aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAshok Reddy Soma2021-08-02 23:20:43 -0600
committerMichal Simek2021-08-26 08:07:46 +0200
commitd04498255559dfc002ad71816dfb37437d29f635 (patch)
tree4db77a7e0b0649c6e4575e0ebb601fc69a8bd0f7 /include
parent42e01bf20ab4f812a1048c8fb354e75f9e50c2f5 (diff)
mmc: zynq_sdhci: Add xilinx_pm_request() method to set tapdelays
Currently xilinx sdhci driver is using zynqmp_mmio_write() to set tapdelay values and DLL resets. Continue to use this for SPL and mini U-Boot where U-Boot will be executed at EL3 level. Use firmware call xilinx_pm_request() using appropriate arguments to set input/output tapdelays and also for DLL resets in regular flow(EL2). Host driver should explicitly request DLL reset before ITAP (assert DLL) and after OTAP (release DLL) to avoid issues in some cases. Also handle error return where possible. Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com> Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Diffstat (limited to 'include')
-rw-r--r--include/zynqmp_tap_delay.h25
1 files changed, 19 insertions, 6 deletions
diff --git a/include/zynqmp_tap_delay.h b/include/zynqmp_tap_delay.h
index 1c1e3e7deed..7ef172f0fa6 100644
--- a/include/zynqmp_tap_delay.h
+++ b/include/zynqmp_tap_delay.h
@@ -8,14 +8,27 @@
#ifndef __ZYNQMP_TAP_DELAY_H__
#define __ZYNQMP_TAP_DELAY_H__
+#include <zynqmp_firmware.h>
+
#ifdef CONFIG_ARCH_ZYNQMP
-void zynqmp_dll_reset(u8 deviceid);
-void arasan_zynqmp_set_in_tapdelay(u8 device_id, u32 itap_delay);
-void arasan_zynqmp_set_out_tapdelay(u8 device_id, u32 otap_delay);
+int zynqmp_dll_reset(u8 node_id, u32 type);
+int arasan_zynqmp_set_in_tapdelay(u8 device_id, u32 itap_delay);
+int arasan_zynqmp_set_out_tapdelay(u8 device_id, u32 otap_delay);
#else
-inline void zynqmp_dll_reset(u8 deviceid) {}
-inline void arasan_zynqmp_set_in_tapdelay(u8 device_id, u32 itap_delay) {}
-inline void arasan_zynqmp_set_out_tapdelay(u8 device_id, u32 otap_delay) {}
+inline int zynqmp_dll_reset(u8 deviceid, u32 type)
+{
+ return 0;
+}
+
+inline int arasan_zynqmp_set_in_tapdelay(u8 device_id, u32 itap_delay)
+{
+ return 0;
+}
+
+inline int arasan_zynqmp_set_out_tapdelay(u8 device_id, u32 otap_delay)
+{
+ return 0;
+}
#endif
#endif