Re: [PATCH 2/2] ARM: add OTG pin-function definitions and fsl-usb2-udc bindings to pcm037

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 15 Apr 2009, Sascha Hauer wrote:

> Hi Guennadi,
> 
> On Wed, Apr 15, 2009 at 02:29:05PM +0200, Guennadi Liakhovetski wrote:
> > From: Guennadi Liakhovetski <lg@xxxxxxx>
> > 
> > Add support for the i.MX31 OTG controller in pure device mode to the pcm037
> > board.
> 
> Have you already investigated what is missing for OTG support? I'm
> asking because currently I use the same port as host port, so that would
> be the next logical step.

No, I haven't. How far are you with the host support? I looked briefly at 
some recent OTG patches on the list, the whole infrastructure seems to be 
still very much experimental and unstable. That was a couple of months ago 
though.

Could you also test your driver with the first port, and implement it 
first as host-only? Adding OTG later when both host and device are in 
place?

> > +/* OTG config */
> > +static struct fsl_usb2_platform_data usb_data = {
> > +	.operating_mode	= FSL_USB2_DR_DEVICE,
> > +	.phy_mode	= FSL_USB2_PHY_ULPI,
> > +};
> > +
> > +static struct resource otg_resources[] = {
> > +	{
> > +		.start = OTG_BASE_ADDR,
> > +		.end   = OTG_BASE_ADDR + 0x1ff,
> > +		.flags = IORESOURCE_MEM,
> > +	}, {
> > +		.start = MXC_INT_USB3,
> > +		.flags = IORESOURCE_IRQ,
> > +	},
> > +};
> > +
> > +static u64 udc_dmamask = DMA_BIT_MASK(32);
> > +
> > +/* OTG gadget device */
> > +static struct platform_device otg_udc_device = {
> > +	.name = "fsl-usb2-udc",
> > +	.id   = -1,
> > +	.dev  = {
> > +		.dma_mask          = &udc_dmamask,
> > +		.coherent_dma_mask = 0xffffffff,
> > +		.platform_data     = &usb_data,
> > +	},
> > +	.resource = otg_resources,
> > +	.num_resources = ARRAY_SIZE(otg_resources),
> > +};
> 
> 
> why not devices.[ch]?

Sure, can do that too, if you prefer.

As UDC support is ready and the patch is very small, it just extends an 
existing driver, I would propose to get it in the mainline now, and extend 
for OTG when the host part is ready too. Would the UDC driver have to be 
modified for that too? Probably, yes. That would be another argument for 
pulling this patch first. If you agree, I'll resubmit only this patch, 
moving platform data into devices.[hc].

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux