SPL is running before ATF in EL3 that's why SMCs can't be called because
there is nothing to call. zynqmp_mmio*() are doing direct read/write
accesses and this patch does the same.
PMUFW is up and running at this time and there is a way to talk to pmufw
via IPI but there is no reason to implement IPI stuff in SPL if we need
just simple read for getting clock driver to work.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
#define ZYNQMP_MMIO_READ 0xC2000014
#define ZYNQMP_MMIO_WRITE 0xC2000013
+#ifndef CONFIG_SPL_BUILD
static int invoke_smc(u32 pm_api_id, u32 arg0, u32 arg1, u32 arg2, u32 arg3,
u32 *ret_payload)
{
return ret;
}
+#else
+int zynqmp_mmio_write(const u32 address,
+ const u32 mask,
+ const u32 value)
+{
+ panic_str("MMIO write not implemented\n");
+ return 0;
+}
+
+int zynqmp_mmio_read(const u32 address, u32 *value)
+{
+ *value = readl((ulong)address);
+ return 0;
+}
+#endif