ohci-at91.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709
  1. /*
  2. * OHCI HCD (Host Controller Driver) for USB.
  3. *
  4. * Copyright (C) 2004 SAN People (Pty) Ltd.
  5. * Copyright (C) 2005 Thibaut VARENE <varenet@parisc-linux.org>
  6. *
  7. * AT91 Bus Glue
  8. *
  9. * Based on fragments of 2.4 driver by Rick Bronson.
  10. * Based on ohci-omap.c
  11. *
  12. * This file is licenced under the GPL.
  13. */
  14. #include <linux/clk.h>
  15. #include <linux/platform_device.h>
  16. #include <linux/of_platform.h>
  17. #include <linux/of_gpio.h>
  18. #include <mach/hardware.h>
  19. #include <asm/gpio.h>
  20. #include <mach/board.h>
  21. #include <mach/cpu.h>
  22. #ifndef CONFIG_ARCH_AT91
  23. #error "CONFIG_ARCH_AT91 must be defined."
  24. #endif
  25. #define valid_port(index) ((index) >= 0 && (index) < AT91_MAX_USBH_PORTS)
  26. #define at91_for_each_port(index) \
  27. for ((index) = 0; (index) < AT91_MAX_USBH_PORTS; (index)++)
  28. /* interface and function clocks; sometimes also an AHB clock */
  29. static struct clk *iclk, *fclk, *hclk;
  30. static int clocked;
  31. extern int usb_disabled(void);
  32. /*-------------------------------------------------------------------------*/
  33. static void at91_start_clock(void)
  34. {
  35. clk_enable(hclk);
  36. clk_enable(iclk);
  37. clk_enable(fclk);
  38. clocked = 1;
  39. }
  40. static void at91_stop_clock(void)
  41. {
  42. clk_disable(fclk);
  43. clk_disable(iclk);
  44. clk_disable(hclk);
  45. clocked = 0;
  46. }
  47. static void at91_start_hc(struct platform_device *pdev)
  48. {
  49. struct usb_hcd *hcd = platform_get_drvdata(pdev);
  50. struct ohci_regs __iomem *regs = hcd->regs;
  51. dev_dbg(&pdev->dev, "start\n");
  52. /*
  53. * Start the USB clocks.
  54. */
  55. at91_start_clock();
  56. /*
  57. * The USB host controller must remain in reset.
  58. */
  59. writel(0, &regs->control);
  60. }
  61. static void at91_stop_hc(struct platform_device *pdev)
  62. {
  63. struct usb_hcd *hcd = platform_get_drvdata(pdev);
  64. struct ohci_regs __iomem *regs = hcd->regs;
  65. dev_dbg(&pdev->dev, "stop\n");
  66. /*
  67. * Put the USB host controller into reset.
  68. */
  69. writel(0, &regs->control);
  70. /*
  71. * Stop the USB clocks.
  72. */
  73. at91_stop_clock();
  74. }
  75. /*-------------------------------------------------------------------------*/
  76. static void __devexit usb_hcd_at91_remove (struct usb_hcd *, struct platform_device *);
  77. /* configure so an HC device and id are always provided */
  78. /* always called with process context; sleeping is OK */
  79. /**
  80. * usb_hcd_at91_probe - initialize AT91-based HCDs
  81. * Context: !in_interrupt()
  82. *
  83. * Allocates basic resources for this USB host controller, and
  84. * then invokes the start() method for the HCD associated with it
  85. * through the hotplug entry's driver_data.
  86. */
  87. static int __devinit usb_hcd_at91_probe(const struct hc_driver *driver,
  88. struct platform_device *pdev)
  89. {
  90. int retval;
  91. struct usb_hcd *hcd = NULL;
  92. if (pdev->num_resources != 2) {
  93. pr_debug("hcd probe: invalid num_resources");
  94. return -ENODEV;
  95. }
  96. if ((pdev->resource[0].flags != IORESOURCE_MEM)
  97. || (pdev->resource[1].flags != IORESOURCE_IRQ)) {
  98. pr_debug("hcd probe: invalid resource type\n");
  99. return -ENODEV;
  100. }
  101. hcd = usb_create_hcd(driver, &pdev->dev, "at91");
  102. if (!hcd)
  103. return -ENOMEM;
  104. hcd->rsrc_start = pdev->resource[0].start;
  105. hcd->rsrc_len = resource_size(&pdev->resource[0]);
  106. if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
  107. pr_debug("request_mem_region failed\n");
  108. retval = -EBUSY;
  109. goto err1;
  110. }
  111. hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
  112. if (!hcd->regs) {
  113. pr_debug("ioremap failed\n");
  114. retval = -EIO;
  115. goto err2;
  116. }
  117. iclk = clk_get(&pdev->dev, "ohci_clk");
  118. if (IS_ERR(iclk)) {
  119. dev_err(&pdev->dev, "failed to get ohci_clk\n");
  120. retval = PTR_ERR(iclk);
  121. goto err3;
  122. }
  123. fclk = clk_get(&pdev->dev, "uhpck");
  124. if (IS_ERR(fclk)) {
  125. dev_err(&pdev->dev, "failed to get uhpck\n");
  126. retval = PTR_ERR(fclk);
  127. goto err4;
  128. }
  129. hclk = clk_get(&pdev->dev, "hclk");
  130. if (IS_ERR(hclk)) {
  131. dev_err(&pdev->dev, "failed to get hclk\n");
  132. retval = PTR_ERR(hclk);
  133. goto err5;
  134. }
  135. at91_start_hc(pdev);
  136. ohci_hcd_init(hcd_to_ohci(hcd));
  137. retval = usb_add_hcd(hcd, pdev->resource[1].start, IRQF_SHARED);
  138. if (retval == 0)
  139. return retval;
  140. /* Error handling */
  141. at91_stop_hc(pdev);
  142. clk_put(hclk);
  143. err5:
  144. clk_put(fclk);
  145. err4:
  146. clk_put(iclk);
  147. err3:
  148. iounmap(hcd->regs);
  149. err2:
  150. release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
  151. err1:
  152. usb_put_hcd(hcd);
  153. return retval;
  154. }
  155. /* may be called with controller, bus, and devices active */
  156. /**
  157. * usb_hcd_at91_remove - shutdown processing for AT91-based HCDs
  158. * @dev: USB Host Controller being removed
  159. * Context: !in_interrupt()
  160. *
  161. * Reverses the effect of usb_hcd_at91_probe(), first invoking
  162. * the HCD's stop() method. It is always called from a thread
  163. * context, "rmmod" or something similar.
  164. *
  165. */
  166. static void __devexit usb_hcd_at91_remove(struct usb_hcd *hcd,
  167. struct platform_device *pdev)
  168. {
  169. usb_remove_hcd(hcd);
  170. at91_stop_hc(pdev);
  171. iounmap(hcd->regs);
  172. release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
  173. usb_put_hcd(hcd);
  174. clk_put(hclk);
  175. clk_put(fclk);
  176. clk_put(iclk);
  177. fclk = iclk = hclk = NULL;
  178. dev_set_drvdata(&pdev->dev, NULL);
  179. }
  180. /*-------------------------------------------------------------------------*/
  181. static int __devinit
  182. ohci_at91_start (struct usb_hcd *hcd)
  183. {
  184. struct at91_usbh_data *board = hcd->self.controller->platform_data;
  185. struct ohci_hcd *ohci = hcd_to_ohci (hcd);
  186. int ret;
  187. if ((ret = ohci_init(ohci)) < 0)
  188. return ret;
  189. ohci->num_ports = board->ports;
  190. if ((ret = ohci_run(ohci)) < 0) {
  191. dev_err(hcd->self.controller, "can't start %s\n",
  192. hcd->self.bus_name);
  193. ohci_stop(hcd);
  194. return ret;
  195. }
  196. return 0;
  197. }
  198. static void ohci_at91_usb_set_power(struct at91_usbh_data *pdata, int port, int enable)
  199. {
  200. if (!valid_port(port))
  201. return;
  202. if (!gpio_is_valid(pdata->vbus_pin[port]))
  203. return;
  204. gpio_set_value(pdata->vbus_pin[port],
  205. pdata->vbus_pin_active_low[port] ^ enable);
  206. }
  207. static int ohci_at91_usb_get_power(struct at91_usbh_data *pdata, int port)
  208. {
  209. if (!valid_port(port))
  210. return -EINVAL;
  211. if (!gpio_is_valid(pdata->vbus_pin[port]))
  212. return -EINVAL;
  213. return gpio_get_value(pdata->vbus_pin[port]) ^
  214. pdata->vbus_pin_active_low[port];
  215. }
  216. /*
  217. * Update the status data from the hub with the over-current indicator change.
  218. */
  219. static int ohci_at91_hub_status_data(struct usb_hcd *hcd, char *buf)
  220. {
  221. struct at91_usbh_data *pdata = hcd->self.controller->platform_data;
  222. int length = ohci_hub_status_data(hcd, buf);
  223. int port;
  224. at91_for_each_port(port) {
  225. if (pdata->overcurrent_changed[port]) {
  226. if (!length)
  227. length = 1;
  228. buf[0] |= 1 << (port + 1);
  229. }
  230. }
  231. return length;
  232. }
  233. /*
  234. * Look at the control requests to the root hub and see if we need to override.
  235. */
  236. static int ohci_at91_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
  237. u16 wIndex, char *buf, u16 wLength)
  238. {
  239. struct at91_usbh_data *pdata = hcd->self.controller->platform_data;
  240. struct usb_hub_descriptor *desc;
  241. int ret = -EINVAL;
  242. u32 *data = (u32 *)buf;
  243. dev_dbg(hcd->self.controller,
  244. "ohci_at91_hub_control(%p,0x%04x,0x%04x,0x%04x,%p,%04x)\n",
  245. hcd, typeReq, wValue, wIndex, buf, wLength);
  246. wIndex--;
  247. switch (typeReq) {
  248. case SetPortFeature:
  249. if (wValue == USB_PORT_FEAT_POWER) {
  250. dev_dbg(hcd->self.controller, "SetPortFeat: POWER\n");
  251. if (valid_port(wIndex)) {
  252. ohci_at91_usb_set_power(pdata, wIndex, 1);
  253. ret = 0;
  254. }
  255. goto out;
  256. }
  257. break;
  258. case ClearPortFeature:
  259. switch (wValue) {
  260. case USB_PORT_FEAT_C_OVER_CURRENT:
  261. dev_dbg(hcd->self.controller,
  262. "ClearPortFeature: C_OVER_CURRENT\n");
  263. if (valid_port(wIndex)) {
  264. pdata->overcurrent_changed[wIndex] = 0;
  265. pdata->overcurrent_status[wIndex] = 0;
  266. }
  267. goto out;
  268. case USB_PORT_FEAT_OVER_CURRENT:
  269. dev_dbg(hcd->self.controller,
  270. "ClearPortFeature: OVER_CURRENT\n");
  271. if (valid_port(wIndex))
  272. pdata->overcurrent_status[wIndex] = 0;
  273. goto out;
  274. case USB_PORT_FEAT_POWER:
  275. dev_dbg(hcd->self.controller,
  276. "ClearPortFeature: POWER\n");
  277. if (valid_port(wIndex)) {
  278. ohci_at91_usb_set_power(pdata, wIndex, 0);
  279. return 0;
  280. }
  281. }
  282. break;
  283. }
  284. ret = ohci_hub_control(hcd, typeReq, wValue, wIndex + 1, buf, wLength);
  285. if (ret)
  286. goto out;
  287. switch (typeReq) {
  288. case GetHubDescriptor:
  289. /* update the hub's descriptor */
  290. desc = (struct usb_hub_descriptor *)buf;
  291. dev_dbg(hcd->self.controller, "wHubCharacteristics 0x%04x\n",
  292. desc->wHubCharacteristics);
  293. /* remove the old configurations for power-switching, and
  294. * over-current protection, and insert our new configuration
  295. */
  296. desc->wHubCharacteristics &= ~cpu_to_le16(HUB_CHAR_LPSM);
  297. desc->wHubCharacteristics |= cpu_to_le16(0x0001);
  298. if (pdata->overcurrent_supported) {
  299. desc->wHubCharacteristics &= ~cpu_to_le16(HUB_CHAR_OCPM);
  300. desc->wHubCharacteristics |= cpu_to_le16(0x0008|0x0001);
  301. }
  302. dev_dbg(hcd->self.controller, "wHubCharacteristics after 0x%04x\n",
  303. desc->wHubCharacteristics);
  304. return ret;
  305. case GetPortStatus:
  306. /* check port status */
  307. dev_dbg(hcd->self.controller, "GetPortStatus(%d)\n", wIndex);
  308. if (valid_port(wIndex)) {
  309. if (!ohci_at91_usb_get_power(pdata, wIndex))
  310. *data &= ~cpu_to_le32(RH_PS_PPS);
  311. if (pdata->overcurrent_changed[wIndex])
  312. *data |= cpu_to_le32(RH_PS_OCIC);
  313. if (pdata->overcurrent_status[wIndex])
  314. *data |= cpu_to_le32(RH_PS_POCI);
  315. }
  316. }
  317. out:
  318. return ret;
  319. }
  320. /*-------------------------------------------------------------------------*/
  321. static const struct hc_driver ohci_at91_hc_driver = {
  322. .description = hcd_name,
  323. .product_desc = "AT91 OHCI",
  324. .hcd_priv_size = sizeof(struct ohci_hcd),
  325. /*
  326. * generic hardware linkage
  327. */
  328. .irq = ohci_irq,
  329. .flags = HCD_USB11 | HCD_MEMORY,
  330. /*
  331. * basic lifecycle operations
  332. */
  333. .start = ohci_at91_start,
  334. .stop = ohci_stop,
  335. .shutdown = ohci_shutdown,
  336. /*
  337. * managing i/o requests and associated device resources
  338. */
  339. .urb_enqueue = ohci_urb_enqueue,
  340. .urb_dequeue = ohci_urb_dequeue,
  341. .endpoint_disable = ohci_endpoint_disable,
  342. /*
  343. * scheduling support
  344. */
  345. .get_frame_number = ohci_get_frame,
  346. /*
  347. * root hub support
  348. */
  349. .hub_status_data = ohci_at91_hub_status_data,
  350. .hub_control = ohci_at91_hub_control,
  351. #ifdef CONFIG_PM
  352. .bus_suspend = ohci_bus_suspend,
  353. .bus_resume = ohci_bus_resume,
  354. #endif
  355. .start_port_reset = ohci_start_port_reset,
  356. };
  357. /*-------------------------------------------------------------------------*/
  358. static irqreturn_t ohci_hcd_at91_overcurrent_irq(int irq, void *data)
  359. {
  360. struct platform_device *pdev = data;
  361. struct at91_usbh_data *pdata = pdev->dev.platform_data;
  362. int val, gpio, port;
  363. /* From the GPIO notifying the over-current situation, find
  364. * out the corresponding port */
  365. at91_for_each_port(port) {
  366. if (gpio_to_irq(pdata->overcurrent_pin[port]) == irq) {
  367. gpio = pdata->overcurrent_pin[port];
  368. break;
  369. }
  370. }
  371. if (port == AT91_MAX_USBH_PORTS) {
  372. dev_err(& pdev->dev, "overcurrent interrupt from unknown GPIO\n");
  373. return IRQ_HANDLED;
  374. }
  375. val = gpio_get_value(gpio);
  376. /* When notified of an over-current situation, disable power
  377. on the corresponding port, and mark this port in
  378. over-current. */
  379. if (!val) {
  380. ohci_at91_usb_set_power(pdata, port, 0);
  381. pdata->overcurrent_status[port] = 1;
  382. pdata->overcurrent_changed[port] = 1;
  383. }
  384. dev_dbg(& pdev->dev, "overcurrent situation %s\n",
  385. val ? "exited" : "notified");
  386. return IRQ_HANDLED;
  387. }
  388. #ifdef CONFIG_OF
  389. static const struct of_device_id at91_ohci_dt_ids[] = {
  390. { .compatible = "atmel,at91rm9200-ohci" },
  391. { /* sentinel */ }
  392. };
  393. MODULE_DEVICE_TABLE(of, at91_ohci_dt_ids);
  394. static u64 at91_ohci_dma_mask = DMA_BIT_MASK(32);
  395. static int __devinit ohci_at91_of_init(struct platform_device *pdev)
  396. {
  397. struct device_node *np = pdev->dev.of_node;
  398. int i, gpio;
  399. enum of_gpio_flags flags;
  400. struct at91_usbh_data *pdata;
  401. u32 ports;
  402. if (!np)
  403. return 0;
  404. /* Right now device-tree probed devices don't get dma_mask set.
  405. * Since shared usb code relies on it, set it here for now.
  406. * Once we have dma capability bindings this can go away.
  407. */
  408. if (!pdev->dev.dma_mask)
  409. pdev->dev.dma_mask = &at91_ohci_dma_mask;
  410. pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
  411. if (!pdata)
  412. return -ENOMEM;
  413. if (!of_property_read_u32(np, "num-ports", &ports))
  414. pdata->ports = ports;
  415. at91_for_each_port(i) {
  416. gpio = of_get_named_gpio_flags(np, "atmel,vbus-gpio", i, &flags);
  417. pdata->vbus_pin[i] = gpio;
  418. if (!gpio_is_valid(gpio))
  419. continue;
  420. pdata->vbus_pin_active_low[i] = flags & OF_GPIO_ACTIVE_LOW;
  421. }
  422. at91_for_each_port(i)
  423. pdata->overcurrent_pin[i] =
  424. of_get_named_gpio_flags(np, "atmel,oc-gpio", i, &flags);
  425. pdev->dev.platform_data = pdata;
  426. return 0;
  427. }
  428. #else
  429. static int __devinit ohci_at91_of_init(struct platform_device *pdev)
  430. {
  431. return 0;
  432. }
  433. #endif
  434. /*-------------------------------------------------------------------------*/
  435. static int __devinit ohci_hcd_at91_drv_probe(struct platform_device *pdev)
  436. {
  437. struct at91_usbh_data *pdata;
  438. int i;
  439. int gpio;
  440. int ret;
  441. ret = ohci_at91_of_init(pdev);
  442. if (ret)
  443. return ret;
  444. pdata = pdev->dev.platform_data;
  445. if (pdata) {
  446. at91_for_each_port(i) {
  447. if (!gpio_is_valid(pdata->vbus_pin[i]))
  448. continue;
  449. gpio = pdata->vbus_pin[i];
  450. ret = gpio_request(gpio, "ohci_vbus");
  451. if (ret) {
  452. dev_err(&pdev->dev,
  453. "can't request vbus gpio %d\n", gpio);
  454. continue;
  455. }
  456. ret = gpio_direction_output(gpio,
  457. !pdata->vbus_pin_active_low[i]);
  458. if (ret) {
  459. dev_err(&pdev->dev,
  460. "can't put vbus gpio %d as output %d\n",
  461. gpio, !pdata->vbus_pin_active_low[i]);
  462. gpio_free(gpio);
  463. continue;
  464. }
  465. ohci_at91_usb_set_power(pdata, i, 1);
  466. }
  467. at91_for_each_port(i) {
  468. if (!gpio_is_valid(pdata->overcurrent_pin[i]))
  469. continue;
  470. gpio = pdata->overcurrent_pin[i];
  471. ret = gpio_request(gpio, "ohci_overcurrent");
  472. if (ret) {
  473. dev_err(&pdev->dev,
  474. "can't request overcurrent gpio %d\n",
  475. gpio);
  476. continue;
  477. }
  478. ret = gpio_direction_input(gpio);
  479. if (ret) {
  480. dev_err(&pdev->dev,
  481. "can't configure overcurrent gpio %d as input\n",
  482. gpio);
  483. gpio_free(gpio);
  484. continue;
  485. }
  486. ret = request_irq(gpio_to_irq(gpio),
  487. ohci_hcd_at91_overcurrent_irq,
  488. IRQF_SHARED, "ohci_overcurrent", pdev);
  489. if (ret) {
  490. gpio_free(gpio);
  491. dev_err(&pdev->dev,
  492. "can't get gpio IRQ for overcurrent\n");
  493. }
  494. }
  495. }
  496. device_init_wakeup(&pdev->dev, 1);
  497. return usb_hcd_at91_probe(&ohci_at91_hc_driver, pdev);
  498. }
  499. static int __devexit ohci_hcd_at91_drv_remove(struct platform_device *pdev)
  500. {
  501. struct at91_usbh_data *pdata = pdev->dev.platform_data;
  502. int i;
  503. if (pdata) {
  504. at91_for_each_port(i) {
  505. if (!gpio_is_valid(pdata->vbus_pin[i]))
  506. continue;
  507. ohci_at91_usb_set_power(pdata, i, 0);
  508. gpio_free(pdata->vbus_pin[i]);
  509. }
  510. at91_for_each_port(i) {
  511. if (!gpio_is_valid(pdata->overcurrent_pin[i]))
  512. continue;
  513. free_irq(gpio_to_irq(pdata->overcurrent_pin[i]), pdev);
  514. gpio_free(pdata->overcurrent_pin[i]);
  515. }
  516. }
  517. device_init_wakeup(&pdev->dev, 0);
  518. usb_hcd_at91_remove(platform_get_drvdata(pdev), pdev);
  519. return 0;
  520. }
  521. #ifdef CONFIG_PM
  522. static int
  523. ohci_hcd_at91_drv_suspend(struct platform_device *pdev, pm_message_t mesg)
  524. {
  525. struct usb_hcd *hcd = platform_get_drvdata(pdev);
  526. struct ohci_hcd *ohci = hcd_to_ohci(hcd);
  527. if (device_may_wakeup(&pdev->dev))
  528. enable_irq_wake(hcd->irq);
  529. /*
  530. * The integrated transceivers seem unable to notice disconnect,
  531. * reconnect, or wakeup without the 48 MHz clock active. so for
  532. * correctness, always discard connection state (using reset).
  533. *
  534. * REVISIT: some boards will be able to turn VBUS off...
  535. */
  536. if (at91_suspend_entering_slow_clock()) {
  537. ohci_usb_reset (ohci);
  538. /* flush the writes */
  539. (void) ohci_readl (ohci, &ohci->regs->control);
  540. at91_stop_clock();
  541. }
  542. return 0;
  543. }
  544. static int ohci_hcd_at91_drv_resume(struct platform_device *pdev)
  545. {
  546. struct usb_hcd *hcd = platform_get_drvdata(pdev);
  547. if (device_may_wakeup(&pdev->dev))
  548. disable_irq_wake(hcd->irq);
  549. if (!clocked)
  550. at91_start_clock();
  551. ohci_finish_controller_resume(hcd);
  552. return 0;
  553. }
  554. #else
  555. #define ohci_hcd_at91_drv_suspend NULL
  556. #define ohci_hcd_at91_drv_resume NULL
  557. #endif
  558. MODULE_ALIAS("platform:at91_ohci");
  559. static struct platform_driver ohci_hcd_at91_driver = {
  560. .probe = ohci_hcd_at91_drv_probe,
  561. .remove = __devexit_p(ohci_hcd_at91_drv_remove),
  562. .shutdown = usb_hcd_platform_shutdown,
  563. .suspend = ohci_hcd_at91_drv_suspend,
  564. .resume = ohci_hcd_at91_drv_resume,
  565. .driver = {
  566. .name = "at91_ohci",
  567. .owner = THIS_MODULE,
  568. .of_match_table = of_match_ptr(at91_ohci_dt_ids),
  569. },
  570. };