On Fri, Apr 27, 2012 at 2:55 PM, Neil Zhang <zhangwm@xxxxxxxxxxx> wrote: > Add usb device support for Marvell PXA910. > Actually PXA920 will use the same device. > > Signed-off-by: Neil Zhang <zhangwm@xxxxxxxxxxx> > --- > arch/arm/mach-mmp/Kconfig | 7 + > arch/arm/mach-mmp/devices.c | 283 +++++++++++++++++++++++++++++ > arch/arm/mach-mmp/include/mach/devices.h | 3 + > arch/arm/mach-mmp/include/mach/pxa910.h | 3 + > arch/arm/mach-mmp/include/mach/regs-usb.h | 253 ++++++++++++++++++++++++++ > arch/arm/mach-mmp/pxa910.c | 2 +- > 6 files changed, 550 insertions(+), 1 deletions(-) > create mode 100644 arch/arm/mach-mmp/include/mach/regs-usb.h > > + > +void u2o_set(void __iomem *base, unsigned int offset, unsigned int value) > +{ > + volatile unsigned int reg; There's no reason to use volatile at here. > + > + reg = readl(base + offset); > + reg |= value; > + writel(reg, base + offset); > + __raw_readl(base + offset); Why use readl() and __raw_readl() at same time? I think that you just need use one readl function. I recommend you to use readl_relaxed(). > + > +int pxa_usb_phy_init(void __iomem *phy_reg) > +{ > + unsigned long flags; > + > + spin_lock_irqsave(&phy_lock, flags); > + if (phy_init_cnt++ == 0) > + usb_phy_init_internal(phy_reg); > + spin_unlock_irqrestore(&phy_lock, flags); You will delay much time while initialize usb controller. Is it necessary to use spin_lock at here? Could you use mutex? -- 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