[PATCH 1/3] add USB setup code for 8349emds PB
Li Yang-r58472
LeoLi at freescale.com
Wed Feb 7 13:22:01 EST 2007
> > + if ((np = of_find_compatible_node(np, "usb", "fsl-usb2-dr")) !=
NULL)
> > + port0_is_dr = 1;
> > + if ((np = of_find_compatible_node(np, "usb", "fsl-usb2-mph")) !=
NULL){
> > + if (port0_is_dr) {
> > + printk(KERN_WARNING
> > + "There is only one USB port on PB board!
\n");
> > + return -1;
> > + } else if (!port0_is_dr)
> > + /* No usb port enabled */
> > + return -1;
> > + }
>
> I'm not sure if scanning through the device tree to find mmio
addresses
> is still considered valid style. I would instead prefer you to provide
a
> of_platform_driver that attaches to the respective 'compatible'
property
> and does the register access in its probe() function in order to not
> conflict with other drivers.
The driver will not use of_platform_driver for it to be used through
multiple architectures.
- Leo
More information about the Linuxppc-dev
mailing list