summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorTony Prisk <linux@prisktech.co.nz>2012-10-14 16:22:34 +1300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-17 13:42:29 -0700
commit09eeffb70c086692064f4224490d1cd2ffe43bdd (patch)
tree653240abe7b3166a762933e6b8cdb08d0a482f9f /drivers/usb/host
parentc5211187f7ff8e8dbff4ebf7c011ac4c0ffe319c (diff)
downloadtalos-obmc-linux-09eeffb70c086692064f4224490d1cd2ffe43bdd.tar.gz
talos-obmc-linux-09eeffb70c086692064f4224490d1cd2ffe43bdd.zip
usb: Missing dma_mask in uhci-platform.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 platforms using devicetree. Without this patch, arch-vt8500 cannot detect uhci 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')
-rw-r--r--drivers/usb/host/uhci-platform.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/usb/host/uhci-platform.c b/drivers/usb/host/uhci-platform.c
index e4780491df4a..68ebf20e1519 100644
--- a/drivers/usb/host/uhci-platform.c
+++ b/drivers/usb/host/uhci-platform.c
@@ -60,6 +60,7 @@ static const struct hc_driver uhci_platform_hc_driver = {
.hub_control = uhci_hub_control,
};
+static u64 platform_uhci_dma_mask = DMA_BIT_MASK(32);
static int __devinit uhci_hcd_platform_probe(struct platform_device *pdev)
{
@@ -71,6 +72,14 @@ static int __devinit uhci_hcd_platform_probe(struct platform_device *pdev)
if (usb_disabled())
return -ENODEV;
+ /*
+ * 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 = &platform_uhci_dma_mask;
+
hcd = usb_create_hcd(&uhci_platform_hc_driver, &pdev->dev,
pdev->name);
if (!hcd)
OpenPOWER on IntegriCloud