USB: fix compile warnings.
authorwlf <wulf@rock-chips.com>
Fri, 13 Jun 2014 08:47:32 +0000 (16:47 +0800)
committerwlf <wulf@rock-chips.com>
Fri, 13 Jun 2014 08:47:32 +0000 (16:47 +0800)
arch/arm/mach-rockchip/rk3188.c
drivers/usb/host/ehci-hcd.c

index b6288b3f4b9aef51d1d2dd67e684c432961cbffd..feb7563478e1845118b59eafd79826a0589945ab 100644 (file)
@@ -73,24 +73,27 @@ static void __init rk3188_boot_mode_init(void)
 }
 static void usb_uart_init(void)
 {
-    u32 soc_status0;
+       u32 soc_status0;
+
        writel_relaxed(0x03100000, RK_GRF_VIRT + RK3188_GRF_UOC0_CON0);
+       soc_status0 = (readl_relaxed(RK_GRF_VIRT + RK3188_GRF_SOC_STATUS0));
+
 #ifdef CONFIG_RK_USB_UART
-    soc_status0 = (readl_relaxed(RK_GRF_VIRT + RK3188_GRF_SOC_STATUS0));
-    if(!(soc_status0 & (1<<10)) && (soc_status0 & (1<<13)))
-    {
-        writel_relaxed(0x00040004, RK_GRF_VIRT + RK3188_GRF_UOC0_CON2); //software control usb phy enable 
-               writel_relaxed(0x003f002a, RK_GRF_VIRT + RK3188_GRF_UOC0_CON3); //usb phy enter suspend
+       if (!(soc_status0 & (1<<10)) && (soc_status0 & (1<<13))) {
+               /* software control usb phy enable */
+               writel_relaxed(0x00040004, RK_GRF_VIRT + RK3188_GRF_UOC0_CON2);
+               /* usb phy enter suspend */
+               writel_relaxed(0x003f002a, RK_GRF_VIRT + RK3188_GRF_UOC0_CON3);
                writel_relaxed(0x03000300, RK_GRF_VIRT + RK3188_GRF_UOC0_CON0);
     }    
-#endif // end of CONFIG_RK_USB_UART
+#endif
 }
 
 static void __init rk3188_dt_map_io(void)
 {
        iotable_init(rk3188_io_desc, ARRAY_SIZE(rk3188_io_desc));
        debug_ll_io_init();
-    usb_uart_init();
+       usb_uart_init();
 
        rockchip_soc_id = ROCKCHIP_SOC_RK3188;
        if (readl_relaxed(RK_ROM_VIRT + 0x27f0) == 0x33313042
index 612b92a71831d37d74489864a5d4ea6f4e18ebc2..f7e5e1467505a6f220ed08f469a315b84939979a 100644 (file)
@@ -591,7 +591,7 @@ static int ehci_run (struct usb_hcd *hcd)
         */
        hcc_params = ehci_readl(ehci, &ehci->caps->hcc_params);
        if (HCC_64BIT_ADDR(hcc_params)) {
-#if CONFIG_ARM64
+#ifdef CONFIG_ARM64
                ehci_writel(ehci, ehci->periodic_dma >> 32, &ehci->regs->segment);
                /*
                 * this is deeply broken on almost all architectures