--- a/arch/arm/plat-omap/usb.c +++ b/arch/arm/plat-omap/usb.c @@ -193,13 +193,10 @@ static u32 __init omap_usb0_init(unsigned nwires, unsigned is_device) l = omap_readl(USB_TRANSCEIVER_CTRL); l &= ~(7 << 4); - omap_writel(l, USB_TRANSCEIVER_CTRL); - if (!is_device) { - l = omap_readl(USB_TRANSCEIVER_CTRL); l |= (3 << 1); - omap_writel(l, USB_TRANSCEIVER_CTRL); } + omap_writel(l, USB_TRANSCEIVER_CTRL); return 3 << 16; } @@ -643,9 +640,6 @@ omap_otg_init(struct omap_usb_config *config) w = omap_readw(ULPD_CLOCK_CTRL); w &= ~USB_MCLK_EN; - omap_writew(w, ULPD_CLOCK_CTRL); - - w = omap_readw(ULPD_CLOCK_CTRL); w |= DIS_USB_PVCI_CLK; omap_writew(w, ULPD_CLOCK_CTRL); } --- a/drivers/i2c/chips/isp1301_omap.c +++ b/drivers/i2c/chips/isp1301_omap.c @@ -520,7 +520,7 @@ static void update_otg1(struct isp1301 *isp, u8 int_src) otg_ctrl = omap_readl(OTG_CTRL) & OTG_CTRL_MASK; otg_ctrl &= ~OTG_XCEIV_INPUTS; - otg_ctrl &= (OTG_ID|OTG_ASESSVLD|OTG_VBUSVLD); + otg_ctrl &= ~(OTG_ID|OTG_ASESSVLD|OTG_VBUSVLD); if (int_src & INTR_SESS_VLD) --- a/drivers/usb/gadget/omap_udc.c +++ b/drivers/usb/gadget/omap_udc.c @@ -2858,7 +2858,6 @@ static int __init omap_udc_probe(struct platform_device *pdev) * means we always "need" the 48MHz clock. */ u32 tmp = omap_readl(FUNC_MUX_CTRL_0); - tmp &= ~VBUS_CTRL_1510; omap_writel(tmp, FUNC_MUX_CTRL_0); tmp |= VBUS_MODE_1510; --- a/drivers/usb/gadget/omap_udc.h +++ b/drivers/usb/gadget/omap_udc.h @@ -202,6 +202,6 @@ struct omap_udc { #define VBUS_MODE_1510 (1 << 18) /* 0 hardware, 1 software */ #define HMC_1510 ((omap_readl(MOD_CONF_CTRL_0) >> 1) & 0x3f) -#define HMC_1610 omap_readl(OTG_SYSCON_2 & 0x3f) +#define HMC_1610 (omap_readl(OTG_SYSCON_2) & 0x3f) #define HMC (cpu_is_omap15xx() ? HMC_1510 : HMC_1610) --- a/drivers/usb/gadget/omap_udc.c +++ b/drivers/usb/gadget/omap_udc.c @@ -2003,7 +2003,7 @@ static irqreturn_t omap_udc_pio_irq(int irq, void *_dev) ep->irqs++; omap_writew(epnum | UDC_EP_DIR | UDC_EP_SEL, UDC_EP_NUM); - if (omap_readw(UDC_STAT_FLG & UDC_ACK)) { + if (omap_readw(UDC_STAT_FLG) & UDC_ACK) { ep->ackwait = 0; if (!list_empty(&ep->queue)) { req = container_of(ep->queue.next,