diff options
author | Zoltan HERPAI <wigyori@uid0.hu> | 2014-03-06 00:09:30 +0000 |
---|---|---|
committer | Zoltan HERPAI <wigyori@uid0.hu> | 2014-03-06 00:09:30 +0000 |
commit | a8ab50ee77d004e4a00cd6280cc1b542e57054b1 (patch) | |
tree | 0a2be71f002d9dd9084a172a72bef22388f0ca0e /target/linux/sunxi/patches-3.13/180-3-usb-ohci-platform-support-bigendian.patch | |
parent | 8911fab5ade7400cdb42c43f884b4a10141c159e (diff) | |
download | upstream-a8ab50ee77d004e4a00cd6280cc1b542e57054b1.tar.gz upstream-a8ab50ee77d004e4a00cd6280cc1b542e57054b1.tar.bz2 upstream-a8ab50ee77d004e4a00cd6280cc1b542e57054b1.zip |
sunxi: driver refresh for 3.13
- update gmac / mmc / usb / ahci drivers to follow mainline dev trees
- add driver for spi
- update clock support
- update a31 support
- move to new DT compats where appropriate
- re-order patchqueue where needed
- verified working a20 smp
- move most DTSes off files/
- update defconfig
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39782 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/sunxi/patches-3.13/180-3-usb-ohci-platform-support-bigendian.patch')
-rw-r--r-- | target/linux/sunxi/patches-3.13/180-3-usb-ohci-platform-support-bigendian.patch | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/target/linux/sunxi/patches-3.13/180-3-usb-ohci-platform-support-bigendian.patch b/target/linux/sunxi/patches-3.13/180-3-usb-ohci-platform-support-bigendian.patch new file mode 100644 index 0000000000..178bf4590c --- /dev/null +++ b/target/linux/sunxi/patches-3.13/180-3-usb-ohci-platform-support-bigendian.patch @@ -0,0 +1,80 @@ +From 10d7c018269928db8487057c4c143dbd014d2262 Mon Sep 17 00:00:00 2001 +From: Hans de Goede <hdegoede@redhat.com> +Date: Tue, 21 Jan 2014 16:05:47 +0100 +Subject: [PATCH] ohci-platform: Add support for controllers with big-endian + regs / descriptors + +Note this commit uses the same devicetree booleans for this as the ones +already existing in the usb-ehci bindings, see: +Documentation/devicetree/bindings/usb/usb-ehci.txt + +Signed-off-by: Hans de Goede <hdegoede@redhat.com> +--- + Documentation/devicetree/bindings/usb/usb-ohci.txt | 3 +++ + drivers/usb/host/ohci-platform.c | 27 ++++++++++++++++++++++ + 2 files changed, 30 insertions(+) + +diff --git a/Documentation/devicetree/bindings/usb/usb-ohci.txt b/Documentation/devicetree/bindings/usb/usb-ohci.txt +index 6ba38d9..6933b0c 100644 +--- a/Documentation/devicetree/bindings/usb/usb-ohci.txt ++++ b/Documentation/devicetree/bindings/usb/usb-ohci.txt +@@ -6,6 +6,9 @@ Required properties: + - interrupts : ohci controller interrupt + + Optional properties: ++- big-endian-regs : boolean, set this for hcds with big-endian registers ++- big-endian-desc : boolean, set this for hcds with big-endian descriptors ++- big-endian : boolean, for hcds with big-endian-regs + big-endian-desc + - clocks : a list of phandle + clock specifier pairs + - phys : phandle + phy specifier pair + - phy-names : "usb" +diff --git a/drivers/usb/host/ohci-platform.c b/drivers/usb/host/ohci-platform.c +index 49304dd..e2c28fd 100644 +--- a/drivers/usb/host/ohci-platform.c ++++ b/drivers/usb/host/ohci-platform.c +@@ -128,6 +128,7 @@ static int ohci_platform_probe(struct platform_device *dev) + struct resource *res_mem; + struct usb_ohci_pdata *pdata = dev_get_platdata(&dev->dev); + struct ohci_platform_priv *priv; ++ struct ohci_hcd *ohci; + int err, irq, clk = 0; + + if (usb_disabled()) +@@ -164,8 +165,34 @@ static int ohci_platform_probe(struct platform_device *dev) + platform_set_drvdata(dev, hcd); + dev->dev.platform_data = pdata; + priv = hcd_to_ohci_priv(hcd); ++ ohci = hcd_to_ohci(hcd); + + if (pdata == &ohci_platform_defaults && dev->dev.of_node) { ++ if (of_property_read_bool(dev->dev.of_node, "big-endian-regs")) ++ ohci->flags |= OHCI_QUIRK_BE_MMIO; ++ ++ if (of_property_read_bool(dev->dev.of_node, "big-endian-desc")) ++ ohci->flags |= OHCI_QUIRK_BE_DESC; ++ ++ if (of_property_read_bool(dev->dev.of_node, "big-endian")) ++ ohci->flags |= OHCI_QUIRK_BE_MMIO | OHCI_QUIRK_BE_DESC; ++ ++#ifndef CONFIG_USB_OHCI_BIG_ENDIAN_MMIO ++ if (ohci->flags & OHCI_QUIRK_BE_MMIO) { ++ dev_err(&dev->dev, ++ "Error big-endian-regs not compiled in\n"); ++ err = -EINVAL; ++ goto err_put_hcd; ++ } ++#endif ++#ifndef CONFIG_USB_OHCI_BIG_ENDIAN_DESC ++ if (ohci->flags & OHCI_QUIRK_BE_DESC) { ++ dev_err(&dev->dev, ++ "Error big-endian-desc not compiled in\n"); ++ err = -EINVAL; ++ goto err_put_hcd; ++ } ++#endif + priv->phy = devm_phy_get(&dev->dev, "usb"); + if (IS_ERR(priv->phy)) { + err = PTR_ERR(priv->phy); +-- +1.8.5.5 + |