mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00:00
firmware: smci: sandbox test for SCMI reset controllers
Add tests for SCMI reset controllers. A test device driver sandbox-scmi_devices.c is used to get reset resources, allowing further resets manipulation. Change sandbox-smci_agent to emulate 1 reset controller exposed through an agent. Add DM test scmi_resets to test this reset controller. Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Cc: Simon Glass <sjg@chromium.org> Cc: Peng Fan <peng.fan@nxp.com> Cc: Sudeep Holla <sudeep.holla@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
34d76fefb2
commit
c0dd177a99
6 changed files with 211 additions and 6 deletions
|
@ -22,16 +22,29 @@ struct sandbox_scmi_clk {
|
|||
ulong rate;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct sandbox_scmi_reset - Simulated reset controller exposed by SCMI
|
||||
* @asserted: Reset control state: true if asserted, false if desasserted
|
||||
*/
|
||||
struct sandbox_scmi_reset {
|
||||
uint id;
|
||||
bool asserted;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct sandbox_scmi_agent - Simulated SCMI service seen by SCMI agent
|
||||
* @idx: Identifier for the SCMI agent, its index
|
||||
* @clk: Simulated clocks
|
||||
* @clk_count: Simulated clocks array size
|
||||
* @clk: Simulated reset domains
|
||||
* @clk_count: Simulated reset domains array size
|
||||
*/
|
||||
struct sandbox_scmi_agent {
|
||||
uint idx;
|
||||
struct sandbox_scmi_clk *clk;
|
||||
size_t clk_count;
|
||||
struct sandbox_scmi_reset *reset;
|
||||
size_t reset_count;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -48,10 +61,14 @@ struct sandbox_scmi_service {
|
|||
* struct sandbox_scmi_devices - Reference to devices probed through SCMI
|
||||
* @clk: Array the clock devices
|
||||
* @clk_count: Number of clock devices probed
|
||||
* @reset: Array the reset controller devices
|
||||
* @reset_count: Number of reset controller devices probed
|
||||
*/
|
||||
struct sandbox_scmi_devices {
|
||||
struct clk *clk;
|
||||
size_t clk_count;
|
||||
struct reset_ctl *reset;
|
||||
size_t reset_count;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_SCMI_FIRMWARE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue