diff mbox series

[v3,2/4] usb: ehci-mx5: Add a default for CFG_MXC_USB_PORTSC

Message ID 20240828132529.3098961-2-festevam@gmail.com
State Accepted
Delegated to: Fabio Estevam
Headers show
Series [v3,1/4] imx: Remove CFG_MXC_USB_FLAGS | expand

Commit Message

Fabio Estevam Aug. 28, 2024, 1:25 p.m. UTC
From: Fabio Estevam <festevam@denx.de>

Just like drivers/usb/host/ehci-mx6.c, add a default for
drivers/usb/host/ehci-mx5.c.

The motivation for doing this is to remove CFG_MXC_USB_PORTSC
from board config files.

All the mx5 boards, with the exeption of mx51evk, define
CFG_MXC_USB_PORTSC as:

 #define CFG_MXC_USB_PORTSC	(PORT_PTS_UTMI | PORT_PTS_PTW)

So move this definition as a default into ehci-mx5.c.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
---
Changes since v2:
- None.

 drivers/usb/host/ehci-mx5.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Marek Vasut Aug. 30, 2024, 6:48 p.m. UTC | #1
On 8/28/24 3:25 PM, Fabio Estevam wrote:
> From: Fabio Estevam <festevam@denx.de>
> 
> Just like drivers/usb/host/ehci-mx6.c, add a default for
> drivers/usb/host/ehci-mx5.c.
> 
> The motivation for doing this is to remove CFG_MXC_USB_PORTSC
> from board config files.
> 
> All the mx5 boards, with the exeption of mx51evk, define
> CFG_MXC_USB_PORTSC as:
> 
>   #define CFG_MXC_USB_PORTSC	(PORT_PTS_UTMI | PORT_PTS_PTW)
> 
> So move this definition as a default into ehci-mx5.c.
> 
> Signed-off-by: Fabio Estevam <festevam@denx.de>
> Reviewed-by: Peng Fan <peng.fan@nxp.com>

Reviewed-by: Marek Vasut <marex@denx.de>
diff mbox series

Patch

diff --git a/drivers/usb/host/ehci-mx5.c b/drivers/usb/host/ehci-mx5.c
index 44912de7787..d8f521befe1 100644
--- a/drivers/usb/host/ehci-mx5.c
+++ b/drivers/usb/host/ehci-mx5.c
@@ -79,6 +79,10 @@ 
 /* USB_CTRL_1 */
 #define MXC_USB_CTRL_UH1_EXT_CLK_EN	(1 << 25)
 
+#ifndef CFG_MXC_USB_PORTSC
+#define CFG_MXC_USB_PORTSC	(PORT_PTS_UTMI | PORT_PTS_PTW)
+#endif
+
 int mxc_set_usbcontrol(int port, unsigned int flags)
 {
 	unsigned int v;