diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2008-09-22 18:00:07 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-10-17 17:40:57 -0400 |
commit | cede969fe21adece300300a455580635590deb47 (patch) | |
tree | a64ccf0720b7fc7be743f9b07c676b9b7fd058c2 | |
parent | bb4e3b5ac81a9601775e62649038934acafa78e2 (diff) |
usb: remove code associated with !CONFIG_PPC_MERGE
Now that arch/ppc is gone we don't need CONFIG_PPC_MERGE anymore remove
the dead code associated with !CONFIG_PPC_MERGE.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/usb/host/ehci-hcd.c | 5 | ||||
-rw-r--r-- | drivers/usb/host/ehci-ppc-soc.c | 201 | ||||
-rw-r--r-- | drivers/usb/host/ehci.h | 9 | ||||
-rw-r--r-- | drivers/usb/host/ohci.h | 8 |
4 files changed, 0 insertions, 223 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 7378aa137a4a..c6f9961eed3c 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c | |||
@@ -1021,11 +1021,6 @@ MODULE_LICENSE ("GPL"); | |||
1021 | #define PS3_SYSTEM_BUS_DRIVER ps3_ehci_driver | 1021 | #define PS3_SYSTEM_BUS_DRIVER ps3_ehci_driver |
1022 | #endif | 1022 | #endif |
1023 | 1023 | ||
1024 | #if defined(CONFIG_440EPX) && !defined(CONFIG_PPC_MERGE) | ||
1025 | #include "ehci-ppc-soc.c" | ||
1026 | #define PLATFORM_DRIVER ehci_ppc_soc_driver | ||
1027 | #endif | ||
1028 | |||
1029 | #ifdef CONFIG_USB_EHCI_HCD_PPC_OF | 1024 | #ifdef CONFIG_USB_EHCI_HCD_PPC_OF |
1030 | #include "ehci-ppc-of.c" | 1025 | #include "ehci-ppc-of.c" |
1031 | #define OF_PLATFORM_DRIVER ehci_hcd_ppc_of_driver | 1026 | #define OF_PLATFORM_DRIVER ehci_hcd_ppc_of_driver |
diff --git a/drivers/usb/host/ehci-ppc-soc.c b/drivers/usb/host/ehci-ppc-soc.c deleted file mode 100644 index 529590eb4037..000000000000 --- a/drivers/usb/host/ehci-ppc-soc.c +++ /dev/null | |||
@@ -1,201 +0,0 @@ | |||
1 | /* | ||
2 | * EHCI HCD (Host Controller Driver) for USB. | ||
3 | * | ||
4 | * (C) Copyright 2006-2007 Stefan Roese <sr@denx.de>, DENX Software Engineering | ||
5 | * | ||
6 | * Bus Glue for PPC On-Chip EHCI driver | ||
7 | * Tested on AMCC 440EPx | ||
8 | * | ||
9 | * Based on "ehci-au1xxx.c" by K.Boge <karsten.boge@amd.com> | ||
10 | * | ||
11 | * This file is licenced under the GPL. | ||
12 | */ | ||
13 | |||
14 | #include <linux/platform_device.h> | ||
15 | |||
16 | extern int usb_disabled(void); | ||
17 | |||
18 | /* called during probe() after chip reset completes */ | ||
19 | static int ehci_ppc_soc_setup(struct usb_hcd *hcd) | ||
20 | { | ||
21 | struct ehci_hcd *ehci = hcd_to_ehci(hcd); | ||
22 | int retval; | ||
23 | |||
24 | retval = ehci_halt(ehci); | ||
25 | if (retval) | ||
26 | return retval; | ||
27 | |||
28 | retval = ehci_init(hcd); | ||
29 | if (retval) | ||
30 | return retval; | ||
31 | |||
32 | ehci->sbrn = 0x20; | ||
33 | return ehci_reset(ehci); | ||
34 | } | ||
35 | |||
36 | /** | ||
37 | * usb_ehci_ppc_soc_probe - initialize PPC-SoC-based HCDs | ||
38 | * Context: !in_interrupt() | ||
39 | * | ||
40 | * Allocates basic resources for this USB host controller, and | ||
41 | * then invokes the start() method for the HCD associated with it | ||
42 | * through the hotplug entry's driver_data. | ||
43 | * | ||
44 | */ | ||
45 | int usb_ehci_ppc_soc_probe(const struct hc_driver *driver, | ||
46 | struct usb_hcd **hcd_out, | ||
47 | struct platform_device *dev) | ||
48 | { | ||
49 | int retval; | ||
50 | struct usb_hcd *hcd; | ||
51 | struct ehci_hcd *ehci; | ||
52 | |||
53 | if (dev->resource[1].flags != IORESOURCE_IRQ) { | ||
54 | pr_debug("resource[1] is not IORESOURCE_IRQ"); | ||
55 | retval = -ENOMEM; | ||
56 | } | ||
57 | hcd = usb_create_hcd(driver, &dev->dev, "PPC-SOC EHCI"); | ||
58 | if (!hcd) | ||
59 | return -ENOMEM; | ||
60 | hcd->rsrc_start = dev->resource[0].start; | ||
61 | hcd->rsrc_len = dev->resource[0].end - dev->resource[0].start + 1; | ||
62 | |||
63 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { | ||
64 | pr_debug("request_mem_region failed"); | ||
65 | retval = -EBUSY; | ||
66 | goto err1; | ||
67 | } | ||
68 | |||
69 | hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len); | ||
70 | if (!hcd->regs) { | ||
71 | pr_debug("ioremap failed"); | ||
72 | retval = -ENOMEM; | ||
73 | goto err2; | ||
74 | } | ||
75 | |||
76 | ehci = hcd_to_ehci(hcd); | ||
77 | ehci->big_endian_mmio = 1; | ||
78 | ehci->big_endian_desc = 1; | ||
79 | ehci->caps = hcd->regs; | ||
80 | ehci->regs = hcd->regs + HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase)); | ||
81 | |||
82 | /* cache this readonly data; minimize chip reads */ | ||
83 | ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params); | ||
84 | |||
85 | #if defined(CONFIG_440EPX) | ||
86 | /* | ||
87 | * 440EPx Errata USBH_3 | ||
88 | * Fix: Enable Break Memory Transfer (BMT) in INSNREG3 | ||
89 | */ | ||
90 | out_be32((void *)((ulong)(&ehci->regs->command) + 0x8c), (1 << 0)); | ||
91 | ehci_dbg(ehci, "Break Memory Transfer (BMT) has beed enabled!\n"); | ||
92 | #endif | ||
93 | |||
94 | retval = usb_add_hcd(hcd, dev->resource[1].start, IRQF_DISABLED); | ||
95 | if (retval == 0) | ||
96 | return retval; | ||
97 | |||
98 | iounmap(hcd->regs); | ||
99 | err2: | ||
100 | release_mem_region(hcd->rsrc_start, hcd->rsrc_len); | ||
101 | err1: | ||
102 | usb_put_hcd(hcd); | ||
103 | return retval; | ||
104 | } | ||
105 | |||
106 | /* may be called without controller electrically present */ | ||
107 | /* may be called with controller, bus, and devices active */ | ||
108 | |||
109 | /** | ||
110 | * usb_ehci_hcd_ppc_soc_remove - shutdown processing for PPC-SoC-based HCDs | ||
111 | * @dev: USB Host Controller being removed | ||
112 | * Context: !in_interrupt() | ||
113 | * | ||
114 | * Reverses the effect of usb_ehci_hcd_ppc_soc_probe(), first invoking | ||
115 | * the HCD's stop() method. It is always called from a thread | ||
116 | * context, normally "rmmod", "apmd", or something similar. | ||
117 | * | ||
118 | */ | ||
119 | void usb_ehci_ppc_soc_remove(struct usb_hcd *hcd, struct platform_device *dev) | ||
120 | { | ||
121 | usb_remove_hcd(hcd); | ||
122 | iounmap(hcd->regs); | ||
123 | release_mem_region(hcd->rsrc_start, hcd->rsrc_len); | ||
124 | usb_put_hcd(hcd); | ||
125 | } | ||
126 | |||
127 | static const struct hc_driver ehci_ppc_soc_hc_driver = { | ||
128 | .description = hcd_name, | ||
129 | .product_desc = "PPC-SOC EHCI", | ||
130 | .hcd_priv_size = sizeof(struct ehci_hcd), | ||
131 | |||
132 | /* | ||
133 | * generic hardware linkage | ||
134 | */ | ||
135 | .irq = ehci_irq, | ||
136 | .flags = HCD_MEMORY | HCD_USB2, | ||
137 | |||
138 | /* | ||
139 | * basic lifecycle operations | ||
140 | */ | ||
141 | .reset = ehci_ppc_soc_setup, | ||
142 | .start = ehci_run, | ||
143 | .stop = ehci_stop, | ||
144 | .shutdown = ehci_shutdown, | ||
145 | |||
146 | /* | ||
147 | * managing i/o requests and associated device resources | ||
148 | */ | ||
149 | .urb_enqueue = ehci_urb_enqueue, | ||
150 | .urb_dequeue = ehci_urb_dequeue, | ||
151 | .endpoint_disable = ehci_endpoint_disable, | ||
152 | |||
153 | /* | ||
154 | * scheduling support | ||
155 | */ | ||
156 | .get_frame_number = ehci_get_frame, | ||
157 | |||
158 | /* | ||
159 | * root hub support | ||
160 | */ | ||
161 | .hub_status_data = ehci_hub_status_data, | ||
162 | .hub_control = ehci_hub_control, | ||
163 | .bus_suspend = ehci_bus_suspend, | ||
164 | .bus_resume = ehci_bus_resume, | ||
165 | .relinquish_port = ehci_relinquish_port, | ||
166 | .port_handed_over = ehci_port_handed_over, | ||
167 | }; | ||
168 | |||
169 | static int ehci_hcd_ppc_soc_drv_probe(struct platform_device *pdev) | ||
170 | { | ||
171 | struct usb_hcd *hcd = NULL; | ||
172 | int ret; | ||
173 | |||
174 | pr_debug("In ehci_hcd_ppc_soc_drv_probe\n"); | ||
175 | |||
176 | if (usb_disabled()) | ||
177 | return -ENODEV; | ||
178 | |||
179 | /* FIXME we only want one one probe() not two */ | ||
180 | ret = usb_ehci_ppc_soc_probe(&ehci_ppc_soc_hc_driver, &hcd, pdev); | ||
181 | return ret; | ||
182 | } | ||
183 | |||
184 | static int ehci_hcd_ppc_soc_drv_remove(struct platform_device *pdev) | ||
185 | { | ||
186 | struct usb_hcd *hcd = platform_get_drvdata(pdev); | ||
187 | |||
188 | /* FIXME we only want one one remove() not two */ | ||
189 | usb_ehci_ppc_soc_remove(hcd, pdev); | ||
190 | return 0; | ||
191 | } | ||
192 | |||
193 | MODULE_ALIAS("platform:ppc-soc-ehci"); | ||
194 | static struct platform_driver ehci_ppc_soc_driver = { | ||
195 | .probe = ehci_hcd_ppc_soc_drv_probe, | ||
196 | .remove = ehci_hcd_ppc_soc_drv_remove, | ||
197 | .shutdown = usb_hcd_platform_shutdown, | ||
198 | .driver = { | ||
199 | .name = "ppc-soc-ehci", | ||
200 | } | ||
201 | }; | ||
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index b697a13364ec..fb1770d6e200 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h | |||
@@ -604,16 +604,7 @@ ehci_port_speed(struct ehci_hcd *ehci, unsigned int portsc) | |||
604 | /* | 604 | /* |
605 | * Big-endian read/write functions are arch-specific. | 605 | * Big-endian read/write functions are arch-specific. |
606 | * Other arches can be added if/when they're needed. | 606 | * Other arches can be added if/when they're needed. |
607 | * | ||
608 | * REVISIT: arch/powerpc now has readl/writel_be, so the | ||
609 | * definition below can die once the 4xx support is | ||
610 | * finally ported over. | ||
611 | */ | 607 | */ |
612 | #if defined(CONFIG_PPC) && !defined(CONFIG_PPC_MERGE) | ||
613 | #define readl_be(addr) in_be32((__force unsigned *)addr) | ||
614 | #define writel_be(val, addr) out_be32((__force unsigned *)addr, val) | ||
615 | #endif | ||
616 | |||
617 | #if defined(CONFIG_ARM) && defined(CONFIG_ARCH_IXP4XX) | 608 | #if defined(CONFIG_ARM) && defined(CONFIG_ARCH_IXP4XX) |
618 | #define readl_be(addr) __raw_readl((__force unsigned *)addr) | 609 | #define readl_be(addr) __raw_readl((__force unsigned *)addr) |
619 | #define writel_be(val, addr) __raw_writel(val, (__force unsigned *)addr) | 610 | #define writel_be(val, addr) __raw_writel(val, (__force unsigned *)addr) |
diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h index faf622eafce7..222011f6172c 100644 --- a/drivers/usb/host/ohci.h +++ b/drivers/usb/host/ohci.h | |||
@@ -540,15 +540,7 @@ static inline struct usb_hcd *ohci_to_hcd (const struct ohci_hcd *ohci) | |||
540 | * Big-endian read/write functions are arch-specific. | 540 | * Big-endian read/write functions are arch-specific. |
541 | * Other arches can be added if/when they're needed. | 541 | * Other arches can be added if/when they're needed. |
542 | * | 542 | * |
543 | * REVISIT: arch/powerpc now has readl/writel_be, so the | ||
544 | * definition below can die once the STB04xxx support is | ||
545 | * finally ported over. | ||
546 | */ | 543 | */ |
547 | #if defined(CONFIG_PPC) && !defined(CONFIG_PPC_MERGE) | ||
548 | #define readl_be(addr) in_be32((__force unsigned *)addr) | ||
549 | #define writel_be(val, addr) out_be32((__force unsigned *)addr, val) | ||
550 | #endif | ||
551 | |||
552 | static inline unsigned int _ohci_readl (const struct ohci_hcd *ohci, | 544 | static inline unsigned int _ohci_readl (const struct ohci_hcd *ohci, |
553 | __hc32 __iomem * regs) | 545 | __hc32 __iomem * regs) |
554 | { | 546 | { |