diff options
author | Tony Prisk <linux@prisktech.co.nz> | 2012-10-13 23:22:35 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-17 16:42:29 -0400 |
commit | 6e1babb3ff2651376f2e9843569fcb39cfe4686b (patch) | |
tree | 1e41a52ea93f66123cf3f99531a79c61720bbb93 /drivers/usb/host/ehci-vt8500.c | |
parent | 09eeffb70c086692064f4224490d1cd2ffe43bdd (diff) |
usb: Missing dma_mask in ehci-vt8500.c when probed from device-tree
Device-tree probed devices don't get a dev.dma_mask set. This patch
sets a default 32bit mask on arch-vt8500 when using devicetree.
Without this patch, arch-vt8500 cannot detect ehci attached devices.
Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ehci-vt8500.c')
-rw-r--r-- | drivers/usb/host/ehci-vt8500.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-vt8500.c b/drivers/usb/host/ehci-vt8500.c index 96722bfebc84..d3c9a3e397b9 100644 --- a/drivers/usb/host/ehci-vt8500.c +++ b/drivers/usb/host/ehci-vt8500.c | |||
@@ -85,6 +85,8 @@ static const struct hc_driver vt8500_ehci_hc_driver = { | |||
85 | .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete, | 85 | .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete, |
86 | }; | 86 | }; |
87 | 87 | ||
88 | static u64 vt8500_ehci_dma_mask = DMA_BIT_MASK(32); | ||
89 | |||
88 | static int vt8500_ehci_drv_probe(struct platform_device *pdev) | 90 | static int vt8500_ehci_drv_probe(struct platform_device *pdev) |
89 | { | 91 | { |
90 | struct usb_hcd *hcd; | 92 | struct usb_hcd *hcd; |
@@ -95,6 +97,14 @@ static int vt8500_ehci_drv_probe(struct platform_device *pdev) | |||
95 | if (usb_disabled()) | 97 | if (usb_disabled()) |
96 | return -ENODEV; | 98 | return -ENODEV; |
97 | 99 | ||
100 | /* | ||
101 | * Right now device-tree probed devices don't get dma_mask set. | ||
102 | * Since shared usb code relies on it, set it here for now. | ||
103 | * Once we have dma capability bindings this can go away. | ||
104 | */ | ||
105 | if (!pdev->dev.dma_mask) | ||
106 | pdev->dev.dma_mask = &vt8500_ehci_dma_mask; | ||
107 | |||
98 | if (pdev->resource[1].flags != IORESOURCE_IRQ) { | 108 | if (pdev->resource[1].flags != IORESOURCE_IRQ) { |
99 | pr_debug("resource[1] is not IORESOURCE_IRQ"); | 109 | pr_debug("resource[1] is not IORESOURCE_IRQ"); |
100 | return -ENOMEM; | 110 | return -ENOMEM; |