Add USB Gadget support for mx35pdk
PATCH 1/1 Add USB Gadget support for mx35pdk
An embedded and charset-unspecified text was scrubbed...
Name: add-usb-gadget-support-for-mx35pdk.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20091126/ac78a7d4/attachment.el>
PATCH 1/1 Add USB Gadget support for mx35pdk
Quoted 11 lines · Harro Haan
Add USB Gadget support for mx35pdk
The patch is baselined on:
git://git.pengutronix.de/git/imx/linux-2.6.gitmxc-masterSigned-off-by Harro Haan <[email protected]>--- arch/arm/mach-mx3/clock-imx35.c | 3 +++ arch/arm/mach-mx3/mx35pdk.c | 12 ++++++++++++ drivers/usb/gadget/Kconfig | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-)
Thank you for working on this.
However, you should split your patch into functional pieces. In this case, that means you should have one for drivers/usb/gadget/Kconfig, one for mx35pdk.c and one for clock-imx35.c.
Firstly because that makes tracking changes easier later and also because these patches might take different pathes to mainline eventually.
Git makes that very easy, btw.
Thanks,
Daniel
Quoted 80 lines
Index: linux-2.6.31/drivers/usb/gadget/Kconfig
===================================================================drivers/usb/gadget/Kconfig +1
-1@@ -156,7 +156,7 @@ config USB_ATMEL_USBA config USB_GADGET_FSL_USB2 boolean "Freescale Highspeed USB DR Peripheral Controller" - depends on FSL_SOC || ARCH_MXC + depends on FSL_SOC || ARCH_MXC || ARCH_MX35 select USB_GADGET_DUALSPEED help Some of Freescale PowerPC processors have a High SpeedIndex:
linux-2.6.31/arch/arm/mach-mx3/mx35pdk.c
===================================================================arch/arm/mach-mx3/mx35pdk.c +12
-0@@ -23,6 +23,7 @@#include <linux/platform_device.h> #include <linux/memory.h> #include <linux/gpio.h> +#include <linux/fsl_devices.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> @@ -69,6 +70,15 @@ static struct pad_desc mx35pdk_pads[] =MX35_PAD_FEC_TDATA2__FEC_TDATA_2 ,MX35_PAD_FEC_RDATA3__FEC_RDATA_3 ,MX35_PAD_FEC_TDATA3__FEC_TDATA_3 , +/* USBOTG */ +MX35_PAD_USBOTG_PWR__USB_TOP_USBOTG_PWR , + MX35_PAD_USBOTG_OC__USB_TOP_USBOTG_OC, +}; + +/* OTG config */ +static struct fsl_usb2_platform_data usb_pdata = { + .operating_mode =FSL_USB2_DR_DEVICE , + .phy_mode =FSL_USB2_PHY_UTMI_WIDE , };/* @@ -81,6 +91,8 @@ static void __init mxc_board_init(void)platform_add_devices (devices,ARRAY_SIZE (devices));mxc_register_device (&mxc_uart_device0, &uart_pdata); + +mxc_register_device (&mxc_otg_udc_device, &usb_pdata); }static void __init mx35pdk_timer_init (void )Index:
linux-2.6.31/arch/arm/mach-mx3/clock-imx35.c
===================================================================arch/arm/mach-mx3/clock-imx35.c +3
-0@@ -387,6 +387,8 @@ DEFINE_CLOCK(csi_clk, 0, CCM_CGR3, 0DEFINE_CLOCK (iim_clk,0 ,CCM_CGR3 ,2 ,NULL ,NULL );DEFINE_CLOCK (gpu2d_clk,0 ,CCM_CGR3 ,4 ,NULL ,NULL ); +DEFINE_CLOCK (usbahb_clk,0 ,0 ,0 , get_rate_ahb,NULL ); +static int clk_dummy_enable (struct clk *clk) {return 0 ;@@ -471,6 +473,7 @@ static struct clk_lookup lookups[] = { _REGISTER_CLOCK("mxc-ehci.1", "usb", usbotg_clk) _REGISTER_CLOCK("mxc-ehci.2", "usb", usbotg_clk) _REGISTER_CLOCK("fsl-usb2-udc", "usb", usbotg_clk) + _REGISTER_CLOCK("fsl-usb2-udc", "usb_ahb", usbahb_clk) _REGISTER_CLOCK("imx-wdt.0", NULL, wdog_clk) _REGISTER_CLOCK(NULL, "max", max_clk)_REGISTER_CLOCK (NULL ,"audmux" , audmux_clk)Signature · 8 lines
-- _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 1/1 Add USB Gadget support for mx35pdk
In reply to Harro HaanQuoted 17 lines · Harro Haan
Add USB Gadget support for mx35pdk
The patch is baselined on:
git://git.pengutronix.de/git/imx/linux-2.6.gitmxc-masterSigned-off-by Harro Haan <[email protected]>--- arch/arm/mach-mx3/clock-imx35.c | 3 +++ arch/arm/mach-mx3/mx35pdk.c | 12 ++++++++++++ drivers/usb/gadget/Kconfig | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-)Index: linux-2.6.31/drivers/usb/gadget/Kconfig
===================================================================
drivers/usb/gadget/Kconfig config USB_ATMEL_USBA · line 162
Quoted 8 lines
drivers/usb/gadget/Kconfig +1
-1@@ -156,7 +156,7 @@ config USB_ATMEL_USBA config USB_GADGET_FSL_USB2 boolean "Freescale Highspeed USB DR Peripheral Controller" - depends on FSL_SOC || ARCH_MXC + depends on FSL_SOC || ARCH_MXC || ARCH_MX35 select USB_GADGET_DUALSPEED help Some of Freescale PowerPC processors have a High Speed
This shouldn't be needed. ARCH_MX35 won't be set without ARCH_MXC.
Sascha
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 |
v2 cover Add USB Gadget support for mx35pdk
In reply to Harro HaanAn embedded and charset-unspecified text was scrubbed...
Name: avoid-disclaimer-footer
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20091127/57aa5308/attachment.el>
PATCH v2 1/2 mx35: register usb_ahb clock in clock-imx35.c
An embedded and charset-unspecified text was scrubbed...
Name: mx35-register-usb_ahb-clock-in-clock-imx35.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20091127/2e727597/attachment.el>
PATCH v2 2/2 mx35: add usb gadget support in mx35pdk.c
In reply to Harro HaanAn embedded and charset-unspecified text was scrubbed...
Name: mx35-add-usb-gadget-support-in-mx35pdk.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20091127/94f954cc/attachment.el>
v2 cover Add USB Gadget support for mx35pdk
In reply to Harro HaanQuoted 9 lines · Harro Haan
[patch v2 1/2] mx35: register
usb_ahbclock inclock-imx35.c[patch v2 2/2] mx35: add usb gadget support inmx35pdk.cChanges with respect to previous version of patch:
- The patch is split up per file as requested
- Removed unneeded change in USB GadgetKconfigThe patch is baselined on:
git://git.pengutronix.de/git/imx/linux-2.6.gitmxc-master
Ok, applied.
Sascha
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 |