From feebf06557771cb639270690ed6a5af64f0831b3 Mon Sep 17 00:00:00 2001 From: wlf Date: Fri, 13 Jun 2014 16:47:32 +0800 Subject: [PATCH] USB: fix compile warnings. --- arch/arm/mach-rockchip/rk3188.c | 19 +++++++++++-------- drivers/usb/host/ehci-hcd.c | 2 +- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/arch/arm/mach-rockchip/rk3188.c b/arch/arm/mach-rockchip/rk3188.c index b6288b3f4b9a..feb7563478e1 100644 --- a/arch/arm/mach-rockchip/rk3188.c +++ b/arch/arm/mach-rockchip/rk3188.c @@ -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 diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 612b92a71831..f7e5e1467505 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -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 -- 2.34.1