PDK API Guide for J721E
Sciclient RM Private APIs

Introduction

Files

file  sciclient_rm_priv.h
 This file contains macros and structures used internally by sciclient_rm.
 

Data Structures

struct  Sciclient_rmIaUsedMapping
 Describes the IA events used by ROM and if they've been cleared back to hardware reset values. More...
 
struct  Sciclient_rmIaInst
 Interrupt aggregator instance containing data required to manage interrupt route discovery using an IA. More...
 
struct  Sciclient_rmIrUsedMapping
 Describes a range of IR input to output mappings used by ROM and if they've been cleared back to hardware reset values. More...
 
struct  Sciclient_rmIrInst
 Interrupt router instance containing data required to manage interrupt route discovery using an IR. More...
 
struct  Sciclient_rmIrqIf
 IRQ connection interface. More...
 
struct  Sciclient_rmIrqNode
 
struct  irq_node
 IRQ interconnection tree node. More...
 

Functions

int32_t Sciclient_rmProgramInterruptRoute (const struct tisci_msg_rm_irq_set_req *req, const struct tisci_msg_rm_irq_set_resp *resp, uint32_t timeout)
 Finds and programs an available interrupt route via System Firmware based on the input parameters. More...
 
int32_t Sciclient_rmClearInterruptRoute (const struct tisci_msg_rm_irq_release_req *req, const struct tisci_msg_rm_irq_release_resp *resp, uint32_t timeout)
 Mapping resources from AM65xx PG2.0 to AM65xx PG1.0. NOTE: Not all the PG2.0 resources are mapped to PG1.0. Due to this the API is programmed to return failure if a match is not found. More...
 
int32_t Sciclient_rmTranslateIntOutput (uint16_t src_dev_id, uint16_t src_output, uint16_t dst_dev_id, uint16_t *dst_input)
 Translates an interrupt router or aggregator output to the peripheral input or IR input it's connected to. More...
 
int32_t Sciclient_rmTranslateIrqInput (uint16_t dst_dev_id, uint16_t dst_input, uint16_t src_dev_id, uint16_t *src_output)
 Translates a peripheral input to the connected interrupt router or aggregator output. The primary use of the function is to retrieve the interrupt router or aggregator output connected to a processor input IRQ. More...
 

Variables

struct Sciclient_rmIaInst gRmIaInstances [SCICLIENT_RM_IA_NUM_INST]
 
struct Sciclient_rmIrInst gRmIrInstances [SCICLIENT_RM_IR_NUM_INST]
 
const struct Sciclient_rmIrqNode *const gRmIrqTree [SCICLIENT_RM_IRQ_TREE_SIZE]
 
const uint32_t gRmIrqTreeCount
 

Macros

#define SCICLIENT_RM_DEV_NONE   255
 
#define SCICLIENT_RM_IA_GENERIC_EVT_RESETVAL   0xFFFF
 
#define SCICLIENT_RM_IR_MAPPING_FREE   0xFFFF
 

Sciclient map structure

Map structure for R5F,A53,GPU and ICSSG
in different contexts.

const Sciclient_MapStruct_t gSciclientMap [SCICLIENT_CONTEXT_MAX_NUM]
 

Macro Definition Documentation

◆ SCICLIENT_RM_DEV_NONE

#define SCICLIENT_RM_DEV_NONE   255

◆ SCICLIENT_RM_IA_GENERIC_EVT_RESETVAL

#define SCICLIENT_RM_IA_GENERIC_EVT_RESETVAL   0xFFFF

◆ SCICLIENT_RM_IR_MAPPING_FREE

#define SCICLIENT_RM_IR_MAPPING_FREE   0xFFFF

Function Documentation

◆ Sciclient_rmProgramInterruptRoute()

int32_t Sciclient_rmProgramInterruptRoute ( const struct tisci_msg_rm_irq_set_req req,
const struct tisci_msg_rm_irq_set_resp resp,
uint32_t  timeout 
)

Finds and programs an available interrupt route via System Firmware based on the input parameters.

Parameters
reqPointer to interrupt route set payload
respPointer to interrupt route set response payload
timeoutGives a sense of how long to wait for the operation. Refer Sciclient_ServiceOperationTimeout.
Returns
r CSL_EFAIL: If the route is not programmed. CSL_PASS: If the route is programmed.

◆ Sciclient_rmClearInterruptRoute()

int32_t Sciclient_rmClearInterruptRoute ( const struct tisci_msg_rm_irq_release_req req,
const struct tisci_msg_rm_irq_release_resp resp,
uint32_t  timeout 
)

Mapping resources from AM65xx PG2.0 to AM65xx PG1.0. NOTE: Not all the PG2.0 resources are mapped to PG1.0. Due to this the API is programmed to return failure if a match is not found.

Parameters
reqPointer to interrupt route release payload
respPointer to interrupt route release response payload
timeoutGives a sense of how long to wait for the operation. Refer Sciclient_ServiceOperationTimeout.
Returns
r CSL_EFAIL: If the route is not cleared. CSL_PASS: If the route is cleared.

◆ Sciclient_rmTranslateIntOutput()

int32_t Sciclient_rmTranslateIntOutput ( uint16_t  src_dev_id,
uint16_t  src_output,
uint16_t  dst_dev_id,
uint16_t *  dst_input 
)

Translates an interrupt router or aggregator output to the peripheral input or IR input it's connected to.

The primary use of the function is to retrieve the processor input IRQ or IR input an interrupt router or aggregator output is connected to.

Parameters
src_dev_idInterrupt router or aggregator device ID
src_outputInterrupt router or aggregator output index
dst_dev_idDevice ID of entity connected to interrupt router or aggregator output
dst_inputPointer to returned input index of entity connected to interrupt router or aggregator output
Returns
CSL_PASS on successful translation, else failure

◆ Sciclient_rmTranslateIrqInput()

int32_t Sciclient_rmTranslateIrqInput ( uint16_t  dst_dev_id,
uint16_t  dst_input,
uint16_t  src_dev_id,
uint16_t *  src_output 
)

Translates a peripheral input to the connected interrupt router or aggregator output. The primary use of the function is to retrieve the interrupt router or aggregator output connected to a processor input IRQ.

Parameters
dst_dev_idDevice ID of entity connected to interrupt router or aggregator output
dst_inputInput index of entity connected to interrupt router or aggregator output
src_dev_idInterrupt router or aggregator device ID
src_outputPointer to returned Interrupt router or aggregator output index
Returns
CSL_PASS on successful translation, else failure

Variable Documentation

◆ gSciclientMap

◆ gRmIaInstances

struct Sciclient_rmIaInst gRmIaInstances[SCICLIENT_RM_IA_NUM_INST]

◆ gRmIrInstances

struct Sciclient_rmIrInst gRmIrInstances[SCICLIENT_RM_IR_NUM_INST]

◆ gRmIrqTree

const struct Sciclient_rmIrqNode* const gRmIrqTree[SCICLIENT_RM_IRQ_TREE_SIZE]

Extern IRQ interconnection tree defined in SoC-specific irq_tree.c. The IRQ tree can be referenced by including this header.

◆ gRmIrqTreeCount

const uint32_t gRmIrqTreeCount

Extern IRQ interconnection tree array size defined in SoC-specific irq_tree.c. The IRQ tree size can be referenced by including this header.