aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/configs/afeb9260_defconfig2
-rw-r--r--arch/arm/configs/at91sam9260_defconfig2
-rw-r--r--arch/arm/configs/at91sam9261_defconfig2
-rw-r--r--arch/arm/configs/at91sam9263_defconfig2
-rw-r--r--arch/arm/configs/at91sam9g20_defconfig2
-rw-r--r--arch/arm/configs/corgi_defconfig2
-rw-r--r--arch/arm/configs/davinci_all_defconfig2
-rw-r--r--arch/arm/configs/h7202_defconfig3
-rw-r--r--arch/arm/configs/magician_defconfig2
-rw-r--r--arch/arm/configs/mini2440_defconfig2
-rw-r--r--arch/arm/configs/omap1_defconfig3
-rw-r--r--arch/arm/configs/prima2_defconfig1
-rw-r--r--arch/arm/configs/spitz_defconfig2
-rw-r--r--arch/arm/configs/stamp9g20_defconfig2
-rw-r--r--arch/arm/configs/viper_defconfig2
-rw-r--r--arch/arm/configs/zeus_defconfig2
-rw-r--r--arch/arm/mach-cns3xxx/cns3420vb.c53
-rw-r--r--arch/avr32/configs/atngw100_defconfig2
-rw-r--r--arch/avr32/configs/atngw100_evklcd100_defconfig2
-rw-r--r--arch/avr32/configs/atngw100_evklcd101_defconfig2
-rw-r--r--arch/avr32/configs/atngw100_mrmt_defconfig2
-rw-r--r--arch/avr32/configs/atngw100mkii_defconfig2
-rw-r--r--arch/avr32/configs/atngw100mkii_evklcd100_defconfig2
-rw-r--r--arch/avr32/configs/atngw100mkii_evklcd101_defconfig2
-rw-r--r--arch/avr32/configs/atstk1002_defconfig2
-rw-r--r--arch/avr32/configs/atstk1003_defconfig2
-rw-r--r--arch/avr32/configs/atstk1004_defconfig2
-rw-r--r--arch/avr32/configs/atstk1006_defconfig2
-rw-r--r--arch/avr32/configs/favr-32_defconfig2
-rw-r--r--arch/avr32/configs/hammerhead_defconfig2
-rw-r--r--arch/blackfin/configs/CM-BF527_defconfig2
-rw-r--r--arch/blackfin/configs/CM-BF548_defconfig2
-rw-r--r--arch/blackfin/configs/CM-BF561_defconfig2
-rw-r--r--arch/mips/alchemy/common/Makefile2
-rw-r--r--arch/mips/alchemy/common/platform.c58
-rw-r--r--arch/mips/alchemy/common/usb.c614
-rw-r--r--arch/mips/ath79/dev-usb.c2
-rw-r--r--arch/mips/configs/bcm47xx_defconfig2
-rw-r--r--arch/mips/configs/db1000_defconfig1
-rw-r--r--arch/mips/configs/db1235_defconfig2
-rw-r--r--arch/mips/configs/gpr_defconfig1
-rw-r--r--arch/mips/configs/ls1b_defconfig1
-rw-r--r--arch/mips/configs/mtx1_defconfig3
-rw-r--r--arch/mips/loongson1/common/platform.c7
-rw-r--r--arch/mips/netlogic/xlr/platform.c17
-rw-r--r--arch/mips/pnx8550/common/platform.c31
-rw-r--r--arch/sh/configs/ecovec24_defconfig2
-rw-r--r--arch/sh/configs/se7724_defconfig2
-rw-r--r--arch/sh/kernel/cpu/sh3/setup-sh7720.c6
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7757.c6
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7763.c6
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7786.c6
52 files changed, 832 insertions, 55 deletions
diff --git a/arch/arm/configs/afeb9260_defconfig b/arch/arm/configs/afeb9260_defconfig
index c285a9d777d9..a8dbc1e05253 100644
--- a/arch/arm/configs/afeb9260_defconfig
+++ b/arch/arm/configs/afeb9260_defconfig
@@ -79,7 +79,7 @@ CONFIG_USB_STORAGE=y
79CONFIG_USB_GADGET=y 79CONFIG_USB_GADGET=y
80CONFIG_USB_ZERO=m 80CONFIG_USB_ZERO=m
81CONFIG_USB_GADGETFS=m 81CONFIG_USB_GADGETFS=m
82CONFIG_USB_FILE_STORAGE=m 82CONFIG_USB_MASS_STORAGE=m
83CONFIG_USB_G_SERIAL=m 83CONFIG_USB_G_SERIAL=m
84CONFIG_RTC_CLASS=y 84CONFIG_RTC_CLASS=y
85CONFIG_RTC_DEBUG=y 85CONFIG_RTC_DEBUG=y
diff --git a/arch/arm/configs/at91sam9260_defconfig b/arch/arm/configs/at91sam9260_defconfig
index 505b3765f87e..0ea5d2c97fc4 100644
--- a/arch/arm/configs/at91sam9260_defconfig
+++ b/arch/arm/configs/at91sam9260_defconfig
@@ -75,7 +75,7 @@ CONFIG_USB_STORAGE_DEBUG=y
75CONFIG_USB_GADGET=y 75CONFIG_USB_GADGET=y
76CONFIG_USB_ZERO=m 76CONFIG_USB_ZERO=m
77CONFIG_USB_GADGETFS=m 77CONFIG_USB_GADGETFS=m
78CONFIG_USB_FILE_STORAGE=m 78CONFIG_USB_MASS_STORAGE=m
79CONFIG_USB_G_SERIAL=m 79CONFIG_USB_G_SERIAL=m
80CONFIG_RTC_CLASS=y 80CONFIG_RTC_CLASS=y
81CONFIG_RTC_DRV_AT91SAM9=y 81CONFIG_RTC_DRV_AT91SAM9=y
diff --git a/arch/arm/configs/at91sam9261_defconfig b/arch/arm/configs/at91sam9261_defconfig
index 1e8712ef062e..c87beb973b37 100644
--- a/arch/arm/configs/at91sam9261_defconfig
+++ b/arch/arm/configs/at91sam9261_defconfig
@@ -125,7 +125,7 @@ CONFIG_USB_GADGET=y
125CONFIG_USB_ZERO=m 125CONFIG_USB_ZERO=m
126CONFIG_USB_ETH=m 126CONFIG_USB_ETH=m
127CONFIG_USB_GADGETFS=m 127CONFIG_USB_GADGETFS=m
128CONFIG_USB_FILE_STORAGE=m 128CONFIG_USB_MASS_STORAGE=m
129CONFIG_USB_G_SERIAL=m 129CONFIG_USB_G_SERIAL=m
130CONFIG_MMC=y 130CONFIG_MMC=y
131CONFIG_MMC_ATMELMCI=m 131CONFIG_MMC_ATMELMCI=m
diff --git a/arch/arm/configs/at91sam9263_defconfig b/arch/arm/configs/at91sam9263_defconfig
index d2050cada82d..c5212f43eee6 100644
--- a/arch/arm/configs/at91sam9263_defconfig
+++ b/arch/arm/configs/at91sam9263_defconfig
@@ -133,7 +133,7 @@ CONFIG_USB_GADGET=y
133CONFIG_USB_ZERO=m 133CONFIG_USB_ZERO=m
134CONFIG_USB_ETH=m 134CONFIG_USB_ETH=m
135CONFIG_USB_GADGETFS=m 135CONFIG_USB_GADGETFS=m
136CONFIG_USB_FILE_STORAGE=m 136CONFIG_USB_MASS_STORAGE=m
137CONFIG_USB_G_SERIAL=m 137CONFIG_USB_G_SERIAL=m
138CONFIG_MMC=y 138CONFIG_MMC=y
139CONFIG_SDIO_UART=m 139CONFIG_SDIO_UART=m
diff --git a/arch/arm/configs/at91sam9g20_defconfig b/arch/arm/configs/at91sam9g20_defconfig
index e1b0e80b54a5..3b1881033ad8 100644
--- a/arch/arm/configs/at91sam9g20_defconfig
+++ b/arch/arm/configs/at91sam9g20_defconfig
@@ -96,7 +96,7 @@ CONFIG_USB_STORAGE=y
96CONFIG_USB_GADGET=y 96CONFIG_USB_GADGET=y
97CONFIG_USB_ZERO=m 97CONFIG_USB_ZERO=m
98CONFIG_USB_GADGETFS=m 98CONFIG_USB_GADGETFS=m
99CONFIG_USB_FILE_STORAGE=m 99CONFIG_USB_MASS_STORAGE=m
100CONFIG_USB_G_SERIAL=m 100CONFIG_USB_G_SERIAL=m
101CONFIG_MMC=y 101CONFIG_MMC=y
102CONFIG_MMC_ATMELMCI=m 102CONFIG_MMC_ATMELMCI=m
diff --git a/arch/arm/configs/corgi_defconfig b/arch/arm/configs/corgi_defconfig
index 4b8a25d9e686..1fd1d1de3220 100644
--- a/arch/arm/configs/corgi_defconfig
+++ b/arch/arm/configs/corgi_defconfig
@@ -218,7 +218,7 @@ CONFIG_USB_GADGET=y
218CONFIG_USB_ZERO=m 218CONFIG_USB_ZERO=m
219CONFIG_USB_ETH=m 219CONFIG_USB_ETH=m
220CONFIG_USB_GADGETFS=m 220CONFIG_USB_GADGETFS=m
221CONFIG_USB_FILE_STORAGE=m 221CONFIG_USB_MASS_STORAGE=m
222CONFIG_USB_G_SERIAL=m 222CONFIG_USB_G_SERIAL=m
223CONFIG_MMC=y 223CONFIG_MMC=y
224CONFIG_MMC_PXA=y 224CONFIG_MMC_PXA=y
diff --git a/arch/arm/configs/davinci_all_defconfig b/arch/arm/configs/davinci_all_defconfig
index 67b5abb6f857..4ea7c95719d2 100644
--- a/arch/arm/configs/davinci_all_defconfig
+++ b/arch/arm/configs/davinci_all_defconfig
@@ -144,7 +144,7 @@ CONFIG_USB_GADGET_DEBUG_FS=y
144CONFIG_USB_ZERO=m 144CONFIG_USB_ZERO=m
145CONFIG_USB_ETH=m 145CONFIG_USB_ETH=m
146CONFIG_USB_GADGETFS=m 146CONFIG_USB_GADGETFS=m
147CONFIG_USB_FILE_STORAGE=m 147CONFIG_USB_MASS_STORAGE=m
148CONFIG_USB_G_SERIAL=m 148CONFIG_USB_G_SERIAL=m
149CONFIG_USB_G_PRINTER=m 149CONFIG_USB_G_PRINTER=m
150CONFIG_USB_CDC_COMPOSITE=m 150CONFIG_USB_CDC_COMPOSITE=m
diff --git a/arch/arm/configs/h7202_defconfig b/arch/arm/configs/h7202_defconfig
index 69405a762423..e16d3f372e2a 100644
--- a/arch/arm/configs/h7202_defconfig
+++ b/arch/arm/configs/h7202_defconfig
@@ -34,8 +34,7 @@ CONFIG_FB_MODE_HELPERS=y
34CONFIG_USB_GADGET=m 34CONFIG_USB_GADGET=m
35CONFIG_USB_ZERO=m 35CONFIG_USB_ZERO=m
36CONFIG_USB_GADGETFS=m 36CONFIG_USB_GADGETFS=m
37CONFIG_USB_FILE_STORAGE=m 37CONFIG_USB_MASS_STORAGE=m
38CONFIG_USB_FILE_STORAGE_TEST=y
39CONFIG_USB_G_SERIAL=m 38CONFIG_USB_G_SERIAL=m
40CONFIG_EXT2_FS=y 39CONFIG_EXT2_FS=y
41CONFIG_TMPFS=y 40CONFIG_TMPFS=y
diff --git a/arch/arm/configs/magician_defconfig b/arch/arm/configs/magician_defconfig
index a691ef4c6008..557dd291288b 100644
--- a/arch/arm/configs/magician_defconfig
+++ b/arch/arm/configs/magician_defconfig
@@ -136,7 +136,7 @@ CONFIG_USB_PXA27X=y
136CONFIG_USB_ETH=m 136CONFIG_USB_ETH=m
137# CONFIG_USB_ETH_RNDIS is not set 137# CONFIG_USB_ETH_RNDIS is not set
138CONFIG_USB_GADGETFS=m 138CONFIG_USB_GADGETFS=m
139CONFIG_USB_FILE_STORAGE=m 139CONFIG_USB_MASS_STORAGE=m
140CONFIG_USB_G_SERIAL=m 140CONFIG_USB_G_SERIAL=m
141CONFIG_USB_CDC_COMPOSITE=m 141CONFIG_USB_CDC_COMPOSITE=m
142CONFIG_USB_GPIO_VBUS=y 142CONFIG_USB_GPIO_VBUS=y
diff --git a/arch/arm/configs/mini2440_defconfig b/arch/arm/configs/mini2440_defconfig
index 00630e6af45c..a07948a87caa 100644
--- a/arch/arm/configs/mini2440_defconfig
+++ b/arch/arm/configs/mini2440_defconfig
@@ -240,7 +240,7 @@ CONFIG_USB_GADGET_S3C2410=y
240CONFIG_USB_ZERO=m 240CONFIG_USB_ZERO=m
241CONFIG_USB_ETH=m 241CONFIG_USB_ETH=m
242CONFIG_USB_GADGETFS=m 242CONFIG_USB_GADGETFS=m
243CONFIG_USB_FILE_STORAGE=m 243CONFIG_USB_MASS_STORAGE=m
244CONFIG_USB_G_SERIAL=m 244CONFIG_USB_G_SERIAL=m
245CONFIG_USB_CDC_COMPOSITE=m 245CONFIG_USB_CDC_COMPOSITE=m
246CONFIG_MMC=y 246CONFIG_MMC=y
diff --git a/arch/arm/configs/omap1_defconfig b/arch/arm/configs/omap1_defconfig
index dde2a1af7b39..42eab9a2a0fd 100644
--- a/arch/arm/configs/omap1_defconfig
+++ b/arch/arm/configs/omap1_defconfig
@@ -214,8 +214,7 @@ CONFIG_USB_TEST=y
214CONFIG_USB_GADGET=y 214CONFIG_USB_GADGET=y
215CONFIG_USB_ETH=m 215CONFIG_USB_ETH=m
216# CONFIG_USB_ETH_RNDIS is not set 216# CONFIG_USB_ETH_RNDIS is not set
217CONFIG_USB_FILE_STORAGE=m 217CONFIG_USB_MASS_STORAGE=m
218CONFIG_USB_FILE_STORAGE_TEST=y
219CONFIG_MMC=y 218CONFIG_MMC=y
220CONFIG_MMC_SDHCI=y 219CONFIG_MMC_SDHCI=y
221CONFIG_MMC_SDHCI_PLTFM=y 220CONFIG_MMC_SDHCI_PLTFM=y
diff --git a/arch/arm/configs/prima2_defconfig b/arch/arm/configs/prima2_defconfig
index 807d4e2acb17..6a936c7c078a 100644
--- a/arch/arm/configs/prima2_defconfig
+++ b/arch/arm/configs/prima2_defconfig
@@ -37,7 +37,6 @@ CONFIG_SPI_SIRF=y
37CONFIG_SPI_SPIDEV=y 37CONFIG_SPI_SPIDEV=y
38# CONFIG_HWMON is not set 38# CONFIG_HWMON is not set
39CONFIG_USB_GADGET=y 39CONFIG_USB_GADGET=y
40CONFIG_USB_FILE_STORAGE=m
41CONFIG_USB_MASS_STORAGE=m 40CONFIG_USB_MASS_STORAGE=m
42CONFIG_MMC=y 41CONFIG_MMC=y
43CONFIG_MMC_SDHCI=y 42CONFIG_MMC_SDHCI=y
diff --git a/arch/arm/configs/spitz_defconfig b/arch/arm/configs/spitz_defconfig
index df77931a4326..2e0419d1b964 100644
--- a/arch/arm/configs/spitz_defconfig
+++ b/arch/arm/configs/spitz_defconfig
@@ -214,7 +214,7 @@ CONFIG_USB_GADGET_DUMMY_HCD=y
214CONFIG_USB_ZERO=m 214CONFIG_USB_ZERO=m
215CONFIG_USB_ETH=m 215CONFIG_USB_ETH=m
216CONFIG_USB_GADGETFS=m 216CONFIG_USB_GADGETFS=m
217CONFIG_USB_FILE_STORAGE=m 217CONFIG_USB_MASS_STORAGE=m
218CONFIG_USB_G_SERIAL=m 218CONFIG_USB_G_SERIAL=m
219CONFIG_MMC=y 219CONFIG_MMC=y
220CONFIG_MMC_PXA=y 220CONFIG_MMC_PXA=y
diff --git a/arch/arm/configs/stamp9g20_defconfig b/arch/arm/configs/stamp9g20_defconfig
index 52f1488591c7..b845f5519bcc 100644
--- a/arch/arm/configs/stamp9g20_defconfig
+++ b/arch/arm/configs/stamp9g20_defconfig
@@ -97,7 +97,7 @@ CONFIG_USB_STORAGE=y
97CONFIG_USB_GADGET=m 97CONFIG_USB_GADGET=m
98CONFIG_USB_ZERO=m 98CONFIG_USB_ZERO=m
99CONFIG_USB_ETH=m 99CONFIG_USB_ETH=m
100CONFIG_USB_FILE_STORAGE=m 100CONFIG_USB_MASS_STORAGE=m
101CONFIG_USB_G_SERIAL=m 101CONFIG_USB_G_SERIAL=m
102CONFIG_MMC=y 102CONFIG_MMC=y
103CONFIG_MMC_ATMELMCI=y 103CONFIG_MMC_ATMELMCI=y
diff --git a/arch/arm/configs/viper_defconfig b/arch/arm/configs/viper_defconfig
index 1d01ddd33122..d36e0d3c86ec 100644
--- a/arch/arm/configs/viper_defconfig
+++ b/arch/arm/configs/viper_defconfig
@@ -139,7 +139,7 @@ CONFIG_USB_SERIAL_MCT_U232=m
139CONFIG_USB_GADGET=m 139CONFIG_USB_GADGET=m
140CONFIG_USB_ETH=m 140CONFIG_USB_ETH=m
141CONFIG_USB_GADGETFS=m 141CONFIG_USB_GADGETFS=m
142CONFIG_USB_FILE_STORAGE=m 142CONFIG_USB_MASS_STORAGE=m
143CONFIG_USB_G_SERIAL=m 143CONFIG_USB_G_SERIAL=m
144CONFIG_USB_G_PRINTER=m 144CONFIG_USB_G_PRINTER=m
145CONFIG_RTC_CLASS=y 145CONFIG_RTC_CLASS=y
diff --git a/arch/arm/configs/zeus_defconfig b/arch/arm/configs/zeus_defconfig
index 547a3c1e59db..731d4f985310 100644
--- a/arch/arm/configs/zeus_defconfig
+++ b/arch/arm/configs/zeus_defconfig
@@ -143,7 +143,7 @@ CONFIG_USB_GADGET=m
143CONFIG_USB_PXA27X=y 143CONFIG_USB_PXA27X=y
144CONFIG_USB_ETH=m 144CONFIG_USB_ETH=m
145CONFIG_USB_GADGETFS=m 145CONFIG_USB_GADGETFS=m
146CONFIG_USB_FILE_STORAGE=m 146CONFIG_USB_MASS_STORAGE=m
147CONFIG_USB_G_SERIAL=m 147CONFIG_USB_G_SERIAL=m
148CONFIG_USB_G_PRINTER=m 148CONFIG_USB_G_PRINTER=m
149CONFIG_MMC=y 149CONFIG_MMC=y
diff --git a/arch/arm/mach-cns3xxx/cns3420vb.c b/arch/arm/mach-cns3xxx/cns3420vb.c
index 2c5fb4c7e509..ae305397003c 100644
--- a/arch/arm/mach-cns3xxx/cns3420vb.c
+++ b/arch/arm/mach-cns3xxx/cns3420vb.c
@@ -24,6 +24,8 @@
24#include <linux/mtd/mtd.h> 24#include <linux/mtd/mtd.h>
25#include <linux/mtd/physmap.h> 25#include <linux/mtd/physmap.h>
26#include <linux/mtd/partitions.h> 26#include <linux/mtd/partitions.h>
27#include <linux/usb/ehci_pdriver.h>
28#include <linux/usb/ohci_pdriver.h>
27#include <asm/setup.h> 29#include <asm/setup.h>
28#include <asm/mach-types.h> 30#include <asm/mach-types.h>
29#include <asm/hardware/gic.h> 31#include <asm/hardware/gic.h>
@@ -32,6 +34,7 @@
32#include <asm/mach/time.h> 34#include <asm/mach/time.h>
33#include <mach/cns3xxx.h> 35#include <mach/cns3xxx.h>
34#include <mach/irqs.h> 36#include <mach/irqs.h>
37#include <mach/pm.h>
35#include "core.h" 38#include "core.h"
36#include "devices.h" 39#include "devices.h"
37 40
@@ -125,13 +128,52 @@ static struct resource cns3xxx_usb_ehci_resources[] = {
125 128
126static u64 cns3xxx_usb_ehci_dma_mask = DMA_BIT_MASK(32); 129static u64 cns3xxx_usb_ehci_dma_mask = DMA_BIT_MASK(32);
127 130
131static int csn3xxx_usb_power_on(struct platform_device *pdev)
132{
133 /*
134 * EHCI and OHCI share the same clock and power,
135 * resetting twice would cause the 1st controller been reset.
136 * Therefore only do power up at the first up device, and
137 * power down at the last down device.
138 *
139 * Set USB AHB INCR length to 16
140 */
141 if (atomic_inc_return(&usb_pwr_ref) == 1) {
142 cns3xxx_pwr_power_up(1 << PM_PLL_HM_PD_CTRL_REG_OFFSET_PLL_USB);
143 cns3xxx_pwr_clk_en(1 << PM_CLK_GATE_REG_OFFSET_USB_HOST);
144 cns3xxx_pwr_soft_rst(1 << PM_SOFT_RST_REG_OFFST_USB_HOST);
145 __raw_writel((__raw_readl(MISC_CHIP_CONFIG_REG) | (0X2 << 24)),
146 MISC_CHIP_CONFIG_REG);
147 }
148
149 return 0;
150}
151
152static void csn3xxx_usb_power_off(struct platform_device *pdev)
153{
154 /*
155 * EHCI and OHCI share the same clock and power,
156 * resetting twice would cause the 1st controller been reset.
157 * Therefore only do power up at the first up device, and
158 * power down at the last down device.
159 */
160 if (atomic_dec_return(&usb_pwr_ref) == 0)
161 cns3xxx_pwr_clk_dis(1 << PM_CLK_GATE_REG_OFFSET_USB_HOST);
162}
163
164static struct usb_ehci_pdata cns3xxx_usb_ehci_pdata = {
165 .power_on = csn3xxx_usb_power_on,
166 .power_off = csn3xxx_usb_power_off,
167};
168
128static struct platform_device cns3xxx_usb_ehci_device = { 169static struct platform_device cns3xxx_usb_ehci_device = {
129 .name = "cns3xxx-ehci", 170 .name = "ehci-platform",
130 .num_resources = ARRAY_SIZE(cns3xxx_usb_ehci_resources), 171 .num_resources = ARRAY_SIZE(cns3xxx_usb_ehci_resources),
131 .resource = cns3xxx_usb_ehci_resources, 172 .resource = cns3xxx_usb_ehci_resources,
132 .dev = { 173 .dev = {
133 .dma_mask = &cns3xxx_usb_ehci_dma_mask, 174 .dma_mask = &cns3xxx_usb_ehci_dma_mask,
134 .coherent_dma_mask = DMA_BIT_MASK(32), 175 .coherent_dma_mask = DMA_BIT_MASK(32),
176 .platform_data = &cns3xxx_usb_ehci_pdata,
135 }, 177 },
136}; 178};
137 179
@@ -149,13 +191,20 @@ static struct resource cns3xxx_usb_ohci_resources[] = {
149 191
150static u64 cns3xxx_usb_ohci_dma_mask = DMA_BIT_MASK(32); 192static u64 cns3xxx_usb_ohci_dma_mask = DMA_BIT_MASK(32);
151 193
194static struct usb_ohci_pdata cns3xxx_usb_ohci_pdata = {
195 .num_ports = 1,
196 .power_on = csn3xxx_usb_power_on,
197 .power_off = csn3xxx_usb_power_off,
198};
199
152static struct platform_device cns3xxx_usb_ohci_device = { 200static struct platform_device cns3xxx_usb_ohci_device = {
153 .name = "cns3xxx-ohci", 201 .name = "ohci-platform",
154 .num_resources = ARRAY_SIZE(cns3xxx_usb_ohci_resources), 202 .num_resources = ARRAY_SIZE(cns3xxx_usb_ohci_resources),
155 .resource = cns3xxx_usb_ohci_resources, 203 .resource = cns3xxx_usb_ohci_resources,
156 .dev = { 204 .dev = {
157 .dma_mask = &cns3xxx_usb_ohci_dma_mask, 205 .dma_mask = &cns3xxx_usb_ohci_dma_mask,
158 .coherent_dma_mask = DMA_BIT_MASK(32), 206 .coherent_dma_mask = DMA_BIT_MASK(32),
207 .platform_data = &cns3xxx_usb_ohci_pdata,
159 }, 208 },
160}; 209};
161 210
diff --git a/arch/avr32/configs/atngw100_defconfig b/arch/avr32/configs/atngw100_defconfig
index a06bfccc2840..f4025db184ff 100644
--- a/arch/avr32/configs/atngw100_defconfig
+++ b/arch/avr32/configs/atngw100_defconfig
@@ -109,7 +109,7 @@ CONFIG_USB_GADGET_VBUS_DRAW=350
109CONFIG_USB_ZERO=m 109CONFIG_USB_ZERO=m
110CONFIG_USB_ETH=m 110CONFIG_USB_ETH=m
111CONFIG_USB_GADGETFS=m 111CONFIG_USB_GADGETFS=m
112CONFIG_USB_FILE_STORAGE=m 112CONFIG_USB_MASS_STORAGE=m
113CONFIG_USB_G_SERIAL=m 113CONFIG_USB_G_SERIAL=m
114CONFIG_USB_CDC_COMPOSITE=m 114CONFIG_USB_CDC_COMPOSITE=m
115CONFIG_MMC=y 115CONFIG_MMC=y
diff --git a/arch/avr32/configs/atngw100_evklcd100_defconfig b/arch/avr32/configs/atngw100_evklcd100_defconfig
index d8f1fe80d210..c76a49b9e9d0 100644
--- a/arch/avr32/configs/atngw100_evklcd100_defconfig
+++ b/arch/avr32/configs/atngw100_evklcd100_defconfig
@@ -125,7 +125,7 @@ CONFIG_USB_GADGET_VBUS_DRAW=350
125CONFIG_USB_ZERO=m 125CONFIG_USB_ZERO=m
126CONFIG_USB_ETH=m 126CONFIG_USB_ETH=m
127CONFIG_USB_GADGETFS=m 127CONFIG_USB_GADGETFS=m
128CONFIG_USB_FILE_STORAGE=m 128CONFIG_USB_MASS_STORAGE=m
129CONFIG_USB_G_SERIAL=m 129CONFIG_USB_G_SERIAL=m
130CONFIG_USB_CDC_COMPOSITE=m 130CONFIG_USB_CDC_COMPOSITE=m
131CONFIG_MMC=y 131CONFIG_MMC=y
diff --git a/arch/avr32/configs/atngw100_evklcd101_defconfig b/arch/avr32/configs/atngw100_evklcd101_defconfig
index d4c5b19ec950..2d8ab089a64e 100644
--- a/arch/avr32/configs/atngw100_evklcd101_defconfig
+++ b/arch/avr32/configs/atngw100_evklcd101_defconfig
@@ -124,7 +124,7 @@ CONFIG_USB_GADGET_VBUS_DRAW=350
124CONFIG_USB_ZERO=m 124CONFIG_USB_ZERO=m
125CONFIG_USB_ETH=m 125CONFIG_USB_ETH=m
126CONFIG_USB_GADGETFS=m 126CONFIG_USB_GADGETFS=m
127CONFIG_USB_FILE_STORAGE=m 127CONFIG_USB_MASS_STORAGE=m
128CONFIG_USB_G_SERIAL=m 128CONFIG_USB_G_SERIAL=m
129CONFIG_USB_CDC_COMPOSITE=m 129CONFIG_USB_CDC_COMPOSITE=m
130CONFIG_MMC=y 130CONFIG_MMC=y
diff --git a/arch/avr32/configs/atngw100_mrmt_defconfig b/arch/avr32/configs/atngw100_mrmt_defconfig
index 77ca4f905d2c..b189e0cab04b 100644
--- a/arch/avr32/configs/atngw100_mrmt_defconfig
+++ b/arch/avr32/configs/atngw100_mrmt_defconfig
@@ -99,7 +99,7 @@ CONFIG_SND_ATMEL_AC97C=m
99# CONFIG_SND_SPI is not set 99# CONFIG_SND_SPI is not set
100CONFIG_USB_GADGET=m 100CONFIG_USB_GADGET=m
101CONFIG_USB_GADGET_DEBUG_FILES=y 101CONFIG_USB_GADGET_DEBUG_FILES=y
102CONFIG_USB_FILE_STORAGE=m 102CONFIG_USB_MASS_STORAGE=m
103CONFIG_USB_G_SERIAL=m 103CONFIG_USB_G_SERIAL=m
104CONFIG_MMC=y 104CONFIG_MMC=y
105CONFIG_MMC_ATMELMCI=y 105CONFIG_MMC_ATMELMCI=y
diff --git a/arch/avr32/configs/atngw100mkii_defconfig b/arch/avr32/configs/atngw100mkii_defconfig
index 6e0dca4d3131..2e4de42a53c4 100644
--- a/arch/avr32/configs/atngw100mkii_defconfig
+++ b/arch/avr32/configs/atngw100mkii_defconfig
@@ -111,7 +111,7 @@ CONFIG_USB_GADGET_VBUS_DRAW=350
111CONFIG_USB_ZERO=m 111CONFIG_USB_ZERO=m
112CONFIG_USB_ETH=m 112CONFIG_USB_ETH=m
113CONFIG_USB_GADGETFS=m 113CONFIG_USB_GADGETFS=m
114CONFIG_USB_FILE_STORAGE=m 114CONFIG_USB_MASS_STORAGE=m
115CONFIG_USB_G_SERIAL=m 115CONFIG_USB_G_SERIAL=m
116CONFIG_USB_CDC_COMPOSITE=m 116CONFIG_USB_CDC_COMPOSITE=m
117CONFIG_MMC=y 117CONFIG_MMC=y
diff --git a/arch/avr32/configs/atngw100mkii_evklcd100_defconfig b/arch/avr32/configs/atngw100mkii_evklcd100_defconfig
index 7f2a344a5fa8..fad3cd22dfd3 100644
--- a/arch/avr32/configs/atngw100mkii_evklcd100_defconfig
+++ b/arch/avr32/configs/atngw100mkii_evklcd100_defconfig
@@ -128,7 +128,7 @@ CONFIG_USB_GADGET_VBUS_DRAW=350
128CONFIG_USB_ZERO=m 128CONFIG_USB_ZERO=m
129CONFIG_USB_ETH=m 129CONFIG_USB_ETH=m
130CONFIG_USB_GADGETFS=m 130CONFIG_USB_GADGETFS=m
131CONFIG_USB_FILE_STORAGE=m 131CONFIG_USB_MASS_STORAGE=m
132CONFIG_USB_G_SERIAL=m 132CONFIG_USB_G_SERIAL=m
133CONFIG_USB_CDC_COMPOSITE=m 133CONFIG_USB_CDC_COMPOSITE=m
134CONFIG_MMC=y 134CONFIG_MMC=y
diff --git a/arch/avr32/configs/atngw100mkii_evklcd101_defconfig b/arch/avr32/configs/atngw100mkii_evklcd101_defconfig
index 085eeba88f67..29986230aaa5 100644
--- a/arch/avr32/configs/atngw100mkii_evklcd101_defconfig
+++ b/arch/avr32/configs/atngw100mkii_evklcd101_defconfig
@@ -127,7 +127,7 @@ CONFIG_USB_GADGET_VBUS_DRAW=350
127CONFIG_USB_ZERO=m 127CONFIG_USB_ZERO=m
128CONFIG_USB_ETH=m 128CONFIG_USB_ETH=m
129CONFIG_USB_GADGETFS=m 129CONFIG_USB_GADGETFS=m
130CONFIG_USB_FILE_STORAGE=m 130CONFIG_USB_MASS_STORAGE=m
131CONFIG_USB_G_SERIAL=m 131CONFIG_USB_G_SERIAL=m
132CONFIG_USB_CDC_COMPOSITE=m 132CONFIG_USB_CDC_COMPOSITE=m
133CONFIG_MMC=y 133CONFIG_MMC=y
diff --git a/arch/avr32/configs/atstk1002_defconfig b/arch/avr32/configs/atstk1002_defconfig
index d1a887e64055..a582465e1cef 100644
--- a/arch/avr32/configs/atstk1002_defconfig
+++ b/arch/avr32/configs/atstk1002_defconfig
@@ -126,7 +126,7 @@ CONFIG_USB_GADGET=y
126CONFIG_USB_ZERO=m 126CONFIG_USB_ZERO=m
127CONFIG_USB_ETH=m 127CONFIG_USB_ETH=m
128CONFIG_USB_GADGETFS=m 128CONFIG_USB_GADGETFS=m
129CONFIG_USB_FILE_STORAGE=m 129CONFIG_USB_MASS_STORAGE=m
130CONFIG_USB_G_SERIAL=m 130CONFIG_USB_G_SERIAL=m
131CONFIG_USB_CDC_COMPOSITE=m 131CONFIG_USB_CDC_COMPOSITE=m
132CONFIG_MMC=y 132CONFIG_MMC=y
diff --git a/arch/avr32/configs/atstk1003_defconfig b/arch/avr32/configs/atstk1003_defconfig
index 956f2819ad45..57a79df2ce5d 100644
--- a/arch/avr32/configs/atstk1003_defconfig
+++ b/arch/avr32/configs/atstk1003_defconfig
@@ -105,7 +105,7 @@ CONFIG_USB_GADGET=y
105CONFIG_USB_ZERO=m 105CONFIG_USB_ZERO=m
106CONFIG_USB_ETH=m 106CONFIG_USB_ETH=m
107CONFIG_USB_GADGETFS=m 107CONFIG_USB_GADGETFS=m
108CONFIG_USB_FILE_STORAGE=m 108CONFIG_USB_MASS_STORAGE=m
109CONFIG_USB_G_SERIAL=m 109CONFIG_USB_G_SERIAL=m
110CONFIG_USB_CDC_COMPOSITE=m 110CONFIG_USB_CDC_COMPOSITE=m
111CONFIG_MMC=y 111CONFIG_MMC=y
diff --git a/arch/avr32/configs/atstk1004_defconfig b/arch/avr32/configs/atstk1004_defconfig
index 40c69f38c61a..1a49bd8c6340 100644
--- a/arch/avr32/configs/atstk1004_defconfig
+++ b/arch/avr32/configs/atstk1004_defconfig
@@ -104,7 +104,7 @@ CONFIG_USB_GADGET=y
104CONFIG_USB_ZERO=m 104CONFIG_USB_ZERO=m
105CONFIG_USB_ETH=m 105CONFIG_USB_ETH=m
106CONFIG_USB_GADGETFS=m 106CONFIG_USB_GADGETFS=m
107CONFIG_USB_FILE_STORAGE=m 107CONFIG_USB_MASS_STORAGE=m
108CONFIG_USB_G_SERIAL=m 108CONFIG_USB_G_SERIAL=m
109CONFIG_USB_CDC_COMPOSITE=m 109CONFIG_USB_CDC_COMPOSITE=m
110CONFIG_MMC=y 110CONFIG_MMC=y
diff --git a/arch/avr32/configs/atstk1006_defconfig b/arch/avr32/configs/atstk1006_defconfig
index 511eb8af356d..206a1b67f763 100644
--- a/arch/avr32/configs/atstk1006_defconfig
+++ b/arch/avr32/configs/atstk1006_defconfig
@@ -129,7 +129,7 @@ CONFIG_USB_GADGET=y
129CONFIG_USB_ZERO=m 129CONFIG_USB_ZERO=m
130CONFIG_USB_ETH=m 130CONFIG_USB_ETH=m
131CONFIG_USB_GADGETFS=m 131CONFIG_USB_GADGETFS=m
132CONFIG_USB_FILE_STORAGE=m 132CONFIG_USB_MASS_STORAGE=m
133CONFIG_USB_G_SERIAL=m 133CONFIG_USB_G_SERIAL=m
134CONFIG_USB_CDC_COMPOSITE=m 134CONFIG_USB_CDC_COMPOSITE=m
135CONFIG_MMC=y 135CONFIG_MMC=y
diff --git a/arch/avr32/configs/favr-32_defconfig b/arch/avr32/configs/favr-32_defconfig
index 19973b06170c..0421498d666b 100644
--- a/arch/avr32/configs/favr-32_defconfig
+++ b/arch/avr32/configs/favr-32_defconfig
@@ -117,7 +117,7 @@ CONFIG_USB_GADGET=y
117CONFIG_USB_ZERO=m 117CONFIG_USB_ZERO=m
118CONFIG_USB_ETH=m 118CONFIG_USB_ETH=m
119CONFIG_USB_GADGETFS=m 119CONFIG_USB_GADGETFS=m
120CONFIG_USB_FILE_STORAGE=m 120CONFIG_USB_MASS_STORAGE=m
121CONFIG_USB_G_SERIAL=m 121CONFIG_USB_G_SERIAL=m
122CONFIG_USB_CDC_COMPOSITE=m 122CONFIG_USB_CDC_COMPOSITE=m
123CONFIG_MMC=y 123CONFIG_MMC=y
diff --git a/arch/avr32/configs/hammerhead_defconfig b/arch/avr32/configs/hammerhead_defconfig
index 6f45681196d1..82f24eb251bd 100644
--- a/arch/avr32/configs/hammerhead_defconfig
+++ b/arch/avr32/configs/hammerhead_defconfig
@@ -127,7 +127,7 @@ CONFIG_USB_GADGET=y
127CONFIG_USB_ZERO=m 127CONFIG_USB_ZERO=m
128CONFIG_USB_ETH=m 128CONFIG_USB_ETH=m
129CONFIG_USB_GADGETFS=m 129CONFIG_USB_GADGETFS=m
130CONFIG_USB_FILE_STORAGE=m 130CONFIG_USB_MASS_STORAGE=m
131CONFIG_USB_G_SERIAL=m 131CONFIG_USB_G_SERIAL=m
132CONFIG_MMC=m 132CONFIG_MMC=m
133CONFIG_MMC_ATMELMCI=m 133CONFIG_MMC_ATMELMCI=m
diff --git a/arch/blackfin/configs/CM-BF527_defconfig b/arch/blackfin/configs/CM-BF527_defconfig
index c280a50e7943..f59c80ee78e3 100644
--- a/arch/blackfin/configs/CM-BF527_defconfig
+++ b/arch/blackfin/configs/CM-BF527_defconfig
@@ -106,7 +106,7 @@ CONFIG_MUSB_PIO_ONLY=y
106CONFIG_USB_STORAGE=m 106CONFIG_USB_STORAGE=m
107CONFIG_USB_GADGET=m 107CONFIG_USB_GADGET=m
108CONFIG_USB_ETH=m 108CONFIG_USB_ETH=m
109CONFIG_USB_FILE_STORAGE=m 109CONFIG_USB_MASS_STORAGE=m
110CONFIG_USB_G_SERIAL=m 110CONFIG_USB_G_SERIAL=m
111CONFIG_USB_G_PRINTER=m 111CONFIG_USB_G_PRINTER=m
112CONFIG_RTC_CLASS=y 112CONFIG_RTC_CLASS=y
diff --git a/arch/blackfin/configs/CM-BF548_defconfig b/arch/blackfin/configs/CM-BF548_defconfig
index 349922be01f3..e961483f1879 100644
--- a/arch/blackfin/configs/CM-BF548_defconfig
+++ b/arch/blackfin/configs/CM-BF548_defconfig
@@ -107,7 +107,7 @@ CONFIG_USB_ZERO=m
107CONFIG_USB_ETH=m 107CONFIG_USB_ETH=m
108# CONFIG_USB_ETH_RNDIS is not set 108# CONFIG_USB_ETH_RNDIS is not set
109CONFIG_USB_GADGETFS=m 109CONFIG_USB_GADGETFS=m
110CONFIG_USB_FILE_STORAGE=m 110CONFIG_USB_MASS_STORAGE=m
111CONFIG_USB_G_SERIAL=m 111CONFIG_USB_G_SERIAL=m
112CONFIG_USB_G_PRINTER=m 112CONFIG_USB_G_PRINTER=m
113CONFIG_MMC=m 113CONFIG_MMC=m
diff --git a/arch/blackfin/configs/CM-BF561_defconfig b/arch/blackfin/configs/CM-BF561_defconfig
index 0456deaa2d6f..24936b91a6ee 100644
--- a/arch/blackfin/configs/CM-BF561_defconfig
+++ b/arch/blackfin/configs/CM-BF561_defconfig
@@ -83,7 +83,7 @@ CONFIG_GPIOLIB=y
83CONFIG_GPIO_SYSFS=y 83CONFIG_GPIO_SYSFS=y
84CONFIG_USB_GADGET=m 84CONFIG_USB_GADGET=m
85CONFIG_USB_ETH=m 85CONFIG_USB_ETH=m
86CONFIG_USB_FILE_STORAGE=m 86CONFIG_USB_MASS_STORAGE=m
87CONFIG_USB_G_SERIAL=m 87CONFIG_USB_G_SERIAL=m
88CONFIG_USB_G_PRINTER=m 88CONFIG_USB_G_PRINTER=m
89CONFIG_MMC=y 89CONFIG_MMC=y
diff --git a/arch/mips/alchemy/common/Makefile b/arch/mips/alchemy/common/Makefile
index 407ebc00e661..cb83d8d21aef 100644
--- a/arch/mips/alchemy/common/Makefile
+++ b/arch/mips/alchemy/common/Makefile
@@ -6,7 +6,7 @@
6# 6#
7 7
8obj-y += prom.o time.o clocks.o platform.o power.o setup.o \ 8obj-y += prom.o time.o clocks.o platform.o power.o setup.o \
9 sleeper.o dma.o dbdma.o vss.o irq.o 9 sleeper.o dma.o dbdma.o vss.o irq.o usb.o
10 10
11# optional gpiolib support 11# optional gpiolib support
12ifeq ($(CONFIG_ALCHEMY_GPIO_INDIRECT),) 12ifeq ($(CONFIG_ALCHEMY_GPIO_INDIRECT),)
diff --git a/arch/mips/alchemy/common/platform.c b/arch/mips/alchemy/common/platform.c
index c0f3ce6dcb56..7af941d8e717 100644
--- a/arch/mips/alchemy/common/platform.c
+++ b/arch/mips/alchemy/common/platform.c
@@ -17,6 +17,8 @@
17#include <linux/platform_device.h> 17#include <linux/platform_device.h>
18#include <linux/serial_8250.h> 18#include <linux/serial_8250.h>
19#include <linux/slab.h> 19#include <linux/slab.h>
20#include <linux/usb/ehci_pdriver.h>
21#include <linux/usb/ohci_pdriver.h>
20 22
21#include <asm/mach-au1x00/au1000.h> 23#include <asm/mach-au1x00/au1000.h>
22#include <asm/mach-au1x00/au1xxx_dbdma.h> 24#include <asm/mach-au1x00/au1xxx_dbdma.h>
@@ -122,6 +124,53 @@ static void __init alchemy_setup_uarts(int ctype)
122static u64 alchemy_ohci_dmamask = DMA_BIT_MASK(32); 124static u64 alchemy_ohci_dmamask = DMA_BIT_MASK(32);
123static u64 __maybe_unused alchemy_ehci_dmamask = DMA_BIT_MASK(32); 125static u64 __maybe_unused alchemy_ehci_dmamask = DMA_BIT_MASK(32);
124 126
127/* Power on callback for the ehci platform driver */
128static int alchemy_ehci_power_on(struct platform_device *pdev)
129{
130 return alchemy_usb_control(ALCHEMY_USB_EHCI0, 1);
131}
132
133/* Power off/suspend callback for the ehci platform driver */
134static void alchemy_ehci_power_off(struct platform_device *pdev)
135{
136 alchemy_usb_control(ALCHEMY_USB_EHCI0, 0);
137}
138
139static struct usb_ehci_pdata alchemy_ehci_pdata = {
140 .no_io_watchdog = 1,
141 .power_on = alchemy_ehci_power_on,
142 .power_off = alchemy_ehci_power_off,
143 .power_suspend = alchemy_ehci_power_off,
144};
145
146/* Power on callback for the ohci platform driver */
147static int alchemy_ohci_power_on(struct platform_device *pdev)
148{
149 int unit;
150
151 unit = (pdev->id == 1) ?
152 ALCHEMY_USB_OHCI1 : ALCHEMY_USB_OHCI0;
153
154 return alchemy_usb_control(unit, 1);
155}
156
157/* Power off/suspend callback for the ohci platform driver */
158static void alchemy_ohci_power_off(struct platform_device *pdev)
159{
160 int unit;
161
162 unit = (pdev->id == 1) ?
163 ALCHEMY_USB_OHCI1 : ALCHEMY_USB_OHCI0;
164
165 alchemy_usb_control(unit, 0);
166}
167
168static struct usb_ohci_pdata alchemy_ohci_pdata = {
169 .power_on = alchemy_ohci_power_on,
170 .power_off = alchemy_ohci_power_off,
171 .power_suspend = alchemy_ohci_power_off,
172};
173
125static unsigned long alchemy_ohci_data[][2] __initdata = { 174static unsigned long alchemy_ohci_data[][2] __initdata = {
126 [ALCHEMY_CPU_AU1000] = { AU1000_USB_OHCI_PHYS_ADDR, AU1000_USB_HOST_INT }, 175 [ALCHEMY_CPU_AU1000] = { AU1000_USB_OHCI_PHYS_ADDR, AU1000_USB_HOST_INT },
127 [ALCHEMY_CPU_AU1500] = { AU1000_USB_OHCI_PHYS_ADDR, AU1500_USB_HOST_INT }, 176 [ALCHEMY_CPU_AU1500] = { AU1000_USB_OHCI_PHYS_ADDR, AU1500_USB_HOST_INT },
@@ -169,9 +218,10 @@ static void __init alchemy_setup_usb(int ctype)
169 res[1].start = alchemy_ohci_data[ctype][1]; 218 res[1].start = alchemy_ohci_data[ctype][1];
170 res[1].end = res[1].start; 219 res[1].end = res[1].start;
171 res[1].flags = IORESOURCE_IRQ; 220 res[1].flags = IORESOURCE_IRQ;
172 pdev->name = "au1xxx-ohci"; 221 pdev->name = "ohci-platform";
173 pdev->id = 0; 222 pdev->id = 0;
174 pdev->dev.dma_mask = &alchemy_ohci_dmamask; 223 pdev->dev.dma_mask = &alchemy_ohci_dmamask;
224 pdev->dev.platform_data = &alchemy_ohci_pdata;
175 225
176 if (platform_device_register(pdev)) 226 if (platform_device_register(pdev))
177 printk(KERN_INFO "Alchemy USB: cannot add OHCI0\n"); 227 printk(KERN_INFO "Alchemy USB: cannot add OHCI0\n");
@@ -188,9 +238,10 @@ static void __init alchemy_setup_usb(int ctype)
188 res[1].start = alchemy_ehci_data[ctype][1]; 238 res[1].start = alchemy_ehci_data[ctype][1];
189 res[1].end = res[1].start; 239 res[1].end = res[1].start;
190 res[1].flags = IORESOURCE_IRQ; 240 res[1].flags = IORESOURCE_IRQ;
191 pdev->name = "au1xxx-ehci"; 241 pdev->name = "ehci-platform";
192 pdev->id = 0; 242 pdev->id = 0;
193 pdev->dev.dma_mask = &alchemy_ehci_dmamask; 243 pdev->dev.dma_mask = &alchemy_ehci_dmamask;
244 pdev->dev.platform_data = &alchemy_ehci_pdata;
194 245
195 if (platform_device_register(pdev)) 246 if (platform_device_register(pdev))
196 printk(KERN_INFO "Alchemy USB: cannot add EHCI0\n"); 247 printk(KERN_INFO "Alchemy USB: cannot add EHCI0\n");
@@ -207,9 +258,10 @@ static void __init alchemy_setup_usb(int ctype)
207 res[1].start = AU1300_USB_INT; 258 res[1].start = AU1300_USB_INT;
208 res[1].end = res[1].start; 259 res[1].end = res[1].start;
209 res[1].flags = IORESOURCE_IRQ; 260 res[1].flags = IORESOURCE_IRQ;
210 pdev->name = "au1xxx-ohci"; 261 pdev->name = "ohci-platform";
211 pdev->id = 1; 262 pdev->id = 1;
212 pdev->dev.dma_mask = &alchemy_ohci_dmamask; 263 pdev->dev.dma_mask = &alchemy_ohci_dmamask;
264 pdev->dev.platform_data = &alchemy_ohci_pdata;
213 265
214 if (platform_device_register(pdev)) 266 if (platform_device_register(pdev))
215 printk(KERN_INFO "Alchemy USB: cannot add OHCI1\n"); 267 printk(KERN_INFO "Alchemy USB: cannot add OHCI1\n");
diff --git a/arch/mips/alchemy/common/usb.c b/arch/mips/alchemy/common/usb.c
new file mode 100644
index 000000000000..936af8359fb2
--- /dev/null
+++ b/arch/mips/alchemy/common/usb.c
@@ -0,0 +1,614 @@
1/*
2 * USB block power/access management abstraction.
3 *
4 * Au1000+: The OHCI block control register is at the far end of the OHCI memory
5 * area. Au1550 has OHCI on different base address. No need to handle
6 * UDC here.
7 * Au1200: one register to control access and clocks to O/EHCI, UDC and OTG
8 * as well as the PHY for EHCI and UDC.
9 *
10 */
11
12#include <linux/init.h>
13#include <linux/io.h>
14#include <linux/module.h>
15#include <linux/spinlock.h>
16#include <linux/syscore_ops.h>
17#include <asm/mach-au1x00/au1000.h>
18
19/* control register offsets */
20#define AU1000_OHCICFG 0x7fffc
21#define AU1550_OHCICFG 0x07ffc
22#define AU1200_USBCFG 0x04
23
24/* Au1000 USB block config bits */
25#define USBHEN_RD (1 << 4) /* OHCI reset-done indicator */
26#define USBHEN_CE (1 << 3) /* OHCI block clock enable */
27#define USBHEN_E (1 << 2) /* OHCI block enable */
28#define USBHEN_C (1 << 1) /* OHCI block coherency bit */
29#define USBHEN_BE (1 << 0) /* OHCI Big-Endian */
30
31/* Au1200 USB config bits */
32#define USBCFG_PFEN (1 << 31) /* prefetch enable (undoc) */
33#define USBCFG_RDCOMB (1 << 30) /* read combining (undoc) */
34#define USBCFG_UNKNOWN (5 << 20) /* unknown, leave this way */
35#define USBCFG_SSD (1 << 23) /* serial short detect en */
36#define USBCFG_PPE (1 << 19) /* HS PHY PLL */
37#define USBCFG_UCE (1 << 18) /* UDC clock enable */
38#define USBCFG_ECE (1 << 17) /* EHCI clock enable */
39#define USBCFG_OCE (1 << 16) /* OHCI clock enable */
40#define USBCFG_FLA(x) (((x) & 0x3f) << 8)
41#define USBCFG_UCAM (1 << 7) /* coherent access (undoc) */
42#define USBCFG_GME (1 << 6) /* OTG mem access */
43#define USBCFG_DBE (1 << 5) /* UDC busmaster enable */
44#define USBCFG_DME (1 << 4) /* UDC mem enable */
45#define USBCFG_EBE (1 << 3) /* EHCI busmaster enable */
46#define USBCFG_EME (1 << 2) /* EHCI mem enable */
47#define USBCFG_OBE (1 << 1) /* OHCI busmaster enable */
48#define USBCFG_OME (1 << 0) /* OHCI mem enable */
49#define USBCFG_INIT_AU1200 (USBCFG_PFEN | USBCFG_RDCOMB | USBCFG_UNKNOWN |\
50 USBCFG_SSD | USBCFG_FLA(0x20) | USBCFG_UCAM | \
51 USBCFG_GME | USBCFG_DBE | USBCFG_DME | \
52 USBCFG_EBE | USBCFG_EME | USBCFG_OBE | \
53 USBCFG_OME)
54
55/* Au1300 USB config registers */
56#define USB_DWC_CTRL1 0x00
57#define USB_DWC_CTRL2 0x04
58#define USB_VBUS_TIMER 0x10
59#define USB_SBUS_CTRL 0x14
60#define USB_MSR_ERR 0x18
61#define USB_DWC_CTRL3 0x1C
62#define USB_DWC_CTRL4 0x20
63#define USB_OTG_STATUS 0x28
64#define USB_DWC_CTRL5 0x2C
65#define USB_DWC_CTRL6 0x30
66#define USB_DWC_CTRL7 0x34
67#define USB_PHY_STATUS 0xC0
68#define USB_INT_STATUS 0xC4
69#define USB_INT_ENABLE 0xC8
70
71#define USB_DWC_CTRL1_OTGD 0x04 /* set to DISable OTG */
72#define USB_DWC_CTRL1_HSTRS 0x02 /* set to ENable EHCI */
73#define USB_DWC_CTRL1_DCRS 0x01 /* set to ENable UDC */
74
75#define USB_DWC_CTRL2_PHY1RS 0x04 /* set to enable PHY1 */
76#define USB_DWC_CTRL2_PHY0RS 0x02 /* set to enable PHY0 */
77#define USB_DWC_CTRL2_PHYRS 0x01 /* set to enable PHY */
78
79#define USB_DWC_CTRL3_OHCI1_CKEN (1 << 19)
80#define USB_DWC_CTRL3_OHCI0_CKEN (1 << 18)
81#define USB_DWC_CTRL3_EHCI0_CKEN (1 << 17)
82#define USB_DWC_CTRL3_OTG0_CKEN (1 << 16)
83
84#define USB_SBUS_CTRL_SBCA 0x04 /* coherent access */
85
86#define USB_INTEN_FORCE 0x20
87#define USB_INTEN_PHY 0x10
88#define USB_INTEN_UDC 0x08
89#define USB_INTEN_EHCI 0x04
90#define USB_INTEN_OHCI1 0x02
91#define USB_INTEN_OHCI0 0x01
92
93static DEFINE_SPINLOCK(alchemy_usb_lock);
94
95static inline void __au1300_usb_phyctl(void __iomem *base, int enable)
96{
97 unsigned long r, s;
98
99 r = __raw_readl(base + USB_DWC_CTRL2);
100 s = __raw_readl(base + USB_DWC_CTRL3);
101
102 s &= USB_DWC_CTRL3_OHCI1_CKEN | USB_DWC_CTRL3_OHCI0_CKEN |
103 USB_DWC_CTRL3_EHCI0_CKEN | USB_DWC_CTRL3_OTG0_CKEN;
104
105 if (enable) {
106 /* simply enable all PHYs */
107 r |= USB_DWC_CTRL2_PHY1RS | USB_DWC_CTRL2_PHY0RS |
108 USB_DWC_CTRL2_PHYRS;
109 __raw_writel(r, base + USB_DWC_CTRL2);
110 wmb();
111 } else if (!s) {
112 /* no USB block active, do disable all PHYs */
113 r &= ~(USB_DWC_CTRL2_PHY1RS | USB_DWC_CTRL2_PHY0RS |
114 USB_DWC_CTRL2_PHYRS);
115 __raw_writel(r, base + USB_DWC_CTRL2);
116 wmb();
117 }
118}
119
120static inline void __au1300_ohci_control(void __iomem *base, int enable, int id)
121{
122 unsigned long r;
123
124 if (enable) {
125 __raw_writel(1, base + USB_DWC_CTRL7); /* start OHCI clock */
126 wmb();
127
128 r = __raw_readl(base + USB_DWC_CTRL3); /* enable OHCI block */
129 r |= (id == 0) ? USB_DWC_CTRL3_OHCI0_CKEN
130 : USB_DWC_CTRL3_OHCI1_CKEN;
131 __raw_writel(r, base + USB_DWC_CTRL3);
132 wmb();
133
134 __au1300_usb_phyctl(base, enable); /* power up the PHYs */
135
136 r = __raw_readl(base + USB_INT_ENABLE);
137 r |= (id == 0) ? USB_INTEN_OHCI0 : USB_INTEN_OHCI1;
138 __raw_writel(r, base + USB_INT_ENABLE);
139 wmb();
140
141 /* reset the OHCI start clock bit */
142 __raw_writel(0, base + USB_DWC_CTRL7);
143 wmb();
144 } else {
145 r = __raw_readl(base + USB_INT_ENABLE);
146 r &= ~((id == 0) ? USB_INTEN_OHCI0 : USB_INTEN_OHCI1);
147 __raw_writel(r, base + USB_INT_ENABLE);
148 wmb();
149
150 r = __raw_readl(base + USB_DWC_CTRL3);
151 r &= ~((id == 0) ? USB_DWC_CTRL3_OHCI0_CKEN
152 : USB_DWC_CTRL3_OHCI1_CKEN);
153 __raw_writel(r, base + USB_DWC_CTRL3);
154 wmb();
155
156 __au1300_usb_phyctl(base, enable);
157 }
158}
159
160static inline void __au1300_ehci_control(void __iomem *base, int enable)
161{
162 unsigned long r;
163
164 if (enable) {
165 r = __raw_readl(base + USB_DWC_CTRL3);
166 r |= USB_DWC_CTRL3_EHCI0_CKEN;
167 __raw_writel(r, base + USB_DWC_CTRL3);
168 wmb();
169
170 r = __raw_readl(base + USB_DWC_CTRL1);
171 r |= USB_DWC_CTRL1_HSTRS;
172 __raw_writel(r, base + USB_DWC_CTRL1);
173 wmb();
174
175 __au1300_usb_phyctl(base, enable);
176
177 r = __raw_readl(base + USB_INT_ENABLE);
178 r |= USB_INTEN_EHCI;
179 __raw_writel(r, base + USB_INT_ENABLE);
180 wmb();
181 } else {
182 r = __raw_readl(base + USB_INT_ENABLE);
183 r &= ~USB_INTEN_EHCI;
184 __raw_writel(r, base + USB_INT_ENABLE);
185 wmb();
186
187 r = __raw_readl(base + USB_DWC_CTRL1);
188 r &= ~USB_DWC_CTRL1_HSTRS;
189 __raw_writel(r, base + USB_DWC_CTRL1);
190 wmb();
191
192 r = __raw_readl(base + USB_DWC_CTRL3);
193 r &= ~USB_DWC_CTRL3_EHCI0_CKEN;
194 __raw_writel(r, base + USB_DWC_CTRL3);
195 wmb();
196
197 __au1300_usb_phyctl(base, enable);
198 }
199}
200
201static inline void __au1300_udc_control(void __iomem *base, int enable)
202{
203 unsigned long r;
204
205 if (enable) {
206 r = __raw_readl(base + USB_DWC_CTRL1);
207 r |= USB_DWC_CTRL1_DCRS;
208 __raw_writel(r, base + USB_DWC_CTRL1);
209 wmb();
210
211 __au1300_usb_phyctl(base, enable);
212
213 r = __raw_readl(base + USB_INT_ENABLE);
214 r |= USB_INTEN_UDC;
215 __raw_writel(r, base + USB_INT_ENABLE);
216 wmb();
217 } else {
218 r = __raw_readl(base + USB_INT_ENABLE);
219 r &= ~USB_INTEN_UDC;
220 __raw_writel(r, base + USB_INT_ENABLE);
221 wmb();
222
223 r = __raw_readl(base + USB_DWC_CTRL1);
224 r &= ~USB_DWC_CTRL1_DCRS;
225 __raw_writel(r, base + USB_DWC_CTRL1);
226 wmb();
227
228 __au1300_usb_phyctl(base, enable);
229 }
230}
231
232static inline void __au1300_otg_control(void __iomem *base, int enable)
233{
234 unsigned long r;
235 if (enable) {
236 r = __raw_readl(base + USB_DWC_CTRL3);
237 r |= USB_DWC_CTRL3_OTG0_CKEN;
238 __raw_writel(r, base + USB_DWC_CTRL3);
239 wmb();
240
241 r = __raw_readl(base + USB_DWC_CTRL1);
242 r &= ~USB_DWC_CTRL1_OTGD;
243 __raw_writel(r, base + USB_DWC_CTRL1);
244 wmb();
245
246 __au1300_usb_phyctl(base, enable);
247 } else {
248 r = __raw_readl(base + USB_DWC_CTRL1);
249 r |= USB_DWC_CTRL1_OTGD;
250 __raw_writel(r, base + USB_DWC_CTRL1);
251 wmb();
252
253 r = __raw_readl(base + USB_DWC_CTRL3);
254 r &= ~USB_DWC_CTRL3_OTG0_CKEN;
255 __raw_writel(r, base + USB_DWC_CTRL3);
256 wmb();
257
258 __au1300_usb_phyctl(base, enable);
259 }
260}
261
262static inline int au1300_usb_control(int block, int enable)
263{
264 void __iomem *base =
265 (void __iomem *)KSEG1ADDR(AU1300_USB_CTL_PHYS_ADDR);
266 int ret = 0;
267
268 switch (block) {
269 case ALCHEMY_USB_OHCI0:
270 __au1300_ohci_control(base, enable, 0);
271 break;
272 case ALCHEMY_USB_OHCI1:
273 __au1300_ohci_control(base, enable, 1);
274 break;
275 case ALCHEMY_USB_EHCI0:
276 __au1300_ehci_control(base, enable);
277 break;
278 case ALCHEMY_USB_UDC0:
279 __au1300_udc_control(base, enable);
280 break;
281 case ALCHEMY_USB_OTG0:
282 __au1300_otg_control(base, enable);
283 break;
284 default:
285 ret = -ENODEV;
286 }
287 return ret;
288}
289
290static inline void au1300_usb_init(void)
291{
292 void __iomem *base =
293 (void __iomem *)KSEG1ADDR(AU1300_USB_CTL_PHYS_ADDR);
294
295 /* set some sane defaults. Note: we don't fiddle with DWC_CTRL4
296 * here at all: Port 2 routing (EHCI or UDC) must be set either
297 * by boot firmware or platform init code; I can't autodetect
298 * a sane setting.
299 */
300 __raw_writel(0, base + USB_INT_ENABLE); /* disable all USB irqs */
301 wmb();
302 __raw_writel(0, base + USB_DWC_CTRL3); /* disable all clocks */
303 wmb();
304 __raw_writel(~0, base + USB_MSR_ERR); /* clear all errors */
305 wmb();
306 __raw_writel(~0, base + USB_INT_STATUS); /* clear int status */
307 wmb();
308 /* set coherent access bit */
309 __raw_writel(USB_SBUS_CTRL_SBCA, base + USB_SBUS_CTRL);
310 wmb();
311}
312
313static inline void __au1200_ohci_control(void __iomem *base, int enable)
314{
315 unsigned long r = __raw_readl(base + AU1200_USBCFG);
316 if (enable) {
317 __raw_writel(r | USBCFG_OCE, base + AU1200_USBCFG);
318 wmb();
319 udelay(2000);
320 } else {
321 __raw_writel(r & ~USBCFG_OCE, base + AU1200_USBCFG);
322 wmb();
323 udelay(1000);
324 }
325}
326
327static inline void __au1200_ehci_control(void __iomem *base, int enable)
328{
329 unsigned long r = __raw_readl(base + AU1200_USBCFG);
330 if (enable) {
331 __raw_writel(r | USBCFG_ECE | USBCFG_PPE, base + AU1200_USBCFG);
332 wmb();
333 udelay(1000);
334 } else {
335 if (!(r & USBCFG_UCE)) /* UDC also off? */
336 r &= ~USBCFG_PPE; /* yes: disable HS PHY PLL */
337 __raw_writel(r & ~USBCFG_ECE, base + AU1200_USBCFG);
338 wmb();
339 udelay(1000);
340 }
341}
342
343static inline void __au1200_udc_control(void __iomem *base, int enable)
344{
345 unsigned long r = __raw_readl(base + AU1200_USBCFG);
346 if (enable) {
347 __raw_writel(r | USBCFG_UCE | USBCFG_PPE, base + AU1200_USBCFG);
348 wmb();
349 } else {
350 if (!(r & USBCFG_ECE)) /* EHCI also off? */
351 r &= ~USBCFG_PPE; /* yes: disable HS PHY PLL */
352 __raw_writel(r & ~USBCFG_UCE, base + AU1200_USBCFG);
353 wmb();
354 }
355}
356
357static inline int au1200_coherency_bug(void)
358{
359#if defined(CONFIG_DMA_COHERENT)
360 /* Au1200 AB USB does not support coherent memory */
361 if (!(read_c0_prid() & 0xff)) {
362 printk(KERN_INFO "Au1200 USB: this is chip revision AB !!\n");
363 printk(KERN_INFO "Au1200 USB: update your board or re-configure"
364 " the kernel\n");
365 return -ENODEV;
366 }
367#endif
368 return 0;
369}
370
371static inline int au1200_usb_control(int block, int enable)
372{
373 void __iomem *base =
374 (void __iomem *)KSEG1ADDR(AU1200_USB_CTL_PHYS_ADDR);
375 int ret = 0;
376
377 switch (block) {
378 case ALCHEMY_USB_OHCI0:
379 ret = au1200_coherency_bug();
380 if (ret && enable)
381 goto out;
382 __au1200_ohci_control(base, enable);
383 break;
384 case ALCHEMY_USB_UDC0:
385 __au1200_udc_control(base, enable);
386 break;
387 case ALCHEMY_USB_EHCI0:
388 ret = au1200_coherency_bug();
389 if (ret && enable)
390 goto out;
391 __au1200_ehci_control(base, enable);
392 break;
393 default:
394 ret = -ENODEV;
395 }
396out:
397 return ret;
398}
399
400
401/* initialize USB block(s) to a known working state */
402static inline void au1200_usb_init(void)
403{
404 void __iomem *base =
405 (void __iomem *)KSEG1ADDR(AU1200_USB_CTL_PHYS_ADDR);
406 __raw_writel(USBCFG_INIT_AU1200, base + AU1200_USBCFG);
407 wmb();
408 udelay(1000);
409}
410
411static inline void au1000_usb_init(unsigned long rb, int reg)
412{
413 void __iomem *base = (void __iomem *)KSEG1ADDR(rb + reg);
414 unsigned long r = __raw_readl(base);
415
416#if defined(__BIG_ENDIAN)
417 r |= USBHEN_BE;
418#endif
419 r |= USBHEN_C;
420
421 __raw_writel(r, base);
422 wmb();
423 udelay(1000);
424}
425
426
427static inline void __au1xx0_ohci_control(int enable, unsigned long rb, int creg)
428{
429 void __iomem *base = (void __iomem *)KSEG1ADDR(rb);
430 unsigned long r = __raw_readl(base + creg);
431
432 if (enable) {
433 __raw_writel(r | USBHEN_CE, base + creg);
434 wmb();
435 udelay(1000);
436 __raw_writel(r | USBHEN_CE | USBHEN_E, base + creg);
437 wmb();
438 udelay(1000);
439
440 /* wait for reset complete (read reg twice: au1500 erratum) */
441 while (__raw_readl(base + creg),
442 !(__raw_readl(base + creg) & USBHEN_RD))
443 udelay(1000);
444 } else {
445 __raw_writel(r & ~(USBHEN_CE | USBHEN_E), base + creg);
446 wmb();
447 }
448}
449
450static inline int au1000_usb_control(int block, int enable, unsigned long rb,
451 int creg)
452{
453 int ret = 0;
454
455 switch (block) {
456 case ALCHEMY_USB_OHCI0:
457 __au1xx0_ohci_control(enable, rb, creg);
458 break;
459 default:
460 ret = -ENODEV;
461 }
462 return ret;
463}
464
465/*
466 * alchemy_usb_control - control Alchemy on-chip USB blocks
467 * @block: USB block to target
468 * @enable: set 1 to enable a block, 0 to disable
469 */
470int alchemy_usb_control(int block, int enable)
471{
472 unsigned long flags;
473 int ret;
474
475 spin_lock_irqsave(&alchemy_usb_lock, flags);
476 switch (alchemy_get_cputype()) {
477 case ALCHEMY_CPU_AU1000:
478 case ALCHEMY_CPU_AU1500:
479 case ALCHEMY_CPU_AU1100:
480 ret = au1000_usb_control(block, enable,
481 AU1000_USB_OHCI_PHYS_ADDR, AU1000_OHCICFG);
482 break;
483 case ALCHEMY_CPU_AU1550:
484 ret = au1000_usb_control(block, enable,
485 AU1550_USB_OHCI_PHYS_ADDR, AU1550_OHCICFG);
486 break;
487 case ALCHEMY_CPU_AU1200:
488 ret = au1200_usb_control(block, enable);
489 break;
490 case ALCHEMY_CPU_AU1300:
491 ret = au1300_usb_control(block, enable);
492 break;
493 default:
494 ret = -ENODEV;
495 }
496 spin_unlock_irqrestore(&alchemy_usb_lock, flags);
497 return ret;
498}
499EXPORT_SYMBOL_GPL(alchemy_usb_control);
500
501
502static unsigned long alchemy_usb_pmdata[2];
503
504static void au1000_usb_pm(unsigned long br, int creg, int susp)
505{
506 void __iomem *base = (void __iomem *)KSEG1ADDR(br);
507
508 if (susp) {
509 alchemy_usb_pmdata[0] = __raw_readl(base + creg);
510 /* There appears to be some undocumented reset register.... */
511 __raw_writel(0, base + 0x04);
512 wmb();
513 __raw_writel(0, base + creg);
514 wmb();
515 } else {
516 __raw_writel(alchemy_usb_pmdata[0], base + creg);
517 wmb();
518 }
519}
520
521static void au1200_usb_pm(int susp)
522{
523 void __iomem *base =
524 (void __iomem *)KSEG1ADDR(AU1200_USB_OTG_PHYS_ADDR);
525 if (susp) {
526 /* save OTG_CAP/MUX registers which indicate port routing */
527 /* FIXME: write an OTG driver to do that */
528 alchemy_usb_pmdata[0] = __raw_readl(base + 0x00);
529 alchemy_usb_pmdata[1] = __raw_readl(base + 0x04);
530 } else {
531 /* restore access to all MMIO areas */
532 au1200_usb_init();
533
534 /* restore OTG_CAP/MUX registers */
535 __raw_writel(alchemy_usb_pmdata[0], base + 0x00);
536 __raw_writel(alchemy_usb_pmdata[1], base + 0x04);
537 wmb();
538 }
539}
540
541static void au1300_usb_pm(int susp)
542{
543 void __iomem *base =
544 (void __iomem *)KSEG1ADDR(AU1300_USB_CTL_PHYS_ADDR);
545 /* remember Port2 routing */
546 if (susp) {
547 alchemy_usb_pmdata[0] = __raw_readl(base + USB_DWC_CTRL4);
548 } else {
549 au1300_usb_init();
550 __raw_writel(alchemy_usb_pmdata[0], base + USB_DWC_CTRL4);
551 wmb();
552 }
553}
554
555static void alchemy_usb_pm(int susp)
556{
557 switch (alchemy_get_cputype()) {
558 case ALCHEMY_CPU_AU1000:
559 case ALCHEMY_CPU_AU1500:
560 case ALCHEMY_CPU_AU1100:
561 au1000_usb_pm(AU1000_USB_OHCI_PHYS_ADDR, AU1000_OHCICFG, susp);
562 break;
563 case ALCHEMY_CPU_AU1550:
564 au1000_usb_pm(AU1550_USB_OHCI_PHYS_ADDR, AU1550_OHCICFG, susp);
565 break;
566 case ALCHEMY_CPU_AU1200:
567 au1200_usb_pm(susp);
568 break;
569 case ALCHEMY_CPU_AU1300:
570 au1300_usb_pm(susp);
571 break;
572 }
573}
574
575static int alchemy_usb_suspend(void)
576{
577 alchemy_usb_pm(1);
578 return 0;
579}
580
581static void alchemy_usb_resume(void)
582{
583 alchemy_usb_pm(0);
584}
585
586static struct syscore_ops alchemy_usb_pm_ops = {
587 .suspend = alchemy_usb_suspend,
588 .resume = alchemy_usb_resume,
589};
590
591static int __init alchemy_usb_init(void)
592{
593 switch (alchemy_get_cputype()) {
594 case ALCHEMY_CPU_AU1000:
595 case ALCHEMY_CPU_AU1500:
596 case ALCHEMY_CPU_AU1100:
597 au1000_usb_init(AU1000_USB_OHCI_PHYS_ADDR, AU1000_OHCICFG);
598 break;
599 case ALCHEMY_CPU_AU1550:
600 au1000_usb_init(AU1550_USB_OHCI_PHYS_ADDR, AU1550_OHCICFG);
601 break;
602 case ALCHEMY_CPU_AU1200:
603 au1200_usb_init();
604 break;
605 case ALCHEMY_CPU_AU1300:
606 au1300_usb_init();
607 break;
608 }
609
610 register_syscore_ops(&alchemy_usb_pm_ops);
611
612 return 0;
613}
614arch_initcall(alchemy_usb_init);
diff --git a/arch/mips/ath79/dev-usb.c b/arch/mips/ath79/dev-usb.c
index 072bb9be2304..bd2bc108e1b5 100644
--- a/arch/mips/ath79/dev-usb.c
+++ b/arch/mips/ath79/dev-usb.c
@@ -50,13 +50,11 @@ static u64 ath79_ehci_dmamask = DMA_BIT_MASK(32);
50 50
51static struct usb_ehci_pdata ath79_ehci_pdata_v1 = { 51static struct usb_ehci_pdata ath79_ehci_pdata_v1 = {
52 .has_synopsys_hc_bug = 1, 52 .has_synopsys_hc_bug = 1,
53 .port_power_off = 1,
54}; 53};
55 54
56static struct usb_ehci_pdata ath79_ehci_pdata_v2 = { 55static struct usb_ehci_pdata ath79_ehci_pdata_v2 = {
57 .caps_offset = 0x100, 56 .caps_offset = 0x100,
58 .has_tt = 1, 57 .has_tt = 1,
59 .port_power_off = 1,
60}; 58};
61 59
62static struct platform_device ath79_ehci_device = { 60static struct platform_device ath79_ehci_device = {
diff --git a/arch/mips/configs/bcm47xx_defconfig b/arch/mips/configs/bcm47xx_defconfig
index b6fde2bb51b6..4ca8e5c99225 100644
--- a/arch/mips/configs/bcm47xx_defconfig
+++ b/arch/mips/configs/bcm47xx_defconfig
@@ -473,7 +473,7 @@ CONFIG_USB_GADGET_NET2280=y
473CONFIG_USB_ZERO=m 473CONFIG_USB_ZERO=m
474CONFIG_USB_ETH=m 474CONFIG_USB_ETH=m
475CONFIG_USB_GADGETFS=m 475CONFIG_USB_GADGETFS=m
476CONFIG_USB_FILE_STORAGE=m 476CONFIG_USB_MASS_STORAGE=m
477CONFIG_USB_G_SERIAL=m 477CONFIG_USB_G_SERIAL=m
478CONFIG_USB_MIDI_GADGET=m 478CONFIG_USB_MIDI_GADGET=m
479CONFIG_LEDS_CLASS=y 479CONFIG_LEDS_CLASS=y
diff --git a/arch/mips/configs/db1000_defconfig b/arch/mips/configs/db1000_defconfig
index 17a36c125172..face9d26e6d5 100644
--- a/arch/mips/configs/db1000_defconfig
+++ b/arch/mips/configs/db1000_defconfig
@@ -233,6 +233,7 @@ CONFIG_USB_EHCI_HCD=y
233CONFIG_USB_EHCI_ROOT_HUB_TT=y 233CONFIG_USB_EHCI_ROOT_HUB_TT=y
234CONFIG_USB_EHCI_TT_NEWSCHED=y 234CONFIG_USB_EHCI_TT_NEWSCHED=y
235CONFIG_USB_OHCI_HCD=y 235CONFIG_USB_OHCI_HCD=y
236CONFIG_USB_OHCI_HCD_PLATFORM=y
236CONFIG_USB_UHCI_HCD=y 237CONFIG_USB_UHCI_HCD=y
237CONFIG_USB_STORAGE=y 238CONFIG_USB_STORAGE=y
238CONFIG_NEW_LEDS=y 239CONFIG_NEW_LEDS=y
diff --git a/arch/mips/configs/db1235_defconfig b/arch/mips/configs/db1235_defconfig
index c48998ffd198..14752dde7540 100644
--- a/arch/mips/configs/db1235_defconfig
+++ b/arch/mips/configs/db1235_defconfig
@@ -346,8 +346,10 @@ CONFIG_USB=y
346CONFIG_USB_DYNAMIC_MINORS=y 346CONFIG_USB_DYNAMIC_MINORS=y
347CONFIG_USB_SUSPEND=y 347CONFIG_USB_SUSPEND=y
348CONFIG_USB_EHCI_HCD=y 348CONFIG_USB_EHCI_HCD=y
349CONFIG_USB_EHCI_HCD_PLATFORM=y
349CONFIG_USB_EHCI_ROOT_HUB_TT=y 350CONFIG_USB_EHCI_ROOT_HUB_TT=y
350CONFIG_USB_OHCI_HCD=y 351CONFIG_USB_OHCI_HCD=y
352CONFIG_USB_OHCI_HCD_PLATFORM=y
351CONFIG_USB_STORAGE=y 353CONFIG_USB_STORAGE=y
352CONFIG_MMC=y 354CONFIG_MMC=y
353CONFIG_MMC_CLKGATE=y 355CONFIG_MMC_CLKGATE=y
diff --git a/arch/mips/configs/gpr_defconfig b/arch/mips/configs/gpr_defconfig
index 48a40aefaf58..fb64589015fc 100644
--- a/arch/mips/configs/gpr_defconfig
+++ b/arch/mips/configs/gpr_defconfig
@@ -291,6 +291,7 @@ CONFIG_USB_MON=y
291CONFIG_USB_EHCI_HCD=y 291CONFIG_USB_EHCI_HCD=y
292CONFIG_USB_EHCI_ROOT_HUB_TT=y 292CONFIG_USB_EHCI_ROOT_HUB_TT=y
293CONFIG_USB_OHCI_HCD=y 293CONFIG_USB_OHCI_HCD=y
294CONFIG_USB_OHCI_HCD_PLATFORM=y
294CONFIG_USB_STORAGE=m 295CONFIG_USB_STORAGE=m
295CONFIG_USB_LIBUSUAL=y 296CONFIG_USB_LIBUSUAL=y
296CONFIG_USB_SERIAL=y 297CONFIG_USB_SERIAL=y
diff --git a/arch/mips/configs/ls1b_defconfig b/arch/mips/configs/ls1b_defconfig
index 80cff8bea8e8..7eb75543ca1a 100644
--- a/arch/mips/configs/ls1b_defconfig
+++ b/arch/mips/configs/ls1b_defconfig
@@ -76,6 +76,7 @@ CONFIG_HID_GENERIC=m
76CONFIG_USB=y 76CONFIG_USB=y
77CONFIG_USB_ANNOUNCE_NEW_DEVICES=y 77CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
78CONFIG_USB_EHCI_HCD=y 78CONFIG_USB_EHCI_HCD=y
79CONFIG_USB_EHCI_HCD_PLATFORM=y
79# CONFIG_USB_EHCI_TT_NEWSCHED is not set 80# CONFIG_USB_EHCI_TT_NEWSCHED is not set
80CONFIG_USB_STORAGE=m 81CONFIG_USB_STORAGE=m
81CONFIG_USB_SERIAL=m 82CONFIG_USB_SERIAL=m
diff --git a/arch/mips/configs/mtx1_defconfig b/arch/mips/configs/mtx1_defconfig
index 46c61edcdf7b..9fa8f16068d8 100644
--- a/arch/mips/configs/mtx1_defconfig
+++ b/arch/mips/configs/mtx1_defconfig
@@ -581,6 +581,7 @@ CONFIG_USB_MON=m
581CONFIG_USB_EHCI_HCD=m 581CONFIG_USB_EHCI_HCD=m
582CONFIG_USB_EHCI_ROOT_HUB_TT=y 582CONFIG_USB_EHCI_ROOT_HUB_TT=y
583CONFIG_USB_OHCI_HCD=m 583CONFIG_USB_OHCI_HCD=m
584CONFIG_USB_OHCI_HCD_PLATFORM=y
584CONFIG_USB_UHCI_HCD=m 585CONFIG_USB_UHCI_HCD=m
585CONFIG_USB_U132_HCD=m 586CONFIG_USB_U132_HCD=m
586CONFIG_USB_SL811_HCD=m 587CONFIG_USB_SL811_HCD=m
@@ -661,7 +662,7 @@ CONFIG_USB_GADGET_NET2280=y
661CONFIG_USB_ZERO=m 662CONFIG_USB_ZERO=m
662CONFIG_USB_ETH=m 663CONFIG_USB_ETH=m
663CONFIG_USB_GADGETFS=m 664CONFIG_USB_GADGETFS=m
664CONFIG_USB_FILE_STORAGE=m 665CONFIG_USB_MASS_STORAGE=m
665CONFIG_USB_G_SERIAL=m 666CONFIG_USB_G_SERIAL=m
666CONFIG_USB_MIDI_GADGET=m 667CONFIG_USB_MIDI_GADGET=m
667CONFIG_MMC=m 668CONFIG_MMC=m
diff --git a/arch/mips/loongson1/common/platform.c b/arch/mips/loongson1/common/platform.c
index e92d59c4bd78..0412ad61e290 100644
--- a/arch/mips/loongson1/common/platform.c
+++ b/arch/mips/loongson1/common/platform.c
@@ -13,6 +13,7 @@
13#include <linux/phy.h> 13#include <linux/phy.h>
14#include <linux/serial_8250.h> 14#include <linux/serial_8250.h>
15#include <linux/stmmac.h> 15#include <linux/stmmac.h>
16#include <linux/usb/ehci_pdriver.h>
16#include <asm-generic/sizes.h> 17#include <asm-generic/sizes.h>
17 18
18#include <loongson1.h> 19#include <loongson1.h>
@@ -107,13 +108,17 @@ static struct resource ls1x_ehci_resources[] = {
107 }, 108 },
108}; 109};
109 110
111static struct usb_ehci_pdata ls1x_ehci_pdata = {
112};
113
110struct platform_device ls1x_ehci_device = { 114struct platform_device ls1x_ehci_device = {
111 .name = "ls1x-ehci", 115 .name = "ehci-platform",
112 .id = -1, 116 .id = -1,
113 .num_resources = ARRAY_SIZE(ls1x_ehci_resources), 117 .num_resources = ARRAY_SIZE(ls1x_ehci_resources),
114 .resource = ls1x_ehci_resources, 118 .resource = ls1x_ehci_resources,
115 .dev = { 119 .dev = {
116 .dma_mask = &ls1x_ehci_dmamask, 120 .dma_mask = &ls1x_ehci_dmamask,
121 .platform_data = &ls1x_ehci_pdata,
117 }, 122 },
118}; 123};
119 124
diff --git a/arch/mips/netlogic/xlr/platform.c b/arch/mips/netlogic/xlr/platform.c
index 71b44d82621d..507230eeb768 100644
--- a/arch/mips/netlogic/xlr/platform.c
+++ b/arch/mips/netlogic/xlr/platform.c
@@ -15,6 +15,8 @@
15#include <linux/serial_8250.h> 15#include <linux/serial_8250.h>
16#include <linux/serial_reg.h> 16#include <linux/serial_reg.h>
17#include <linux/i2c.h> 17#include <linux/i2c.h>
18#include <linux/usb/ehci_pdriver.h>
19#include <linux/usb/ohci_pdriver.h>
18 20
19#include <asm/netlogic/haldefs.h> 21#include <asm/netlogic/haldefs.h>
20#include <asm/netlogic/xlr/iomap.h> 22#include <asm/netlogic/xlr/iomap.h>
@@ -123,12 +125,18 @@ static u64 xls_usb_dmamask = ~(u32)0;
123 }, \ 125 }, \
124 } 126 }
125 127
128static struct usb_ehci_pdata xls_usb_ehci_pdata = {
129 .caps_offset = 0,
130};
131
132static struct usb_ohci_pdata xls_usb_ohci_pdata;
133
126static struct platform_device xls_usb_ehci_device = 134static struct platform_device xls_usb_ehci_device =
127 USB_PLATFORM_DEV("ehci-xls", 0, PIC_USB_IRQ); 135 USB_PLATFORM_DEV("ehci-platform", 0, PIC_USB_IRQ);
128static struct platform_device xls_usb_ohci_device_0 = 136static struct platform_device xls_usb_ohci_device_0 =
129 USB_PLATFORM_DEV("ohci-xls-0", 1, PIC_USB_IRQ); 137 USB_PLATFORM_DEV("ohci-platform", 1, PIC_USB_IRQ);
130static struct platform_device xls_usb_ohci_device_1 = 138static struct platform_device xls_usb_ohci_device_1 =
131 USB_PLATFORM_DEV("ohci-xls-1", 2, PIC_USB_IRQ); 139 USB_PLATFORM_DEV("ohci-platform", 2, PIC_USB_IRQ);
132 140
133static struct platform_device *xls_platform_devices[] = { 141static struct platform_device *xls_platform_devices[] = {
134 &xls_usb_ehci_device, 142 &xls_usb_ehci_device,
@@ -172,14 +180,17 @@ int xls_platform_usb_init(void)
172 memres = CPHYSADDR((unsigned long)usb_mmio); 180 memres = CPHYSADDR((unsigned long)usb_mmio);
173 xls_usb_ehci_device.resource[0].start = memres; 181 xls_usb_ehci_device.resource[0].start = memres;
174 xls_usb_ehci_device.resource[0].end = memres + 0x400 - 1; 182 xls_usb_ehci_device.resource[0].end = memres + 0x400 - 1;
183 xls_usb_ehci_device.dev.platform_data = &xls_usb_ehci_pdata;
175 184
176 memres += 0x400; 185 memres += 0x400;
177 xls_usb_ohci_device_0.resource[0].start = memres; 186 xls_usb_ohci_device_0.resource[0].start = memres;
178 xls_usb_ohci_device_0.resource[0].end = memres + 0x400 - 1; 187 xls_usb_ohci_device_0.resource[0].end = memres + 0x400 - 1;
188 xls_usb_ohci_device_0.dev.platform_data = &xls_usb_ohci_pdata;
179 189
180 memres += 0x400; 190 memres += 0x400;
181 xls_usb_ohci_device_1.resource[0].start = memres; 191 xls_usb_ohci_device_1.resource[0].start = memres;
182 xls_usb_ohci_device_1.resource[0].end = memres + 0x400 - 1; 192 xls_usb_ohci_device_1.resource[0].end = memres + 0x400 - 1;
193 xls_usb_ohci_device_1.dev.platform_data = &xls_usb_ohci_pdata;
183 194
184 return platform_add_devices(xls_platform_devices, 195 return platform_add_devices(xls_platform_devices,
185 ARRAY_SIZE(xls_platform_devices)); 196 ARRAY_SIZE(xls_platform_devices));
diff --git a/arch/mips/pnx8550/common/platform.c b/arch/mips/pnx8550/common/platform.c
index 5264cc09a27b..0a8faeaa7b70 100644
--- a/arch/mips/pnx8550/common/platform.c
+++ b/arch/mips/pnx8550/common/platform.c
@@ -20,6 +20,7 @@
20#include <linux/serial.h> 20#include <linux/serial.h>
21#include <linux/serial_pnx8xxx.h> 21#include <linux/serial_pnx8xxx.h>
22#include <linux/platform_device.h> 22#include <linux/platform_device.h>
23#include <linux/usb/ohci_pdriver.h>
23 24
24#include <int.h> 25#include <int.h>
25#include <usb.h> 26#include <usb.h>
@@ -96,12 +97,40 @@ static u64 ohci_dmamask = DMA_BIT_MASK(32);
96 97
97static u64 uart_dmamask = DMA_BIT_MASK(32); 98static u64 uart_dmamask = DMA_BIT_MASK(32);
98 99
100static int pnx8550_usb_ohci_power_on(struct platform_device *pdev)
101{
102 /*
103 * Set register CLK48CTL to enable and 48MHz
104 */
105 outl(0x00000003, PCI_BASE | 0x0004770c);
106
107 /*
108 * Set register CLK12CTL to enable and 48MHz
109 */
110 outl(0x00000003, PCI_BASE | 0x00047710);
111
112 udelay(100);
113
114 return 0;
115}
116
117static void pnx8550_usb_ohci_power_off(struct platform_device *pdev)
118{
119 udelay(10);
120}
121
122static struct usb_ohci_pdata pnx8550_usb_ohci_pdata = {
123 .power_on = pnx8550_usb_ohci_power_on,
124 .power_off = pnx8550_usb_ohci_power_off,
125};
126
99static struct platform_device pnx8550_usb_ohci_device = { 127static struct platform_device pnx8550_usb_ohci_device = {
100 .name = "pnx8550-ohci", 128 .name = "ohci-platform",
101 .id = -1, 129 .id = -1,
102 .dev = { 130 .dev = {
103 .dma_mask = &ohci_dmamask, 131 .dma_mask = &ohci_dmamask,
104 .coherent_dma_mask = DMA_BIT_MASK(32), 132 .coherent_dma_mask = DMA_BIT_MASK(32),
133 .platform_data = &pnx8550_usb_ohci_pdata,
105 }, 134 },
106 .num_resources = ARRAY_SIZE(pnx8550_usb_ohci_resources), 135 .num_resources = ARRAY_SIZE(pnx8550_usb_ohci_resources),
107 .resource = pnx8550_usb_ohci_resources, 136 .resource = pnx8550_usb_ohci_resources,
diff --git a/arch/sh/configs/ecovec24_defconfig b/arch/sh/configs/ecovec24_defconfig
index 911e30c9abfd..c6c2becdc8ab 100644
--- a/arch/sh/configs/ecovec24_defconfig
+++ b/arch/sh/configs/ecovec24_defconfig
@@ -112,7 +112,7 @@ CONFIG_USB_MON=y
112CONFIG_USB_R8A66597_HCD=y 112CONFIG_USB_R8A66597_HCD=y
113CONFIG_USB_STORAGE=y 113CONFIG_USB_STORAGE=y
114CONFIG_USB_GADGET=y 114CONFIG_USB_GADGET=y
115CONFIG_USB_FILE_STORAGE=m 115CONFIG_USB_MASS_STORAGE=m
116CONFIG_MMC=y 116CONFIG_MMC=y
117CONFIG_MMC_SPI=y 117CONFIG_MMC_SPI=y
118CONFIG_MMC_SDHI=y 118CONFIG_MMC_SDHI=y
diff --git a/arch/sh/configs/se7724_defconfig b/arch/sh/configs/se7724_defconfig
index ed35093e3758..1faa788aecae 100644
--- a/arch/sh/configs/se7724_defconfig
+++ b/arch/sh/configs/se7724_defconfig
@@ -109,7 +109,7 @@ CONFIG_USB_STORAGE=y
109CONFIG_USB_GADGET=y 109CONFIG_USB_GADGET=y
110CONFIG_USB_ETH=m 110CONFIG_USB_ETH=m
111CONFIG_USB_GADGETFS=m 111CONFIG_USB_GADGETFS=m
112CONFIG_USB_FILE_STORAGE=m 112CONFIG_USB_MASS_STORAGE=m
113CONFIG_USB_G_SERIAL=m 113CONFIG_USB_G_SERIAL=m
114CONFIG_MMC=y 114CONFIG_MMC=y
115CONFIG_MMC_SPI=y 115CONFIG_MMC_SPI=y
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7720.c b/arch/sh/kernel/cpu/sh3/setup-sh7720.c
index 0c2f1b2c2e19..42d991f632b1 100644
--- a/arch/sh/kernel/cpu/sh3/setup-sh7720.c
+++ b/arch/sh/kernel/cpu/sh3/setup-sh7720.c
@@ -20,6 +20,7 @@
20#include <linux/serial_sci.h> 20#include <linux/serial_sci.h>
21#include <linux/sh_timer.h> 21#include <linux/sh_timer.h>
22#include <linux/sh_intc.h> 22#include <linux/sh_intc.h>
23#include <linux/usb/ohci_pdriver.h>
23#include <asm/rtc.h> 24#include <asm/rtc.h>
24#include <cpu/serial.h> 25#include <cpu/serial.h>
25 26
@@ -103,12 +104,15 @@ static struct resource usb_ohci_resources[] = {
103 104
104static u64 usb_ohci_dma_mask = 0xffffffffUL; 105static u64 usb_ohci_dma_mask = 0xffffffffUL;
105 106
107static struct usb_ohci_pdata usb_ohci_pdata;
108
106static struct platform_device usb_ohci_device = { 109static struct platform_device usb_ohci_device = {
107 .name = "sh_ohci", 110 .name = "ohci-platform",
108 .id = -1, 111 .id = -1,
109 .dev = { 112 .dev = {
110 .dma_mask = &usb_ohci_dma_mask, 113 .dma_mask = &usb_ohci_dma_mask,
111 .coherent_dma_mask = 0xffffffff, 114 .coherent_dma_mask = 0xffffffff,
115 .platform_data = &usb_ohci_pdata,
112 }, 116 },
113 .num_resources = ARRAY_SIZE(usb_ohci_resources), 117 .num_resources = ARRAY_SIZE(usb_ohci_resources),
114 .resource = usb_ohci_resources, 118 .resource = usb_ohci_resources,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c b/arch/sh/kernel/cpu/sh4a/setup-sh7757.c
index 4a2f357f4df8..9079a0f9ea9b 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7757.c
@@ -19,6 +19,7 @@
19#include <linux/sh_timer.h> 19#include <linux/sh_timer.h>
20#include <linux/sh_dma.h> 20#include <linux/sh_dma.h>
21#include <linux/sh_intc.h> 21#include <linux/sh_intc.h>
22#include <linux/usb/ohci_pdriver.h>
22#include <cpu/dma-register.h> 23#include <cpu/dma-register.h>
23#include <cpu/sh7757.h> 24#include <cpu/sh7757.h>
24 25
@@ -750,12 +751,15 @@ static struct resource usb_ohci_resources[] = {
750 }, 751 },
751}; 752};
752 753
754static struct usb_ohci_pdata usb_ohci_pdata;
755
753static struct platform_device usb_ohci_device = { 756static struct platform_device usb_ohci_device = {
754 .name = "sh_ohci", 757 .name = "ohci-platform",
755 .id = -1, 758 .id = -1,
756 .dev = { 759 .dev = {
757 .dma_mask = &usb_ohci_device.dev.coherent_dma_mask, 760 .dma_mask = &usb_ohci_device.dev.coherent_dma_mask,
758 .coherent_dma_mask = DMA_BIT_MASK(32), 761 .coherent_dma_mask = DMA_BIT_MASK(32),
762 .platform_data = &usb_ohci_pdata,
759 }, 763 },
760 .num_resources = ARRAY_SIZE(usb_ohci_resources), 764 .num_resources = ARRAY_SIZE(usb_ohci_resources),
761 .resource = usb_ohci_resources, 765 .resource = usb_ohci_resources,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7763.c b/arch/sh/kernel/cpu/sh4a/setup-sh7763.c
index bd0a8fbe610f..1686acaaf45a 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7763.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7763.c
@@ -16,6 +16,7 @@
16#include <linux/sh_intc.h> 16#include <linux/sh_intc.h>
17#include <linux/io.h> 17#include <linux/io.h>
18#include <linux/serial_sci.h> 18#include <linux/serial_sci.h>
19#include <linux/usb/ohci_pdriver.h>
19 20
20static struct plat_sci_port scif0_platform_data = { 21static struct plat_sci_port scif0_platform_data = {
21 .mapbase = 0xffe00000, 22 .mapbase = 0xffe00000,
@@ -106,12 +107,15 @@ static struct resource usb_ohci_resources[] = {
106 107
107static u64 usb_ohci_dma_mask = 0xffffffffUL; 108static u64 usb_ohci_dma_mask = 0xffffffffUL;
108 109
110static struct usb_ohci_pdata usb_ohci_pdata;
111
109static struct platform_device usb_ohci_device = { 112static struct platform_device usb_ohci_device = {
110 .name = "sh_ohci", 113 .name = "ohci-platform",
111 .id = -1, 114 .id = -1,
112 .dev = { 115 .dev = {
113 .dma_mask = &usb_ohci_dma_mask, 116 .dma_mask = &usb_ohci_dma_mask,
114 .coherent_dma_mask = 0xffffffff, 117 .coherent_dma_mask = 0xffffffff,
118 .platform_data = &usb_ohci_pdata,
115 }, 119 },
116 .num_resources = ARRAY_SIZE(usb_ohci_resources), 120 .num_resources = ARRAY_SIZE(usb_ohci_resources),
117 .resource = usb_ohci_resources, 121 .resource = usb_ohci_resources,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c
index 2e6952f87848..ab52d4d4484d 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c
@@ -23,6 +23,7 @@
23#include <linux/sh_timer.h> 23#include <linux/sh_timer.h>
24#include <linux/sh_dma.h> 24#include <linux/sh_dma.h>
25#include <linux/sh_intc.h> 25#include <linux/sh_intc.h>
26#include <linux/usb/ohci_pdriver.h>
26#include <cpu/dma-register.h> 27#include <cpu/dma-register.h>
27#include <asm/mmzone.h> 28#include <asm/mmzone.h>
28 29
@@ -583,12 +584,15 @@ static struct resource usb_ohci_resources[] = {
583 }, 584 },
584}; 585};
585 586
587static struct usb_ohci_pdata usb_ohci_pdata;
588
586static struct platform_device usb_ohci_device = { 589static struct platform_device usb_ohci_device = {
587 .name = "sh_ohci", 590 .name = "ohci-platform",
588 .id = -1, 591 .id = -1,
589 .dev = { 592 .dev = {
590 .dma_mask = &usb_ohci_device.dev.coherent_dma_mask, 593 .dma_mask = &usb_ohci_device.dev.coherent_dma_mask,
591 .coherent_dma_mask = DMA_BIT_MASK(32), 594 .coherent_dma_mask = DMA_BIT_MASK(32),
595 .platform_data = &usb_ohci_pdata,
592 }, 596 },
593 .num_resources = ARRAY_SIZE(usb_ohci_resources), 597 .num_resources = ARRAY_SIZE(usb_ohci_resources),
594 .resource = usb_ohci_resources, 598 .resource = usb_ohci_resources,