mirror of
https://xff.cz/git/u-boot/
synced 2025-09-02 17:22:22 +02:00
firmware: ti_sci: Add support for firewall management
TI-SCI message protocol provides support for controlling the firewall configurations available in SoC. Introduce support for the set of TI-SCI message protocol APIs that provide us with this capability of controlling firewalls. Signed-off-by: Andrew F. Davis <afd@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Andreas Dannenberg <dannenberg@ti.com>
This commit is contained in:
committed by
Tom Rini
parent
407a219261
commit
32ca8ffd5b
@@ -510,6 +510,68 @@ struct ti_sci_rm_udmap_ops {
|
||||
const struct ti_sci_msg_rm_udmap_flow_cfg *params);
|
||||
};
|
||||
|
||||
/**
|
||||
* struct ti_sci_msg_fwl_region_cfg - Request and Response for firewalls settings
|
||||
*
|
||||
* @fwl_id: Firewall ID in question
|
||||
* @region: Region or channel number to set config info
|
||||
* This field is unused in case of a simple firewall and must be initialized
|
||||
* to zero. In case of a region based firewall, this field indicates the
|
||||
* region in question. (index starting from 0) In case of a channel based
|
||||
* firewall, this field indicates the channel in question (index starting
|
||||
* from 0)
|
||||
* @n_permission_regs: Number of permission registers to set
|
||||
* @control: Contents of the firewall CONTROL register to set
|
||||
* @permissions: Contents of the firewall PERMISSION register to set
|
||||
* @start_address: Contents of the firewall START_ADDRESS register to set
|
||||
* @end_address: Contents of the firewall END_ADDRESS register to set
|
||||
*/
|
||||
struct ti_sci_msg_fwl_region {
|
||||
u16 fwl_id;
|
||||
u16 region;
|
||||
u32 n_permission_regs;
|
||||
u32 control;
|
||||
u32 permissions[3];
|
||||
u64 start_address;
|
||||
u64 end_address;
|
||||
} __packed;
|
||||
|
||||
/**
|
||||
* \brief Request and Response for firewall owner change
|
||||
*
|
||||
* @fwl_id: Firewall ID in question
|
||||
* @region: Region or channel number to set config info
|
||||
* This field is unused in case of a simple firewall and must be initialized
|
||||
* to zero. In case of a region based firewall, this field indicates the
|
||||
* region in question. (index starting from 0) In case of a channel based
|
||||
* firewall, this field indicates the channel in question (index starting
|
||||
* from 0)
|
||||
* @n_permission_regs: Number of permission registers <= 3
|
||||
* @control: Control register value for this region
|
||||
* @owner_index: New owner index to change to. Owner indexes are setup in DMSC firmware boot configuration data
|
||||
* @owner_privid: New owner priv-id, used to lookup owner_index is not known, must be set to zero otherwise
|
||||
* @owner_permission_bits: New owner permission bits
|
||||
*/
|
||||
struct ti_sci_msg_fwl_owner {
|
||||
u16 fwl_id;
|
||||
u16 region;
|
||||
u8 owner_index;
|
||||
u8 owner_privid;
|
||||
u16 owner_permission_bits;
|
||||
} __packed;
|
||||
|
||||
/**
|
||||
* struct ti_sci_fwl_ops - Firewall specific operations
|
||||
* @set_fwl_region: Request for configuring the firewall permissions.
|
||||
* @get_fwl_region: Request for retrieving the firewall permissions.
|
||||
* @change_fwl_owner: Request for a change of firewall owner.
|
||||
*/
|
||||
struct ti_sci_fwl_ops {
|
||||
int (*set_fwl_region)(const struct ti_sci_handle *handle, const struct ti_sci_msg_fwl_region *region);
|
||||
int (*get_fwl_region)(const struct ti_sci_handle *handle, struct ti_sci_msg_fwl_region *region);
|
||||
int (*change_fwl_owner)(const struct ti_sci_handle *handle, struct ti_sci_msg_fwl_owner *owner);
|
||||
};
|
||||
|
||||
/**
|
||||
* struct ti_sci_ops - Function support for TI SCI
|
||||
* @board_ops: Miscellaneous operations
|
||||
@@ -518,6 +580,7 @@ struct ti_sci_rm_udmap_ops {
|
||||
* @core_ops: Core specific operations
|
||||
* @proc_ops: Processor specific operations
|
||||
* @ring_ops: Ring Accelerator Management operations
|
||||
* @fw_ops: Firewall specific operations
|
||||
*/
|
||||
struct ti_sci_ops {
|
||||
struct ti_sci_board_ops board_ops;
|
||||
@@ -529,6 +592,7 @@ struct ti_sci_ops {
|
||||
struct ti_sci_rm_ringacc_ops rm_ring_ops;
|
||||
struct ti_sci_rm_psil_ops rm_psil_ops;
|
||||
struct ti_sci_rm_udmap_ops rm_udmap_ops;
|
||||
struct ti_sci_fwl_ops fwl_ops;
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user