blob: 61fe2b985070f1f7dcad0fc46b143b367997f9a7 [file] [log] [blame]
Hauke Mehrtensfa3364b2012-03-13 01:04:47 +01001/*
2 * Generic platform ohci driver
3 *
4 * Copyright 2007 Michael Buesch <m@bues.ch>
5 * Copyright 2011-2012 Hauke Mehrtens <hauke@hauke-m.de>
Hans de Goedeca52a172014-02-07 16:36:40 +01006 * Copyright 2014 Hans de Goede <hdegoede@redhat.com>
Hauke Mehrtensfa3364b2012-03-13 01:04:47 +01007 *
8 * Derived from the OCHI-SSB driver
9 * Derived from the OHCI-PCI driver
10 * Copyright 1999 Roman Weissgaerber
11 * Copyright 2000-2002 David Brownell
12 * Copyright 1999 Linus Torvalds
13 * Copyright 1999 Gregory P. Smith
14 *
15 * Licensed under the GNU/GPL. See COPYING for details.
16 */
Manjunath Goudar928fb682013-06-03 20:46:08 +053017
Hans de Goedeca52a172014-02-07 16:36:40 +010018#include <linux/clk.h>
19#include <linux/dma-mapping.h>
Manjunath Goudar928fb682013-06-03 20:46:08 +053020#include <linux/hrtimer.h>
21#include <linux/io.h>
22#include <linux/kernel.h>
23#include <linux/module.h>
Thierry Reding148e1132013-01-21 11:09:22 +010024#include <linux/err.h>
Hans de Goedeca52a172014-02-07 16:36:40 +010025#include <linux/phy/phy.h>
Hauke Mehrtensfa3364b2012-03-13 01:04:47 +010026#include <linux/platform_device.h>
Tony Lindgren0aa0b932017-05-25 09:13:31 -070027#include <linux/pm_runtime.h>
Maxime Ripard4615f3b2014-05-13 17:44:20 +020028#include <linux/reset.h>
Hauke Mehrtensfa3364b2012-03-13 01:04:47 +010029#include <linux/usb/ohci_pdriver.h>
Manjunath Goudar928fb682013-06-03 20:46:08 +053030#include <linux/usb.h>
31#include <linux/usb/hcd.h>
32
33#include "ohci.h"
34
35#define DRIVER_DESC "OHCI generic platform driver"
Hans de Goedeca52a172014-02-07 16:36:40 +010036#define OHCI_MAX_CLKS 3
Hans de Goede62d96942016-06-02 17:14:06 +020037#define OHCI_MAX_RESETS 2
Hans de Goedeca52a172014-02-07 16:36:40 +010038#define hcd_to_ohci_priv(h) ((struct ohci_platform_priv *)hcd_to_ohci(h)->priv)
39
40struct ohci_platform_priv {
41 struct clk *clks[OHCI_MAX_CLKS];
Hans de Goede62d96942016-06-02 17:14:06 +020042 struct reset_control *resets[OHCI_MAX_RESETS];
Arun Ramamurthy85cd6902015-01-19 16:05:30 -080043 struct phy **phys;
44 int num_phys;
Hans de Goedeca52a172014-02-07 16:36:40 +010045};
Manjunath Goudar928fb682013-06-03 20:46:08 +053046
47static const char hcd_name[] = "ohci-platform";
Hauke Mehrtensfa3364b2012-03-13 01:04:47 +010048
Hans de Goedeca52a172014-02-07 16:36:40 +010049static int ohci_platform_power_on(struct platform_device *dev)
50{
51 struct usb_hcd *hcd = platform_get_drvdata(dev);
52 struct ohci_platform_priv *priv = hcd_to_ohci_priv(hcd);
Arun Ramamurthy85cd6902015-01-19 16:05:30 -080053 int clk, ret, phy_num;
Hans de Goedeca52a172014-02-07 16:36:40 +010054
55 for (clk = 0; clk < OHCI_MAX_CLKS && priv->clks[clk]; clk++) {
56 ret = clk_prepare_enable(priv->clks[clk]);
57 if (ret)
58 goto err_disable_clks;
59 }
60
Arun Ramamurthy85cd6902015-01-19 16:05:30 -080061 for (phy_num = 0; phy_num < priv->num_phys; phy_num++) {
Arun Ramamurthya666f7d2015-04-22 16:04:13 -070062 ret = phy_init(priv->phys[phy_num]);
63 if (ret)
64 goto err_exit_phy;
65 ret = phy_power_on(priv->phys[phy_num]);
66 if (ret) {
67 phy_exit(priv->phys[phy_num]);
68 goto err_exit_phy;
Arun Ramamurthy85cd6902015-01-19 16:05:30 -080069 }
Hans de Goedeca52a172014-02-07 16:36:40 +010070 }
71
72 return 0;
73
74err_exit_phy:
Arun Ramamurthy85cd6902015-01-19 16:05:30 -080075 while (--phy_num >= 0) {
Arun Ramamurthya666f7d2015-04-22 16:04:13 -070076 phy_power_off(priv->phys[phy_num]);
77 phy_exit(priv->phys[phy_num]);
Arun Ramamurthy85cd6902015-01-19 16:05:30 -080078 }
Hans de Goedeca52a172014-02-07 16:36:40 +010079err_disable_clks:
80 while (--clk >= 0)
81 clk_disable_unprepare(priv->clks[clk]);
82
83 return ret;
84}
85
86static void ohci_platform_power_off(struct platform_device *dev)
87{
88 struct usb_hcd *hcd = platform_get_drvdata(dev);
89 struct ohci_platform_priv *priv = hcd_to_ohci_priv(hcd);
Arun Ramamurthy85cd6902015-01-19 16:05:30 -080090 int clk, phy_num;
Hans de Goedeca52a172014-02-07 16:36:40 +010091
Arun Ramamurthy85cd6902015-01-19 16:05:30 -080092 for (phy_num = 0; phy_num < priv->num_phys; phy_num++) {
Arun Ramamurthya666f7d2015-04-22 16:04:13 -070093 phy_power_off(priv->phys[phy_num]);
94 phy_exit(priv->phys[phy_num]);
Hans de Goedeca52a172014-02-07 16:36:40 +010095 }
96
97 for (clk = OHCI_MAX_CLKS - 1; clk >= 0; clk--)
98 if (priv->clks[clk])
99 clk_disable_unprepare(priv->clks[clk]);
100}
101
Manjunath Goudar928fb682013-06-03 20:46:08 +0530102static struct hc_driver __read_mostly ohci_platform_hc_driver;
Hauke Mehrtensfa3364b2012-03-13 01:04:47 +0100103
Manjunath Goudar928fb682013-06-03 20:46:08 +0530104static const struct ohci_driver_overrides platform_overrides __initconst = {
Hans de Goedeca52a172014-02-07 16:36:40 +0100105 .product_desc = "Generic Platform OHCI controller",
Hans de Goedeca52a172014-02-07 16:36:40 +0100106 .extra_priv_size = sizeof(struct ohci_platform_priv),
107};
108
109static struct usb_ohci_pdata ohci_platform_defaults = {
110 .power_on = ohci_platform_power_on,
111 .power_suspend = ohci_platform_power_off,
112 .power_off = ohci_platform_power_off,
Hauke Mehrtensfa3364b2012-03-13 01:04:47 +0100113};
114
Bill Pemberton41ac7b32012-11-19 13:21:48 -0500115static int ohci_platform_probe(struct platform_device *dev)
Hauke Mehrtensfa3364b2012-03-13 01:04:47 +0100116{
117 struct usb_hcd *hcd;
118 struct resource *res_mem;
Jingoo Hand4f09e22013-07-30 19:59:40 +0900119 struct usb_ohci_pdata *pdata = dev_get_platdata(&dev->dev);
Hans de Goedeca52a172014-02-07 16:36:40 +0100120 struct ohci_platform_priv *priv;
Hans de Goedeb1034412014-02-07 16:36:42 +0100121 struct ohci_hcd *ohci;
Hans de Goede62d96942016-06-02 17:14:06 +0200122 int err, irq, phy_num, clk = 0, rst = 0;
Hauke Mehrtensfa3364b2012-03-13 01:04:47 +0100123
124 if (usb_disabled())
125 return -ENODEV;
126
Hans de Goedeca52a172014-02-07 16:36:40 +0100127 /*
128 * Use reasonable defaults so platforms don't have to provide these
129 * with DT probing on ARM.
130 */
131 if (!pdata)
132 pdata = &ohci_platform_defaults;
133
134 err = dma_coerce_mask_and_coherent(&dev->dev, DMA_BIT_MASK(32));
135 if (err)
136 return err;
137
Hauke Mehrtensfa3364b2012-03-13 01:04:47 +0100138 irq = platform_get_irq(dev, 0);
139 if (irq < 0) {
Florian Fainelli976baf62012-10-08 15:11:42 +0200140 dev_err(&dev->dev, "no irq provided");
Hauke Mehrtensfa3364b2012-03-13 01:04:47 +0100141 return irq;
142 }
143
Hans de Goedeca52a172014-02-07 16:36:40 +0100144 hcd = usb_create_hcd(&ohci_platform_hc_driver, &dev->dev,
145 dev_name(&dev->dev));
146 if (!hcd)
147 return -ENOMEM;
148
149 platform_set_drvdata(dev, hcd);
150 dev->dev.platform_data = pdata;
151 priv = hcd_to_ohci_priv(hcd);
Hans de Goedeb1034412014-02-07 16:36:42 +0100152 ohci = hcd_to_ohci(hcd);
Hans de Goedeca52a172014-02-07 16:36:40 +0100153
154 if (pdata == &ohci_platform_defaults && dev->dev.of_node) {
Hans de Goedeb1034412014-02-07 16:36:42 +0100155 if (of_property_read_bool(dev->dev.of_node, "big-endian-regs"))
156 ohci->flags |= OHCI_QUIRK_BE_MMIO;
157
158 if (of_property_read_bool(dev->dev.of_node, "big-endian-desc"))
159 ohci->flags |= OHCI_QUIRK_BE_DESC;
160
161 if (of_property_read_bool(dev->dev.of_node, "big-endian"))
162 ohci->flags |= OHCI_QUIRK_BE_MMIO | OHCI_QUIRK_BE_DESC;
163
Kevin Cernekeec4b86922014-10-11 11:10:48 -0700164 if (of_property_read_bool(dev->dev.of_node, "no-big-frame-no"))
165 ohci->flags |= OHCI_QUIRK_FRAME_NO;
166
Tony Lindgren2545d852017-05-25 09:13:32 -0700167 if (of_property_read_bool(dev->dev.of_node,
168 "remote-wakeup-connected"))
169 ohci->hc_control = OHCI_CTRL_RWC;
170
Kevin Cernekeec4b86922014-10-11 11:10:48 -0700171 of_property_read_u32(dev->dev.of_node, "num-ports",
172 &ohci->num_ports);
173
Arun Ramamurthy85cd6902015-01-19 16:05:30 -0800174 priv->num_phys = of_count_phandle_with_args(dev->dev.of_node,
175 "phys", "#phy-cells");
Arun Ramamurthy85cd6902015-01-19 16:05:30 -0800176
Arun Ramamurthya666f7d2015-04-22 16:04:13 -0700177 if (priv->num_phys > 0) {
178 priv->phys = devm_kcalloc(&dev->dev, priv->num_phys,
179 sizeof(struct phy *), GFP_KERNEL);
180 if (!priv->phys)
181 return -ENOMEM;
182 } else
183 priv->num_phys = 0;
Arun Ramamurthy85cd6902015-01-19 16:05:30 -0800184
185 for (phy_num = 0; phy_num < priv->num_phys; phy_num++) {
Arun Ramamurthya666f7d2015-04-22 16:04:13 -0700186 priv->phys[phy_num] = devm_of_phy_get_by_index(
187 &dev->dev, dev->dev.of_node, phy_num);
188 if (IS_ERR(priv->phys[phy_num])) {
189 err = PTR_ERR(priv->phys[phy_num]);
190 goto err_put_hcd;
Yoshihiro Shimodad3d6ef12017-03-13 15:25:24 +0900191 } else if (!hcd->phy) {
192 /* Avoiding phy_get() in usb_add_hcd() */
193 hcd->phy = priv->phys[phy_num];
Arun Ramamurthya666f7d2015-04-22 16:04:13 -0700194 }
Hans de Goedeca52a172014-02-07 16:36:40 +0100195 }
196
197 for (clk = 0; clk < OHCI_MAX_CLKS; clk++) {
198 priv->clks[clk] = of_clk_get(dev->dev.of_node, clk);
199 if (IS_ERR(priv->clks[clk])) {
200 err = PTR_ERR(priv->clks[clk]);
201 if (err == -EPROBE_DEFER)
202 goto err_put_clks;
203 priv->clks[clk] = NULL;
204 break;
205 }
206 }
Hans de Goede62d96942016-06-02 17:14:06 +0200207 for (rst = 0; rst < OHCI_MAX_RESETS; rst++) {
208 priv->resets[rst] =
209 devm_reset_control_get_shared_by_index(
210 &dev->dev, rst);
211 if (IS_ERR(priv->resets[rst])) {
212 err = PTR_ERR(priv->resets[rst]);
213 if (err == -EPROBE_DEFER)
214 goto err_reset;
215 priv->resets[rst] = NULL;
216 break;
217 }
218 err = reset_control_deassert(priv->resets[rst]);
219 if (err)
220 goto err_reset;
221 }
Hans de Goedeca52a172014-02-07 16:36:40 +0100222 }
223
Alan Sternadff5292014-02-11 11:26:00 -0500224 if (pdata->big_endian_desc)
225 ohci->flags |= OHCI_QUIRK_BE_DESC;
226 if (pdata->big_endian_mmio)
227 ohci->flags |= OHCI_QUIRK_BE_MMIO;
Kevin Cernekee46f21942014-10-11 11:10:49 -0700228 if (pdata->no_big_frame_no)
229 ohci->flags |= OHCI_QUIRK_FRAME_NO;
230 if (pdata->num_ports)
231 ohci->num_ports = pdata->num_ports;
Alan Sternadff5292014-02-11 11:26:00 -0500232
233#ifndef CONFIG_USB_OHCI_BIG_ENDIAN_MMIO
234 if (ohci->flags & OHCI_QUIRK_BE_MMIO) {
235 dev_err(&dev->dev,
236 "Error: CONFIG_USB_OHCI_BIG_ENDIAN_MMIO not set\n");
237 err = -EINVAL;
Maxime Ripard4615f3b2014-05-13 17:44:20 +0200238 goto err_reset;
Alan Sternadff5292014-02-11 11:26:00 -0500239 }
240#endif
241#ifndef CONFIG_USB_OHCI_BIG_ENDIAN_DESC
242 if (ohci->flags & OHCI_QUIRK_BE_DESC) {
243 dev_err(&dev->dev,
244 "Error: CONFIG_USB_OHCI_BIG_ENDIAN_DESC not set\n");
245 err = -EINVAL;
Maxime Ripard4615f3b2014-05-13 17:44:20 +0200246 goto err_reset;
Alan Sternadff5292014-02-11 11:26:00 -0500247 }
248#endif
249
Tony Lindgren0aa0b932017-05-25 09:13:31 -0700250 pm_runtime_set_active(&dev->dev);
251 pm_runtime_enable(&dev->dev);
Kuninori Morimotoe4d37ae2012-08-06 18:09:10 -0700252 if (pdata->power_on) {
253 err = pdata->power_on(dev);
254 if (err < 0)
Maxime Ripard4615f3b2014-05-13 17:44:20 +0200255 goto err_reset;
Kuninori Morimotoe4d37ae2012-08-06 18:09:10 -0700256 }
Hauke Mehrtensfa3364b2012-03-13 01:04:47 +0100257
Varka Bhadram7b519292014-11-04 07:51:16 +0530258 res_mem = platform_get_resource(dev, IORESOURCE_MEM, 0);
Thierry Reding148e1132013-01-21 11:09:22 +0100259 hcd->regs = devm_ioremap_resource(&dev->dev, res_mem);
260 if (IS_ERR(hcd->regs)) {
261 err = PTR_ERR(hcd->regs);
Hans de Goedeca52a172014-02-07 16:36:40 +0100262 goto err_power;
Julia Lawallaece3892012-08-14 08:47:37 +0200263 }
Varka Bhadram7b519292014-11-04 07:51:16 +0530264 hcd->rsrc_start = res_mem->start;
265 hcd->rsrc_len = resource_size(res_mem);
266
Hauke Mehrtensfa3364b2012-03-13 01:04:47 +0100267 err = usb_add_hcd(hcd, irq, IRQF_SHARED);
268 if (err)
Hans de Goedeca52a172014-02-07 16:36:40 +0100269 goto err_power;
Hauke Mehrtensfa3364b2012-03-13 01:04:47 +0100270
Peter Chen3c9740a2013-11-05 10:46:02 +0800271 device_wakeup_enable(hcd->self.controller);
272
Hauke Mehrtensfa3364b2012-03-13 01:04:47 +0100273 platform_set_drvdata(dev, hcd);
274
275 return err;
276
Kuninori Morimotoe4d37ae2012-08-06 18:09:10 -0700277err_power:
278 if (pdata->power_off)
279 pdata->power_off(dev);
Maxime Ripard4615f3b2014-05-13 17:44:20 +0200280err_reset:
Tony Lindgren0aa0b932017-05-25 09:13:31 -0700281 pm_runtime_disable(&dev->dev);
Hans de Goede62d96942016-06-02 17:14:06 +0200282 while (--rst >= 0)
283 reset_control_assert(priv->resets[rst]);
Hans de Goedeca52a172014-02-07 16:36:40 +0100284err_put_clks:
285 while (--clk >= 0)
286 clk_put(priv->clks[clk]);
287err_put_hcd:
288 if (pdata == &ohci_platform_defaults)
289 dev->dev.platform_data = NULL;
290
291 usb_put_hcd(hcd);
Kuninori Morimotoe4d37ae2012-08-06 18:09:10 -0700292
Hauke Mehrtensfa3364b2012-03-13 01:04:47 +0100293 return err;
294}
295
Bill Pembertonfb4e98a2012-11-19 13:26:20 -0500296static int ohci_platform_remove(struct platform_device *dev)
Hauke Mehrtensfa3364b2012-03-13 01:04:47 +0100297{
298 struct usb_hcd *hcd = platform_get_drvdata(dev);
Jingoo Hand4f09e22013-07-30 19:59:40 +0900299 struct usb_ohci_pdata *pdata = dev_get_platdata(&dev->dev);
Hans de Goedeca52a172014-02-07 16:36:40 +0100300 struct ohci_platform_priv *priv = hcd_to_ohci_priv(hcd);
Hans de Goede62d96942016-06-02 17:14:06 +0200301 int clk, rst;
Hauke Mehrtensfa3364b2012-03-13 01:04:47 +0100302
Tony Lindgren0aa0b932017-05-25 09:13:31 -0700303 pm_runtime_get_sync(&dev->dev);
Hauke Mehrtensfa3364b2012-03-13 01:04:47 +0100304 usb_remove_hcd(hcd);
Hauke Mehrtensfa3364b2012-03-13 01:04:47 +0100305
Kuninori Morimotoe4d37ae2012-08-06 18:09:10 -0700306 if (pdata->power_off)
307 pdata->power_off(dev);
308
Hans de Goede62d96942016-06-02 17:14:06 +0200309 for (rst = 0; rst < OHCI_MAX_RESETS && priv->resets[rst]; rst++)
310 reset_control_assert(priv->resets[rst]);
Maxime Ripard4615f3b2014-05-13 17:44:20 +0200311
Hans de Goedeca52a172014-02-07 16:36:40 +0100312 for (clk = 0; clk < OHCI_MAX_CLKS && priv->clks[clk]; clk++)
313 clk_put(priv->clks[clk]);
314
315 usb_put_hcd(hcd);
316
Tony Lindgren0aa0b932017-05-25 09:13:31 -0700317 pm_runtime_put_sync(&dev->dev);
318 pm_runtime_disable(&dev->dev);
319
Hans de Goedeca52a172014-02-07 16:36:40 +0100320 if (pdata == &ohci_platform_defaults)
321 dev->dev.platform_data = NULL;
322
Hauke Mehrtensfa3364b2012-03-13 01:04:47 +0100323 return 0;
324}
325
Wonhong Kwon5e4ccd92014-10-24 13:45:47 +0900326#ifdef CONFIG_PM_SLEEP
Hauke Mehrtensfa3364b2012-03-13 01:04:47 +0100327static int ohci_platform_suspend(struct device *dev)
328{
Manjunath Goudar39dbd7d2013-10-04 09:58:14 +0530329 struct usb_hcd *hcd = dev_get_drvdata(dev);
330 struct usb_ohci_pdata *pdata = dev->platform_data;
Geliang Tang20db5512015-12-23 21:26:52 +0800331 struct platform_device *pdev = to_platform_device(dev);
Manjunath Goudar39dbd7d2013-10-04 09:58:14 +0530332 bool do_wakeup = device_may_wakeup(dev);
333 int ret;
334
335 ret = ohci_suspend(hcd, do_wakeup);
336 if (ret)
337 return ret;
Kuninori Morimotoe4d37ae2012-08-06 18:09:10 -0700338
339 if (pdata->power_suspend)
340 pdata->power_suspend(pdev);
341
Manjunath Goudar39dbd7d2013-10-04 09:58:14 +0530342 return ret;
Hauke Mehrtensfa3364b2012-03-13 01:04:47 +0100343}
344
345static int ohci_platform_resume(struct device *dev)
346{
347 struct usb_hcd *hcd = dev_get_drvdata(dev);
Jingoo Hand4f09e22013-07-30 19:59:40 +0900348 struct usb_ohci_pdata *pdata = dev_get_platdata(dev);
Geliang Tang20db5512015-12-23 21:26:52 +0800349 struct platform_device *pdev = to_platform_device(dev);
Kuninori Morimotoe4d37ae2012-08-06 18:09:10 -0700350
351 if (pdata->power_on) {
352 int err = pdata->power_on(pdev);
353 if (err < 0)
354 return err;
355 }
Hauke Mehrtensfa3364b2012-03-13 01:04:47 +0100356
Florian Fainellicfa49b42012-10-08 15:11:29 +0200357 ohci_resume(hcd, false);
Hauke Mehrtensfa3364b2012-03-13 01:04:47 +0100358 return 0;
359}
Wonhong Kwon5e4ccd92014-10-24 13:45:47 +0900360#endif /* CONFIG_PM_SLEEP */
Hauke Mehrtensfa3364b2012-03-13 01:04:47 +0100361
Hans de Goedeca52a172014-02-07 16:36:40 +0100362static const struct of_device_id ohci_platform_ids[] = {
Hans de Goedece149c32014-02-11 17:35:28 +0100363 { .compatible = "generic-ohci", },
Andreas Herrmanna95cfa62015-01-06 13:48:56 +0100364 { .compatible = "cavium,octeon-6335-ohci", },
Tony Lindgren2545d852017-05-25 09:13:32 -0700365 { .compatible = "ti,ohci-omap3", },
Hans de Goedeca52a172014-02-07 16:36:40 +0100366 { }
367};
368MODULE_DEVICE_TABLE(of, ohci_platform_ids);
369
Hauke Mehrtensfa3364b2012-03-13 01:04:47 +0100370static const struct platform_device_id ohci_platform_table[] = {
371 { "ohci-platform", 0 },
372 { }
373};
374MODULE_DEVICE_TABLE(platform, ohci_platform_table);
375
Wonhong Kwon5e4ccd92014-10-24 13:45:47 +0900376static SIMPLE_DEV_PM_OPS(ohci_platform_pm_ops, ohci_platform_suspend,
377 ohci_platform_resume);
Hauke Mehrtensfa3364b2012-03-13 01:04:47 +0100378
379static struct platform_driver ohci_platform_driver = {
380 .id_table = ohci_platform_table,
381 .probe = ohci_platform_probe,
Bill Pemberton76904172012-11-19 13:21:08 -0500382 .remove = ohci_platform_remove,
Hauke Mehrtensfa3364b2012-03-13 01:04:47 +0100383 .shutdown = usb_hcd_platform_shutdown,
384 .driver = {
Hauke Mehrtensfa3364b2012-03-13 01:04:47 +0100385 .name = "ohci-platform",
386 .pm = &ohci_platform_pm_ops,
Hans de Goedeca52a172014-02-07 16:36:40 +0100387 .of_match_table = ohci_platform_ids,
Hauke Mehrtensfa3364b2012-03-13 01:04:47 +0100388 }
389};
Manjunath Goudar928fb682013-06-03 20:46:08 +0530390
391static int __init ohci_platform_init(void)
392{
393 if (usb_disabled())
394 return -ENODEV;
395
396 pr_info("%s: " DRIVER_DESC "\n", hcd_name);
397
398 ohci_init_driver(&ohci_platform_hc_driver, &platform_overrides);
399 return platform_driver_register(&ohci_platform_driver);
400}
401module_init(ohci_platform_init);
402
403static void __exit ohci_platform_cleanup(void)
404{
405 platform_driver_unregister(&ohci_platform_driver);
406}
407module_exit(ohci_platform_cleanup);
408
409MODULE_DESCRIPTION(DRIVER_DESC);
410MODULE_AUTHOR("Hauke Mehrtens");
411MODULE_AUTHOR("Alan Stern");
412MODULE_LICENSE("GPL");