ohci-at91.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708
  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 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 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 = pdev->resource[0].end - pdev->resource[0].start + 1;
  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 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. err("can't start %s", hcd->self.bus_name);
  192. ohci_stop(hcd);
  193. return ret;
  194. }
  195. return 0;
  196. }
  197. static void ohci_at91_usb_set_power(struct at91_usbh_data *pdata, int port, int enable)
  198. {
  199. if (!valid_port(port))
  200. return;
  201. if (!gpio_is_valid(pdata->vbus_pin[port]))
  202. return;
  203. gpio_set_value(pdata->vbus_pin[port],
  204. pdata->vbus_pin_active_low[port] ^ enable);
  205. }
  206. static int ohci_at91_usb_get_power(struct at91_usbh_data *pdata, int port)
  207. {
  208. if (!valid_port(port))
  209. return -EINVAL;
  210. if (!gpio_is_valid(pdata->vbus_pin[port]))
  211. return -EINVAL;
  212. return gpio_get_value(pdata->vbus_pin[port]) ^
  213. pdata->vbus_pin_active_low[port];
  214. }
  215. /*
  216. * Update the status data from the hub with the over-current indicator change.
  217. */
  218. static int ohci_at91_hub_status_data(struct usb_hcd *hcd, char *buf)
  219. {
  220. struct at91_usbh_data *pdata = hcd->self.controller->platform_data;
  221. int length = ohci_hub_status_data(hcd, buf);
  222. int port;
  223. at91_for_each_port(port) {
  224. if (pdata->overcurrent_changed[port]) {
  225. if (!length)
  226. length = 1;
  227. buf[0] |= 1 << (port + 1);
  228. }
  229. }
  230. return length;
  231. }
  232. /*
  233. * Look at the control requests to the root hub and see if we need to override.
  234. */
  235. static int ohci_at91_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
  236. u16 wIndex, char *buf, u16 wLength)
  237. {
  238. struct at91_usbh_data *pdata = hcd->self.controller->platform_data;
  239. struct usb_hub_descriptor *desc;
  240. int ret = -EINVAL;
  241. u32 *data = (u32 *)buf;
  242. dev_dbg(hcd->self.controller,
  243. "ohci_at91_hub_control(%p,0x%04x,0x%04x,0x%04x,%p,%04x)\n",
  244. hcd, typeReq, wValue, wIndex, buf, wLength);
  245. wIndex--;
  246. switch (typeReq) {
  247. case SetPortFeature:
  248. if (wValue == USB_PORT_FEAT_POWER) {
  249. dev_dbg(hcd->self.controller, "SetPortFeat: POWER\n");
  250. if (valid_port(wIndex)) {
  251. ohci_at91_usb_set_power(pdata, wIndex, 1);
  252. ret = 0;
  253. }
  254. goto out;
  255. }
  256. break;
  257. case ClearPortFeature:
  258. switch (wValue) {
  259. case USB_PORT_FEAT_C_OVER_CURRENT:
  260. dev_dbg(hcd->self.controller,
  261. "ClearPortFeature: C_OVER_CURRENT\n");
  262. if (valid_port(wIndex)) {
  263. pdata->overcurrent_changed[wIndex] = 0;
  264. pdata->overcurrent_status[wIndex] = 0;
  265. }
  266. goto out;
  267. case USB_PORT_FEAT_OVER_CURRENT:
  268. dev_dbg(hcd->self.controller,
  269. "ClearPortFeature: OVER_CURRENT\n");
  270. if (valid_port(wIndex))
  271. pdata->overcurrent_status[wIndex] = 0;
  272. goto out;
  273. case USB_PORT_FEAT_POWER:
  274. dev_dbg(hcd->self.controller,
  275. "ClearPortFeature: POWER\n");
  276. if (valid_port(wIndex)) {
  277. ohci_at91_usb_set_power(pdata, wIndex, 0);
  278. return 0;
  279. }
  280. }
  281. break;
  282. }
  283. ret = ohci_hub_control(hcd, typeReq, wValue, wIndex + 1, buf, wLength);
  284. if (ret)
  285. goto out;
  286. switch (typeReq) {
  287. case GetHubDescriptor:
  288. /* update the hub's descriptor */
  289. desc = (struct usb_hub_descriptor *)buf;
  290. dev_dbg(hcd->self.controller, "wHubCharacteristics 0x%04x\n",
  291. desc->wHubCharacteristics);
  292. /* remove the old configurations for power-switching, and
  293. * over-current protection, and insert our new configuration
  294. */
  295. desc->wHubCharacteristics &= ~cpu_to_le16(HUB_CHAR_LPSM);
  296. desc->wHubCharacteristics |= cpu_to_le16(0x0001);
  297. if (pdata->overcurrent_supported) {
  298. desc->wHubCharacteristics &= ~cpu_to_le16(HUB_CHAR_OCPM);
  299. desc->wHubCharacteristics |= cpu_to_le16(0x0008|0x0001);
  300. }
  301. dev_dbg(hcd->self.controller, "wHubCharacteristics after 0x%04x\n",
  302. desc->wHubCharacteristics);
  303. return ret;
  304. case GetPortStatus:
  305. /* check port status */
  306. dev_dbg(hcd->self.controller, "GetPortStatus(%d)\n", wIndex);
  307. if (valid_port(wIndex)) {
  308. if (!ohci_at91_usb_get_power(pdata, wIndex))
  309. *data &= ~cpu_to_le32(RH_PS_PPS);
  310. if (pdata->overcurrent_changed[wIndex])
  311. *data |= cpu_to_le32(RH_PS_OCIC);
  312. if (pdata->overcurrent_status[wIndex])
  313. *data |= cpu_to_le32(RH_PS_POCI);
  314. }
  315. }
  316. out:
  317. return ret;
  318. }
  319. /*-------------------------------------------------------------------------*/
  320. static const struct hc_driver ohci_at91_hc_driver = {
  321. .description = hcd_name,
  322. .product_desc = "AT91 OHCI",
  323. .hcd_priv_size = sizeof(struct ohci_hcd),
  324. /*
  325. * generic hardware linkage
  326. */
  327. .irq = ohci_irq,
  328. .flags = HCD_USB11 | HCD_MEMORY,
  329. /*
  330. * basic lifecycle operations
  331. */
  332. .start = ohci_at91_start,
  333. .stop = ohci_stop,
  334. .shutdown = ohci_shutdown,
  335. /*
  336. * managing i/o requests and associated device resources
  337. */
  338. .urb_enqueue = ohci_urb_enqueue,
  339. .urb_dequeue = ohci_urb_dequeue,
  340. .endpoint_disable = ohci_endpoint_disable,
  341. /*
  342. * scheduling support
  343. */
  344. .get_frame_number = ohci_get_frame,
  345. /*
  346. * root hub support
  347. */
  348. .hub_status_data = ohci_at91_hub_status_data,
  349. .hub_control = ohci_at91_hub_control,
  350. #ifdef CONFIG_PM
  351. .bus_suspend = ohci_bus_suspend,
  352. .bus_resume = ohci_bus_resume,
  353. #endif
  354. .start_port_reset = ohci_start_port_reset,
  355. };
  356. /*-------------------------------------------------------------------------*/
  357. static irqreturn_t ohci_hcd_at91_overcurrent_irq(int irq, void *data)
  358. {
  359. struct platform_device *pdev = data;
  360. struct at91_usbh_data *pdata = pdev->dev.platform_data;
  361. int val, gpio, port;
  362. /* From the GPIO notifying the over-current situation, find
  363. * out the corresponding port */
  364. at91_for_each_port(port) {
  365. if (gpio_to_irq(pdata->overcurrent_pin[port]) == irq) {
  366. gpio = pdata->overcurrent_pin[port];
  367. break;
  368. }
  369. }
  370. if (port == AT91_MAX_USBH_PORTS) {
  371. dev_err(& pdev->dev, "overcurrent interrupt from unknown GPIO\n");
  372. return IRQ_HANDLED;
  373. }
  374. val = gpio_get_value(gpio);
  375. /* When notified of an over-current situation, disable power
  376. on the corresponding port, and mark this port in
  377. over-current. */
  378. if (!val) {
  379. ohci_at91_usb_set_power(pdata, port, 0);
  380. pdata->overcurrent_status[port] = 1;
  381. pdata->overcurrent_changed[port] = 1;
  382. }
  383. dev_dbg(& pdev->dev, "overcurrent situation %s\n",
  384. val ? "exited" : "notified");
  385. return IRQ_HANDLED;
  386. }
  387. #ifdef CONFIG_OF
  388. static const struct of_device_id at91_ohci_dt_ids[] = {
  389. { .compatible = "atmel,at91rm9200-ohci" },
  390. { /* sentinel */ }
  391. };
  392. MODULE_DEVICE_TABLE(of, at91_ohci_dt_ids);
  393. static u64 at91_ohci_dma_mask = DMA_BIT_MASK(32);
  394. static int __devinit ohci_at91_of_init(struct platform_device *pdev)
  395. {
  396. struct device_node *np = pdev->dev.of_node;
  397. int i, gpio;
  398. enum of_gpio_flags flags;
  399. struct at91_usbh_data *pdata;
  400. u32 ports;
  401. if (!np)
  402. return 0;
  403. /* Right now device-tree probed devices don't get dma_mask set.
  404. * Since shared usb code relies on it, set it here for now.
  405. * Once we have dma capability bindings this can go away.
  406. */
  407. if (!pdev->dev.dma_mask)
  408. pdev->dev.dma_mask = &at91_ohci_dma_mask;
  409. pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
  410. if (!pdata)
  411. return -ENOMEM;
  412. if (!of_property_read_u32(np, "num-ports", &ports))
  413. pdata->ports = ports;
  414. at91_for_each_port(i) {
  415. gpio = of_get_named_gpio_flags(np, "atmel,vbus-gpio", i, &flags);
  416. pdata->vbus_pin[i] = gpio;
  417. if (!gpio_is_valid(gpio))
  418. continue;
  419. pdata->vbus_pin_active_low[i] = flags & OF_GPIO_ACTIVE_LOW;
  420. }
  421. at91_for_each_port(i)
  422. pdata->overcurrent_pin[i] =
  423. of_get_named_gpio_flags(np, "atmel,oc-gpio", i, &flags);
  424. pdev->dev.platform_data = pdata;
  425. return 0;
  426. }
  427. #else
  428. static int __devinit ohci_at91_of_init(struct platform_device *pdev)
  429. {
  430. return 0;
  431. }
  432. #endif
  433. /*-------------------------------------------------------------------------*/
  434. static int ohci_hcd_at91_drv_probe(struct platform_device *pdev)
  435. {
  436. struct at91_usbh_data *pdata;
  437. int i;
  438. int gpio;
  439. int ret;
  440. ret = ohci_at91_of_init(pdev);
  441. if (ret)
  442. return ret;
  443. pdata = pdev->dev.platform_data;
  444. if (pdata) {
  445. at91_for_each_port(i) {
  446. if (!gpio_is_valid(pdata->vbus_pin[i]))
  447. continue;
  448. gpio = pdata->vbus_pin[i];
  449. ret = gpio_request(gpio, "ohci_vbus");
  450. if (ret) {
  451. dev_err(&pdev->dev,
  452. "can't request vbus gpio %d\n", gpio);
  453. continue;
  454. }
  455. ret = gpio_direction_output(gpio,
  456. !pdata->vbus_pin_active_low[i]);
  457. if (ret) {
  458. dev_err(&pdev->dev,
  459. "can't put vbus gpio %d as output %d\n",
  460. gpio, !pdata->vbus_pin_active_low[i]);
  461. gpio_free(gpio);
  462. continue;
  463. }
  464. ohci_at91_usb_set_power(pdata, i, 1);
  465. }
  466. at91_for_each_port(i) {
  467. if (!gpio_is_valid(pdata->overcurrent_pin[i]))
  468. continue;
  469. gpio = pdata->overcurrent_pin[i];
  470. ret = gpio_request(gpio, "ohci_overcurrent");
  471. if (ret) {
  472. dev_err(&pdev->dev,
  473. "can't request overcurrent gpio %d\n",
  474. gpio);
  475. continue;
  476. }
  477. ret = gpio_direction_input(gpio);
  478. if (ret) {
  479. dev_err(&pdev->dev,
  480. "can't configure overcurrent gpio %d as input\n",
  481. gpio);
  482. gpio_free(gpio);
  483. continue;
  484. }
  485. ret = request_irq(gpio_to_irq(gpio),
  486. ohci_hcd_at91_overcurrent_irq,
  487. IRQF_SHARED, "ohci_overcurrent", pdev);
  488. if (ret) {
  489. gpio_free(gpio);
  490. dev_err(&pdev->dev,
  491. "can't get gpio IRQ for overcurrent\n");
  492. }
  493. }
  494. }
  495. device_init_wakeup(&pdev->dev, 1);
  496. return usb_hcd_at91_probe(&ohci_at91_hc_driver, pdev);
  497. }
  498. static int ohci_hcd_at91_drv_remove(struct platform_device *pdev)
  499. {
  500. struct at91_usbh_data *pdata = pdev->dev.platform_data;
  501. int i;
  502. if (pdata) {
  503. at91_for_each_port(i) {
  504. if (!gpio_is_valid(pdata->vbus_pin[i]))
  505. continue;
  506. ohci_at91_usb_set_power(pdata, i, 0);
  507. gpio_free(pdata->vbus_pin[i]);
  508. }
  509. at91_for_each_port(i) {
  510. if (!gpio_is_valid(pdata->overcurrent_pin[i]))
  511. continue;
  512. free_irq(gpio_to_irq(pdata->overcurrent_pin[i]), pdev);
  513. gpio_free(pdata->overcurrent_pin[i]);
  514. }
  515. }
  516. device_init_wakeup(&pdev->dev, 0);
  517. usb_hcd_at91_remove(platform_get_drvdata(pdev), pdev);
  518. return 0;
  519. }
  520. #ifdef CONFIG_PM
  521. static int
  522. ohci_hcd_at91_drv_suspend(struct platform_device *pdev, pm_message_t mesg)
  523. {
  524. struct usb_hcd *hcd = platform_get_drvdata(pdev);
  525. struct ohci_hcd *ohci = hcd_to_ohci(hcd);
  526. if (device_may_wakeup(&pdev->dev))
  527. enable_irq_wake(hcd->irq);
  528. /*
  529. * The integrated transceivers seem unable to notice disconnect,
  530. * reconnect, or wakeup without the 48 MHz clock active. so for
  531. * correctness, always discard connection state (using reset).
  532. *
  533. * REVISIT: some boards will be able to turn VBUS off...
  534. */
  535. if (at91_suspend_entering_slow_clock()) {
  536. ohci_usb_reset (ohci);
  537. /* flush the writes */
  538. (void) ohci_readl (ohci, &ohci->regs->control);
  539. at91_stop_clock();
  540. }
  541. return 0;
  542. }
  543. static int ohci_hcd_at91_drv_resume(struct platform_device *pdev)
  544. {
  545. struct usb_hcd *hcd = platform_get_drvdata(pdev);
  546. if (device_may_wakeup(&pdev->dev))
  547. disable_irq_wake(hcd->irq);
  548. if (!clocked)
  549. at91_start_clock();
  550. ohci_finish_controller_resume(hcd);
  551. return 0;
  552. }
  553. #else
  554. #define ohci_hcd_at91_drv_suspend NULL
  555. #define ohci_hcd_at91_drv_resume NULL
  556. #endif
  557. MODULE_ALIAS("platform:at91_ohci");
  558. static struct platform_driver ohci_hcd_at91_driver = {
  559. .probe = ohci_hcd_at91_drv_probe,
  560. .remove = ohci_hcd_at91_drv_remove,
  561. .shutdown = usb_hcd_platform_shutdown,
  562. .suspend = ohci_hcd_at91_drv_suspend,
  563. .resume = ohci_hcd_at91_drv_resume,
  564. .driver = {
  565. .name = "at91_ohci",
  566. .owner = THIS_MODULE,
  567. .of_match_table = of_match_ptr(at91_ohci_dt_ids),
  568. },
  569. };