<p dir="ltr"><br>
On Oct 28, 2012 11:44 PM, "Vasily Khoruzhick" <<a href="mailto:anarsoul@gmail.com">anarsoul@gmail.com</a>> wrote:<br>
><br>
> On Mon, Oct 29, 2012 at 12:59 AM, Marek Vasut <<a href="mailto:marex@denx.de">marex@denx.de</a>> wrote:<br>
> > Dear Vasily Khoruzhick,<br>
> ><br>
> > missing commit message.<br>
><br>
> OK<br>
><br>
> >> Signed-off-by: Vasily Khoruzhick <<a href="mailto:anarsoul@gmail.com">anarsoul@gmail.com</a>><br>
> >> ---<br>
> >> arch/arm/mach-pxa/z2.c | 52<br>
> >> ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52<br>
> >> insertions(+)<br>
> >><br>
> >> diff --git a/arch/arm/mach-pxa/z2.c b/arch/arm/mach-pxa/z2.c<br>
> >> index c97485f..ce90fa9 100644<br>
> >> --- a/arch/arm/mach-pxa/z2.c<br>
> >> +++ b/arch/arm/mach-pxa/z2.c<br>
> >> @@ -41,6 +41,9 @@<br>
> >> #include <linux/platform_data/mmc-pxamci.h><br>
> >> #include <linux/platform_data/keypad-pxa27x.h><br>
> >> #include <mach/pm.h><br>
> >> +#include <mach/pxa27x-udc.h><br>
> >> +#include <mach/udc.h><br>
> >> +#include <linux/platform_data/usb-ohci-pxa27x.h><br>
> >><br>
> >> #include "generic.h"<br>
> >> #include "devices.h"<br>
> >> @@ -680,6 +683,52 @@ static void __init z2_pmic_init(void)<br>
> >> static inline void z2_pmic_init(void) {}<br>
> >> #endif<br>
> >><br>
> >> +/*************************************************************************<br>
> >> ***** + * USB Switch<br>
> >> +<br>
> >> **************************************************************************<br>
> >> ****/ +static struct platform_device z2_usb_switch = {<br>
> >> + .name = "z2-usb-switch",<br>
> >> + .id = -1,<br>
> >> +};<br>
> >> +<br>
> >> +static void __init z2_usb_switch_init(void)<br>
> >> +{<br>
> >> + platform_device_register(&z2_usb_switch);<br>
> >> +}<br>
> >> +<br>
> >> +/*************************************************************************<br>
> >> ***** + * USB Gadget<br>
> >> +<br>
> >> **************************************************************************<br>
> >> ****/ +#if defined(CONFIG_USB_GADGET_PXA27X) \<br>
> >> + || defined(CONFIG_USB_GADGET_PXA27X_MODULE)<br>
> >> +static int z2_udc_is_connected(void)<br>
> >> +{<br>
> >> + return 1;<br>
> >> +}<br>
> >> +<br>
> >> +static struct pxa2xx_udc_mach_info z2_udc_info __initdata = {<br>
> >> + .udc_is_connected = z2_udc_is_connected,<br>
> >> + .gpio_pullup = -1,<br>
> >> +};<br>
> >> +<br>
> >> +static void __init z2_udc_init(void)<br>
> >> +{<br>
> >> + pxa_set_udc_info(&z2_udc_info);<br>
> >> +}<br>
> >> +#else<br>
> >> +static inline void z2_udc_init(void) {}<br>
> >> +#endif<br>
> ><br>
> > We really should work on the DT here.<br>
><br>
> Any volunteers? :) It requires huge amount of work, </p>
<p dir="ltr">Well, it's actually quite straight forward. With the changes that got merged to 3.7, pxa3xx platforms boot, and I also ported some pxa specific peripheral drivers that should work for both 2xx and 3xx. Adding CPU support for 27x should also just be a matter of some extra lines.</p>
<p dir="ltr">So I would clearly say you should give the DT approach a try first and see which bits are missing. And I would vote for not taking any new features for the legay board support files but just bugfixes.</p>
<p dir="ltr">> and right now my goal<br>
> is to get every piece of Z2 HW working with vanilla kernel, before those changes<br>
> are lost in my github repo. I see no advantages in moving Z2 to DT except<br>
> self-education. I'm OK with DT, but it needs some time. Let's get non-DT<br>
> version working properly first.</p>
<p dir="ltr">At least there is a reference :-) For mainline though, things should be done right in the first place.<br></p>
<p dir="ltr">Daniel<br></p>
<p dir="ltr">><br>
> >> +/*************************************************************************<br>
> >> ***** + * USB Host (OHCI)<br>
> >> +<br>
> >> **************************************************************************<br>
> >> ****/ +static struct pxaohci_platform_data z2_ohci_platform_data = {<br>
> >> + .port_mode = PMM_PERPORT_MODE,<br>
> >> + .flags = ENABLE_PORT2 | NO_OC_PROTECTION,<br>
> >> + .power_on_delay = 10,<br>
> >> + .power_budget = 500,<br>
> >> +};<br>
> >> +<br>
> >> #ifdef CONFIG_PM<br>
> >> static void z2_power_off(void)<br>
> >> {<br>
> >> @@ -705,10 +754,12 @@ static void __init z2_init(void)<br>
> >> pxa_set_ffuart_info(NULL);<br>
> >> pxa_set_btuart_info(NULL);<br>
> >> pxa_set_stuart_info(NULL);<br>
> >> + pxa_set_ohci_info(&z2_ohci_platform_data);<br>
> >><br>
> >> z2_lcd_init();<br>
> >> z2_mmc_init();<br>
> >> z2_mkp_init();<br>
> >> + z2_udc_init();<br>
> ><br>
> > This patch adds _host_ ? So why do you have udc in here ?<br>
><br>
> Both, host and device.<br>
><br>
> > Besides, pxa_set_ohci_info() should also be wrapped in some z2_uhc_init()<br>
><br>
> OK<br>
><br>
> >> z2_i2c_init();<br>
> >> z2_spi_init();<br>
> >> z2_nor_init();<br>
> >> @@ -716,6 +767,7 @@ static void __init z2_init(void)<br>
> >> z2_leds_init();<br>
> >> z2_keys_init();<br>
> >> z2_pmic_init();<br>
> >> + z2_usb_switch_init();<br>
> >><br>
> >> pm_power_off = z2_power_off;<br>
> >> }<br>
> ><br>
> > Best regards,<br>
> > Marek Vasut<br>
><br>
> Regards<br>
> Vasily<br>
><br>
> _______________________________________________<br>
> linux-arm-kernel mailing list<br>
> <a href="mailto:linux-arm-kernel@lists.infradead.org">linux-arm-kernel@lists.infradead.org</a><br>
> <a href="http://lists.infradead.org/mailman/listinfo/linux-arm-kernel">http://lists.infradead.org/mailman/listinfo/linux-arm-kernel</a><br>
</p>