Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 364348
b: refs/heads/master
c: 5867320
h: refs/heads/master
v: v3
  • Loading branch information
Roger Quadros authored and Greg Kroah-Hartman committed Mar 15, 2013
1 parent ca3fef3 commit 7282103
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8c3ec38550a6b880738c8b1982f9207d0fd5a339
refs/heads/master: 5867320dec346c2dc26f224f876d780111ca149d
15 changes: 15 additions & 0 deletions trunk/Documentation/devicetree/bindings/usb/ohci-omap3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
OMAP HS USB OHCI controller (OMAP3 and later)

Required properties:

- compatible: should be "ti,ohci-omap3"
- reg: should contain one register range i.e. start and length
- interrupts: description of the interrupt line

Example for OMAP4:

usbhsohci: ohci@4a064800 {
compatible = "ti,ohci-omap3", "usb-ohci";
reg = <0x4a064800 0x400>;
interrupts = <0 76 0x4>;
};
19 changes: 19 additions & 0 deletions trunk/drivers/usb/host/ohci-omap3.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@

#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/of.h>
#include <linux/dma-mapping.h>

/*-------------------------------------------------------------------------*/

Expand Down Expand Up @@ -112,6 +114,8 @@ static const struct hc_driver ohci_omap3_hc_driver = {

/*-------------------------------------------------------------------------*/

static u64 omap_ohci_dma_mask = DMA_BIT_MASK(32);

/*
* configure so an HC device and id are always provided
* always called with process context; sleeping is OK
Expand Down Expand Up @@ -159,6 +163,13 @@ static int ohci_hcd_omap3_probe(struct platform_device *pdev)
return -ENOMEM;
}

/*
* Right now device-tree probed devices don't get dma_mask set.
* Since shared usb code relies on it, set it here for now.
* Once we have dma capability bindings this can go away.
*/
if (!pdev->dev.dma_mask)
pdev->dev.dma_mask = &omap_ohci_dma_mask;

hcd = usb_create_hcd(&ohci_omap3_hc_driver, dev,
dev_name(dev));
Expand Down Expand Up @@ -228,12 +239,20 @@ static void ohci_hcd_omap3_shutdown(struct platform_device *pdev)
hcd->driver->shutdown(hcd);
}

static const struct of_device_id omap_ohci_dt_ids[] = {
{ .compatible = "ti,ohci-omap3" },
{ }
};

MODULE_DEVICE_TABLE(of, omap_ohci_dt_ids);

static struct platform_driver ohci_hcd_omap3_driver = {
.probe = ohci_hcd_omap3_probe,
.remove = ohci_hcd_omap3_remove,
.shutdown = ohci_hcd_omap3_shutdown,
.driver = {
.name = "ohci-omap3",
.of_match_table = of_match_ptr(omap_ohci_dt_ids),
},
};

Expand Down

0 comments on commit 7282103

Please sign in to comment.