Device Tables (DT) for IP soc_proxy and top darjeeling. More...
Go to the source code of this file.
Typedefs | |
typedef enum dt_soc_proxy | dt_soc_proxy_t |
List of instances. | |
typedef enum dt_soc_proxy_reg_block | dt_soc_proxy_reg_block_t |
List of register blocks. | |
typedef enum dt_soc_proxy_irq | dt_soc_proxy_irq_t |
List of IRQs. | |
typedef enum dt_soc_proxy_alert | dt_soc_proxy_alert_t |
List of Alerts. | |
typedef enum dt_soc_proxy_clock | dt_soc_proxy_clock_t |
List of clock ports. | |
typedef enum dt_soc_proxy_reset_req | dt_soc_proxy_reset_req_t |
List of reset requests. | |
typedef enum dt_soc_proxy_reset | dt_soc_proxy_reset_t |
List of reset ports. | |
typedef enum dt_soc_proxy_periph_io | dt_soc_proxy_periph_io_t |
List of peripheral I/O. | |
typedef enum dt_soc_proxy_wakeup | dt_soc_proxy_wakeup_t |
List of wakeups. | |
Enumerations | |
enum | dt_soc_proxy { kDtSocProxy = 0 , kDtSocProxyFirst = 0 , kDtSocProxyCount = 1 } |
List of instances. More... | |
enum | dt_soc_proxy_reg_block { kDtSocProxyRegBlockCore = 0 , kDtSocProxyRegBlockCtn = 1 , kDtSocProxyRegBlockCount = 2 } |
List of register blocks. More... | |
enum | dt_soc_proxy_irq { kDtSocProxyIrqExternal0 = 0 , kDtSocProxyIrqExternal1 = 1 , kDtSocProxyIrqExternal2 = 2 , kDtSocProxyIrqExternal3 = 3 , kDtSocProxyIrqExternal4 = 4 , kDtSocProxyIrqExternal5 = 5 , kDtSocProxyIrqExternal6 = 6 , kDtSocProxyIrqExternal7 = 7 , kDtSocProxyIrqExternal8 = 8 , kDtSocProxyIrqExternal9 = 9 , kDtSocProxyIrqExternal10 = 10 , kDtSocProxyIrqExternal11 = 11 , kDtSocProxyIrqExternal12 = 12 , kDtSocProxyIrqExternal13 = 13 , kDtSocProxyIrqExternal14 = 14 , kDtSocProxyIrqExternal15 = 15 , kDtSocProxyIrqExternal16 = 16 , kDtSocProxyIrqExternal17 = 17 , kDtSocProxyIrqExternal18 = 18 , kDtSocProxyIrqExternal19 = 19 , kDtSocProxyIrqExternal20 = 20 , kDtSocProxyIrqExternal21 = 21 , kDtSocProxyIrqExternal22 = 22 , kDtSocProxyIrqExternal23 = 23 , kDtSocProxyIrqExternal24 = 24 , kDtSocProxyIrqExternal25 = 25 , kDtSocProxyIrqExternal26 = 26 , kDtSocProxyIrqExternal27 = 27 , kDtSocProxyIrqExternal28 = 28 , kDtSocProxyIrqExternal29 = 29 , kDtSocProxyIrqExternal30 = 30 , kDtSocProxyIrqExternal31 = 31 , kDtSocProxyIrqCount = 32 } |
List of IRQs. More... | |
enum | dt_soc_proxy_alert { kDtSocProxyAlertFatalAlertIntg = 0 , kDtSocProxyAlertFatalAlertExternal0 = 1 , kDtSocProxyAlertFatalAlertExternal1 = 2 , kDtSocProxyAlertFatalAlertExternal2 = 3 , kDtSocProxyAlertFatalAlertExternal3 = 4 , kDtSocProxyAlertFatalAlertExternal4 = 5 , kDtSocProxyAlertFatalAlertExternal5 = 6 , kDtSocProxyAlertFatalAlertExternal6 = 7 , kDtSocProxyAlertFatalAlertExternal7 = 8 , kDtSocProxyAlertFatalAlertExternal8 = 9 , kDtSocProxyAlertFatalAlertExternal9 = 10 , kDtSocProxyAlertFatalAlertExternal10 = 11 , kDtSocProxyAlertFatalAlertExternal11 = 12 , kDtSocProxyAlertFatalAlertExternal12 = 13 , kDtSocProxyAlertFatalAlertExternal13 = 14 , kDtSocProxyAlertFatalAlertExternal14 = 15 , kDtSocProxyAlertFatalAlertExternal15 = 16 , kDtSocProxyAlertFatalAlertExternal16 = 17 , kDtSocProxyAlertFatalAlertExternal17 = 18 , kDtSocProxyAlertFatalAlertExternal18 = 19 , kDtSocProxyAlertFatalAlertExternal19 = 20 , kDtSocProxyAlertFatalAlertExternal20 = 21 , kDtSocProxyAlertFatalAlertExternal21 = 22 , kDtSocProxyAlertFatalAlertExternal22 = 23 , kDtSocProxyAlertFatalAlertExternal23 = 24 , kDtSocProxyAlertRecovAlertExternal0 = 25 , kDtSocProxyAlertRecovAlertExternal1 = 26 , kDtSocProxyAlertRecovAlertExternal2 = 27 , kDtSocProxyAlertRecovAlertExternal3 = 28 , kDtSocProxyAlertCount = 29 } |
List of Alerts. More... | |
enum | dt_soc_proxy_clock { kDtSocProxyClockClk = 0 , kDtSocProxyClockAon = 1 , kDtSocProxyClockCount = 2 } |
List of clock ports. More... | |
enum | dt_soc_proxy_reset_req { kDtSocProxyResetReqExternal = 0 , kDtSocProxyResetReqCount = 1 } |
List of reset requests. More... | |
enum | dt_soc_proxy_reset { kDtSocProxyResetRst = 0 , kDtSocProxyResetPor = 1 , kDtSocProxyResetCount = 2 } |
List of reset ports. More... | |
enum | dt_soc_proxy_periph_io { kDtSocProxyPeriphIoSocGpi0 = 0 , kDtSocProxyPeriphIoSocGpi1 = 1 , kDtSocProxyPeriphIoSocGpi2 = 2 , kDtSocProxyPeriphIoSocGpi3 = 3 , kDtSocProxyPeriphIoSocGpi4 = 4 , kDtSocProxyPeriphIoSocGpi5 = 5 , kDtSocProxyPeriphIoSocGpi6 = 6 , kDtSocProxyPeriphIoSocGpi7 = 7 , kDtSocProxyPeriphIoSocGpi8 = 8 , kDtSocProxyPeriphIoSocGpi9 = 9 , kDtSocProxyPeriphIoSocGpi10 = 10 , kDtSocProxyPeriphIoSocGpi11 = 11 , kDtSocProxyPeriphIoSocGpi12 = 12 , kDtSocProxyPeriphIoSocGpi13 = 13 , kDtSocProxyPeriphIoSocGpi14 = 14 , kDtSocProxyPeriphIoSocGpi15 = 15 , kDtSocProxyPeriphIoSocGpo0 = 16 , kDtSocProxyPeriphIoSocGpo1 = 17 , kDtSocProxyPeriphIoSocGpo2 = 18 , kDtSocProxyPeriphIoSocGpo3 = 19 , kDtSocProxyPeriphIoSocGpo4 = 20 , kDtSocProxyPeriphIoSocGpo5 = 21 , kDtSocProxyPeriphIoSocGpo6 = 22 , kDtSocProxyPeriphIoSocGpo7 = 23 , kDtSocProxyPeriphIoSocGpo8 = 24 , kDtSocProxyPeriphIoSocGpo9 = 25 , kDtSocProxyPeriphIoSocGpo10 = 26 , kDtSocProxyPeriphIoSocGpo11 = 27 , kDtSocProxyPeriphIoSocGpo12 = 28 , kDtSocProxyPeriphIoSocGpo13 = 29 , kDtSocProxyPeriphIoSocGpo14 = 30 , kDtSocProxyPeriphIoSocGpo15 = 31 , kDtSocProxyPeriphIoCount = 32 } |
List of peripheral I/O. More... | |
enum | dt_soc_proxy_wakeup { kDtSocProxyWakeupWkupInternalReq = 0 , kDtSocProxyWakeupWkupExternalReq = 1 , kDtSocProxyWakeupCount = 2 } |
List of wakeups. More... | |
Functions | |
dt_soc_proxy_t | dt_soc_proxy_from_instance_id (dt_instance_id_t inst_id) |
Get the soc_proxy instance from an instance ID. | |
dt_instance_id_t | dt_soc_proxy_instance_id (dt_soc_proxy_t dt) |
Get the instance ID of an instance. | |
uint32_t | dt_soc_proxy_reg_block (dt_soc_proxy_t dt, dt_soc_proxy_reg_block_t reg_block) |
Get the register base address of an instance. | |
dt_plic_irq_id_t | dt_soc_proxy_irq_to_plic_id (dt_soc_proxy_t dt, dt_soc_proxy_irq_t irq) |
Get the PLIC ID of a soc_proxy IRQ for a given instance. | |
dt_soc_proxy_irq_t | dt_soc_proxy_irq_from_plic_id (dt_soc_proxy_t dt, dt_plic_irq_id_t irq) |
Convert a global IRQ ID to a local soc_proxy IRQ type. | |
dt_alert_id_t | dt_soc_proxy_alert_to_alert_id (dt_soc_proxy_t dt, dt_soc_proxy_alert_t alert) |
Get the alert ID of a soc_proxy alert for a given instance. | |
dt_soc_proxy_alert_t | dt_soc_proxy_alert_from_alert_id (dt_soc_proxy_t dt, dt_alert_id_t alert) |
Convert a global alert ID to a local soc_proxy alert type. | |
dt_periph_io_t | dt_soc_proxy_periph_io (dt_soc_proxy_t dt, dt_soc_proxy_periph_io_t sig) |
Get the peripheral I/O description of an instance. | |
dt_clock_t | dt_soc_proxy_clock (dt_soc_proxy_t dt, dt_soc_proxy_clock_t clk) |
Get the clock signal connected to a clock port of an instance. | |
dt_reset_t | dt_soc_proxy_reset (dt_soc_proxy_t dt, dt_soc_proxy_reset_t rst) |
Get the reset signal connected to a reset port of an instance. | |
Device Tables (DT) for IP soc_proxy and top darjeeling.
This file contains the type definitions and global functions of the soc_proxy.
Definition in file dt_soc_proxy.h.
typedef enum dt_soc_proxy_alert dt_soc_proxy_alert_t |
List of Alerts.
Alerts are guaranteed to be numbered consecutively from 0.
typedef enum dt_soc_proxy_clock dt_soc_proxy_clock_t |
List of clock ports.
Clock ports are guaranteed to be numbered consecutively from 0.
typedef enum dt_soc_proxy_irq dt_soc_proxy_irq_t |
List of IRQs.
IRQs are guaranteed to be numbered consecutively from 0.
typedef enum dt_soc_proxy_periph_io dt_soc_proxy_periph_io_t |
List of peripheral I/O.
Peripheral I/O are guaranteed to be numbered consecutively from 0.
typedef enum dt_soc_proxy_reg_block dt_soc_proxy_reg_block_t |
List of register blocks.
Register blocks are guaranteed to start at 0 and to be consecutively numbered.
typedef enum dt_soc_proxy_reset_req dt_soc_proxy_reset_req_t |
List of reset requests.
Reset requests are guaranteed to be numbered consecutively from 0.
typedef enum dt_soc_proxy_reset dt_soc_proxy_reset_t |
List of reset ports.
Reset ports are guaranteed to be numbered consecutively from 0.
typedef enum dt_soc_proxy_wakeup dt_soc_proxy_wakeup_t |
List of wakeups.
Wakeups are guaranteed to be numbered consecutively from 0.
enum dt_soc_proxy |
enum dt_soc_proxy_alert |
List of Alerts.
Alerts are guaranteed to be numbered consecutively from 0.
Definition at line 89 of file dt_soc_proxy.h.
enum dt_soc_proxy_clock |
List of clock ports.
Clock ports are guaranteed to be numbered consecutively from 0.
Enumerator | |
---|---|
kDtSocProxyClockClk | Clock port clk_i. |
kDtSocProxyClockAon | Clock port clk_aon_i. |
Definition at line 127 of file dt_soc_proxy.h.
enum dt_soc_proxy_irq |
List of IRQs.
IRQs are guaranteed to be numbered consecutively from 0.
Definition at line 48 of file dt_soc_proxy.h.
List of peripheral I/O.
Peripheral I/O are guaranteed to be numbered consecutively from 0.
Definition at line 159 of file dt_soc_proxy.h.
List of register blocks.
Register blocks are guaranteed to start at 0 and to be consecutively numbered.
Definition at line 34 of file dt_soc_proxy.h.
enum dt_soc_proxy_reset |
List of reset ports.
Reset ports are guaranteed to be numbered consecutively from 0.
Enumerator | |
---|---|
kDtSocProxyResetRst | Reset port rst_ni. |
kDtSocProxyResetPor | Reset port rst_por_ni. |
Definition at line 148 of file dt_soc_proxy.h.
List of reset requests.
Reset requests are guaranteed to be numbered consecutively from 0.
Enumerator | |
---|---|
kDtSocProxyResetReqExternal | External reset request. |
Definition at line 138 of file dt_soc_proxy.h.
enum dt_soc_proxy_wakeup |
List of wakeups.
Wakeups are guaranteed to be numbered consecutively from 0.
Enumerator | |
---|---|
kDtSocProxyWakeupWkupInternalReq | Internal wakeup request, should be asserted whenever an external alert or IRQ is seen. |
kDtSocProxyWakeupWkupExternalReq | External wakeup request. |
Definition at line 200 of file dt_soc_proxy.h.
dt_soc_proxy_alert_t dt_soc_proxy_alert_from_alert_id | ( | dt_soc_proxy_t | dt, |
dt_alert_id_t | alert ) |
Convert a global alert ID to a local soc_proxy alert type.
dt | Instance of soc_proxy. |
alert | A global alert ID that belongs to this instance. |
kDtSocProxyAlertCount
.Note: This function assumes that the global alert ID belongs to the instance of soc_proxy passed in parameter. In other words, it must be the case that dt_soc_proxy_instance_id(dt) == dt_alert_id_to_instance_id(alert)
. Otherwise, this function will return kDtSocProxyAlertCount
.
Definition at line 377 of file dt_soc_proxy.c.
dt_alert_id_t dt_soc_proxy_alert_to_alert_id | ( | dt_soc_proxy_t | dt, |
dt_soc_proxy_alert_t | alert ) |
Get the alert ID of a soc_proxy alert for a given instance.
Note: This function only makes sense if the instance is connected to the Alert Handler. For any instances where the instance is not connected, the return value is unspecified.
dt | Instance of soc_proxy. |
alert | A soc_proxy alert. |
Definition at line 371 of file dt_soc_proxy.c.
Get the clock signal connected to a clock port of an instance.
dt | Instance of soc_proxy. |
clk | Clock port. |
Definition at line 395 of file dt_soc_proxy.c.
dt_soc_proxy_t dt_soc_proxy_from_instance_id | ( | dt_instance_id_t | inst_id | ) |
Get the soc_proxy instance from an instance ID.
For example, dt_uart_from_instance_id(kDtInstanceIdUart3) == kDtUart3
.
inst_id | Instance ID. |
Note: This function only makes sense if the instance ID has device type soc_proxy, otherwise the returned value is unspecified.
Definition at line 327 of file dt_soc_proxy.c.
dt_instance_id_t dt_soc_proxy_instance_id | ( | dt_soc_proxy_t | dt | ) |
Get the instance ID of an instance.
dt | Instance of soc_proxy. |
Definition at line 334 of file dt_soc_proxy.c.
dt_soc_proxy_irq_t dt_soc_proxy_irq_from_plic_id | ( | dt_soc_proxy_t | dt, |
dt_plic_irq_id_t | irq ) |
Convert a global IRQ ID to a local soc_proxy IRQ type.
dt | Instance of soc_proxy. |
irq | A PLIC ID that belongs to this instance. |
kDtSocProxyIrqCount
.Note: This function assumes that the PLIC ID belongs to the instance of soc_proxy passed in parameter. In other words, it must be the case that dt_soc_proxy_instance_id(dt) == dt_plic_id_to_instance_id(irq)
. Otherwise, this function will return kDtSocProxyIrqCount
.
Definition at line 356 of file dt_soc_proxy.c.
dt_plic_irq_id_t dt_soc_proxy_irq_to_plic_id | ( | dt_soc_proxy_t | dt, |
dt_soc_proxy_irq_t | irq ) |
Get the PLIC ID of a soc_proxy IRQ for a given instance.
If the instance is not connected to the PLIC, this function will return kDtPlicIrqIdNone
.
dt | Instance of soc_proxy. |
irq | A soc_proxy IRQ. |
Definition at line 346 of file dt_soc_proxy.c.
Get the peripheral I/O description of an instance.
dt | Instance of soc_proxy. |
sig | Requested peripheral I/O. |
Definition at line 388 of file dt_soc_proxy.c.
uint32_t dt_soc_proxy_reg_block | ( | dt_soc_proxy_t | dt, |
dt_soc_proxy_reg_block_t | reg_block ) |
Get the register base address of an instance.
dt | Instance of soc_proxy. |
reg_block | The register block requested. |
Definition at line 339 of file dt_soc_proxy.c.
Get the reset signal connected to a reset port of an instance.
dt | Instance of soc_proxy. |
rst | Reset port. |
Definition at line 402 of file dt_soc_proxy.c.