diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2013-09-13 16:39:36 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2013-09-13 16:39:36 +0000 |
commit | e2db78c0e1acee64cf528d6215863ac782cef369 (patch) | |
tree | c8f2eb3447d1dcd2908321e7fd7addc006e1ad9c /target/linux/cns21xx/patches-3.8/104-cns21xx-usb-ehci-support.patch | |
parent | a493a36f6ce8a17a50297c0afa768ce63e11febf (diff) | |
download | upstream-e2db78c0e1acee64cf528d6215863ac782cef369.tar.gz upstream-e2db78c0e1acee64cf528d6215863ac782cef369.tar.bz2 upstream-e2db78c0e1acee64cf528d6215863ac782cef369.zip |
cns21xx: remove 3.8 support
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37973 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/cns21xx/patches-3.8/104-cns21xx-usb-ehci-support.patch')
-rw-r--r-- | target/linux/cns21xx/patches-3.8/104-cns21xx-usb-ehci-support.patch | 180 |
1 files changed, 0 insertions, 180 deletions
diff --git a/target/linux/cns21xx/patches-3.8/104-cns21xx-usb-ehci-support.patch b/target/linux/cns21xx/patches-3.8/104-cns21xx-usb-ehci-support.patch deleted file mode 100644 index c75aaecbe9..0000000000 --- a/target/linux/cns21xx/patches-3.8/104-cns21xx-usb-ehci-support.patch +++ /dev/null @@ -1,180 +0,0 @@ ---- a/drivers/usb/host/ehci-hcd.c -+++ b/drivers/usb/host/ehci-hcd.c -@@ -1342,6 +1342,7 @@ MODULE_LICENSE ("GPL"); - !IS_ENABLED(CONFIG_USB_EHCI_HCD_PLATFORM) && \ - !IS_ENABLED(CONFIG_USB_CHIPIDEA_HOST) && \ - !IS_ENABLED(CONFIG_USB_EHCI_MXC) && \ -+ !IS_ENABLED(CONFIG_USB_EHCI_CNS21XX) && \ - !defined(PLATFORM_DRIVER) && \ - !defined(PS3_SYSTEM_BUS_DRIVER) && \ - !defined(OF_PLATFORM_DRIVER) && \ ---- /dev/null -+++ b/drivers/usb/host/ehci-cns21xx.c -@@ -0,0 +1,130 @@ -+/* -+ * Copyright (c) 2008 Cavium Networks -+ * Copyright (c) 2010-2013 Gabor Juhos <juhosg@openwrt.org> -+ * -+ * This file is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License, Version 2, as -+ * published by the Free Software Foundation. -+ */ -+ -+#include <linux/kernel.h> -+#include <linux/module.h> -+#include <linux/io.h> -+#include <linux/platform_device.h> -+#include <linux/irq.h> -+#include <linux/usb.h> -+#include <linux/usb/hcd.h> -+ -+#include <mach/cns21xx.h> -+ -+#include "ehci.h" -+ -+#define DRIVER_NAME "cns21xx-ehci" -+ -+static const char hcd_name[] = "ehci-cns21xx"; -+static struct hc_driver __read_mostly ehci_cns21xx_hc_driver; -+ -+static void ehci_cns21xx_init_hc(void) -+{ -+ void __iomem *base = (void __iomem *) CNS21XX_EHCI_CONFIG_BASE_VIRT; -+ -+ __raw_writel(0x106, base + 0x04); -+ __raw_writel((3 << 5) | 0x2000, base + 0x40); -+ msleep(100); -+} -+ -+static int ehci_cns21xx_probe(struct platform_device *pdev) -+{ -+ struct usb_hcd *hcd; -+ struct ehci_hcd *ehci; -+ struct resource *res; -+ int irq; -+ int ret; -+ -+ irq = platform_get_irq(pdev, 0); -+ if (irq < 0) { -+ dev_dbg(&pdev->dev, "no IRQ specified for %s\n", -+ dev_name(&pdev->dev)); -+ return -ENODEV; -+ } -+ -+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0); -+ if (!res) { -+ dev_dbg(&pdev->dev, "no base address specified for %s\n", -+ dev_name(&pdev->dev)); -+ return -EINVAL; -+ } -+ -+ hcd = usb_create_hcd(&ehci_cns21xx_hc_driver, &pdev->dev, -+ dev_name(&pdev->dev)); -+ if (!hcd) -+ return -ENOMEM; -+ -+ hcd->rsrc_start = res->start; -+ hcd->rsrc_len = res->end - res->start + 1; -+ -+ hcd->regs = devm_ioremap_resource(&pdev->dev, res); -+ if (IS_ERR(hcd->regs)) { -+ ret = PTR_ERR(hcd->regs); -+ goto err_put_hcd; -+ } -+ -+ ehci_cns21xx_init_hc(); -+ -+ ehci = hcd_to_ehci(hcd); -+ ehci->caps = hcd->regs; -+ -+ ret = usb_add_hcd(hcd, irq, IRQF_SHARED); -+ if (ret) -+ goto err_put_hcd; -+ -+ platform_set_drvdata(pdev, hcd); -+ -+ return 0; -+ -+err_put_hcd: -+ usb_put_hcd(hcd); -+ -+ return ret; -+} -+ -+static int ehci_cns21xx_remove(struct platform_device *pdev) -+{ -+ struct usb_hcd *hcd = platform_get_drvdata(pdev); -+ -+ usb_remove_hcd(hcd); -+ usb_put_hcd(hcd); -+ -+ return 0; -+} -+ -+static struct platform_driver ehci_cns21xx_driver = { -+ .probe = ehci_cns21xx_probe, -+ .remove = ehci_cns21xx_remove, -+ .shutdown = usb_hcd_platform_shutdown, -+ .driver = { -+ .owner = THIS_MODULE, -+ .name = DRIVER_NAME, -+ }, -+}; -+ -+static int __init ehci_cns21xx_init(void) -+{ -+ if (usb_disabled()) -+ return -ENODEV; -+ -+ ehci_init_driver(&ehci_cns21xx_hc_driver, NULL); -+ -+ return platform_driver_register(&ehci_cns21xx_driver); -+} -+module_init(ehci_cns21xx_init); -+ -+static void __exit ehci_cns21xx_exit(void) -+{ -+ platform_driver_unregister(&ehci_cns21xx_driver); -+} -+module_exit(ehci_cns21xx_exit); -+ -+MODULE_DESCRIPTION("Cavium Networks CNS21xx built-in EHCI controller driver"); -+MODULE_ALIAS("platform:" DRIVER_NAME); -+MODULE_LICENSE("GPL v2"); ---- a/arch/arm/Kconfig -+++ b/arch/arm/Kconfig -@@ -382,6 +382,7 @@ config ARCH_CNS21XX - select ARCH_REQUIRE_GPIOLIB - select ARM_L1_CACHE_SHIFT_4 - select USB_ARCH_HAS_OHCI -+ select USB_ARCH_HAS_EHCI - help - Support for Cavium Networks CNS21xx family. - ---- a/drivers/usb/host/Kconfig -+++ b/drivers/usb/host/Kconfig -@@ -219,6 +219,14 @@ config USB_W90X900_EHCI - ---help--- - Enables support for the W90X900 USB controller - -+config USB_EHCI_CNS21XX -+ tristate "EHCI support for the Cavium CNS21XX SoCs" -+ depends on ARCH_CNS21XX -+ default y -+ help -+ Enables support for the built-in EHCI controller of the -+ Cavium CNS21xx SoCs. -+ - config USB_CNS3XXX_EHCI - bool "Cavium CNS3XXX EHCI Module (DEPRECATED)" - depends on USB_EHCI_HCD && ARCH_CNS3XXX ---- a/drivers/usb/host/Makefile -+++ b/drivers/usb/host/Makefile -@@ -27,6 +27,7 @@ obj-$(CONFIG_USB_EHCI_HCD) += ehci-hcd.o - obj-$(CONFIG_USB_EHCI_PCI) += ehci-pci.o - obj-$(CONFIG_USB_EHCI_HCD_PLATFORM) += ehci-platform.o - obj-$(CONFIG_USB_EHCI_MXC) += ehci-mxc.o -+obj-$(CONFIG_USB_EHCI_CNS21XX) += ehci-cns21xx.o - - obj-$(CONFIG_USB_OXU210HP_HCD) += oxu210hp-hcd.o - obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o |