Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6e1babb3 authored by Tony Prisk's avatar Tony Prisk Committed by Greg Kroah-Hartman
Browse files

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: default avatarTony Prisk <linux@prisktech.co.nz>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 09eeffb7
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -85,6 +85,8 @@ static const struct hc_driver vt8500_ehci_hc_driver = {
	.clear_tt_buffer_complete	= ehci_clear_tt_buffer_complete,
};

static u64 vt8500_ehci_dma_mask = DMA_BIT_MASK(32);

static int vt8500_ehci_drv_probe(struct platform_device *pdev)
{
	struct usb_hcd *hcd;
@@ -95,6 +97,14 @@ static int vt8500_ehci_drv_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 = &vt8500_ehci_dma_mask;

	if (pdev->resource[1].flags != IORESOURCE_IRQ) {
		pr_debug("resource[1] is not IORESOURCE_IRQ");
		return -ENOMEM;