[U-Boot] [PATCH v1] EHCI: Fix endian access issue on EHCI intinalization

Yinbo Zhu yinbo.zhu at nxp.com
Tue Jun 12 08:22:14 UTC 2018


Hi York Sun

please help review, if no issue, would you help me merge it to upstream.

Thanks.
Regards
Yinbo
-----Original Message-----
From: Yinbo Zhu 
Sent: 2018年5月21日 12:05
To: yinbo.zhu at nxp.com; u-boot at lists.denx.de; York Sun <york.sun at nxp.com>
Cc: Xiaobo Xie <xiaobo.xie at nxp.com>; Jerry Huang <jerry.huang at nxp.com>; Ran Wang <ran.wang_1 at nxp.com>
Subject: RE: [PATCH v1] EHCI: Fix endian access issue on EHCI intinalization

+York Sun

-----Original Message-----
From: yinbo.zhu at nxp.com [mailto:yinbo.zhu at nxp.com] 
Sent: 2018年1月22日 15:22
To: u-boot at lists.denx.de
Cc: Xiaobo Xie <xiaobo.xie at nxp.com>; Jerry Huang <jerry.huang at nxp.com>; Ran Wang <ran.wang_1 at nxp.com>; Yinbo Zhu <yinbo.zhu at nxp.com>
Subject: [PATCH v1] EHCI: Fix endian access issue on EHCI intinalization

From: yinbo.zhu <yinbo.zhu at nxp.com>

This issue is exposed after commit 9000eddbase0d
("drivers/usb/ehci: Use platform-specific accessors"), the wrong endian way of EHCI controller programing will cause USB function down.

Configs Affected: P2041-40-R2.0, P3041-R2.0, P4080-40-R3.0, P5040-21-R2.1, T1024-R1.0, T1040-42-20-22-R1.1, T2080-R1.1, T4240-4160-R2.0

Signed-off-by: yinbo.zhu <yinbo.zhu at nxp.com>
---
 include/configs/P2041RDB.h   |    1 +
 include/configs/T102xRDB.h   |    1 +
 include/configs/T208xRDB.h   |    1 +
 include/configs/T4240RDB.h   |    1 +
 include/configs/corenet_ds.h |    1 +
 5 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/include/configs/P2041RDB.h b/include/configs/P2041RDB.h index 5f7ebe7..6b4c962 100644
--- a/include/configs/P2041RDB.h
+++ b/include/configs/P2041RDB.h
@@ -577,6 +577,7 @@ unsigned long get_board_sys_clk(unsigned long dummy);
 
 #if defined(CONFIG_HAS_FSL_DR_USB) || defined(CONFIG_HAS_FSL_MPH_USB)  #define CONFIG_USB_EHCI_FSL
+#define CONFIG_EHCI_DESC_BIG_ENDIAN
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET  #endif
 
diff --git a/include/configs/T102xRDB.h b/include/configs/T102xRDB.h index e1f2196..fad84d1 100644
--- a/include/configs/T102xRDB.h
+++ b/include/configs/T102xRDB.h
@@ -636,6 +636,7 @@ unsigned long get_board_ddr_clk(void);
 
 #ifdef CONFIG_HAS_FSL_DR_USB
 #define CONFIG_USB_EHCI_FSL
+#define CONFIG_EHCI_DESC_BIG_ENDIAN
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET  #endif
 
diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h index eb9fe8d..0e0abca 100644
--- a/include/configs/T208xRDB.h
+++ b/include/configs/T208xRDB.h
@@ -644,6 +644,7 @@ unsigned long get_board_ddr_clk(void);
  */
 #ifdef CONFIG_USB_EHCI_HCD
 #define CONFIG_USB_EHCI_FSL
+#define CONFIG_EHCI_DESC_BIG_ENDIAN
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET  #define CONFIG_HAS_FSL_DR_USB  #endif diff --git a/include/configs/T4240RDB.h b/include/configs/T4240RDB.h index bdb9322..6bdc3a7 100644
--- a/include/configs/T4240RDB.h
+++ b/include/configs/T4240RDB.h
@@ -657,6 +657,7 @@ unsigned long get_board_ddr_clk(void);
 * USB
 */
 #define CONFIG_USB_EHCI_FSL
+#define CONFIG_EHCI_DESC_BIG_ENDIAN
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET  #define CONFIG_HAS_FSL_DR_USB
 
diff --git a/include/configs/corenet_ds.h b/include/configs/corenet_ds.h index 2344bd3..0076df9 100644
--- a/include/configs/corenet_ds.h
+++ b/include/configs/corenet_ds.h
@@ -586,6 +586,7 @@
 
 #if defined(CONFIG_HAS_FSL_DR_USB) || defined(CONFIG_HAS_FSL_MPH_USB)  #define CONFIG_USB_EHCI_FSL
+#define CONFIG_EHCI_DESC_BIG_ENDIAN
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET  #endif
 
--
1.7.1



More information about the U-Boot mailing list