ROM_CTRL Device Interface Functions More...
#include <stdbool.h>#include <stdint.h>#include "sw/device/lib/base/macros.h"#include "sw/device/lib/base/mmio.h"#include "sw/device/lib/dif/dif_base.h"#include "hw/top/dt/rom_ctrl.h"Go to the source code of this file.
Data Structures | |
| struct | dif_rom_ctrl |
| A handle to rom_ctrl. More... | |
Typedefs | |
| typedef struct dif_rom_ctrl | dif_rom_ctrl_t |
| A handle to rom_ctrl. | |
| typedef enum dif_rom_ctrl_alert | dif_rom_ctrl_alert_t |
| A rom_ctrl alert type. | |
Enumerations | |
| enum | dif_rom_ctrl_alert { kDifRomCtrlAlertFatal = 0 } |
| A rom_ctrl alert type. More... | |
Functions | |
| OT_WARN_UNUSED_RESULT dif_result_t | dif_rom_ctrl_init (mmio_region_t base_addr, dif_rom_ctrl_t *rom_ctrl) |
| Creates a new handle for a(n) rom_ctrl peripheral. | |
| OT_WARN_UNUSED_RESULT dif_result_t | dif_rom_ctrl_init_from_dt (dt_rom_ctrl_t dt, dif_rom_ctrl_t *rom_ctrl) |
| Creates a new handle for a(n) rom_ctrl peripheral. | |
| OT_WARN_UNUSED_RESULT dif_result_t | dif_rom_ctrl_get_dt (const dif_rom_ctrl_t *rom_ctrl, dt_rom_ctrl_t *dt) |
| Get the DT handle from this DIF. | |
| OT_WARN_UNUSED_RESULT dif_result_t | dif_rom_ctrl_alert_force (const dif_rom_ctrl_t *rom_ctrl, dif_rom_ctrl_alert_t alert) |
| Forces a particular alert, causing it to be escalated as if the hardware had raised it. | |
ROM_CTRL Device Interface Functions
Definition in file dif_rom_ctrl_autogen.h.
| struct dif_rom_ctrl |
A handle to rom_ctrl.
This type should be treated as opaque by users.
Definition at line 37 of file dif_rom_ctrl_autogen.h.
| Data Fields | ||
|---|---|---|
| mmio_region_t | base_addr | The base address for the rom_ctrl hardware registers. |
| dt_rom_ctrl_t | dt |
The instance, set to kDtRomCtrlCount if not initialized through dif_rom_ctrl_init_from_dt. |
| typedef struct dif_rom_ctrl dif_rom_ctrl_t |
A handle to rom_ctrl.
This type should be treated as opaque by users.
| enum dif_rom_ctrl_alert |
A rom_ctrl alert type.
| Enumerator | |
|---|---|
| kDifRomCtrlAlertFatal | A fatal error. Fatal alerts are non-recoverable and will be asserted until a hard reset. |
Definition at line 98 of file dif_rom_ctrl_autogen.h.
| OT_WARN_UNUSED_RESULT dif_result_t dif_rom_ctrl_alert_force | ( | const dif_rom_ctrl_t * | rom_ctrl, |
| dif_rom_ctrl_alert_t | alert ) |
Forces a particular alert, causing it to be escalated as if the hardware had raised it.
| rom_ctrl | A rom_ctrl handle. |
| alert | The alert to force. |
Definition at line 62 of file dif_rom_ctrl_autogen.c.
| OT_WARN_UNUSED_RESULT dif_result_t dif_rom_ctrl_get_dt | ( | const dif_rom_ctrl_t * | rom_ctrl, |
| dt_rom_ctrl_t * | dt ) |
Get the DT handle from this DIF.
If this DIF was initialized by dif_rom_ctrl_init_from_dt(dt, ..) then this function will return dt. Otherwise it will return an error.
| rom_ctrl | A rom_ctrl handle. | |
| [out] | dt | DT handle. |
kDifBadArg if the DIF has no DT information, kDifOk otherwise. Definition at line 52 of file dif_rom_ctrl_autogen.c.
| OT_WARN_UNUSED_RESULT dif_result_t dif_rom_ctrl_init | ( | mmio_region_t | base_addr, |
| dif_rom_ctrl_t * | rom_ctrl ) |
Creates a new handle for a(n) rom_ctrl peripheral.
This function does not actuate the hardware.
| base_addr | The MMIO base address of the rom_ctrl peripheral. | |
| [out] | rom_ctrl | Out param for the initialized handle. |
DEPRECATED This function exists solely for the transition to dt-based DIFs and will be removed in the future.
Definition at line 25 of file dif_rom_ctrl_autogen.c.
| OT_WARN_UNUSED_RESULT dif_result_t dif_rom_ctrl_init_from_dt | ( | dt_rom_ctrl_t | dt, |
| dif_rom_ctrl_t * | rom_ctrl ) |
Creates a new handle for a(n) rom_ctrl peripheral.
This function does not actuate the hardware.
| dt | The devicetable description of the device. | |
| [out] | rom_ctrl | Out param for the initialized handle. |
Definition at line 39 of file dif_rom_ctrl_autogen.c.