ARM: imx: Remove mxc specific ulpi access ops
Subsystems (3)
PATCH 1/1 ARM: imx: Remove mxc specific ulpi access ops
There are ulpi access ops implemented in drivers/usb/phy/phy-ulpi.c. mxc access ops implement the same access operations within mach-imx. This patch removes the mxc ulpi file and uses phy-ulpi instead for imx_otg_ulpi_create.
phy-ulpi successfully tested with i.MX27 Phytec phyCARD-S (pca100).
--- arch/arm/mach-imx/Kconfig | 1 + arch/arm/mach-imx/Makefile | 1 - arch/arm/mach-imx/mach-pca100.c | 4 +- arch/arm/mach-imx/ulpi.c | 118 ---------------------------------------- arch/arm/mach-imx/ulpi.h | 9 ++- 5 files changed, 9 insertions(+), 124 deletions(-) delete mode 100644 arch/arm/mach-imx/ulpi.c
arch/arm/mach-imx/Kconfig +1 -0
@@ -58,6 +58,7 @@ config MXC_USE_EPIT config MXC_ULPI bool + select USB_ULPI_VIEWPORT config ARCH_HAS_RNGA bool
arch/arm/mach-imx/Makefile +0 -1
@@ -23,7 +23,6 @@ obj-$(CONFIG_ARCH_MXC_IOMUX_V3) += iomux-v3.o obj-$(CONFIG_MXC_TZIC) += tzic.o obj-$(CONFIG_MXC_AVIC) += avic.o -obj-$(CONFIG_MXC_ULPI) += ulpi.o obj-$(CONFIG_MXC_USE_EPIT) += epit.o obj-$(CONFIG_MXC_DEBUG_BOARD) += 3ds_debugboard.o
arch/arm/mach-imx/mach-pca100.c +2 -2
@@ -398,8 +398,8 @@ static void __init pca100_init(void)imx27_add_fsl_usb2_udc (&otg_device_pdata); } - usbh2_pdata.otg =otg_ulpi_create (&mxc_ulpi_access_ops, -ULPI_OTG_DRVVBUS |ULPI_OTG_DRVVBUS_EXT ); + usbh2_pdata.otg =imx_otg_ulpi_create ( +ULPI_OTG_DRVVBUS |ULPI_OTG_DRVVBUS_EXT );if (usbh2_pdata.otg)imx27_add_mxc_ehci_hs (2 , &usbh2_pdata);
arch/arm/mach-imx/ulpi.c deleted +0 -118
118 lines not on this page · raw message
arch/arm/mach-imx/ulpi.h +6 -3
@@ -1,8 +1,13 @@ #ifndef __MACH_ULPI_H #define __MACH_ULPI_H +#include <linux/usb/ulpi.h> + #ifdef CONFIG_USB_ULPI -struct usb_phy *imx_otg_ulpi_create(unsigned int flags); +static inline struct usb_phy *imx_otg_ulpi_create(unsigned int flags) +{ + return otg_ulpi_create(&ulpi_viewport_access_ops, flags); +} #else static inline struct usb_phy *imx_otg_ulpi_create(unsigned int flags) {
@@ -10,7 +15,5 @@ static inline struct usb_phy *imx_otg_ulpi_create(unsigned int flags) }#endif -extern struct usb_phy_io_ops mxc_ulpi_access_ops; -#endif /* __MACH_ULPI_H */
Signature · 1 line
1.8.2.1
PATCH 1/1 ARM: imx: Remove mxc specific ulpi access ops
Quoted 47 lines · Markus Pargmann
There are ulpi access ops implemented in
drivers/usb/phy/phy-ulpi.c. mxc access ops implement the same access operations within mach-imx. This patch removes the mxc ulpi file and uses phy-ulpi instead forimx_otg_ulpi_create.phy-ulpi successfully tested with i.MX27 Phytec phyCARD-S (pca100).
Signed-off-by Markus Pargmann <[email protected]>Acked-by Sascha Hauer <[email protected]>--- arch/arm/mach-imx/Kconfig | 1 + arch/arm/mach-imx/Makefile | 1 - arch/arm/mach-imx/mach-pca100.c | 4 +- arch/arm/mach-imx/ulpi.c | 118 ---------------------------------------- arch/arm/mach-imx/ulpi.h | 9 ++- 5 files changed, 9 insertions(+), 124 deletions(-) delete mode 100644 arch/arm/mach-imx/ulpi.carch/arm/mach-imx/Kconfig +1
-0@@ -58,6 +58,7 @@ config MXC_USE_EPIT config MXC_ULPI bool + select USB_ULPI_VIEWPORT config ARCH_HAS_RNGA boolarch/arm/mach-imx/Makefile +0
-1@@ -23,7 +23,6 @@ obj-$(CONFIG_ARCH_MXC_IOMUX_V3) += iomux-v3.o obj-$(CONFIG_MXC_TZIC) += tzic.o obj-$(CONFIG_MXC_AVIC) += avic.o -obj-$(CONFIG_MXC_ULPI) += ulpi.o obj-$(CONFIG_MXC_USE_EPIT) += epit.o obj-$(CONFIG_MXC_DEBUG_BOARD) += 3ds_debugboard.oarch/arm/mach-imx/mach-pca100.c +0
-0
arch/arm/mach-imx/mach-pca100.c static void __init pca100_init(void) · line 402
Quoted 7 lines
arch/arm/mach-imx/mach-pca100.c +2
-2@@ -398,8 +398,8 @@ static void __init pca100_init(void)imx27_add_fsl_usb2_udc (&otg_device_pdata); } - usbh2_pdata.otg =otg_ulpi_create (&mxc_ulpi_access_ops, -ULPI_OTG_DRVVBUS |ULPI_OTG_DRVVBUS_EXT ); + usbh2_pdata.otg =imx_otg_ulpi_create ( +ULPI_OTG_DRVVBUS |ULPI_OTG_DRVVBUS_EXT );
Why don't you keep otg_ulpi_create()?
http://lxr.free-electrons.com/source/include/linux/usb/ulpi.h#L185
Marc
Signature · 12 lines
Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de | -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 263 bytes Desc: OpenPGP digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130530/7195f3ed/attachment.sig>
PATCH 1/1 ARM: imx: Remove mxc specific ulpi access ops
Quoted 51 lines · Marc Kleine-Budde
Quoted 50 lines · Markus Pargmann
There are ulpi access ops implemented in
drivers/usb/phy/phy-ulpi.c. mxc access ops implement the same access operations within mach-imx. This patch removes the mxc ulpi file and uses phy-ulpi instead forimx_otg_ulpi_create.phy-ulpi successfully tested with i.MX27 Phytec phyCARD-S (pca100).
Signed-off-by Markus Pargmann <[email protected]>Acked-by Sascha Hauer <[email protected]>--- arch/arm/mach-imx/Kconfig | 1 + arch/arm/mach-imx/Makefile | 1 - arch/arm/mach-imx/mach-pca100.c | 4 +- arch/arm/mach-imx/ulpi.c | 118 ---------------------------------------- arch/arm/mach-imx/ulpi.h | 9 ++- 5 files changed, 9 insertions(+), 124 deletions(-) delete mode 100644 arch/arm/mach-imx/ulpi.carch/arm/mach-imx/Kconfig +1
-0@@ -58,6 +58,7 @@ config MXC_USE_EPIT config MXC_ULPI bool + select USB_ULPI_VIEWPORT config ARCH_HAS_RNGA boolarch/arm/mach-imx/Makefile +0
-1@@ -23,7 +23,6 @@ obj-$(CONFIG_ARCH_MXC_IOMUX_V3) += iomux-v3.o obj-$(CONFIG_MXC_TZIC) += tzic.o obj-$(CONFIG_MXC_AVIC) += avic.o -obj-$(CONFIG_MXC_ULPI) += ulpi.o obj-$(CONFIG_MXC_USE_EPIT) += epit.o obj-$(CONFIG_MXC_DEBUG_BOARD) += 3ds_debugboard.oarch/arm/mach-imx/mach-pca100.c +0
-0@@ -398,8 +398,8 @@ static void __init pca100_init(void)imx27_add_fsl_usb2_udc (&otg_device_pdata); }
Quoted 6 lines
arch/arm/mach-imx/mach-pca100.c static void __init pca100_init(void) · line 402
Quoted 4 lines
arch/arm/mach-imx/mach-pca100.c +2
-2- usbh2_pdata.otg =otg_ulpi_create (&mxc_ulpi_access_ops, -ULPI_OTG_DRVVBUS |ULPI_OTG_DRVVBUS_EXT ); + usbh2_pdata.otg =imx_otg_ulpi_create ( +ULPI_OTG_DRVVBUS |ULPI_OTG_DRVVBUS_EXT );Why don't you keep
otg_ulpi_create()?
I could still use otg_ulpi_create with updated access ops (ulpi_viewport_access_ops). But I decided to use imx_otg_ulpi_create because it is used 10 lines above and it is more consistent this way.
Regards,
Markus
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
PATCH 1/1 ARM: imx: Remove mxc specific ulpi access ops
In reply to Markus PargmannQuoted 23 lines · Markus Pargmann
There are ulpi access ops implemented in
drivers/usb/phy/phy-ulpi.c. mxc access ops implement the same access operations within mach-imx. This patch removes the mxc ulpi file and uses phy-ulpi instead forimx_otg_ulpi_create.phy-ulpi successfully tested with i.MX27 Phytec phyCARD-S (pca100).
Signed-off-by Markus Pargmann <[email protected]>Acked-by Sascha Hauer <[email protected]>--- arch/arm/mach-imx/Kconfig | 1 + arch/arm/mach-imx/Makefile | 1 - arch/arm/mach-imx/mach-pca100.c | 4 +- arch/arm/mach-imx/ulpi.c | 118 ---------------------------------------- arch/arm/mach-imx/ulpi.h | 9 ++- 5 files changed, 9 insertions(+), 124 deletions(-) delete mode 100644 arch/arm/mach-imx/ulpi.carch/arm/mach-imx/Kconfig +0
-0
arch/arm/mach-imx/Kconfig config MXC_USE_EPIT · line 61
Quoted 4 lines
arch/arm/mach-imx/Kconfig +1
-0@@ -58,6 +58,7 @@ config MXC_USE_EPIT config MXC_ULPI bool + select USB_ULPI_VIEWPORT
Is MXC_ULPI still used anywhere after you remove ulpi.c in the patch? You are even patching it, so I'm a little confused.
Shawn
PATCH 1/1 ARM: imx: Remove mxc specific ulpi access ops
Quoted 25 lines · Shawn Guo
Quoted 24 lines · Markus Pargmann
There are ulpi access ops implemented in
drivers/usb/phy/phy-ulpi.c. mxc access ops implement the same access operations within mach-imx. This patch removes the mxc ulpi file and uses phy-ulpi instead forimx_otg_ulpi_create.phy-ulpi successfully tested with i.MX27 Phytec phyCARD-S (pca100).
Signed-off-by Markus Pargmann <[email protected]>Acked-by Sascha Hauer <[email protected]>--- arch/arm/mach-imx/Kconfig | 1 + arch/arm/mach-imx/Makefile | 1 - arch/arm/mach-imx/mach-pca100.c | 4 +- arch/arm/mach-imx/ulpi.c | 118 ---------------------------------------- arch/arm/mach-imx/ulpi.h | 9 ++- 5 files changed, 9 insertions(+), 124 deletions(-) delete mode 100644 arch/arm/mach-imx/ulpi.carch/arm/mach-imx/Kconfig +0
-0@@ -58,6 +58,7 @@ config MXC_USE_EPIT
Quoted 6 lines
arch/arm/mach-imx/Kconfig config MXC_USE_EPIT · line 61
Quoted 3 lines
arch/arm/mach-imx/Kconfig +1
-0config MXC_ULPI bool + select USB_ULPI_VIEWPORTIs
MXC_ULPIstill used anywhere after you removeulpi.cin the patch? You are even patching it, so I'm a little confused.
No it is not used anywhere else. I removed it and replaced all occurences with USB_ULPI_VIEWPORT.
Thanks,
Markus
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |