summaryrefslogtreecommitdiff
path: root/drivers/firmware
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-06-27 17:15:50 +0300
committerTom Rini <trini@konsulko.com>2022-06-27 17:15:50 +0300
commitc316ee674f25b73285f241ce922307296616a92a (patch)
tree9067e60451612dee5fbd0d3132548d3e84063f53 /drivers/firmware
parent31016a5a853cb5b8e27e9fdf956d8250ae59eca9 (diff)
parent728a86edb63a647e6faf211c0dbc7bd0e4ff7ac6 (diff)
downloadu-boot-c316ee674f25b73285f241ce922307296616a92a.tar.xz
Merge tag 'xilinx-for-v2022.10' of https://source.denx.de/u-boot/custodians/u-boot-microblaze into next
Xilinx changes for v2022.10 cpu: - Add driver for microblaze cpu net: - Add support for DM_ETH_PHY to AXI emac and emaclite xilinx: - Switch platforms to DM_ETH_PHY - DT chagnes in ZynqMP and Zynq - Enable support for SquashFS zynqmp: - Add support for KR260 boards - Move BSS from address 0 - Move platform identification from board code to soc driver - Improve zynqmp_psu_init_minimize versal: - Enable loading app at EL1 serial: - Setup default address and clock rates for DEBUG uarts pinctrl: - Add support for tri state and output enable properties relocate-rela: - Clean relocate-rela implementation for ARM64 - Add support for Microblaze microblaze: - Add support for runtime relocation - Rework cache handling (wiring, Kconfig) based on cpuinfo - Remove interrupt support timer: - Extract axi timer driver from Microblaze to generic location
Diffstat (limited to 'drivers/firmware')
-rw-r--r--drivers/firmware/firmware-zynqmp.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/drivers/firmware/firmware-zynqmp.c b/drivers/firmware/firmware-zynqmp.c
index 0f0d2b07c0..b0cd647aa5 100644
--- a/drivers/firmware/firmware-zynqmp.c
+++ b/drivers/firmware/firmware-zynqmp.c
@@ -26,7 +26,7 @@
struct zynqmp_power {
struct mbox_chan tx_chan;
struct mbox_chan rx_chan;
-} zynqmp_power;
+} zynqmp_power = {};
#define NODE_ID_LOCATION 5
@@ -79,6 +79,20 @@ int zynqmp_pmufw_node(u32 id)
return 0;
}
+static int do_pm_probe(void)
+{
+ struct udevice *dev;
+ int ret;
+
+ ret = uclass_get_device_by_driver(UCLASS_FIRMWARE,
+ DM_DRIVER_GET(zynqmp_power),
+ &dev);
+ if (ret)
+ debug("%s: Probing device failed: %d\n", __func__, ret);
+
+ return ret;
+}
+
static int ipi_req(const u32 *req, size_t req_len, u32 *res, size_t res_maxlen)
{
struct zynqmp_ipi_msg msg;
@@ -92,8 +106,11 @@ static int ipi_req(const u32 *req, size_t req_len, u32 *res, size_t res_maxlen)
res_maxlen > PMUFW_PAYLOAD_ARG_CNT)
return -EINVAL;
- if (!(zynqmp_power.tx_chan.dev) || !(&zynqmp_power.rx_chan.dev))
- return -EINVAL;
+ if (!(zynqmp_power.tx_chan.dev) || !(zynqmp_power.rx_chan.dev)) {
+ ret = do_pm_probe();
+ if (ret)
+ return ret;
+ }
debug("%s, Sending IPI message with ID: 0x%0x\n", __func__, req[0]);
msg.buf = (u32 *)req;