diff options
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/isp116x-hcd.c | 1 | ||||
-rw-r--r-- | drivers/usb/host/ohci-au1xxx.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ohci-lh7a404.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ohci-omap.c | 1 | ||||
-rw-r--r-- | drivers/usb/host/ohci-ppc-soc.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ohci-pxa27x.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ohci-s3c2410.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/pci-quirks.c | 23 | ||||
-rw-r--r-- | drivers/usb/host/sl811-hcd.c | 1 | ||||
-rw-r--r-- | drivers/usb/host/sl811_cs.c | 1 |
10 files changed, 37 insertions, 0 deletions
diff --git a/drivers/usb/host/isp116x-hcd.c b/drivers/usb/host/isp116x-hcd.c index ddb8fc591466..f9c3f5b8dd1c 100644 --- a/drivers/usb/host/isp116x-hcd.c +++ b/drivers/usb/host/isp116x-hcd.c | |||
@@ -70,6 +70,7 @@ | |||
70 | #include <linux/interrupt.h> | 70 | #include <linux/interrupt.h> |
71 | #include <linux/usb.h> | 71 | #include <linux/usb.h> |
72 | #include <linux/usb_isp116x.h> | 72 | #include <linux/usb_isp116x.h> |
73 | #include <linux/platform_device.h> | ||
73 | 74 | ||
74 | #include <asm/io.h> | 75 | #include <asm/io.h> |
75 | #include <asm/irq.h> | 76 | #include <asm/irq.h> |
diff --git a/drivers/usb/host/ohci-au1xxx.c b/drivers/usb/host/ohci-au1xxx.c index a277e258eb6c..f0c78cf14b6c 100644 --- a/drivers/usb/host/ohci-au1xxx.c +++ b/drivers/usb/host/ohci-au1xxx.c | |||
@@ -18,6 +18,8 @@ | |||
18 | * This file is licenced under the GPL. | 18 | * This file is licenced under the GPL. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/platform_device.h> | ||
22 | |||
21 | #include <asm/mach-au1x00/au1000.h> | 23 | #include <asm/mach-au1x00/au1000.h> |
22 | 24 | ||
23 | #define USBH_ENABLE_BE (1<<0) | 25 | #define USBH_ENABLE_BE (1<<0) |
diff --git a/drivers/usb/host/ohci-lh7a404.c b/drivers/usb/host/ohci-lh7a404.c index 238fa4ade615..336c766c6e29 100644 --- a/drivers/usb/host/ohci-lh7a404.c +++ b/drivers/usb/host/ohci-lh7a404.c | |||
@@ -16,6 +16,8 @@ | |||
16 | * This file is licenced under the GPL. | 16 | * This file is licenced under the GPL. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/platform_device.h> | ||
20 | |||
19 | #include <asm/hardware.h> | 21 | #include <asm/hardware.h> |
20 | 22 | ||
21 | 23 | ||
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c index 49815ec4b842..e46cc540cf4d 100644 --- a/drivers/usb/host/ohci-omap.c +++ b/drivers/usb/host/ohci-omap.c | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include <linux/signal.h> /* SA_INTERRUPT */ | 17 | #include <linux/signal.h> /* SA_INTERRUPT */ |
18 | #include <linux/jiffies.h> | 18 | #include <linux/jiffies.h> |
19 | #include <linux/platform_device.h> | ||
19 | 20 | ||
20 | #include <asm/hardware.h> | 21 | #include <asm/hardware.h> |
21 | #include <asm/io.h> | 22 | #include <asm/io.h> |
diff --git a/drivers/usb/host/ohci-ppc-soc.c b/drivers/usb/host/ohci-ppc-soc.c index 4832e57ae579..92cf6f4a1374 100644 --- a/drivers/usb/host/ohci-ppc-soc.c +++ b/drivers/usb/host/ohci-ppc-soc.c | |||
@@ -14,6 +14,8 @@ | |||
14 | * This file is licenced under the GPL. | 14 | * This file is licenced under the GPL. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/platform_device.h> | ||
18 | |||
17 | /* configure so an HC device and id are always provided */ | 19 | /* configure so an HC device and id are always provided */ |
18 | /* always called with process context; sleeping is OK */ | 20 | /* always called with process context; sleeping is OK */ |
19 | 21 | ||
diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c index f4a4aeda40b7..59e20568e8f9 100644 --- a/drivers/usb/host/ohci-pxa27x.c +++ b/drivers/usb/host/ohci-pxa27x.c | |||
@@ -21,6 +21,8 @@ | |||
21 | 21 | ||
22 | #include <linux/device.h> | 22 | #include <linux/device.h> |
23 | #include <linux/signal.h> | 23 | #include <linux/signal.h> |
24 | #include <linux/platform_device.h> | ||
25 | |||
24 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
25 | #include <asm/hardware.h> | 27 | #include <asm/hardware.h> |
26 | #include <asm/arch/pxa-regs.h> | 28 | #include <asm/arch/pxa-regs.h> |
diff --git a/drivers/usb/host/ohci-s3c2410.c b/drivers/usb/host/ohci-s3c2410.c index fab420a2ce71..ee1fc605b402 100644 --- a/drivers/usb/host/ohci-s3c2410.c +++ b/drivers/usb/host/ohci-s3c2410.c | |||
@@ -19,6 +19,8 @@ | |||
19 | * This file is licenced under the GPL. | 19 | * This file is licenced under the GPL. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/platform_device.h> | ||
23 | |||
22 | #include <asm/hardware.h> | 24 | #include <asm/hardware.h> |
23 | #include <asm/hardware/clock.h> | 25 | #include <asm/hardware/clock.h> |
24 | #include <asm/arch/usb-control.h> | 26 | #include <asm/arch/usb-control.h> |
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c index b7fd3f644e1e..b1aa350fd32f 100644 --- a/drivers/usb/host/pci-quirks.c +++ b/drivers/usb/host/pci-quirks.c | |||
@@ -138,11 +138,23 @@ reset_needed: | |||
138 | } | 138 | } |
139 | EXPORT_SYMBOL_GPL(uhci_check_and_reset_hc); | 139 | EXPORT_SYMBOL_GPL(uhci_check_and_reset_hc); |
140 | 140 | ||
141 | static inline int io_type_enabled(struct pci_dev *pdev, unsigned int mask) | ||
142 | { | ||
143 | u16 cmd; | ||
144 | return !pci_read_config_word(pdev, PCI_COMMAND, &cmd) && (cmd & mask); | ||
145 | } | ||
146 | |||
147 | #define pio_enabled(dev) io_type_enabled(dev, PCI_COMMAND_IO) | ||
148 | #define mmio_enabled(dev) io_type_enabled(dev, PCI_COMMAND_MEMORY) | ||
149 | |||
141 | static void __devinit quirk_usb_handoff_uhci(struct pci_dev *pdev) | 150 | static void __devinit quirk_usb_handoff_uhci(struct pci_dev *pdev) |
142 | { | 151 | { |
143 | unsigned long base = 0; | 152 | unsigned long base = 0; |
144 | int i; | 153 | int i; |
145 | 154 | ||
155 | if (!pio_enabled(pdev)) | ||
156 | return; | ||
157 | |||
146 | for (i = 0; i < PCI_ROM_RESOURCE; i++) | 158 | for (i = 0; i < PCI_ROM_RESOURCE; i++) |
147 | if ((pci_resource_flags(pdev, i) & IORESOURCE_IO)) { | 159 | if ((pci_resource_flags(pdev, i) & IORESOURCE_IO)) { |
148 | base = pci_resource_start(pdev, i); | 160 | base = pci_resource_start(pdev, i); |
@@ -153,12 +165,20 @@ static void __devinit quirk_usb_handoff_uhci(struct pci_dev *pdev) | |||
153 | uhci_check_and_reset_hc(pdev, base); | 165 | uhci_check_and_reset_hc(pdev, base); |
154 | } | 166 | } |
155 | 167 | ||
168 | static int __devinit mmio_resource_enabled(struct pci_dev *pdev, int idx) | ||
169 | { | ||
170 | return pci_resource_start(pdev, idx) && mmio_enabled(pdev); | ||
171 | } | ||
172 | |||
156 | static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev) | 173 | static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev) |
157 | { | 174 | { |
158 | void __iomem *base; | 175 | void __iomem *base; |
159 | int wait_time; | 176 | int wait_time; |
160 | u32 control; | 177 | u32 control; |
161 | 178 | ||
179 | if (!mmio_resource_enabled(pdev, 0)) | ||
180 | return; | ||
181 | |||
162 | base = ioremap_nocache(pci_resource_start(pdev, 0), | 182 | base = ioremap_nocache(pci_resource_start(pdev, 0), |
163 | pci_resource_len(pdev, 0)); | 183 | pci_resource_len(pdev, 0)); |
164 | if (base == NULL) return; | 184 | if (base == NULL) return; |
@@ -201,6 +221,9 @@ static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev) | |||
201 | u32 hcc_params, val, temp; | 221 | u32 hcc_params, val, temp; |
202 | u8 cap_length; | 222 | u8 cap_length; |
203 | 223 | ||
224 | if (!mmio_resource_enabled(pdev, 0)) | ||
225 | return; | ||
226 | |||
204 | base = ioremap_nocache(pci_resource_start(pdev, 0), | 227 | base = ioremap_nocache(pci_resource_start(pdev, 0), |
205 | pci_resource_len(pdev, 0)); | 228 | pci_resource_len(pdev, 0)); |
206 | if (base == NULL) return; | 229 | if (base == NULL) return; |
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c index 40169d9cf2b1..5607c0ae6835 100644 --- a/drivers/usb/host/sl811-hcd.c +++ b/drivers/usb/host/sl811-hcd.c | |||
@@ -54,6 +54,7 @@ | |||
54 | #include <linux/interrupt.h> | 54 | #include <linux/interrupt.h> |
55 | #include <linux/usb.h> | 55 | #include <linux/usb.h> |
56 | #include <linux/usb_sl811.h> | 56 | #include <linux/usb_sl811.h> |
57 | #include <linux/platform_device.h> | ||
57 | 58 | ||
58 | #include <asm/io.h> | 59 | #include <asm/io.h> |
59 | #include <asm/irq.h> | 60 | #include <asm/irq.h> |
diff --git a/drivers/usb/host/sl811_cs.c b/drivers/usb/host/sl811_cs.c index 38aebe361ca1..e73faf831b24 100644 --- a/drivers/usb/host/sl811_cs.c +++ b/drivers/usb/host/sl811_cs.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/string.h> | 19 | #include <linux/string.h> |
20 | #include <linux/timer.h> | 20 | #include <linux/timer.h> |
21 | #include <linux/ioport.h> | 21 | #include <linux/ioport.h> |
22 | #include <linux/platform_device.h> | ||
22 | 23 | ||
23 | #include <pcmcia/cs_types.h> | 24 | #include <pcmcia/cs_types.h> |
24 | #include <pcmcia/cs.h> | 25 | #include <pcmcia/cs.h> |