[PATCH 2/3] USB: add of_platform glue driver for FSL USB DR controller
Anton Vorontsov
cbouatmailru at gmail.com
Wed Jul 28 18:28:34 EST 2010
On Wed, Jul 28, 2010 at 02:16:08AM -0600, Grant Likely wrote:
[...]
> > +static int __devinit fsl_usb2_mph_dr_of_probe(struct of_device *ofdev,
> > + const struct of_device_id *match)
> > +{
> > + struct device_node *np = ofdev->dev.of_node;
> > + struct platform_device *usb_dev;
> > + struct fsl_usb2_platform_data data, *pdata;
> > + struct fsl_usb2_dev_data *dev_data;
> > + const unsigned char *prop;
> > + static unsigned int idx;
> > + int i;
> > +
> > + if (!of_device_is_available(np))
> > + return -ENODEV;
>
> What is this for?
USB pins/clocks might be muxed away to other peripherals, like
eSDHC. In such cases firmware marks USB as unavailable (status
= "disabled").
If you try to access USB while it is disabled the SOC will hang.
--
Anton Vorontsov
email: cbouatmailru at gmail.com
irc://irc.freenode.net/bd2
More information about the Linuxppc-dev
mailing list