9 #include "qm_soc_regs.h"
17 typedef void (*qm_fpr_callback_t)(
void *data);
76 #define QM_FPR_FPR0_REG_OFFSET (7)
78 #define QM_FPR_WRITE_LOCK_OFFSET (31)
79 #define QM_FPR_ENABLE_OFFSET (30)
80 #define QM_FPR_ENABLE_MASK BIT(QM_FPR_ENABLE_OFFSET)
81 #define QM_FPR_RD_ALLOW_OFFSET (20)
82 #define QM_FPR_RD_ALLOW_MASK (0xF00000)
83 #define QM_FPR_UPPER_BOUND_OFFSET (10)
84 #define QM_FPR_UPPER_BOUND_MASK (0x3FC00)
85 #define QM_FPR_LOW_BOUND_MASK (0xFF)
86 #define QM_FPR_MPR_VSTS_VALID BIT(31)
88 #define QM_FPR_LOCK BIT(31)
90 #define QM_FPR_EN_MASK_ENABLE BIT(0)
91 #define QM_FPR_EN_MASK_LOCK BIT(1)
92 #define QM_FPR_AGENT_MASK_HOST BIT(0)
93 #define QM_FPR_AGENT_MASK_SS BIT(1)
94 #define QM_FPR_AGENT_MASK_DMA BIT(2)
95 #define QM_FPR_AGENT_MASK_OTHER BIT(3)
127 qm_fpr_callback_t fpr_cb,
void *data);
Allow DMA to access flash region.
int qm_fpr_set_violation_policy(const qm_fpr_viol_mode_t mode, const qm_flash_t flash, qm_fpr_callback_t fpr_cb, void *data)
Configure FPR violation behaviour.
uint8_t low_bound
1KB-aligned lower Flash phys addr.
Flash Protection Region configuration structure.
Allow other agents to access flash region.
int qm_fpr_restore_context(const qm_flash_t flash, const qm_fpr_context_t *const ctx)
Restore FPR context.
qm_fpr_read_allow_t allow_agents
Per-agent read enable bitmask.
Allow host processor to access flash region.
Enter probe mode on violation.
qm_flash_t
Number of Flash controllers.
uint8_t up_bound
1KB-aligned upper Flash phys addr.
qm_fpr_en_t
FPR enable type.
int qm_fpr_set_config(const qm_flash_t flash, const qm_fpr_id_t id, const qm_fpr_config_t *const cfg, const qm_flash_region_type_t region)
Configure a Flash controller's Flash Protection Region.
qm_fpr_en_t en_mask
Enable/lock bitmask.
Generate interrupt on violation.
int qm_fpr_save_context(const qm_flash_t flash, qm_fpr_context_t *const ctx)
Save FPR context.
qm_fpr_read_allow_t
FPR read allow type.
qm_fpr_id_t
FPR register map.
qm_fpr_viol_mode_t
FPR violation mode type.
Allow sensor subsystem to access flash region.
qm_flash_region_type_t
FPR region type.