diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2017-01-02 15:57:05 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2017-01-05 12:34:18 -0500 |
commit | 4d94b4a239eec860701f0d2e07123a0ed5283a22 (patch) | |
tree | 1bc82a7f7b2d1fc26d3c385f442f9c83aa13860b | |
parent | bde49e5928c5135047749363f40387dad5aa51bf (diff) |
ARM: OMAP1: USB: delete redundant CPU class checks
Delete redundant CPU class checks. This code is only used
on OMAP1 nowadays.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r-- | arch/arm/mach-omap1/usb.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/arch/arm/mach-omap1/usb.c b/arch/arm/mach-omap1/usb.c index 0b4ed94c7b99..455e2cf2866d 100644 --- a/arch/arm/mach-omap1/usb.c +++ b/arch/arm/mach-omap1/usb.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Platform level USB initialization for FS USB OTG controller on omap1 and 24xx | 2 | * Platform level USB initialization for FS USB OTG controller on omap1 |
3 | * | 3 | * |
4 | * Copyright (C) 2004 Texas Instruments, Inc. | 4 | * Copyright (C) 2004 Texas Instruments, Inc. |
5 | * | 5 | * |
@@ -63,6 +63,7 @@ omap_otg_init(struct omap_usb_config *config) | |||
63 | { | 63 | { |
64 | u32 syscon; | 64 | u32 syscon; |
65 | int alt_pingroup = 0; | 65 | int alt_pingroup = 0; |
66 | u16 w; | ||
66 | 67 | ||
67 | /* NOTE: no bus or clock setup (yet?) */ | 68 | /* NOTE: no bus or clock setup (yet?) */ |
68 | 69 | ||
@@ -87,9 +88,8 @@ omap_otg_init(struct omap_usb_config *config) | |||
87 | if (config->otg) | 88 | if (config->otg) |
88 | syscon |= OTG_EN; | 89 | syscon |= OTG_EN; |
89 | #endif | 90 | #endif |
90 | if (cpu_class_is_omap1()) | 91 | pr_debug("USB_TRANSCEIVER_CTRL = %03x\n", |
91 | pr_debug("USB_TRANSCEIVER_CTRL = %03x\n", | 92 | omap_readl(USB_TRANSCEIVER_CTRL)); |
92 | omap_readl(USB_TRANSCEIVER_CTRL)); | ||
93 | pr_debug("OTG_SYSCON_2 = %08x\n", omap_readl(OTG_SYSCON_2)); | 93 | pr_debug("OTG_SYSCON_2 = %08x\n", omap_readl(OTG_SYSCON_2)); |
94 | omap_writel(syscon, OTG_SYSCON_2); | 94 | omap_writel(syscon, OTG_SYSCON_2); |
95 | 95 | ||
@@ -107,19 +107,16 @@ omap_otg_init(struct omap_usb_config *config) | |||
107 | pr_cont(", Mini-AB on usb%d", config->otg - 1); | 107 | pr_cont(", Mini-AB on usb%d", config->otg - 1); |
108 | pr_cont("\n"); | 108 | pr_cont("\n"); |
109 | 109 | ||
110 | if (cpu_class_is_omap1()) { | 110 | /* leave USB clocks/controllers off until needed */ |
111 | u16 w; | 111 | w = omap_readw(ULPD_SOFT_REQ); |
112 | w &= ~SOFT_USB_CLK_REQ; | ||
113 | omap_writew(w, ULPD_SOFT_REQ); | ||
112 | 114 | ||
113 | /* leave USB clocks/controllers off until needed */ | 115 | w = omap_readw(ULPD_CLOCK_CTRL); |
114 | w = omap_readw(ULPD_SOFT_REQ); | 116 | w &= ~USB_MCLK_EN; |
115 | w &= ~SOFT_USB_CLK_REQ; | 117 | w |= DIS_USB_PVCI_CLK; |
116 | omap_writew(w, ULPD_SOFT_REQ); | 118 | omap_writew(w, ULPD_CLOCK_CTRL); |
117 | 119 | ||
118 | w = omap_readw(ULPD_CLOCK_CTRL); | ||
119 | w &= ~USB_MCLK_EN; | ||
120 | w |= DIS_USB_PVCI_CLK; | ||
121 | omap_writew(w, ULPD_CLOCK_CTRL); | ||
122 | } | ||
123 | syscon = omap_readl(OTG_SYSCON_1); | 120 | syscon = omap_readl(OTG_SYSCON_1); |
124 | syscon |= HST_IDLE_EN|DEV_IDLE_EN|OTG_IDLE_EN; | 121 | syscon |= HST_IDLE_EN|DEV_IDLE_EN|OTG_IDLE_EN; |
125 | 122 | ||