Here's patch v2...

-- 
Steve McIntyre, Cambridge, UK.                                [email protected]
Into the distance, a ribbon of black
Stretched to the point of no turning back
diff -Nru linux-3.16.7-ckt9/debian/changelog linux-3.16.7-ckt9/debian/changelog
--- linux-3.16.7-ckt9/debian/changelog  2015-04-13 01:01:55.000000000 +0000
+++ linux-3.16.7-ckt9/debian/changelog  2015-05-15 08:47:00.000000000 +0000
@@ -1,3 +1,10 @@
+linux (3.16.7-ckt9-2.1) unstable; urgency=medium
+
+  * arm64: enable XHCI USB on APM X-Gene
+  * usb: host: allow 64-bit DMA mask for XHCI
+
+ -- Steve McIntyre <[email protected]>  Fri, 15 May 2015 09:41:31 +0100
+
 linux (3.16.7-ckt9-2) unstable; urgency=medium
 
   * btrfs: simplify insert_orphan_item (Closes: #782362)
diff -Nru linux-3.16.7-ckt9/debian/config/arm64/config 
linux-3.16.7-ckt9/debian/config/arm64/config
--- linux-3.16.7-ckt9/debian/config/arm64/config        2015-01-02 
03:46:07.000000000 +0000
+++ linux-3.16.7-ckt9/debian/config/arm64/config        2015-05-15 
08:54:05.000000000 +0000
@@ -120,6 +120,8 @@
 CONFIG_USB_EHCI_HCD_PLATFORM=m
 CONFIG_USB_OHCI_HCD=m
 CONFIG_USB_OHCI_HCD_PLATFORM=m
+CONFIG_USB_XHCI_HCD=m
+CONFIG_USB_XHCI_PLATFORM=y
 
 ##
 ## file: drivers/virtio/Kconfig
diff -Nru 
linux-3.16.7-ckt9/debian/patches/features/arm64/xgene-enable-xhci-usb.patch 
linux-3.16.7-ckt9/debian/patches/features/arm64/xgene-enable-xhci-usb.patch
--- linux-3.16.7-ckt9/debian/patches/features/arm64/xgene-enable-xhci-usb.patch 
1970-01-01 00:00:00.000000000 +0000
+++ linux-3.16.7-ckt9/debian/patches/features/arm64/xgene-enable-xhci-usb.patch 
2015-05-15 10:48:28.000000000 +0000
@@ -0,0 +1,61 @@
+From: Mark Langsdorf <[email protected]>
+Date: Wed, 20 May 2015 00:19:13 +0100
+Subject: [usb] make xhci platform driver use 64 bit or 32 bit DMA
+Bug-Debian: https://bugs.debian.org/785707
+Forwarded: no
+
+The xhci platform driver needs to work on systems that either only
+support 64-bit DMA or only support 32-bit DMA. Attempt to set a
+coherent dma mask for 64-bit DMA, and attempt again with 32-bit
+DMA if that fails.
+
+Signed-off-by: Mark Langsdorf <[email protected]>
+Signed-off-by: Steve McIntyre <[email protected]>
+
+Index: linux-3.16.7-ckt9/drivers/usb/host/xhci-plat.c
+===================================================================
+--- linux-3.16.7-ckt9.orig/drivers/usb/host/xhci-plat.c
++++ linux-3.16.7-ckt9/drivers/usb/host/xhci-plat.c
+@@ -115,14 +115,18 @@ static int xhci_plat_probe(struct platfo
+       if (!res)
+               return -ENODEV;
+ 
+-      /* Initialize dma_mask and coherent_dma_mask to 32-bits */
+-      ret = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
+-      if (ret)
+-              return ret;
++      /* Try setting the coherent_dma_mask to 64 bits, then try 32 bits */
++      if (sizeof(dma_addr_t) < 8 ||
++              dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64))) {
++              ret = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
++              if (ret)
++                      return ret;
++      }
+       if (!pdev->dev.dma_mask)
+               pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask;
+       else
+-              dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));
++              dma_set_mask(&pdev->dev, pdev->dev.coherent_dma_mask);
++
+ 
+       hcd = usb_create_hcd(driver, &pdev->dev, dev_name(&pdev->dev));
+       if (!hcd)
+Index: linux-3.16.7-ckt9/drivers/usb/host/Kconfig
+===================================================================
+--- linux-3.16.7-ckt9.orig/drivers/usb/host/Kconfig
++++ linux-3.16.7-ckt9/drivers/usb/host/Kconfig
+@@ -27,7 +27,13 @@
+ if USB_XHCI_HCD
+ 
+ config USB_XHCI_PLATFORM
+-      tristate
++      tristate "Generic XHCI driver for a platform device"
++      default n
++      ---help---
++        Adds an XHCI host driver for a generic platform device, which
++        provides a memory space and an irq.
++
++        If unsure, say N.
+ 
+ config USB_XHCI_MVEBU
+       tristate "xHCI support for Marvell Armada 375/38x"
diff -Nru linux-3.16.7-ckt9/debian/patches/series 
linux-3.16.7-ckt9/debian/patches/series
--- linux-3.16.7-ckt9/debian/patches/series     2015-04-13 00:40:38.000000000 
+0000
+++ linux-3.16.7-ckt9/debian/patches/series     2015-05-15 08:47:26.000000000 
+0000
@@ -578,3 +578,4 @@
 debian/procfs-avoid-abi-change-in-3.16.7-ckt8.patch
 
 bugfix/all/btrfs-simplify-insert_orphan_item.patch
+features/arm64/xgene-enable-xhci-usb.patch

Reply via email to