blob: d9f0481d7258aaa16b78f381518fe697af1e22a8 [file] [log] [blame]
Vitaly Wool60bbfc82006-06-29 18:28:18 +04001/*
Roland Stigge28643102012-03-12 22:54:50 +01002 * driver for NXP USB Host devices
Vitaly Wool60bbfc82006-06-29 18:28:18 +04003 *
Roland Stigge28643102012-03-12 22:54:50 +01004 * Currently supported OHCI host devices:
Roland Stigge53dc25a2012-03-12 22:54:51 +01005 * - NXP LPC32xx
Vitaly Wool60bbfc82006-06-29 18:28:18 +04006 *
7 * Authors: Dmitry Chigirev <source@mvista.com>
David Brownelldd9048a2006-12-05 03:18:31 -08008 * Vitaly Wool <vitalywool@gmail.com>
Vitaly Wool60bbfc82006-06-29 18:28:18 +04009 *
10 * register initialization is based on code examples provided by Philips
11 * Copyright (c) 2005 Koninklijke Philips Electronics N.V.
12 *
13 * NOTE: This driver does not have suspend/resume functionality
14 * This driver is intended for engineering development purposes only
15 *
16 * 2005-2006 (c) MontaVista Software, Inc. This file is licensed under
17 * the terms of the GNU General Public License version 2. This program
18 * is licensed "as is" without any warranty of any kind, whether express
19 * or implied.
20 */
21#include <linux/clk.h>
Manjunath Goudar30330b82013-09-21 16:38:44 +053022#include <linux/dma-mapping.h>
23#include <linux/io.h>
Vitaly Wool60bbfc82006-06-29 18:28:18 +040024#include <linux/i2c.h>
Manjunath Goudar30330b82013-09-21 16:38:44 +053025#include <linux/kernel.h>
26#include <linux/module.h>
Roland Stigge2265efe2012-04-29 16:47:03 +020027#include <linux/of.h>
Manjunath Goudar30330b82013-09-21 16:38:44 +053028#include <linux/platform_device.h>
Roland Stigge73108aa2012-04-29 16:47:06 +020029#include <linux/usb/isp1301.h>
Manjunath Goudar30330b82013-09-21 16:38:44 +053030#include <linux/usb.h>
31#include <linux/usb/hcd.h>
32
33#include "ohci.h"
34
Vitaly Wool60bbfc82006-06-29 18:28:18 +040035
Russell Kinga09e64f2008-08-05 16:14:15 +010036#include <mach/hardware.h>
Roland Stigge53dc25a2012-03-12 22:54:51 +010037#include <asm/mach-types.h>
Vitaly Wool60bbfc82006-06-29 18:28:18 +040038#include <asm/io.h>
Vitaly Wool60bbfc82006-06-29 18:28:18 +040039
Russell Kinga09e64f2008-08-05 16:14:15 +010040#include <mach/platform.h>
41#include <mach/irqs.h>
Vitaly Wool60bbfc82006-06-29 18:28:18 +040042
Roland Stigge53dc25a2012-03-12 22:54:51 +010043#define USB_CONFIG_BASE 0x31020000
44#define PWRMAN_BASE 0x40004000
45
46#define USB_CTRL IO_ADDRESS(PWRMAN_BASE + 0x64)
Vitaly Wool60bbfc82006-06-29 18:28:18 +040047
48/* USB_CTRL bit defines */
49#define USB_SLAVE_HCLK_EN (1 << 24)
Roland Stiggea6a99cf2012-04-29 16:47:02 +020050#define USB_DEV_NEED_CLK_EN (1 << 22)
Vitaly Wool60bbfc82006-06-29 18:28:18 +040051#define USB_HOST_NEED_CLK_EN (1 << 21)
Roland Stiggea6a99cf2012-04-29 16:47:02 +020052#define PAD_CONTROL_LAST_DRIVEN (1 << 19)
Vitaly Wool60bbfc82006-06-29 18:28:18 +040053
Roland Stigge53dc25a2012-03-12 22:54:51 +010054#define USB_OTG_STAT_CONTROL IO_ADDRESS(USB_CONFIG_BASE + 0x110)
Vitaly Wool60bbfc82006-06-29 18:28:18 +040055
56/* USB_OTG_STAT_CONTROL bit defines */
57#define TRANSPARENT_I2C_EN (1 << 7)
58#define HOST_EN (1 << 0)
59
Roland Stigge53dc25a2012-03-12 22:54:51 +010060/* On LPC32xx, those are undefined */
61#ifndef start_int_set_falling_edge
62#define start_int_set_falling_edge(irq)
63#define start_int_set_rising_edge(irq)
64#define start_int_ack(irq)
65#define start_int_mask(irq)
66#define start_int_umask(irq)
67#endif
68
Manjunath Goudar30330b82013-09-21 16:38:44 +053069#define DRIVER_DESC "OHCI NXP driver"
70
71static const char hcd_name[] = "ohci-nxp";
72static struct hc_driver __read_mostly ohci_nxp_hc_driver;
73
Jean Delvare09ce4972009-10-01 19:03:13 +020074static struct i2c_client *isp1301_i2c_client;
Vitaly Wool60bbfc82006-06-29 18:28:18 +040075
76extern int usb_disabled(void);
Vitaly Wool60bbfc82006-06-29 18:28:18 +040077
Alexandre Pereira da Silva78091dc2012-06-20 09:02:23 -030078static struct clk *usb_pll_clk;
79static struct clk *usb_dev_clk;
80static struct clk *usb_otg_clk;
Vitaly Wool60bbfc82006-06-29 18:28:18 +040081
Roland Stigge53dc25a2012-03-12 22:54:51 +010082static void isp1301_configure_lpc32xx(void)
83{
84 /* LPC32XX only supports DAT_SE0 USB mode */
85 /* This sequence is important */
86
87 /* Disable transparent UART mode first */
88 i2c_smbus_write_byte_data(isp1301_i2c_client,
89 (ISP1301_I2C_MODE_CONTROL_1 | ISP1301_I2C_REG_CLEAR_ADDR),
90 MC1_UART_EN);
91 i2c_smbus_write_byte_data(isp1301_i2c_client,
92 (ISP1301_I2C_MODE_CONTROL_1 | ISP1301_I2C_REG_CLEAR_ADDR),
93 ~MC1_SPEED_REG);
94 i2c_smbus_write_byte_data(isp1301_i2c_client,
95 ISP1301_I2C_MODE_CONTROL_1, MC1_SPEED_REG);
96 i2c_smbus_write_byte_data(isp1301_i2c_client,
97 (ISP1301_I2C_MODE_CONTROL_2 | ISP1301_I2C_REG_CLEAR_ADDR),
98 ~0);
99 i2c_smbus_write_byte_data(isp1301_i2c_client,
100 ISP1301_I2C_MODE_CONTROL_2,
101 (MC2_BI_DI | MC2_PSW_EN | MC2_SPD_SUSP_CTRL));
102 i2c_smbus_write_byte_data(isp1301_i2c_client,
103 (ISP1301_I2C_OTG_CONTROL_1 | ISP1301_I2C_REG_CLEAR_ADDR), ~0);
104 i2c_smbus_write_byte_data(isp1301_i2c_client,
105 ISP1301_I2C_MODE_CONTROL_1, MC1_DAT_SE0);
106 i2c_smbus_write_byte_data(isp1301_i2c_client,
107 ISP1301_I2C_OTG_CONTROL_1,
108 (OTG1_DM_PULLDOWN | OTG1_DP_PULLDOWN));
109 i2c_smbus_write_byte_data(isp1301_i2c_client,
110 (ISP1301_I2C_OTG_CONTROL_1 | ISP1301_I2C_REG_CLEAR_ADDR),
111 (OTG1_DM_PULLUP | OTG1_DP_PULLUP));
112 i2c_smbus_write_byte_data(isp1301_i2c_client,
113 ISP1301_I2C_INTERRUPT_LATCH | ISP1301_I2C_REG_CLEAR_ADDR, ~0);
114 i2c_smbus_write_byte_data(isp1301_i2c_client,
115 ISP1301_I2C_INTERRUPT_FALLING | ISP1301_I2C_REG_CLEAR_ADDR,
116 ~0);
117 i2c_smbus_write_byte_data(isp1301_i2c_client,
118 ISP1301_I2C_INTERRUPT_RISING | ISP1301_I2C_REG_CLEAR_ADDR, ~0);
119
120 /* Enable usb_need_clk clock after transceiver is initialized */
Roland Stiggea6a99cf2012-04-29 16:47:02 +0200121 __raw_writel(__raw_readl(USB_CTRL) | USB_HOST_NEED_CLK_EN, USB_CTRL);
Roland Stigge53dc25a2012-03-12 22:54:51 +0100122
123 printk(KERN_INFO "ISP1301 Vendor ID : 0x%04x\n",
124 i2c_smbus_read_word_data(isp1301_i2c_client, 0x00));
125 printk(KERN_INFO "ISP1301 Product ID : 0x%04x\n",
126 i2c_smbus_read_word_data(isp1301_i2c_client, 0x02));
127 printk(KERN_INFO "ISP1301 Version ID : 0x%04x\n",
128 i2c_smbus_read_word_data(isp1301_i2c_client, 0x14));
129}
130
131static void isp1301_configure(void)
132{
Roland Stigged684f052012-08-26 16:30:37 +0200133 isp1301_configure_lpc32xx();
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400134}
135
136static inline void isp1301_vbus_on(void)
137{
Roland Stiggea6a36002012-03-12 22:54:52 +0100138 i2c_smbus_write_byte_data(isp1301_i2c_client, ISP1301_I2C_OTG_CONTROL_1,
139 OTG1_VBUS_DRV);
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400140}
141
142static inline void isp1301_vbus_off(void)
143{
Roland Stiggea6a36002012-03-12 22:54:52 +0100144 i2c_smbus_write_byte_data(isp1301_i2c_client,
145 ISP1301_I2C_OTG_CONTROL_1 | ISP1301_I2C_REG_CLEAR_ADDR,
146 OTG1_VBUS_DRV);
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400147}
148
Manjunath Goudar30330b82013-09-21 16:38:44 +0530149static void ohci_nxp_start_hc(void)
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400150{
151 unsigned long tmp = __raw_readl(USB_OTG_STAT_CONTROL) | HOST_EN;
152 __raw_writel(tmp, USB_OTG_STAT_CONTROL);
153 isp1301_vbus_on();
154}
155
Manjunath Goudar30330b82013-09-21 16:38:44 +0530156static void ohci_nxp_stop_hc(void)
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400157{
158 unsigned long tmp;
159 isp1301_vbus_off();
160 tmp = __raw_readl(USB_OTG_STAT_CONTROL) & ~HOST_EN;
161 __raw_writel(tmp, USB_OTG_STAT_CONTROL);
162}
163
Manjunath Goudar30330b82013-09-21 16:38:44 +0530164static int ohci_hcd_nxp_probe(struct platform_device *pdev)
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400165{
166 struct usb_hcd *hcd = 0;
Roland Stigge28643102012-03-12 22:54:50 +0100167 const struct hc_driver *driver = &ohci_nxp_hc_driver;
Roland Stiggea6a99cf2012-04-29 16:47:02 +0200168 struct resource *res;
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400169 int ret = 0, irq;
Roland Stigge73108aa2012-04-29 16:47:06 +0200170 struct device_node *isp1301_node;
171
172 if (pdev->dev.of_node) {
173 isp1301_node = of_parse_phandle(pdev->dev.of_node,
174 "transceiver", 0);
175 } else {
176 isp1301_node = NULL;
177 }
178
179 isp1301_i2c_client = isp1301_get_client(isp1301_node);
180 if (!isp1301_i2c_client) {
Libo Chenb3517d52013-05-10 14:22:42 +0800181 return -EPROBE_DEFER;
Roland Stigge73108aa2012-04-29 16:47:06 +0200182 }
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400183
Russell Kinge1fd7342013-06-27 12:36:37 +0100184 ret = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
Russell King22d9d8e2013-06-10 16:28:49 +0100185 if (ret)
186 goto fail_disable;
Roland Stiggea6a99cf2012-04-29 16:47:02 +0200187
Roland Stigge28643102012-03-12 22:54:50 +0100188 dev_dbg(&pdev->dev, "%s: " DRIVER_DESC " (nxp)\n", hcd_name);
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400189 if (usb_disabled()) {
Greg Kroah-Hartmanb6c227e2012-04-27 11:24:41 -0700190 dev_err(&pdev->dev, "USB is disabled\n");
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400191 ret = -ENODEV;
Libo Chenb3517d52013-05-10 14:22:42 +0800192 goto fail_disable;
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400193 }
194
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400195 /* Enable AHB slave USB clock, needed for further USB clock control */
Roland Stiggea6a99cf2012-04-29 16:47:02 +0200196 __raw_writel(USB_SLAVE_HCLK_EN | PAD_CONTROL_LAST_DRIVEN, USB_CTRL);
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400197
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400198 /* Enable USB PLL */
Jingoo Hanac8d81f2013-12-11 16:30:35 +0900199 usb_pll_clk = devm_clk_get(&pdev->dev, "ck_pll5");
Alexandre Pereira da Silva78091dc2012-06-20 09:02:23 -0300200 if (IS_ERR(usb_pll_clk)) {
Greg Kroah-Hartmanb6c227e2012-04-27 11:24:41 -0700201 dev_err(&pdev->dev, "failed to acquire USB PLL\n");
Alexandre Pereira da Silva78091dc2012-06-20 09:02:23 -0300202 ret = PTR_ERR(usb_pll_clk);
Jingoo Hanac8d81f2013-12-11 16:30:35 +0900203 goto fail_disable;
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400204 }
205
Alexandre Pereira da Silva78091dc2012-06-20 09:02:23 -0300206 ret = clk_enable(usb_pll_clk);
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400207 if (ret < 0) {
Greg Kroah-Hartmanb6c227e2012-04-27 11:24:41 -0700208 dev_err(&pdev->dev, "failed to start USB PLL\n");
Jingoo Hanac8d81f2013-12-11 16:30:35 +0900209 goto fail_disable;
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400210 }
211
Alexandre Pereira da Silva78091dc2012-06-20 09:02:23 -0300212 ret = clk_set_rate(usb_pll_clk, 48000);
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400213 if (ret < 0) {
Greg Kroah-Hartmanb6c227e2012-04-27 11:24:41 -0700214 dev_err(&pdev->dev, "failed to set USB clock rate\n");
Libo Chenb3517d52013-05-10 14:22:42 +0800215 goto fail_rate;
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400216 }
217
Alexandre Pereira da Silva78091dc2012-06-20 09:02:23 -0300218 /* Enable USB device clock */
Jingoo Hanac8d81f2013-12-11 16:30:35 +0900219 usb_dev_clk = devm_clk_get(&pdev->dev, "ck_usbd");
Alexandre Pereira da Silva78091dc2012-06-20 09:02:23 -0300220 if (IS_ERR(usb_dev_clk)) {
221 dev_err(&pdev->dev, "failed to acquire USB DEV Clock\n");
222 ret = PTR_ERR(usb_dev_clk);
Jingoo Hanac8d81f2013-12-11 16:30:35 +0900223 goto fail_rate;
Alexandre Pereira da Silva78091dc2012-06-20 09:02:23 -0300224 }
225
226 ret = clk_enable(usb_dev_clk);
227 if (ret < 0) {
228 dev_err(&pdev->dev, "failed to start USB DEV Clock\n");
Jingoo Hanac8d81f2013-12-11 16:30:35 +0900229 goto fail_rate;
Alexandre Pereira da Silva78091dc2012-06-20 09:02:23 -0300230 }
231
232 /* Enable USB otg clocks */
Jingoo Hanac8d81f2013-12-11 16:30:35 +0900233 usb_otg_clk = devm_clk_get(&pdev->dev, "ck_usb_otg");
Alexandre Pereira da Silva78091dc2012-06-20 09:02:23 -0300234 if (IS_ERR(usb_otg_clk)) {
235 dev_err(&pdev->dev, "failed to acquire USB DEV Clock\n");
Julia Lawall2ec15a62012-08-25 21:57:07 +0200236 ret = PTR_ERR(usb_otg_clk);
Libo Chenb3517d52013-05-10 14:22:42 +0800237 goto fail_otg;
Alexandre Pereira da Silva78091dc2012-06-20 09:02:23 -0300238 }
239
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400240 __raw_writel(__raw_readl(USB_CTRL) | USB_HOST_NEED_CLK_EN, USB_CTRL);
241
Alexandre Pereira da Silva78091dc2012-06-20 09:02:23 -0300242 ret = clk_enable(usb_otg_clk);
243 if (ret < 0) {
244 dev_err(&pdev->dev, "failed to start USB DEV Clock\n");
Jingoo Hanac8d81f2013-12-11 16:30:35 +0900245 goto fail_otg;
Alexandre Pereira da Silva78091dc2012-06-20 09:02:23 -0300246 }
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400247
Alexandre Pereira da Silva78091dc2012-06-20 09:02:23 -0300248 isp1301_configure();
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400249
Roland Stiggea6a99cf2012-04-29 16:47:02 +0200250 hcd = usb_create_hcd(driver, &pdev->dev, dev_name(&pdev->dev));
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400251 if (!hcd) {
Greg Kroah-Hartmanb6c227e2012-04-27 11:24:41 -0700252 dev_err(&pdev->dev, "Failed to allocate HC buffer\n");
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400253 ret = -ENOMEM;
Libo Chenb3517d52013-05-10 14:22:42 +0800254 goto fail_hcd;
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400255 }
256
Roland Stiggea6a99cf2012-04-29 16:47:02 +0200257 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
Thierry Reding148e1132013-01-21 11:09:22 +0100258 hcd->regs = devm_ioremap_resource(&pdev->dev, res);
259 if (IS_ERR(hcd->regs)) {
260 ret = PTR_ERR(hcd->regs);
Libo Chenb3517d52013-05-10 14:22:42 +0800261 goto fail_resource;
Roland Stiggea6a99cf2012-04-29 16:47:02 +0200262 }
263 hcd->rsrc_start = res->start;
264 hcd->rsrc_len = resource_size(res);
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400265
266 irq = platform_get_irq(pdev, 0);
267 if (irq < 0) {
268 ret = -ENXIO;
Libo Chenb3517d52013-05-10 14:22:42 +0800269 goto fail_resource;
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400270 }
271
Manjunath Goudar30330b82013-09-21 16:38:44 +0530272 ohci_nxp_start_hc();
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400273 platform_set_drvdata(pdev, hcd);
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400274
275 dev_info(&pdev->dev, "at 0x%p, irq %d\n", hcd->regs, hcd->irq);
Yong Zhangb5dd18d2011-09-07 16:10:52 +0800276 ret = usb_add_hcd(hcd, irq, 0);
Peter Chen3c9740a2013-11-05 10:46:02 +0800277 if (ret == 0) {
278 device_wakeup_enable(hcd->self.controller);
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400279 return ret;
Peter Chen3c9740a2013-11-05 10:46:02 +0800280 }
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400281
Manjunath Goudar30330b82013-09-21 16:38:44 +0530282 ohci_nxp_stop_hc();
Libo Chenb3517d52013-05-10 14:22:42 +0800283fail_resource:
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400284 usb_put_hcd(hcd);
Libo Chenb3517d52013-05-10 14:22:42 +0800285fail_hcd:
Alexandre Pereira da Silva78091dc2012-06-20 09:02:23 -0300286 clk_disable(usb_otg_clk);
Libo Chenb3517d52013-05-10 14:22:42 +0800287fail_otg:
Alexandre Pereira da Silva78091dc2012-06-20 09:02:23 -0300288 clk_disable(usb_dev_clk);
Libo Chenb3517d52013-05-10 14:22:42 +0800289fail_rate:
Alexandre Pereira da Silva78091dc2012-06-20 09:02:23 -0300290 clk_disable(usb_pll_clk);
Libo Chenb3517d52013-05-10 14:22:42 +0800291fail_disable:
Jean Delvare3a407e72008-11-13 18:57:53 +0100292 isp1301_i2c_client = NULL;
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400293 return ret;
294}
295
Manjunath Goudar30330b82013-09-21 16:38:44 +0530296static int ohci_hcd_nxp_remove(struct platform_device *pdev)
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400297{
298 struct usb_hcd *hcd = platform_get_drvdata(pdev);
299
300 usb_remove_hcd(hcd);
Manjunath Goudar30330b82013-09-21 16:38:44 +0530301 ohci_nxp_stop_hc();
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400302 usb_put_hcd(hcd);
Alexandre Pereira da Silva78091dc2012-06-20 09:02:23 -0300303 clk_disable(usb_pll_clk);
Alexandre Pereira da Silva78091dc2012-06-20 09:02:23 -0300304 clk_disable(usb_dev_clk);
Luotao Fu8740cc72010-02-19 15:42:00 +0100305 i2c_unregister_device(isp1301_i2c_client);
Jean Delvare3a407e72008-11-13 18:57:53 +0100306 isp1301_i2c_client = NULL;
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400307
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400308 return 0;
309}
310
Kay Sieversf4fce612008-04-10 21:29:22 -0700311/* work with hotplug and coldplug */
312MODULE_ALIAS("platform:usb-ohci");
313
Roland Stigge2265efe2012-04-29 16:47:03 +0200314#ifdef CONFIG_OF
Manjunath Goudar30330b82013-09-21 16:38:44 +0530315static const struct of_device_id ohci_hcd_nxp_match[] = {
Roland Stigge2265efe2012-04-29 16:47:03 +0200316 { .compatible = "nxp,ohci-nxp" },
317 {},
318};
Manjunath Goudar30330b82013-09-21 16:38:44 +0530319MODULE_DEVICE_TABLE(of, ohci_hcd_nxp_match);
Roland Stigge2265efe2012-04-29 16:47:03 +0200320#endif
321
Manjunath Goudar30330b82013-09-21 16:38:44 +0530322static struct platform_driver ohci_hcd_nxp_driver = {
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400323 .driver = {
324 .name = "usb-ohci",
Manjunath Goudar30330b82013-09-21 16:38:44 +0530325 .of_match_table = of_match_ptr(ohci_hcd_nxp_match),
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400326 },
Manjunath Goudar30330b82013-09-21 16:38:44 +0530327 .probe = ohci_hcd_nxp_probe,
328 .remove = ohci_hcd_nxp_remove,
Vitaly Wool60bbfc82006-06-29 18:28:18 +0400329};
330
Manjunath Goudar30330b82013-09-21 16:38:44 +0530331static int __init ohci_nxp_init(void)
332{
333 if (usb_disabled())
334 return -ENODEV;
335
336 pr_info("%s: " DRIVER_DESC "\n", hcd_name);
337
338 ohci_init_driver(&ohci_nxp_hc_driver, NULL);
339 return platform_driver_register(&ohci_hcd_nxp_driver);
340}
341module_init(ohci_nxp_init);
342
343static void __exit ohci_nxp_cleanup(void)
344{
345 platform_driver_unregister(&ohci_hcd_nxp_driver);
346}
347module_exit(ohci_nxp_cleanup);
348
349MODULE_DESCRIPTION(DRIVER_DESC);
350MODULE_LICENSE("GPL v2");