[PATCH v2 2/8] ARM: PXA: Z2: Enable OHCI on Zipit Z2

Marek Vasut marek.vasut at gmail.com
Fri Mar 11 16:42:30 EST 2011


On Friday 11 March 2011 15:56:46 Vasily Khoruzhick wrote:
> This patch is a part of similar mozzwald's patch which was
> based on GPSFan and rkdavis work.

Noone knows what/who is "mozzwald" or "rkdavis" or "GPSFan", the comment for 
this patch is irelevant and has zero information value.

I also suspect, the pins on the back connector are USB UDC, not UHC ... aka. the 
hardware has no UHC.
> 
> Signed-off-by: Vasily Khoruzhick <anarsoul at gmail.com>
> ---
> v2: Fix authorship of original patch
> 
>  arch/arm/mach-pxa/z2.c |   24 ++++++++++++++++++++++++
>  1 files changed, 24 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-pxa/z2.c b/arch/arm/mach-pxa/z2.c
> index 7bad4f7..dde3f1c 100644
> --- a/arch/arm/mach-pxa/z2.c
> +++ b/arch/arm/mach-pxa/z2.c
> @@ -40,6 +40,8 @@
>  #include <mach/pxafb.h>
>  #include <mach/mmc.h>
>  #include <plat/pxa27x_keypad.h>
> +#include <mach/pxa27x-udc.h>
> +#include <mach/ohci.h>
> 
>  #include "generic.h"
>  #include "devices.h"
> @@ -679,6 +681,27 @@ static inline void z2_pmic_init(void) {}
>  #endif
> 
>  /*************************************************************************
> ***** + * USB Host (OHCI)
> +
> **************************************************************************
> ****/ +static int z2_ohci_init(struct device *dev)
> +{
> +	/* Only Port 2 is connected
> +	 * Setup USB Port 2 Output Control Register
> +	*/
> +	UP2OCR = UP2OCR_HXS | UP2OCR_HXOE | UP2OCR_DPPDE | UP2OCR_DMPDE;
> +
> +	return 0;
> +}
> +
> +static struct pxaohci_platform_data z2_ohci_platform_data = {
> +	.port_mode	= PMM_PERPORT_MODE,
> +	.init		= z2_ohci_init,
> +	.flags		= ENABLE_PORT2 | NO_OC_PROTECTION,
> +	.power_on_delay	= 10,
> +	.power_budget	= 500,
> +};
> +
> +/*************************************************************************
> ***** * Machine init
>  
> **************************************************************************
> ****/ static void __init z2_init(void)
> @@ -688,6 +711,7 @@ static void __init z2_init(void)
>  	pxa_set_ffuart_info(NULL);
>  	pxa_set_btuart_info(NULL);
>  	pxa_set_stuart_info(NULL);
> +	pxa_set_ohci_info(&z2_ohci_platform_data);
> 
>  	z2_lcd_init();
>  	z2_mmc_init();



More information about the linux-arm-kernel mailing list