RE: [PATCH 2/3] usb: musb: dsps: add phy control logic to glue

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

 



Hi,
> > > >> On Mon, Jul 9, 2012 at 7:18 PM, Damodar Santhapuri
> <x0132156@xxxxxx>
[...]
> > > >> Avoid getting resource by name.. With dt, you wont be able to do
> > > >> those..
> > > >
> > > > When we are completely on DT then this would anyways go and we
> can
> > > > get these resource data for each usb port from DT APIs.
> > >
> > > Even with dt, you will still get the resources using
> > > platform_get_resource() API's.. So why not have it that way from
> the
> > > beginning itself..
> >
> > Ok got it. We will post an updated patch.
> 
> Plalform_get_resource api works fine if we hardcode 3rd argument to
> 3+id for usb_cntrl register Since dsps_create_musb_pdev calls for each
> wrp->instances.
> 
> static int __devinit dsps_create_musb_pdev(struct dsps_glue *glue, u8
> id)
> {
> 	....
> 	....
>         /* get memory resource for usb control register */
>         res = platform_get_resource(pdev, IORESOURCE_MEM, 3+id);
>         dev_err(dev,"Damodar :usb ctrl%d res=%x\n",id,res->start);
>         if (!res) {
>                 dev_err(dev, "%s get mem resource failed\n", res_name);
>                 ret = -ENODEV;
>                 goto err0;
>         }
> ....
> }

You can place the memory resources as 
{{usbss, .}, {musb0, .}, {usb0_ctrl, .}, {musb1, .}, {usb1_ctrl, .}}

and then use index as "2 * id + 2" to get the usbX_ctrl base address.

Ajay
> 
> Damodar.
> >
> > Ajay
> > >
> > > Thanks
> > > Kishon
--
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