diff options
-rw-r--r-- | arch/arm/mach-tegra/usb_phy.c | 14 | ||||
-rw-r--r-- | drivers/usb/gadget/fsl_udc_core.c | 14 | ||||
-rw-r--r-- | drivers/usb/gadget/fsl_usb2_udc.h | 6 | ||||
-rw-r--r-- | drivers/usb/host/ehci-hub.c | 2 |
4 files changed, 18 insertions, 18 deletions
diff --git a/arch/arm/mach-tegra/usb_phy.c b/arch/arm/mach-tegra/usb_phy.c index fe227156b97b..05a3f63c568a 100644 --- a/arch/arm/mach-tegra/usb_phy.c +++ b/arch/arm/mach-tegra/usb_phy.c @@ -189,7 +189,7 @@ #define UHSIC_CONNECT_DETECT (1 << 0) -#else /* T30 definitions */ +#else #define USB_USBCMD 0x130 #define USB_USBCMD_RS (1 << 0) @@ -897,7 +897,7 @@ static void utmi_phy_power_off(struct tegra_usb_phy *phy, bool is_dpd) UTMIP_FORCE_PDDR_POWERDOWN; writel(val, base + UTMIP_XCVR_CFG1); -#ifdef CONFIG_ARCH_TEGRA_3x_SOC +#ifndef CONFIG_ARCH_TEGRA_2x_SOC val = readl(base + UTMIP_BIAS_CFG1); val |= UTMIP_BIAS_PDTRK_COUNT(0x5); writel(val, base + UTMIP_BIAS_CFG1); @@ -998,7 +998,7 @@ static void utmi_phy_restore_end(struct tegra_usb_phy *phy) static void ulpi_set_tristate(bool enable) { -#ifdef CONFIG_ARCH_TEGRA_3x_SOC +#ifndef CONFIG_ARCH_TEGRA_2x_SOC int tristate = (enable)? TEGRA_TRI_TRISTATE : TEGRA_TRI_NORMAL; tegra_pinmux_set_tristate(TEGRA_PINGROUP_ULPI_DATA0, tristate); @@ -1020,7 +1020,7 @@ static void ulpi_phy_reset(void __iomem *base) { unsigned long val; -#ifdef CONFIG_ARCH_TEGRA_3x_SOC +#ifndef CONFIG_ARCH_TEGRA_2x_SOC tegra_pinmux_set_tristate(TEGRA_PINGROUP_ULPI_CLK, TEGRA_TRI_TRISTATE); #endif val = readl(base + USB_SUSP_CTRL); @@ -1588,7 +1588,7 @@ struct tegra_usb_phy *tegra_usb_phy_open(int instance, void __iomem *regs, phy->ulpi = otg_ulpi_create(&ulpi_viewport_access_ops, 0); phy->ulpi->io_priv = regs + ULPI_VIEWPORT; } -#ifdef CONFIG_ARCH_TEGRA_3x_SOC +#ifndef CONFIG_ARCH_TEGRA_2x_SOC else if (phy->usb_phy_type == TEGRA_USB_PHY_TYPE_HSIC) { ulpi_config = config; gpio_request(ulpi_config->enable_gpio, @@ -1629,7 +1629,7 @@ struct tegra_usb_phy *tegra_usb_phy_open(int instance, void __iomem *regs, } } -#ifdef CONFIG_ARCH_TEGRA_3x_SOC +#ifndef CONFIG_ARCH_TEGRA_2x_SOC /* Power-up the VBUS detector for UTMIP PHY */ if (phy->usb_phy_type == TEGRA_USB_PHY_TYPE_UTMIP) { writel(readl((IO_ADDRESS(TEGRA_PMC_BASE) + TEGRA_PMC_USB_AO)) & @@ -1798,7 +1798,7 @@ int tegra_usb_phy_bus_connect(struct tegra_usb_phy *phy) void __iomem *base = phy->regs; if (phy->usb_phy_type == TEGRA_USB_PHY_TYPE_HSIC) { -#ifdef CONFIG_ARCH_TEGRA_3x_SOC +#ifndef CONFIG_ARCH_TEGRA_2x_SOC /* Change the USB controller PHY type to HSIC */ val = readl(base + HOSTPC1_DEVLC); val &= ~HOSTPC1_DEVLC_PTS(HOSTPC1_DEVLC_PTS_MASK); diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb/gadget/fsl_udc_core.c index 8f0eca5650df..6afd0954e6f7 100644 --- a/drivers/usb/gadget/fsl_udc_core.c +++ b/drivers/usb/gadget/fsl_udc_core.c @@ -2230,7 +2230,7 @@ static irqreturn_t fsl_udc_irq(int irq, void *_udc) spin_unlock_irqrestore(&udc->lock, flags); return IRQ_NONE; } -#ifdef CONFIG_ARCH_TEGRA_3x_SOC +#ifndef CONFIG_ARCH_TEGRA_2x_SOC { u32 temp = fsl_readl(&usb_sys_regs->vbus_sensors); udc->vbus_active = (temp & USB_SYS_VBUS_ASESSION) ? true : false; @@ -2520,12 +2520,12 @@ static int fsl_proc_read(char *page, char **start, off_t off, int count, next += t; tmp_reg = fsl_readl(&dr_regs->portsc1); -#ifdef CONFIG_ARCH_TEGRA_3x_SOC +#ifdef CONFIG_ARCH_TEGRA_2x_SOC + tmp_reg2 = tmp_reg; +#else /* In Tegra3 the Phy Type Select(PTS) and Port Speed fields are specified in * hostpc1devlc register instead of portsc1 register. */ tmp_reg2 = fsl_readl(&dr_regs->hostpc1devlc); -#else - tmp_reg2 = tmp_reg; #endif t = scnprintf(next, size, "USB Port Status&Control Reg:\n" @@ -2898,10 +2898,10 @@ static int __init fsl_udc_probe(struct platform_device *pdev) } #endif -#ifdef CONFIG_ARCH_TEGRA_3x_SOC - control_reg = &dr_regs->hostpc1devlc; -#else +#ifdef CONFIG_ARCH_TEGRA_2x_SOC control_reg = &dr_regs->portsc1; +#else + control_reg = &dr_regs->hostpc1devlc; #endif #if !defined(CONFIG_ARCH_MXC) && !defined(CONFIG_ARCH_TEGRA) if (pdata->have_sysif_regs) diff --git a/drivers/usb/gadget/fsl_usb2_udc.h b/drivers/usb/gadget/fsl_usb2_udc.h index 8ce0da7ed6c6..a605e111e432 100644 --- a/drivers/usb/gadget/fsl_usb2_udc.h +++ b/drivers/usb/gadget/fsl_usb2_udc.h @@ -9,7 +9,7 @@ #define USB_MAX_CTRL_PAYLOAD 64 #define USB_DR_SYS_OFFSET 0x400 -#if !defined(CONFIG_ARCH_TEGRA_3x_SOC) +#ifdef CONFIG_ARCH_TEGRA_2x_SOC /* USB DR device mode registers (Little Endian) */ struct usb_dr_device { /* Capability register */ @@ -171,7 +171,7 @@ struct usb_dr_host { u32 endptcomplete; /* Endpoint Complete Register */ u32 endptctrl[6]; /* Endpoint Control Registers */ }; -#endif // if !defined(CONFIG_ARCH_TEGRA_3x_SOC) +#endif // ifdef CONFIG_ARCH_TEGRA_2x_SOC /* non-EHCI USB system interface registers (Big Endian) */ #ifdef CONFIG_ARCH_TEGRA @@ -299,7 +299,7 @@ struct usb_sys_interface { #define PORTSCX_WAKE_ON_OVER_CURRENT 0x00400000 #define PORTSCX_PHY_LOW_POWER_SPD 0x00800000 -#if !defined(CONFIG_ARCH_TEGRA_3x_SOC) +#ifdef CONFIG_ARCH_TEGRA_2x_SOC #define PORTSCX_PORT_FORCE_FULL_SPEED 0x01000000 #define PORTSCX_PORT_SPEED_MASK 0x0C000000 #define PORTSCX_PORT_WIDTH 0x10000000 diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c index 16994e4907e9..59ff46ece6eb 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c @@ -285,7 +285,7 @@ static int ehci_bus_suspend (struct usb_hcd *hcd) changed = 1; } } -#ifndef CONFIG_ARCH_TEGRA_3x_SOC +#ifdef CONFIG_ARCH_TEGRA_2x_SOC if (changed && ehci->has_hostpc) { spin_unlock_irq(&ehci->lock); msleep(5); /* 5 ms for HCD to enter low-power mode */ |