* [PATCH 01/25] USB: ehci: remove IXP4xx EHCI driver
[not found] <1349276601-8371-1-git-send-email-florian@openwrt.org>
@ 2012-10-03 15:02 ` Florian Fainelli
2012-10-03 15:02 ` [PATCH 02/25] MIPS: Loongson 1B: use ehci-platform instead of ehci-ls1x Florian Fainelli
` (24 subsequent siblings)
25 siblings, 0 replies; 44+ messages in thread
From: Florian Fainelli @ 2012-10-03 15:02 UTC (permalink / raw)
To: stern; +Cc: linux-usb, Florian Fainelli, Greg Kroah-Hartman, linux-kernel
This driver is not registered by any in-tree user. If needed it can easily
be registered using the ehci-platform driver with caps_offset set to 0x100.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/usb/host/ehci-hcd.c | 5 --
drivers/usb/host/ehci-ixp4xx.c | 139 ----------------------------------------
2 files changed, 144 deletions(-)
delete mode 100644 drivers/usb/host/ehci-ixp4xx.c
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 6bf6c42..442f774 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -1249,11 +1249,6 @@ MODULE_LICENSE ("GPL");
#define PLATFORM_DRIVER ehci_orion_driver
#endif
-#ifdef CONFIG_ARCH_IXP4XX
-#include "ehci-ixp4xx.c"
-#define PLATFORM_DRIVER ixp4xx_ehci_driver
-#endif
-
#ifdef CONFIG_USB_W90X900_EHCI
#include "ehci-w90x900.c"
#define PLATFORM_DRIVER ehci_hcd_w90x900_driver
diff --git a/drivers/usb/host/ehci-ixp4xx.c b/drivers/usb/host/ehci-ixp4xx.c
deleted file mode 100644
index f224c0a..0000000
--- a/drivers/usb/host/ehci-ixp4xx.c
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * IXP4XX EHCI Host Controller Driver
- *
- * Author: Vladimir Barinov <vbarinov@embeddedalley.com>
- *
- * Based on "ehci-fsl.c" by Randy Vinson <rvinson@mvista.com>
- *
- * 2007 (c) MontaVista Software, Inc. This file is licensed under
- * the terms of the GNU General Public License version 2. This program
- * is licensed "as is" without any warranty of any kind, whether express
- * or implied.
- */
-
-#include <linux/platform_device.h>
-
-static int ixp4xx_ehci_init(struct usb_hcd *hcd)
-{
- struct ehci_hcd *ehci = hcd_to_ehci(hcd);
- int retval = 0;
-
- ehci->big_endian_desc = 1;
- ehci->big_endian_mmio = 1;
-
- ehci->caps = hcd->regs + 0x100;
-
- hcd->has_tt = 1;
-
- retval = ehci_setup(hcd);
- if (retval)
- return retval;
-
- ehci_port_power(ehci, 0);
-
- return retval;
-}
-
-static const struct hc_driver ixp4xx_ehci_hc_driver = {
- .description = hcd_name,
- .product_desc = "IXP4XX EHCI Host Controller",
- .hcd_priv_size = sizeof(struct ehci_hcd),
- .irq = ehci_irq,
- .flags = HCD_MEMORY | HCD_USB2,
- .reset = ixp4xx_ehci_init,
- .start = ehci_run,
- .stop = ehci_stop,
- .shutdown = ehci_shutdown,
- .urb_enqueue = ehci_urb_enqueue,
- .urb_dequeue = ehci_urb_dequeue,
- .endpoint_disable = ehci_endpoint_disable,
- .endpoint_reset = ehci_endpoint_reset,
- .get_frame_number = ehci_get_frame,
- .hub_status_data = ehci_hub_status_data,
- .hub_control = ehci_hub_control,
-#if defined(CONFIG_PM)
- .bus_suspend = ehci_bus_suspend,
- .bus_resume = ehci_bus_resume,
-#endif
- .relinquish_port = ehci_relinquish_port,
- .port_handed_over = ehci_port_handed_over,
-
- .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete,
-};
-
-static int ixp4xx_ehci_probe(struct platform_device *pdev)
-{
- struct usb_hcd *hcd;
- const struct hc_driver *driver = &ixp4xx_ehci_hc_driver;
- struct resource *res;
- int irq;
- int retval;
-
- if (usb_disabled())
- return -ENODEV;
-
- res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
- if (!res) {
- dev_err(&pdev->dev,
- "Found HC with no IRQ. Check %s setup!\n",
- dev_name(&pdev->dev));
- return -ENODEV;
- }
- irq = res->start;
-
- hcd = usb_create_hcd(driver, &pdev->dev, dev_name(&pdev->dev));
- if (!hcd) {
- retval = -ENOMEM;
- goto fail_create_hcd;
- }
-
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res) {
- dev_err(&pdev->dev,
- "Found HC with no register addr. Check %s setup!\n",
- dev_name(&pdev->dev));
- retval = -ENODEV;
- goto fail_request_resource;
- }
- hcd->rsrc_start = res->start;
- hcd->rsrc_len = resource_size(res);
-
- hcd->regs = devm_request_and_ioremap(&pdev->dev, res);
- if (hcd->regs == NULL) {
- dev_dbg(&pdev->dev, "error mapping memory\n");
- retval = -EFAULT;
- goto fail_request_resource;
- }
-
- retval = usb_add_hcd(hcd, irq, IRQF_SHARED);
- if (retval)
- goto fail_request_resource;
-
- return retval;
-
-fail_request_resource:
- usb_put_hcd(hcd);
-fail_create_hcd:
- dev_err(&pdev->dev, "init %s fail, %d\n", dev_name(&pdev->dev), retval);
- return retval;
-}
-
-static int ixp4xx_ehci_remove(struct platform_device *pdev)
-{
- struct usb_hcd *hcd = platform_get_drvdata(pdev);
-
- usb_remove_hcd(hcd);
- usb_put_hcd(hcd);
-
- return 0;
-}
-
-MODULE_ALIAS("platform:ixp4xx-ehci");
-
-static struct platform_driver ixp4xx_ehci_driver = {
- .probe = ixp4xx_ehci_probe,
- .remove = ixp4xx_ehci_remove,
- .driver = {
- .name = "ixp4xx-ehci",
- },
-};
--
1.7.9.5
^ permalink raw reply related [flat|nested] 44+ messages in thread
* [PATCH 02/25] MIPS: Loongson 1B: use ehci-platform instead of ehci-ls1x.
[not found] <1349276601-8371-1-git-send-email-florian@openwrt.org>
2012-10-03 15:02 ` [PATCH 01/25] USB: ehci: remove IXP4xx EHCI driver Florian Fainelli
@ 2012-10-03 15:02 ` Florian Fainelli
2012-10-03 15:02 ` [PATCH 03/25] USB: ehci: remove Loongson 1B EHCI driver Florian Fainelli
` (23 subsequent siblings)
25 siblings, 0 replies; 44+ messages in thread
From: Florian Fainelli @ 2012-10-03 15:02 UTC (permalink / raw)
To: stern
Cc: linux-usb, Florian Fainelli, Ralf Baechle, Kelvin Cheung,
linux-mips, linux-kernel
The Loongson 1B EHCI driver does nothing more than what the EHCI platform
driver already does, so use the generic implementation.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
arch/mips/configs/ls1b_defconfig | 1 +
arch/mips/loongson1/common/platform.c | 8 +++++++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/arch/mips/configs/ls1b_defconfig b/arch/mips/configs/ls1b_defconfig
index 80cff8b..7eb7554 100644
--- a/arch/mips/configs/ls1b_defconfig
+++ b/arch/mips/configs/ls1b_defconfig
@@ -76,6 +76,7 @@ CONFIG_HID_GENERIC=m
CONFIG_USB=y
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_HCD_PLATFORM=y
# CONFIG_USB_EHCI_TT_NEWSCHED is not set
CONFIG_USB_STORAGE=m
CONFIG_USB_SERIAL=m
diff --git a/arch/mips/loongson1/common/platform.c b/arch/mips/loongson1/common/platform.c
index e92d59c..2874bf2 100644
--- a/arch/mips/loongson1/common/platform.c
+++ b/arch/mips/loongson1/common/platform.c
@@ -13,6 +13,7 @@
#include <linux/phy.h>
#include <linux/serial_8250.h>
#include <linux/stmmac.h>
+#include <linux/usb/ehci_pdriver.h>
#include <asm-generic/sizes.h>
#include <loongson1.h>
@@ -107,13 +108,18 @@ static struct resource ls1x_ehci_resources[] = {
},
};
+static struct usb_ehci_pdata ls1x_ehci_pdata = {
+ .port_power_off = 1,
+};
+
struct platform_device ls1x_ehci_device = {
- .name = "ls1x-ehci",
+ .name = "ehci-platform",
.id = -1,
.num_resources = ARRAY_SIZE(ls1x_ehci_resources),
.resource = ls1x_ehci_resources,
.dev = {
.dma_mask = &ls1x_ehci_dmamask,
+ .platform_data = &ls1x_ehci_pdata,
},
};
--
1.7.9.5
^ permalink raw reply related [flat|nested] 44+ messages in thread
* [PATCH 03/25] USB: ehci: remove Loongson 1B EHCI driver.
[not found] <1349276601-8371-1-git-send-email-florian@openwrt.org>
2012-10-03 15:02 ` [PATCH 01/25] USB: ehci: remove IXP4xx EHCI driver Florian Fainelli
2012-10-03 15:02 ` [PATCH 02/25] MIPS: Loongson 1B: use ehci-platform instead of ehci-ls1x Florian Fainelli
@ 2012-10-03 15:02 ` Florian Fainelli
2012-10-03 15:02 ` [PATCH 04/25] MIPS: Netlogic: use ehci-platform driver Florian Fainelli
` (22 subsequent siblings)
25 siblings, 0 replies; 44+ messages in thread
From: Florian Fainelli @ 2012-10-03 15:02 UTC (permalink / raw)
To: stern; +Cc: linux-usb, Florian Fainelli, Greg Kroah-Hartman, linux-kernel
The platform code registering the EHCI driver now uses the platform EHCI driver
instead.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/usb/host/ehci-hcd.c | 5 --
drivers/usb/host/ehci-ls1x.c | 147 ------------------------------------------
2 files changed, 152 deletions(-)
delete mode 100644 drivers/usb/host/ehci-ls1x.c
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 442f774..2f517d9 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -1319,11 +1319,6 @@ MODULE_LICENSE ("GPL");
#define PLATFORM_DRIVER ehci_mv_driver
#endif
-#ifdef CONFIG_MACH_LOONGSON1
-#include "ehci-ls1x.c"
-#define PLATFORM_DRIVER ehci_ls1x_driver
-#endif
-
#ifdef CONFIG_MIPS_SEAD3
#include "ehci-sead3.c"
#define PLATFORM_DRIVER ehci_hcd_sead3_driver
diff --git a/drivers/usb/host/ehci-ls1x.c b/drivers/usb/host/ehci-ls1x.c
deleted file mode 100644
index ca75965..0000000
--- a/drivers/usb/host/ehci-ls1x.c
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Bus Glue for Loongson LS1X built-in EHCI controller.
- *
- * Copyright (c) 2012 Zhang, Keguang <keguang.zhang@gmail.com>
- *
- * This program 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/platform_device.h>
-
-static int ehci_ls1x_reset(struct usb_hcd *hcd)
-{
- struct ehci_hcd *ehci = hcd_to_ehci(hcd);
- int ret;
-
- ehci->caps = hcd->regs;
-
- ret = ehci_setup(hcd);
- if (ret)
- return ret;
-
- ehci_port_power(ehci, 0);
-
- return 0;
-}
-
-static const struct hc_driver ehci_ls1x_hc_driver = {
- .description = hcd_name,
- .product_desc = "LOONGSON1 EHCI",
- .hcd_priv_size = sizeof(struct ehci_hcd),
-
- /*
- * generic hardware linkage
- */
- .irq = ehci_irq,
- .flags = HCD_MEMORY | HCD_USB2,
-
- /*
- * basic lifecycle operations
- */
- .reset = ehci_ls1x_reset,
- .start = ehci_run,
- .stop = ehci_stop,
- .shutdown = ehci_shutdown,
-
- /*
- * managing i/o requests and associated device resources
- */
- .urb_enqueue = ehci_urb_enqueue,
- .urb_dequeue = ehci_urb_dequeue,
- .endpoint_disable = ehci_endpoint_disable,
- .endpoint_reset = ehci_endpoint_reset,
-
- /*
- * scheduling support
- */
- .get_frame_number = ehci_get_frame,
-
- /*
- * root hub support
- */
- .hub_status_data = ehci_hub_status_data,
- .hub_control = ehci_hub_control,
- .relinquish_port = ehci_relinquish_port,
- .port_handed_over = ehci_port_handed_over,
-
- .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete,
-};
-
-static int ehci_hcd_ls1x_probe(struct platform_device *pdev)
-{
- struct usb_hcd *hcd;
- struct resource *res;
- int irq;
- int ret;
-
- pr_debug("initializing loongson1 ehci USB Controller\n");
-
- if (usb_disabled())
- return -ENODEV;
-
- res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
- if (!res) {
- dev_err(&pdev->dev,
- "Found HC with no IRQ. Check %s setup!\n",
- dev_name(&pdev->dev));
- return -ENODEV;
- }
- irq = res->start;
-
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res) {
- dev_err(&pdev->dev,
- "Found HC with no register addr. Check %s setup!\n",
- dev_name(&pdev->dev));
- return -ENODEV;
- }
-
- hcd = usb_create_hcd(&ehci_ls1x_hc_driver, &pdev->dev,
- dev_name(&pdev->dev));
- if (!hcd)
- return -ENOMEM;
- hcd->rsrc_start = res->start;
- hcd->rsrc_len = resource_size(res);
-
- hcd->regs = devm_request_and_ioremap(&pdev->dev, res);
- if (hcd->regs == NULL) {
- dev_dbg(&pdev->dev, "error mapping memory\n");
- ret = -EFAULT;
- goto err_put_hcd;
- }
-
- ret = usb_add_hcd(hcd, irq, IRQF_SHARED);
- if (ret)
- goto err_put_hcd;
-
- return ret;
-
-err_put_hcd:
- usb_put_hcd(hcd);
- return ret;
-}
-
-static int ehci_hcd_ls1x_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_ls1x_driver = {
- .probe = ehci_hcd_ls1x_probe,
- .remove = ehci_hcd_ls1x_remove,
- .shutdown = usb_hcd_platform_shutdown,
- .driver = {
- .name = "ls1x-ehci",
- .owner = THIS_MODULE,
- },
-};
-
-MODULE_ALIAS(PLATFORM_MODULE_PREFIX "ls1x-ehci");
--
1.7.9.5
^ permalink raw reply related [flat|nested] 44+ messages in thread
* [PATCH 04/25] MIPS: Netlogic: use ehci-platform driver
[not found] <1349276601-8371-1-git-send-email-florian@openwrt.org>
` (2 preceding siblings ...)
2012-10-03 15:02 ` [PATCH 03/25] USB: ehci: remove Loongson 1B EHCI driver Florian Fainelli
@ 2012-10-03 15:02 ` Florian Fainelli
2012-10-03 16:47 ` Alan Stern
2012-10-04 10:51 ` Jonas Gorski
2012-10-03 15:03 ` [PATCH 05/25] USB: ehci: remove Netlogic XLS EHCI driver Florian Fainelli
` (21 subsequent siblings)
25 siblings, 2 replies; 44+ messages in thread
From: Florian Fainelli @ 2012-10-03 15:02 UTC (permalink / raw)
To: stern
Cc: linux-usb, Florian Fainelli, Ralf Baechle, Jayachandran C,
linux-mips, linux-kernel
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
arch/mips/netlogic/xlr/platform.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/mips/netlogic/xlr/platform.c b/arch/mips/netlogic/xlr/platform.c
index 71b44d8..1731dfd 100644
--- a/arch/mips/netlogic/xlr/platform.c
+++ b/arch/mips/netlogic/xlr/platform.c
@@ -15,6 +15,7 @@
#include <linux/serial_8250.h>
#include <linux/serial_reg.h>
#include <linux/i2c.h>
+#include <linux/usb/ehci_pdriver.h>
#include <asm/netlogic/haldefs.h>
#include <asm/netlogic/xlr/iomap.h>
@@ -123,6 +124,10 @@ static u64 xls_usb_dmamask = ~(u32)0;
}, \
}
+static struct usb_ehci_pdata xls_usb_ehci_pdata = {
+ .caps_offset = 0,
+};
+
static struct platform_device xls_usb_ehci_device =
USB_PLATFORM_DEV("ehci-xls", 0, PIC_USB_IRQ);
static struct platform_device xls_usb_ohci_device_0 =
@@ -172,6 +177,7 @@ int xls_platform_usb_init(void)
memres = CPHYSADDR((unsigned long)usb_mmio);
xls_usb_ehci_device.resource[0].start = memres;
xls_usb_ehci_device.resource[0].end = memres + 0x400 - 1;
+ xls_usb_ehci_device.dev.platform_data = &xls_usb_ehci_pdata;
memres += 0x400;
xls_usb_ohci_device_0.resource[0].start = memres;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 44+ messages in thread
* [PATCH 05/25] USB: ehci: remove Netlogic XLS EHCI driver
[not found] <1349276601-8371-1-git-send-email-florian@openwrt.org>
` (3 preceding siblings ...)
2012-10-03 15:02 ` [PATCH 04/25] MIPS: Netlogic: use ehci-platform driver Florian Fainelli
@ 2012-10-03 15:03 ` Florian Fainelli
2012-10-03 15:03 ` [PATCH 06/25] USB: ehci: allow need_io_watchdog to be passed to ehci-platform driver Florian Fainelli
` (20 subsequent siblings)
25 siblings, 0 replies; 44+ messages in thread
From: Florian Fainelli @ 2012-10-03 15:03 UTC (permalink / raw)
To: stern; +Cc: linux-usb, Florian Fainelli, Greg Kroah-Hartman, linux-kernel
The platform code has been migrated to use the ehci-platform driver.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/usb/host/ehci-hcd.c | 5 --
drivers/usb/host/ehci-xls.c | 142 -------------------------------------------
2 files changed, 147 deletions(-)
delete mode 100644 drivers/usb/host/ehci-xls.c
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 2f517d9..f2a9982 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -1309,11 +1309,6 @@ MODULE_LICENSE ("GPL");
#define PLATFORM_DRIVER ehci_grlib_driver
#endif
-#ifdef CONFIG_CPU_XLR
-#include "ehci-xls.c"
-#define PLATFORM_DRIVER ehci_xls_driver
-#endif
-
#ifdef CONFIG_USB_EHCI_MV
#include "ehci-mv.c"
#define PLATFORM_DRIVER ehci_mv_driver
diff --git a/drivers/usb/host/ehci-xls.c b/drivers/usb/host/ehci-xls.c
deleted file mode 100644
index 8dc6a22..0000000
--- a/drivers/usb/host/ehci-xls.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * EHCI HCD for Netlogic XLS processors.
- *
- * (C) Copyright 2011 Netlogic Microsystems Inc.
- *
- * Based on various ehci-*.c drivers
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file COPYING in the main directory of this archive for
- * more details.
- */
-
-#include <linux/platform_device.h>
-
-static int ehci_xls_setup(struct usb_hcd *hcd)
-{
- struct ehci_hcd *ehci = hcd_to_ehci(hcd);
-
- ehci->caps = hcd->regs;
-
- return ehci_setup(hcd);
-}
-
-int ehci_xls_probe_internal(const struct hc_driver *driver,
- struct platform_device *pdev)
-{
- struct usb_hcd *hcd;
- struct resource *res;
- int retval, irq;
-
- /* Get our IRQ from an earlier registered Platform Resource */
- irq = platform_get_irq(pdev, 0);
- if (irq < 0) {
- dev_err(&pdev->dev, "Found HC with no IRQ. Check %s setup!\n",
- dev_name(&pdev->dev));
- return -ENODEV;
- }
-
- /* Get our Memory Handle */
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res) {
- dev_err(&pdev->dev, "Error: MMIO Handle %s setup!\n",
- dev_name(&pdev->dev));
- return -ENODEV;
- }
- hcd = usb_create_hcd(driver, &pdev->dev, dev_name(&pdev->dev));
- if (!hcd) {
- retval = -ENOMEM;
- goto err1;
- }
-
- hcd->rsrc_start = res->start;
- hcd->rsrc_len = resource_size(res);
-
- if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len,
- driver->description)) {
- dev_dbg(&pdev->dev, "controller already in use\n");
- retval = -EBUSY;
- goto err2;
- }
- hcd->regs = ioremap_nocache(hcd->rsrc_start, hcd->rsrc_len);
-
- if (hcd->regs == NULL) {
- dev_dbg(&pdev->dev, "error mapping memory\n");
- retval = -EFAULT;
- goto err3;
- }
-
- retval = usb_add_hcd(hcd, irq, IRQF_SHARED);
- if (retval != 0)
- goto err4;
- return retval;
-
-err4:
- iounmap(hcd->regs);
-err3:
- release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
-err2:
- usb_put_hcd(hcd);
-err1:
- dev_err(&pdev->dev, "init %s fail, %d\n", dev_name(&pdev->dev),
- retval);
- return retval;
-}
-
-static struct hc_driver ehci_xls_hc_driver = {
- .description = hcd_name,
- .product_desc = "XLS EHCI Host Controller",
- .hcd_priv_size = sizeof(struct ehci_hcd),
- .irq = ehci_irq,
- .flags = HCD_USB2 | HCD_MEMORY,
- .reset = ehci_xls_setup,
- .start = ehci_run,
- .stop = ehci_stop,
- .shutdown = ehci_shutdown,
-
- .urb_enqueue = ehci_urb_enqueue,
- .urb_dequeue = ehci_urb_dequeue,
- .endpoint_disable = ehci_endpoint_disable,
- .endpoint_reset = ehci_endpoint_reset,
-
- .get_frame_number = ehci_get_frame,
-
- .hub_status_data = ehci_hub_status_data,
- .hub_control = ehci_hub_control,
- .bus_suspend = ehci_bus_suspend,
- .bus_resume = ehci_bus_resume,
- .relinquish_port = ehci_relinquish_port,
- .port_handed_over = ehci_port_handed_over,
-
- .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete,
-};
-
-static int ehci_xls_probe(struct platform_device *pdev)
-{
- if (usb_disabled())
- return -ENODEV;
-
- return ehci_xls_probe_internal(&ehci_xls_hc_driver, pdev);
-}
-
-static int ehci_xls_remove(struct platform_device *pdev)
-{
- struct usb_hcd *hcd = platform_get_drvdata(pdev);
-
- usb_remove_hcd(hcd);
- iounmap(hcd->regs);
- release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
- usb_put_hcd(hcd);
- return 0;
-}
-
-MODULE_ALIAS("ehci-xls");
-
-static struct platform_driver ehci_xls_driver = {
- .probe = ehci_xls_probe,
- .remove = ehci_xls_remove,
- .shutdown = usb_hcd_platform_shutdown,
- .driver = {
- .name = "ehci-xls",
- },
-};
--
1.7.9.5
^ permalink raw reply related [flat|nested] 44+ messages in thread
* [PATCH 06/25] USB: ehci: allow need_io_watchdog to be passed to ehci-platform driver
[not found] <1349276601-8371-1-git-send-email-florian@openwrt.org>
` (4 preceding siblings ...)
2012-10-03 15:03 ` [PATCH 05/25] USB: ehci: remove Netlogic XLS EHCI driver Florian Fainelli
@ 2012-10-03 15:03 ` Florian Fainelli
2012-10-03 16:01 ` Alan Stern
2012-10-03 15:03 ` [PATCH 07/25] MIPS: Alchemy: use the ehci platform driver Florian Fainelli
` (19 subsequent siblings)
25 siblings, 1 reply; 44+ messages in thread
From: Florian Fainelli @ 2012-10-03 15:03 UTC (permalink / raw)
To: stern
Cc: linux-usb, Florian Fainelli, Ralf Baechle, Greg Kroah-Hartman,
Gabor Juhos, Hauke Mehrtens, Kelvin Cheung, Jayachandran C,
Dan Carpenter, Geert Uytterhoeven, linux-mips, linux-kernel
And convert all the existing users of ehci-platform to specify a correct
need_io_watchdog value.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
arch/mips/ath79/dev-usb.c | 2 ++
arch/mips/loongson1/common/platform.c | 1 +
arch/mips/netlogic/xlr/platform.c | 1 +
drivers/usb/host/bcma-hcd.c | 1 +
drivers/usb/host/ehci-platform.c | 1 +
drivers/usb/host/ssb-hcd.c | 1 +
include/linux/usb/ehci_pdriver.h | 3 +++
7 files changed, 10 insertions(+)
diff --git a/arch/mips/ath79/dev-usb.c b/arch/mips/ath79/dev-usb.c
index b2a2311..42b259b 100644
--- a/arch/mips/ath79/dev-usb.c
+++ b/arch/mips/ath79/dev-usb.c
@@ -71,12 +71,14 @@ static u64 ath79_ehci_dmamask = DMA_BIT_MASK(32);
static struct usb_ehci_pdata ath79_ehci_pdata_v1 = {
.has_synopsys_hc_bug = 1,
.port_power_off = 1,
+ .need_io_watchdog = 1,
};
static struct usb_ehci_pdata ath79_ehci_pdata_v2 = {
.caps_offset = 0x100,
.has_tt = 1,
.port_power_off = 1,
+ .need_io_watchdog = 1,
};
static struct platform_device ath79_ehci_device = {
diff --git a/arch/mips/loongson1/common/platform.c b/arch/mips/loongson1/common/platform.c
index 2874bf2..fa6b5d6 100644
--- a/arch/mips/loongson1/common/platform.c
+++ b/arch/mips/loongson1/common/platform.c
@@ -110,6 +110,7 @@ static struct resource ls1x_ehci_resources[] = {
static struct usb_ehci_pdata ls1x_ehci_pdata = {
.port_power_off = 1,
+ .need_io_watchdog = 1,
};
struct platform_device ls1x_ehci_device = {
diff --git a/arch/mips/netlogic/xlr/platform.c b/arch/mips/netlogic/xlr/platform.c
index 1731dfd..320b7ef 100644
--- a/arch/mips/netlogic/xlr/platform.c
+++ b/arch/mips/netlogic/xlr/platform.c
@@ -126,6 +126,7 @@ static u64 xls_usb_dmamask = ~(u32)0;
static struct usb_ehci_pdata xls_usb_ehci_pdata = {
.caps_offset = 0,
+ .need_io_watchdog = 1,
};
static struct platform_device xls_usb_ehci_device =
diff --git a/drivers/usb/host/bcma-hcd.c b/drivers/usb/host/bcma-hcd.c
index 443da21..e404f5c 100644
--- a/drivers/usb/host/bcma-hcd.c
+++ b/drivers/usb/host/bcma-hcd.c
@@ -160,6 +160,7 @@ static void __devinit bcma_hcd_init_chip(struct bcma_device *dev)
}
static const struct usb_ehci_pdata ehci_pdata = {
+ .need_io_watchdog = 1,
};
static const struct usb_ohci_pdata ohci_pdata = {
diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c
index 764e010..08d5dec 100644
--- a/drivers/usb/host/ehci-platform.c
+++ b/drivers/usb/host/ehci-platform.c
@@ -32,6 +32,7 @@ static int ehci_platform_reset(struct usb_hcd *hcd)
ehci->has_synopsys_hc_bug = pdata->has_synopsys_hc_bug;
ehci->big_endian_desc = pdata->big_endian_desc;
ehci->big_endian_mmio = pdata->big_endian_mmio;
+ ehci->need_io_watchdog = pdata->need_io_watchdog;
ehci->caps = hcd->regs + pdata->caps_offset;
retval = ehci_setup(hcd);
diff --git a/drivers/usb/host/ssb-hcd.c b/drivers/usb/host/ssb-hcd.c
index c2a29fa..77e2851 100644
--- a/drivers/usb/host/ssb-hcd.c
+++ b/drivers/usb/host/ssb-hcd.c
@@ -96,6 +96,7 @@ static u32 __devinit ssb_hcd_init_chip(struct ssb_device *dev)
}
static const struct usb_ehci_pdata ehci_pdata = {
+ .need_io_watchdog = 1,
};
static const struct usb_ohci_pdata ohci_pdata = {
diff --git a/include/linux/usb/ehci_pdriver.h b/include/linux/usb/ehci_pdriver.h
index c9d09f8..988504d 100644
--- a/include/linux/usb/ehci_pdriver.h
+++ b/include/linux/usb/ehci_pdriver.h
@@ -29,6 +29,8 @@
* initialization.
* @port_power_off: set to 1 if the controller needs to be powered down
* after initialization.
+ * @need_io_watchdog: set to 1 if the controller needs the I/O watchdog to
+ * run.
*
* These are general configuration options for the EHCI controller. All of
* these options are activating more or less workarounds for some hardware.
@@ -41,6 +43,7 @@ struct usb_ehci_pdata {
unsigned big_endian_mmio:1;
unsigned port_power_on:1;
unsigned port_power_off:1;
+ unsigned need_io_watchdog:1;
/* Turn on all power and clocks */
int (*power_on)(struct platform_device *pdev);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 44+ messages in thread
* [PATCH 07/25] MIPS: Alchemy: use the ehci platform driver
[not found] <1349276601-8371-1-git-send-email-florian@openwrt.org>
` (5 preceding siblings ...)
2012-10-03 15:03 ` [PATCH 06/25] USB: ehci: allow need_io_watchdog to be passed to ehci-platform driver Florian Fainelli
@ 2012-10-03 15:03 ` Florian Fainelli
2012-10-03 15:14 ` Manuel Lauss
2012-10-03 15:03 ` [PATCH 08/25] USB: ehci: remove Alchemy EHCI driver Florian Fainelli
` (18 subsequent siblings)
25 siblings, 1 reply; 44+ messages in thread
From: Florian Fainelli @ 2012-10-03 15:03 UTC (permalink / raw)
To: stern
Cc: linux-usb, Florian Fainelli, Ralf Baechle, Manuel Lauss,
Thomas Meyer, David S. Miller, linux-mips, linux-kernel
Use the ehci platform driver power_{on,suspend,off} callbacks to perform the
USB block gate enabling/disabling as what the ehci-au1xxx.c driver does.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
arch/mips/alchemy/common/platform.c | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/arch/mips/alchemy/common/platform.c b/arch/mips/alchemy/common/platform.c
index c0f3ce6..57335a2 100644
--- a/arch/mips/alchemy/common/platform.c
+++ b/arch/mips/alchemy/common/platform.c
@@ -17,6 +17,7 @@
#include <linux/platform_device.h>
#include <linux/serial_8250.h>
#include <linux/slab.h>
+#include <linux/usb/ehci_pdriver.h>
#include <asm/mach-au1x00/au1000.h>
#include <asm/mach-au1x00/au1xxx_dbdma.h>
@@ -122,6 +123,25 @@ static void __init alchemy_setup_uarts(int ctype)
static u64 alchemy_ohci_dmamask = DMA_BIT_MASK(32);
static u64 __maybe_unused alchemy_ehci_dmamask = DMA_BIT_MASK(32);
+/* Power on callback for the ehci platform driver */
+static int alchemy_ehci_power_on(struct platform_device *pdev)
+{
+ return alchemy_usb_control(ALCHEMY_USB_EHCI0, 1);
+}
+
+/* Power off/suspend callback for the ehci platform driver */
+static void alchemy_ehci_power_off(struct platform_device *pdev)
+{
+ alchemy_usb_control(ALCHEMY_USB_EHCI0, 0);
+}
+
+static struct usb_ehci_pdata alchemy_ehci_pdata = {
+ .need_io_watchdog = 0,
+ .power_on = alchemy_ehci_power_on,
+ .power_off = alchemy_ehci_power_off,
+ .power_suspend = alchemy_ehci_power_off,
+};
+
static unsigned long alchemy_ohci_data[][2] __initdata = {
[ALCHEMY_CPU_AU1000] = { AU1000_USB_OHCI_PHYS_ADDR, AU1000_USB_HOST_INT },
[ALCHEMY_CPU_AU1500] = { AU1000_USB_OHCI_PHYS_ADDR, AU1500_USB_HOST_INT },
@@ -188,9 +208,10 @@ static void __init alchemy_setup_usb(int ctype)
res[1].start = alchemy_ehci_data[ctype][1];
res[1].end = res[1].start;
res[1].flags = IORESOURCE_IRQ;
- pdev->name = "au1xxx-ehci";
+ pdev->name = "ehci-platform";
pdev->id = 0;
pdev->dev.dma_mask = &alchemy_ehci_dmamask;
+ pdev->dev.platform_data = &alchemy_ehci_pdata;
if (platform_device_register(pdev))
printk(KERN_INFO "Alchemy USB: cannot add EHCI0\n");
--
1.7.9.5
^ permalink raw reply related [flat|nested] 44+ messages in thread
* [PATCH 08/25] USB: ehci: remove Alchemy EHCI driver
[not found] <1349276601-8371-1-git-send-email-florian@openwrt.org>
` (6 preceding siblings ...)
2012-10-03 15:03 ` [PATCH 07/25] MIPS: Alchemy: use the ehci platform driver Florian Fainelli
@ 2012-10-03 15:03 ` Florian Fainelli
2012-10-03 15:03 ` [PATCH 09/25] MIPS: Octeon: use ehci-platform driver Florian Fainelli
` (17 subsequent siblings)
25 siblings, 0 replies; 44+ messages in thread
From: Florian Fainelli @ 2012-10-03 15:03 UTC (permalink / raw)
To: stern; +Cc: linux-usb, Florian Fainelli, Greg Kroah-Hartman, linux-kernel
The platform code has been converted to use the ehci-platform driver instead.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/usb/host/ehci-au1xxx.c | 184 ----------------------------------------
drivers/usb/host/ehci-hcd.c | 5 --
2 files changed, 189 deletions(-)
delete mode 100644 drivers/usb/host/ehci-au1xxx.c
diff --git a/drivers/usb/host/ehci-au1xxx.c b/drivers/usb/host/ehci-au1xxx.c
deleted file mode 100644
index 65c945e..0000000
--- a/drivers/usb/host/ehci-au1xxx.c
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * EHCI HCD (Host Controller Driver) for USB.
- *
- * Bus Glue for AMD Alchemy Au1xxx
- *
- * Based on "ohci-au1xxx.c" by Matt Porter <mporter@kernel.crashing.org>
- *
- * Modified for AMD Alchemy Au1200 EHC
- * by K.Boge <karsten.boge@amd.com>
- *
- * This file is licenced under the GPL.
- */
-
-#include <linux/platform_device.h>
-#include <asm/mach-au1x00/au1000.h>
-
-
-extern int usb_disabled(void);
-
-static int au1xxx_ehci_setup(struct usb_hcd *hcd)
-{
- struct ehci_hcd *ehci = hcd_to_ehci(hcd);
- int ret;
-
- ehci->caps = hcd->regs;
- ret = ehci_setup(hcd);
-
- ehci->need_io_watchdog = 0;
- return ret;
-}
-
-static const struct hc_driver ehci_au1xxx_hc_driver = {
- .description = hcd_name,
- .product_desc = "Au1xxx EHCI",
- .hcd_priv_size = sizeof(struct ehci_hcd),
-
- /*
- * generic hardware linkage
- */
- .irq = ehci_irq,
- .flags = HCD_MEMORY | HCD_USB2,
-
- /*
- * basic lifecycle operations
- *
- * FIXME -- ehci_init() doesn't do enough here.
- * See ehci-ppc-soc for a complete implementation.
- */
- .reset = au1xxx_ehci_setup,
- .start = ehci_run,
- .stop = ehci_stop,
- .shutdown = ehci_shutdown,
-
- /*
- * managing i/o requests and associated device resources
- */
- .urb_enqueue = ehci_urb_enqueue,
- .urb_dequeue = ehci_urb_dequeue,
- .endpoint_disable = ehci_endpoint_disable,
- .endpoint_reset = ehci_endpoint_reset,
-
- /*
- * scheduling support
- */
- .get_frame_number = ehci_get_frame,
-
- /*
- * root hub support
- */
- .hub_status_data = ehci_hub_status_data,
- .hub_control = ehci_hub_control,
- .bus_suspend = ehci_bus_suspend,
- .bus_resume = ehci_bus_resume,
- .relinquish_port = ehci_relinquish_port,
- .port_handed_over = ehci_port_handed_over,
-
- .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete,
-};
-
-static int ehci_hcd_au1xxx_drv_probe(struct platform_device *pdev)
-{
- struct usb_hcd *hcd;
- struct resource *res;
- int ret;
-
- if (usb_disabled())
- return -ENODEV;
-
- if (pdev->resource[1].flags != IORESOURCE_IRQ) {
- pr_debug("resource[1] is not IORESOURCE_IRQ");
- return -ENOMEM;
- }
- hcd = usb_create_hcd(&ehci_au1xxx_hc_driver, &pdev->dev, "Au1xxx");
- if (!hcd)
- return -ENOMEM;
-
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- hcd->rsrc_start = res->start;
- hcd->rsrc_len = resource_size(res);
-
- hcd->regs = devm_request_and_ioremap(&pdev->dev, res);
- if (!hcd->regs) {
- pr_debug("devm_request_and_ioremap failed");
- ret = -ENOMEM;
- goto err1;
- }
-
- if (alchemy_usb_control(ALCHEMY_USB_EHCI0, 1)) {
- printk(KERN_INFO "%s: controller init failed!\n", pdev->name);
- ret = -ENODEV;
- goto err1;
- }
-
- ret = usb_add_hcd(hcd, pdev->resource[1].start,
- IRQF_SHARED);
- if (ret == 0) {
- platform_set_drvdata(pdev, hcd);
- return ret;
- }
-
- alchemy_usb_control(ALCHEMY_USB_EHCI0, 0);
-err1:
- usb_put_hcd(hcd);
- return ret;
-}
-
-static int ehci_hcd_au1xxx_drv_remove(struct platform_device *pdev)
-{
- struct usb_hcd *hcd = platform_get_drvdata(pdev);
-
- usb_remove_hcd(hcd);
- alchemy_usb_control(ALCHEMY_USB_EHCI0, 0);
- usb_put_hcd(hcd);
- platform_set_drvdata(pdev, NULL);
-
- return 0;
-}
-
-#ifdef CONFIG_PM
-static int ehci_hcd_au1xxx_drv_suspend(struct device *dev)
-{
- struct usb_hcd *hcd = dev_get_drvdata(dev);
- bool do_wakeup = device_may_wakeup(dev);
- int rc;
-
- rc = ehci_suspend(hcd, do_wakeup);
- alchemy_usb_control(ALCHEMY_USB_EHCI0, 0);
-
- return rc;
-}
-
-static int ehci_hcd_au1xxx_drv_resume(struct device *dev)
-{
- struct usb_hcd *hcd = dev_get_drvdata(dev);
-
- alchemy_usb_control(ALCHEMY_USB_EHCI0, 1);
- ehci_resume(hcd, false);
-
- return 0;
-}
-
-static const struct dev_pm_ops au1xxx_ehci_pmops = {
- .suspend = ehci_hcd_au1xxx_drv_suspend,
- .resume = ehci_hcd_au1xxx_drv_resume,
-};
-
-#define AU1XXX_EHCI_PMOPS &au1xxx_ehci_pmops
-
-#else
-#define AU1XXX_EHCI_PMOPS NULL
-#endif
-
-static struct platform_driver ehci_hcd_au1xxx_driver = {
- .probe = ehci_hcd_au1xxx_drv_probe,
- .remove = ehci_hcd_au1xxx_drv_remove,
- .shutdown = usb_hcd_platform_shutdown,
- .driver = {
- .name = "au1xxx-ehci",
- .owner = THIS_MODULE,
- .pm = AU1XXX_EHCI_PMOPS,
- }
-};
-
-MODULE_ALIAS("platform:au1xxx-ehci");
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index f2a9982..a954a95 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -1219,11 +1219,6 @@ MODULE_LICENSE ("GPL");
#define PLATFORM_DRIVER ehci_hcd_sh_driver
#endif
-#ifdef CONFIG_MIPS_ALCHEMY
-#include "ehci-au1xxx.c"
-#define PLATFORM_DRIVER ehci_hcd_au1xxx_driver
-#endif
-
#ifdef CONFIG_USB_EHCI_HCD_OMAP
#include "ehci-omap.c"
#define PLATFORM_DRIVER ehci_hcd_omap_driver
--
1.7.9.5
^ permalink raw reply related [flat|nested] 44+ messages in thread
* [PATCH 09/25] MIPS: Octeon: use ehci-platform driver
[not found] <1349276601-8371-1-git-send-email-florian@openwrt.org>
` (7 preceding siblings ...)
2012-10-03 15:03 ` [PATCH 08/25] USB: ehci: remove Alchemy EHCI driver Florian Fainelli
@ 2012-10-03 15:03 ` Florian Fainelli
2012-10-03 16:45 ` David Daney
2012-10-03 15:03 ` [PATCH 10/25] USB: ehci: remove Octeon EHCI driver Florian Fainelli
` (16 subsequent siblings)
25 siblings, 1 reply; 44+ messages in thread
From: Florian Fainelli @ 2012-10-03 15:03 UTC (permalink / raw)
To: stern
Cc: linux-usb, Florian Fainelli, Ralf Baechle, David Daney,
David S. Miller, Wolfram Sang, linux-mips, linux-kernel
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
arch/mips/cavium-octeon/octeon-platform.c | 43 ++++++++++++++++++++++++++++-
1 file changed, 42 insertions(+), 1 deletion(-)
diff --git a/arch/mips/cavium-octeon/octeon-platform.c b/arch/mips/cavium-octeon/octeon-platform.c
index 0938df1..539e1bc 100644
--- a/arch/mips/cavium-octeon/octeon-platform.c
+++ b/arch/mips/cavium-octeon/octeon-platform.c
@@ -18,9 +18,11 @@
#include <linux/of_platform.h>
#include <linux/of_fdt.h>
#include <linux/libfdt.h>
+#include <linux/usb/ehci_pdriver.h>
#include <asm/octeon/octeon.h>
#include <asm/octeon/cvmx-rnm-defs.h>
+#include <asm/octeon/cvmx-uctlx-defs.h>
#include <asm/octeon/cvmx-helper.h>
#include <asm/octeon/cvmx-helper-board.h>
@@ -169,6 +171,41 @@ out:
device_initcall(octeon_rng_device_init);
#ifdef CONFIG_USB
+void octeon2_usb_clocks_start(void);
+void octeon2_usb_clocks_stop(void);
+
+static int octeon_ehci_power_on(struct platform_device *pdev)
+{
+ union cvmx_uctlx_ehci_ctl ehci_ctl;
+
+ octeon2_usb_clocks_start();
+
+ ehci_ctl.u64 = cvmx_read_csr(CVMX_UCTLX_EHCI_CTL(0));
+ /* Use 64-bit addressing. */
+ ehci_ctl.s.ehci_64b_addr_en = 1;
+ ehci_ctl.s.l2c_addr_msb = 0;
+ ehci_ctl.s.l2c_buff_emod = 1; /* Byte swapped. */
+ ehci_ctl.s.l2c_desc_emod = 1; /* Byte swapped. */
+ cvmx_write_csr(CVMX_UCTLX_EHCI_CTL(0), ehci_ctl.u64);
+
+ return 0;
+}
+
+static void octeon_ehci_power_off(struct platform_device *pdev)
+{
+ octeon2_usb_clocks_stop();
+}
+
+static struct usb_ehci_pdata octeon_ehci_pdata = {
+#ifdef __BIG_ENDIAN
+ .big_endian_mmio = 1,
+#endif
+ .port_power_on = 1,
+ .power_on = octeon_ehci_power_on,
+ .power_off = octeon_ehci_power_off,
+};
+
+static u64 octeon_ehci_dma_mask = DMA_BIT_MASK(64);
static int __init octeon_ehci_device_init(void)
{
@@ -190,7 +227,7 @@ static int __init octeon_ehci_device_init(void)
if (octeon_is_simulation() || usb_disabled())
return 0; /* No USB in the simulator. */
- pd = platform_device_alloc("octeon-ehci", 0);
+ pd = platform_device_alloc("ehci-platform", 0);
if (!pd) {
ret = -ENOMEM;
goto out;
@@ -207,6 +244,10 @@ static int __init octeon_ehci_device_init(void)
if (ret)
goto fail;
+ pd.dev.platform_data = &octeon_ehci_pdata;
+ pd.dev.coherent_dma_mask = DMA_BIT_MASK(32);
+ pd.dev.dma_mask = &octeon_ehci_dma_mask;
+
ret = platform_device_add(pd);
if (ret)
goto fail;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 44+ messages in thread
* [PATCH 10/25] USB: ehci: remove Octeon EHCI driver
[not found] <1349276601-8371-1-git-send-email-florian@openwrt.org>
` (8 preceding siblings ...)
2012-10-03 15:03 ` [PATCH 09/25] MIPS: Octeon: use ehci-platform driver Florian Fainelli
@ 2012-10-03 15:03 ` Florian Fainelli
2012-10-03 15:03 ` [PATCH 11/25] ARM: cns3xxx: use ehci platform driver Florian Fainelli
` (15 subsequent siblings)
25 siblings, 0 replies; 44+ messages in thread
From: Florian Fainelli @ 2012-10-03 15:03 UTC (permalink / raw)
To: stern
Cc: linux-usb, Florian Fainelli, Greg Kroah-Hartman, Hauke Mehrtens,
Felipe Balbi, linux-kernel
Users of this driver have been converted to use the ehci platform driver
instead.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/usb/host/Kconfig | 8 +-
drivers/usb/host/ehci-octeon.c | 203 ----------------------------------------
2 files changed, 6 insertions(+), 205 deletions(-)
delete mode 100644 drivers/usb/host/ehci-octeon.c
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index b1deb0f..18cf37f 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -627,11 +627,15 @@ config USB_IMX21_HCD
module will be called "imx21-hcd".
config USB_OCTEON_EHCI
- bool "Octeon on-chip EHCI support"
- depends on USB && USB_EHCI_HCD && CPU_CAVIUM_OCTEON
+ bool "Octeon on-chip EHCI support (DEPRECATED)"
+ depends on USB && CPU_CAVIUM_OCTEON
default n
select USB_EHCI_BIG_ENDIAN_MMIO
+ select USB_EHCI_HCD_PLATFORM if USB_EHCI_HCD
help
+ This option is deprecated now and the driver was removed, use
+ USB_EHCI_HCD_PLATFORM instead.
+
Enable support for the Octeon II SOC's on-chip EHCI
controller. It is needed for high-speed (480Mbit/sec)
USB 2.0 device support. All CN6XXX based chips with USB are
diff --git a/drivers/usb/host/ehci-octeon.c b/drivers/usb/host/ehci-octeon.c
deleted file mode 100644
index ba26957a..0000000
--- a/drivers/usb/host/ehci-octeon.c
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * EHCI HCD glue for Cavium Octeon II SOCs.
- *
- * Loosely based on ehci-au1xxx.c
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2010 Cavium Networks
- *
- */
-
-#include <linux/platform_device.h>
-
-#include <asm/octeon/octeon.h>
-#include <asm/octeon/cvmx-uctlx-defs.h>
-
-#define OCTEON_EHCI_HCD_NAME "octeon-ehci"
-
-/* Common clock init code. */
-void octeon2_usb_clocks_start(void);
-void octeon2_usb_clocks_stop(void);
-
-static void ehci_octeon_start(void)
-{
- union cvmx_uctlx_ehci_ctl ehci_ctl;
-
- octeon2_usb_clocks_start();
-
- ehci_ctl.u64 = cvmx_read_csr(CVMX_UCTLX_EHCI_CTL(0));
- /* Use 64-bit addressing. */
- ehci_ctl.s.ehci_64b_addr_en = 1;
- ehci_ctl.s.l2c_addr_msb = 0;
- ehci_ctl.s.l2c_buff_emod = 1; /* Byte swapped. */
- ehci_ctl.s.l2c_desc_emod = 1; /* Byte swapped. */
- cvmx_write_csr(CVMX_UCTLX_EHCI_CTL(0), ehci_ctl.u64);
-}
-
-static void ehci_octeon_stop(void)
-{
- octeon2_usb_clocks_stop();
-}
-
-static const struct hc_driver ehci_octeon_hc_driver = {
- .description = hcd_name,
- .product_desc = "Octeon EHCI",
- .hcd_priv_size = sizeof(struct ehci_hcd),
-
- /*
- * generic hardware linkage
- */
- .irq = ehci_irq,
- .flags = HCD_MEMORY | HCD_USB2,
-
- /*
- * basic lifecycle operations
- */
- .reset = ehci_setup,
- .start = ehci_run,
- .stop = ehci_stop,
- .shutdown = ehci_shutdown,
-
- /*
- * managing i/o requests and associated device resources
- */
- .urb_enqueue = ehci_urb_enqueue,
- .urb_dequeue = ehci_urb_dequeue,
- .endpoint_disable = ehci_endpoint_disable,
- .endpoint_reset = ehci_endpoint_reset,
-
- /*
- * scheduling support
- */
- .get_frame_number = ehci_get_frame,
-
- /*
- * root hub support
- */
- .hub_status_data = ehci_hub_status_data,
- .hub_control = ehci_hub_control,
- .bus_suspend = ehci_bus_suspend,
- .bus_resume = ehci_bus_resume,
- .relinquish_port = ehci_relinquish_port,
- .port_handed_over = ehci_port_handed_over,
-
- .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete,
-};
-
-static u64 ehci_octeon_dma_mask = DMA_BIT_MASK(64);
-
-static int ehci_octeon_drv_probe(struct platform_device *pdev)
-{
- struct usb_hcd *hcd;
- struct ehci_hcd *ehci;
- struct resource *res_mem;
- int irq;
- int ret;
-
- if (usb_disabled())
- return -ENODEV;
-
- irq = platform_get_irq(pdev, 0);
- if (irq < 0) {
- dev_err(&pdev->dev, "No irq assigned\n");
- return -ENODEV;
- }
-
- res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (res_mem == NULL) {
- dev_err(&pdev->dev, "No register space assigned\n");
- return -ENODEV;
- }
-
- /*
- * We can DMA from anywhere. But the descriptors must be in
- * the lower 4GB.
- */
- pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
- pdev->dev.dma_mask = &ehci_octeon_dma_mask;
-
- hcd = usb_create_hcd(&ehci_octeon_hc_driver, &pdev->dev, "octeon");
- if (!hcd)
- return -ENOMEM;
-
- hcd->rsrc_start = res_mem->start;
- hcd->rsrc_len = resource_size(res_mem);
-
- if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len,
- OCTEON_EHCI_HCD_NAME)) {
- dev_err(&pdev->dev, "request_mem_region failed\n");
- ret = -EBUSY;
- goto err1;
- }
-
- hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
- if (!hcd->regs) {
- dev_err(&pdev->dev, "ioremap failed\n");
- ret = -ENOMEM;
- goto err2;
- }
-
- ehci_octeon_start();
-
- ehci = hcd_to_ehci(hcd);
-
- /* Octeon EHCI matches CPU endianness. */
-#ifdef __BIG_ENDIAN
- ehci->big_endian_mmio = 1;
-#endif
-
- ehci->caps = hcd->regs;
-
- ret = usb_add_hcd(hcd, irq, IRQF_SHARED);
- if (ret) {
- dev_dbg(&pdev->dev, "failed to add hcd with err %d\n", ret);
- goto err3;
- }
-
- platform_set_drvdata(pdev, hcd);
-
- /* root ports should always stay powered */
- ehci_port_power(ehci, 1);
-
- return 0;
-err3:
- ehci_octeon_stop();
-
- iounmap(hcd->regs);
-err2:
- release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
-err1:
- usb_put_hcd(hcd);
- return ret;
-}
-
-static int ehci_octeon_drv_remove(struct platform_device *pdev)
-{
- struct usb_hcd *hcd = platform_get_drvdata(pdev);
-
- usb_remove_hcd(hcd);
-
- ehci_octeon_stop();
- iounmap(hcd->regs);
- release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
- usb_put_hcd(hcd);
-
- platform_set_drvdata(pdev, NULL);
-
- return 0;
-}
-
-static struct platform_driver ehci_octeon_driver = {
- .probe = ehci_octeon_drv_probe,
- .remove = ehci_octeon_drv_remove,
- .shutdown = usb_hcd_platform_shutdown,
- .driver = {
- .name = OCTEON_EHCI_HCD_NAME,
- .owner = THIS_MODULE,
- }
-};
-
-MODULE_ALIAS("platform:" OCTEON_EHCI_HCD_NAME);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 44+ messages in thread
* [PATCH 11/25] ARM: cns3xxx: use ehci platform driver
[not found] <1349276601-8371-1-git-send-email-florian@openwrt.org>
` (9 preceding siblings ...)
2012-10-03 15:03 ` [PATCH 10/25] USB: ehci: remove Octeon EHCI driver Florian Fainelli
@ 2012-10-03 15:03 ` Florian Fainelli
2012-10-03 15:03 ` [PATCH 12/25] USB: ehci: remove CNS3xxx EHCI " Florian Fainelli
` (14 subsequent siblings)
25 siblings, 0 replies; 44+ messages in thread
From: Florian Fainelli @ 2012-10-03 15:03 UTC (permalink / raw)
To: stern
Cc: linux-usb, Florian Fainelli, Anton Vorontsov, Russell King,
linux-arm-kernel, linux-kernel
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
arch/arm/mach-cns3xxx/cns3420vb.c | 44 ++++++++++++++++++++++++++++++++++++-
1 file changed, 43 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-cns3xxx/cns3420vb.c b/arch/arm/mach-cns3xxx/cns3420vb.c
index 2c5fb4c..906094c 100644
--- a/arch/arm/mach-cns3xxx/cns3420vb.c
+++ b/arch/arm/mach-cns3xxx/cns3420vb.c
@@ -24,6 +24,7 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/physmap.h>
#include <linux/mtd/partitions.h>
+#include <linux/usb/ehci_pdriver.h>
#include <asm/setup.h>
#include <asm/mach-types.h>
#include <asm/hardware/gic.h>
@@ -32,6 +33,7 @@
#include <asm/mach/time.h>
#include <mach/cns3xxx.h>
#include <mach/irqs.h>
+#include <mach/pm.h>
#include "core.h"
#include "devices.h"
@@ -125,13 +127,53 @@ static struct resource cns3xxx_usb_ehci_resources[] = {
static u64 cns3xxx_usb_ehci_dma_mask = DMA_BIT_MASK(32);
+static int csn3xxx_usb_ehci_power_on(struct platform_device *pdev)
+{
+ /*
+ * EHCI and OHCI share the same clock and power,
+ * resetting twice would cause the 1st controller been reset.
+ * Therefore only do power up at the first up device, and
+ * power down at the last down device.
+ *
+ * Set USB AHB INCR length to 16
+ */
+ if (atomic_inc_return(&usb_pwr_ref) == 1) {
+ cns3xxx_pwr_power_up(1 << PM_PLL_HM_PD_CTRL_REG_OFFSET_PLL_USB);
+ cns3xxx_pwr_clk_en(1 << PM_CLK_GATE_REG_OFFSET_USB_HOST);
+ cns3xxx_pwr_soft_rst(1 << PM_SOFT_RST_REG_OFFST_USB_HOST);
+ __raw_writel((__raw_readl(MISC_CHIP_CONFIG_REG) | (0X2 << 24)),
+ MISC_CHIP_CONFIG_REG);
+ }
+
+ return 0;
+}
+
+static void csn3xxx_usb_ehci_power_off(struct platform_device *pdev)
+{
+ /*
+ * EHCI and OHCI share the same clock and power,
+ * resetting twice would cause the 1st controller been reset.
+ * Therefore only do power up at the first up device, and
+ * power down at the last down device.
+ */
+ if (atomic_dec_return(&usb_pwr_ref) == 0)
+ cns3xxx_pwr_clk_dis(1 << PM_CLK_GATE_REG_OFFSET_USB_HOST);
+}
+
+static struct usb_ehci_pdata cns3xxx_usb_ehci_pdata = {
+ .port_power_off = 1,
+ .power_on = csn3xxx_usb_ehci_power_on,
+ .power_off = csn3xxx_usb_ehci_power_off,
+};
+
static struct platform_device cns3xxx_usb_ehci_device = {
- .name = "cns3xxx-ehci",
+ .name = "ehci-platform",
.num_resources = ARRAY_SIZE(cns3xxx_usb_ehci_resources),
.resource = cns3xxx_usb_ehci_resources,
.dev = {
.dma_mask = &cns3xxx_usb_ehci_dma_mask,
.coherent_dma_mask = DMA_BIT_MASK(32),
+ .platform_data = &cns3xxx_usb_ehci_pdata,
},
};
--
1.7.9.5
^ permalink raw reply related [flat|nested] 44+ messages in thread
* [PATCH 12/25] USB: ehci: remove CNS3xxx EHCI platform driver
[not found] <1349276601-8371-1-git-send-email-florian@openwrt.org>
` (10 preceding siblings ...)
2012-10-03 15:03 ` [PATCH 11/25] ARM: cns3xxx: use ehci platform driver Florian Fainelli
@ 2012-10-03 15:03 ` Florian Fainelli
2012-10-03 16:16 ` Alan Stern
2012-10-03 15:03 ` [PATCH 13/25] USB: ohci: allow platform driver to specify the number of ports Florian Fainelli
` (13 subsequent siblings)
25 siblings, 1 reply; 44+ messages in thread
From: Florian Fainelli @ 2012-10-03 15:03 UTC (permalink / raw)
To: stern
Cc: linux-usb, Florian Fainelli, Greg Kroah-Hartman, Hauke Mehrtens,
Felipe Balbi, linux-kernel
The users have been converted to use the ehci platform driver instead.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/usb/host/Kconfig | 6 +-
drivers/usb/host/ehci-cns3xxx.c | 155 ---------------------------------------
drivers/usb/host/ehci-hcd.c | 10 ---
3 files changed, 5 insertions(+), 166 deletions(-)
delete mode 100644 drivers/usb/host/ehci-cns3xxx.c
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 18cf37f..0754dd1 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -215,9 +215,13 @@ config USB_W90X900_EHCI
Enables support for the W90X900 USB controller
config USB_CNS3XXX_EHCI
- bool "Cavium CNS3XXX EHCI Module"
+ bool "Cavium CNS3XXX EHCI Module (DEPRECATED)"
depends on USB_EHCI_HCD && ARCH_CNS3XXX
+ select USB_EHCI_HCD_PLATFORM
---help---
+ This option is deprecated now and the driver was removed, use
+ USB_EHCI_HCD_PLATFORM instead.
+
Enable support for the CNS3XXX SOC's on-chip EHCI controller.
It is needed for high-speed (480Mbit/sec) USB 2.0 device
support.
diff --git a/drivers/usb/host/ehci-cns3xxx.c b/drivers/usb/host/ehci-cns3xxx.c
deleted file mode 100644
index d91708d..0000000
--- a/drivers/usb/host/ehci-cns3xxx.c
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright 2008 Cavium Networks
- *
- * 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/platform_device.h>
-#include <linux/atomic.h>
-#include <mach/cns3xxx.h>
-#include <mach/pm.h>
-
-static int cns3xxx_ehci_init(struct usb_hcd *hcd)
-{
- struct ehci_hcd *ehci = hcd_to_ehci(hcd);
- int retval;
-
- /*
- * EHCI and OHCI share the same clock and power,
- * resetting twice would cause the 1st controller been reset.
- * Therefore only do power up at the first up device, and
- * power down at the last down device.
- *
- * Set USB AHB INCR length to 16
- */
- if (atomic_inc_return(&usb_pwr_ref) == 1) {
- cns3xxx_pwr_power_up(1 << PM_PLL_HM_PD_CTRL_REG_OFFSET_PLL_USB);
- cns3xxx_pwr_clk_en(1 << PM_CLK_GATE_REG_OFFSET_USB_HOST);
- cns3xxx_pwr_soft_rst(1 << PM_SOFT_RST_REG_OFFST_USB_HOST);
- __raw_writel((__raw_readl(MISC_CHIP_CONFIG_REG) | (0X2 << 24)),
- MISC_CHIP_CONFIG_REG);
- }
-
- ehci->caps = hcd->regs;
-
- hcd->has_tt = 0;
-
- retval = ehci_setup(hcd);
- if (retval)
- return retval;
-
- ehci_port_power(ehci, 0);
-
- return retval;
-}
-
-static const struct hc_driver cns3xxx_ehci_hc_driver = {
- .description = hcd_name,
- .product_desc = "CNS3XXX EHCI Host Controller",
- .hcd_priv_size = sizeof(struct ehci_hcd),
- .irq = ehci_irq,
- .flags = HCD_MEMORY | HCD_USB2,
- .reset = cns3xxx_ehci_init,
- .start = ehci_run,
- .stop = ehci_stop,
- .shutdown = ehci_shutdown,
- .urb_enqueue = ehci_urb_enqueue,
- .urb_dequeue = ehci_urb_dequeue,
- .endpoint_disable = ehci_endpoint_disable,
- .endpoint_reset = ehci_endpoint_reset,
- .get_frame_number = ehci_get_frame,
- .hub_status_data = ehci_hub_status_data,
- .hub_control = ehci_hub_control,
-#ifdef CONFIG_PM
- .bus_suspend = ehci_bus_suspend,
- .bus_resume = ehci_bus_resume,
-#endif
- .relinquish_port = ehci_relinquish_port,
- .port_handed_over = ehci_port_handed_over,
-
- .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete,
-};
-
-static int cns3xxx_ehci_probe(struct platform_device *pdev)
-{
- struct device *dev = &pdev->dev;
- struct usb_hcd *hcd;
- const struct hc_driver *driver = &cns3xxx_ehci_hc_driver;
- struct resource *res;
- int irq;
- int retval;
-
- if (usb_disabled())
- return -ENODEV;
-
- res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
- if (!res) {
- dev_err(dev, "Found HC with no IRQ.\n");
- return -ENODEV;
- }
- irq = res->start;
-
- hcd = usb_create_hcd(driver, &pdev->dev, dev_name(&pdev->dev));
- if (!hcd)
- return -ENOMEM;
-
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res) {
- dev_err(dev, "Found HC with no register addr.\n");
- retval = -ENODEV;
- goto err1;
- }
-
- hcd->rsrc_start = res->start;
- hcd->rsrc_len = resource_size(res);
-
- hcd->regs = devm_request_and_ioremap(&pdev->dev, res);
- if (hcd->regs == NULL) {
- dev_dbg(dev, "error mapping memory\n");
- retval = -EFAULT;
- goto err1;
- }
-
- retval = usb_add_hcd(hcd, irq, IRQF_SHARED);
- if (retval == 0)
- return retval;
-
-err1:
- usb_put_hcd(hcd);
-
- return retval;
-}
-
-static int cns3xxx_ehci_remove(struct platform_device *pdev)
-{
- struct usb_hcd *hcd = platform_get_drvdata(pdev);
-
- usb_remove_hcd(hcd);
-
- /*
- * EHCI and OHCI share the same clock and power,
- * resetting twice would cause the 1st controller been reset.
- * Therefore only do power up at the first up device, and
- * power down at the last down device.
- */
- if (atomic_dec_return(&usb_pwr_ref) == 0)
- cns3xxx_pwr_clk_dis(1 << PM_CLK_GATE_REG_OFFSET_USB_HOST);
-
- usb_put_hcd(hcd);
-
- platform_set_drvdata(pdev, NULL);
-
- return 0;
-}
-
-MODULE_ALIAS("platform:cns3xxx-ehci");
-
-static struct platform_driver cns3xxx_ehci_driver = {
- .probe = cns3xxx_ehci_probe,
- .remove = cns3xxx_ehci_remove,
- .driver = {
- .name = "cns3xxx-ehci",
- },
-};
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index a954a95..57b7bd0 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -1254,16 +1254,6 @@ MODULE_LICENSE ("GPL");
#define PLATFORM_DRIVER ehci_atmel_driver
#endif
-#ifdef CONFIG_USB_OCTEON_EHCI
-#include "ehci-octeon.c"
-#define PLATFORM_DRIVER ehci_octeon_driver
-#endif
-
-#ifdef CONFIG_USB_CNS3XXX_EHCI
-#include "ehci-cns3xxx.c"
-#define PLATFORM_DRIVER cns3xxx_ehci_driver
-#endif
-
#ifdef CONFIG_ARCH_VT8500
#include "ehci-vt8500.c"
#define PLATFORM_DRIVER vt8500_ehci_driver
--
1.7.9.5
^ permalink raw reply related [flat|nested] 44+ messages in thread
* [PATCH 13/25] USB: ohci: allow platform driver to specify the number of ports
[not found] <1349276601-8371-1-git-send-email-florian@openwrt.org>
` (11 preceding siblings ...)
2012-10-03 15:03 ` [PATCH 12/25] USB: ehci: remove CNS3xxx EHCI " Florian Fainelli
@ 2012-10-03 15:03 ` Florian Fainelli
2012-10-03 15:03 ` [PATCH 14/25] MIPS: PNX8550: use OHCI platform driver Florian Fainelli
` (12 subsequent siblings)
25 siblings, 0 replies; 44+ messages in thread
From: Florian Fainelli @ 2012-10-03 15:03 UTC (permalink / raw)
To: stern; +Cc: linux-usb, Florian Fainelli, Greg Kroah-Hartman, linux-kernel
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/usb/host/ohci-platform.c | 4 ++++
include/linux/usb/ohci_pdriver.h | 2 ++
2 files changed, 6 insertions(+)
diff --git a/drivers/usb/host/ohci-platform.c b/drivers/usb/host/ohci-platform.c
index e24ec9f..1caaf65 100644
--- a/drivers/usb/host/ohci-platform.c
+++ b/drivers/usb/host/ohci-platform.c
@@ -31,6 +31,10 @@ static int ohci_platform_reset(struct usb_hcd *hcd)
ohci->flags |= OHCI_QUIRK_FRAME_NO;
ohci_hcd_init(ohci);
+
+ if (pdata->num_ports)
+ ohci->num_ports = pdata->num_ports;
+
err = ohci_init(ohci);
return err;
diff --git a/include/linux/usb/ohci_pdriver.h b/include/linux/usb/ohci_pdriver.h
index 74e7755..012f2b7 100644
--- a/include/linux/usb/ohci_pdriver.h
+++ b/include/linux/usb/ohci_pdriver.h
@@ -25,6 +25,7 @@
* @big_endian_desc: BE descriptors
* @big_endian_mmio: BE registers
* @no_big_frame_no: no big endian frame_no shift
+ * @num_ports: number of ports
*
* These are general configuration options for the OHCI controller. All of
* these options are activating more or less workarounds for some hardware.
@@ -33,6 +34,7 @@ struct usb_ohci_pdata {
unsigned big_endian_desc:1;
unsigned big_endian_mmio:1;
unsigned no_big_frame_no:1;
+ unsigned int num_ports;
/* Turn on all power and clocks */
int (*power_on)(struct platform_device *pdev);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 44+ messages in thread
* [PATCH 14/25] MIPS: PNX8550: use OHCI platform driver
[not found] <1349276601-8371-1-git-send-email-florian@openwrt.org>
` (12 preceding siblings ...)
2012-10-03 15:03 ` [PATCH 13/25] USB: ohci: allow platform driver to specify the number of ports Florian Fainelli
@ 2012-10-03 15:03 ` Florian Fainelli
2012-10-03 15:03 ` [PATCH 14/25] MIPS: PNX8550: useOHCI " Florian Fainelli
` (11 subsequent siblings)
25 siblings, 0 replies; 44+ messages in thread
From: Florian Fainelli @ 2012-10-03 15:03 UTC (permalink / raw)
To: stern; +Cc: linux-usb, Florian Fainelli, Ralf Baechle, linux-mips,
linux-kernel
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
arch/mips/pnx8550/common/platform.c | 31 ++++++++++++++++++++++++++++++-
1 file changed, 30 insertions(+), 1 deletion(-)
diff --git a/arch/mips/pnx8550/common/platform.c b/arch/mips/pnx8550/common/platform.c
index 5264cc0..0a8faea 100644
--- a/arch/mips/pnx8550/common/platform.c
+++ b/arch/mips/pnx8550/common/platform.c
@@ -20,6 +20,7 @@
#include <linux/serial.h>
#include <linux/serial_pnx8xxx.h>
#include <linux/platform_device.h>
+#include <linux/usb/ohci_pdriver.h>
#include <int.h>
#include <usb.h>
@@ -96,12 +97,40 @@ static u64 ohci_dmamask = DMA_BIT_MASK(32);
static u64 uart_dmamask = DMA_BIT_MASK(32);
+static int pnx8550_usb_ohci_power_on(struct platform_device *pdev)
+{
+ /*
+ * Set register CLK48CTL to enable and 48MHz
+ */
+ outl(0x00000003, PCI_BASE | 0x0004770c);
+
+ /*
+ * Set register CLK12CTL to enable and 48MHz
+ */
+ outl(0x00000003, PCI_BASE | 0x00047710);
+
+ udelay(100);
+
+ return 0;
+}
+
+static void pnx8550_usb_ohci_power_off(struct platform_device *pdev)
+{
+ udelay(10);
+}
+
+static struct usb_ohci_pdata pnx8550_usb_ohci_pdata = {
+ .power_on = pnx8550_usb_ohci_power_on,
+ .power_off = pnx8550_usb_ohci_power_off,
+};
+
static struct platform_device pnx8550_usb_ohci_device = {
- .name = "pnx8550-ohci",
+ .name = "ohci-platform",
.id = -1,
.dev = {
.dma_mask = &ohci_dmamask,
.coherent_dma_mask = DMA_BIT_MASK(32),
+ .platform_data = &pnx8550_usb_ohci_pdata,
},
.num_resources = ARRAY_SIZE(pnx8550_usb_ohci_resources),
.resource = pnx8550_usb_ohci_resources,
--
1.7.9.5
^ permalink raw reply related [flat|nested] 44+ messages in thread
* [PATCH 14/25] MIPS: PNX8550: useOHCI platform driver
[not found] <1349276601-8371-1-git-send-email-florian@openwrt.org>
` (13 preceding siblings ...)
2012-10-03 15:03 ` [PATCH 14/25] MIPS: PNX8550: use OHCI platform driver Florian Fainelli
@ 2012-10-03 15:03 ` Florian Fainelli
2012-10-03 15:03 ` [PATCH 15/25] USB: ohci: remove PNX8550 OHCI driver Florian Fainelli
` (10 subsequent siblings)
25 siblings, 0 replies; 44+ messages in thread
From: Florian Fainelli @ 2012-10-03 15:03 UTC (permalink / raw)
To: stern; +Cc: linux-usb, Florian Fainelli, Ralf Baechle, linux-mips,
linux-kernel
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
arch/mips/pnx8550/common/platform.c | 31 ++++++++++++++++++++++++++++++-
1 file changed, 30 insertions(+), 1 deletion(-)
diff --git a/arch/mips/pnx8550/common/platform.c b/arch/mips/pnx8550/common/platform.c
index 5264cc0..0a8faea 100644
--- a/arch/mips/pnx8550/common/platform.c
+++ b/arch/mips/pnx8550/common/platform.c
@@ -20,6 +20,7 @@
#include <linux/serial.h>
#include <linux/serial_pnx8xxx.h>
#include <linux/platform_device.h>
+#include <linux/usb/ohci_pdriver.h>
#include <int.h>
#include <usb.h>
@@ -96,12 +97,40 @@ static u64 ohci_dmamask = DMA_BIT_MASK(32);
static u64 uart_dmamask = DMA_BIT_MASK(32);
+static int pnx8550_usb_ohci_power_on(struct platform_device *pdev)
+{
+ /*
+ * Set register CLK48CTL to enable and 48MHz
+ */
+ outl(0x00000003, PCI_BASE | 0x0004770c);
+
+ /*
+ * Set register CLK12CTL to enable and 48MHz
+ */
+ outl(0x00000003, PCI_BASE | 0x00047710);
+
+ udelay(100);
+
+ return 0;
+}
+
+static void pnx8550_usb_ohci_power_off(struct platform_device *pdev)
+{
+ udelay(10);
+}
+
+static struct usb_ohci_pdata pnx8550_usb_ohci_pdata = {
+ .power_on = pnx8550_usb_ohci_power_on,
+ .power_off = pnx8550_usb_ohci_power_off,
+};
+
static struct platform_device pnx8550_usb_ohci_device = {
- .name = "pnx8550-ohci",
+ .name = "ohci-platform",
.id = -1,
.dev = {
.dma_mask = &ohci_dmamask,
.coherent_dma_mask = DMA_BIT_MASK(32),
+ .platform_data = &pnx8550_usb_ohci_pdata,
},
.num_resources = ARRAY_SIZE(pnx8550_usb_ohci_resources),
.resource = pnx8550_usb_ohci_resources,
--
1.7.9.5
^ permalink raw reply related [flat|nested] 44+ messages in thread
* [PATCH 15/25] USB: ohci: remove PNX8550 OHCI driver
[not found] <1349276601-8371-1-git-send-email-florian@openwrt.org>
` (14 preceding siblings ...)
2012-10-03 15:03 ` [PATCH 14/25] MIPS: PNX8550: useOHCI " Florian Fainelli
@ 2012-10-03 15:03 ` Florian Fainelli
2012-10-03 15:03 ` [PATCH 16/25] ARM: cns3xxx: use OHCI platform driver Florian Fainelli
` (9 subsequent siblings)
25 siblings, 0 replies; 44+ messages in thread
From: Florian Fainelli @ 2012-10-03 15:03 UTC (permalink / raw)
To: stern; +Cc: linux-usb, Florian Fainelli, Greg Kroah-Hartman, linux-kernel
The users have been converted to use the platform OHCI driver instead.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/usb/host/ohci-hcd.c | 5 -
drivers/usb/host/ohci-pnx8550.c | 243 ---------------------------------------
2 files changed, 248 deletions(-)
delete mode 100644 drivers/usb/host/ohci-pnx8550.c
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 2b1e8d8..17ed0a8 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -1034,11 +1034,6 @@ MODULE_LICENSE ("GPL");
#define PLATFORM_DRIVER ohci_hcd_au1xxx_driver
#endif
-#ifdef CONFIG_PNX8550
-#include "ohci-pnx8550.c"
-#define PLATFORM_DRIVER ohci_hcd_pnx8550_driver
-#endif
-
#ifdef CONFIG_USB_OHCI_HCD_PPC_SOC
#include "ohci-ppc-soc.c"
#define PLATFORM_DRIVER ohci_hcd_ppc_soc_driver
diff --git a/drivers/usb/host/ohci-pnx8550.c b/drivers/usb/host/ohci-pnx8550.c
deleted file mode 100644
index 148d27d..0000000
--- a/drivers/usb/host/ohci-pnx8550.c
+++ /dev/null
@@ -1,243 +0,0 @@
-/*
- * OHCI HCD (Host Controller Driver) for USB.
- *
- * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
- * (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
- * (C) Copyright 2002 Hewlett-Packard Company
- * (C) Copyright 2005 Embedded Alley Solutions, Inc.
- *
- * Bus Glue for PNX8550
- *
- * Written by Christopher Hoover <ch@hpl.hp.com>
- * Based on fragments of previous driver by Russell King et al.
- *
- * Modified for LH7A404 from ohci-sa1111.c
- * by Durgesh Pattamatta <pattamattad@sharpsec.com>
- *
- * Modified for PNX8550 from ohci-sa1111.c and sa-omap.c
- * by Vitaly Wool <vitalywool@gmail.com>
- *
- * This file is licenced under the GPL.
- */
-
-#include <linux/device.h>
-#include <linux/platform_device.h>
-#include <asm/mach-pnx8550/usb.h>
-#include <asm/mach-pnx8550/int.h>
-#include <asm/mach-pnx8550/pci.h>
-
-#ifndef CONFIG_PNX8550
-#error "This file is PNX8550 bus glue. CONFIG_PNX8550 must be defined."
-#endif
-
-extern int usb_disabled(void);
-
-/*-------------------------------------------------------------------------*/
-
-static void pnx8550_start_hc(struct platform_device *dev)
-{
- /*
- * Set register CLK48CTL to enable and 48MHz
- */
- outl(0x00000003, PCI_BASE | 0x0004770c);
-
- /*
- * Set register CLK12CTL to enable and 48MHz
- */
- outl(0x00000003, PCI_BASE | 0x00047710);
-
- udelay(100);
-}
-
-static void pnx8550_stop_hc(struct platform_device *dev)
-{
- udelay(10);
-}
-
-
-/*-------------------------------------------------------------------------*/
-
-/* configure so an HC device and id are always provided */
-/* always called with process context; sleeping is OK */
-
-
-/**
- * usb_hcd_pnx8550_probe - initialize pnx8550-based HCDs
- * Context: !in_interrupt()
- *
- * Allocates basic resources for this USB host controller, and
- * then invokes the start() method for the HCD associated with it
- * through the hotplug entry's driver_data.
- *
- */
-int usb_hcd_pnx8550_probe (const struct hc_driver *driver,
- struct platform_device *dev)
-{
- int retval;
- struct usb_hcd *hcd;
-
- if (dev->resource[0].flags != IORESOURCE_MEM ||
- dev->resource[1].flags != IORESOURCE_IRQ) {
- dev_err (&dev->dev,"invalid resource type\n");
- return -ENOMEM;
- }
-
- hcd = usb_create_hcd (driver, &dev->dev, "pnx8550");
- if (!hcd)
- return -ENOMEM;
- hcd->rsrc_start = dev->resource[0].start;
- hcd->rsrc_len = dev->resource[0].end - dev->resource[0].start + 1;
-
- if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
- dev_err(&dev->dev, "request_mem_region [0x%08llx, 0x%08llx] "
- "failed\n", hcd->rsrc_start, hcd->rsrc_len);
- retval = -EBUSY;
- goto err1;
- }
-
- hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
- if (!hcd->regs) {
- dev_err(&dev->dev, "ioremap [[0x%08llx, 0x%08llx] failed\n",
- hcd->rsrc_start, hcd->rsrc_len);
- retval = -ENOMEM;
- goto err2;
- }
-
- pnx8550_start_hc(dev);
-
- ohci_hcd_init(hcd_to_ohci(hcd));
-
- retval = usb_add_hcd(hcd, dev->resource[1].start, 0);
- if (retval == 0)
- return retval;
-
- pnx8550_stop_hc(dev);
- iounmap(hcd->regs);
- err2:
- release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
- err1:
- usb_put_hcd(hcd);
- return retval;
-}
-
-
-/* may be called without controller electrically present */
-/* may be called with controller, bus, and devices active */
-
-/**
- * usb_hcd_pnx8550_remove - shutdown processing for pnx8550-based HCDs
- * @dev: USB Host Controller being removed
- * Context: !in_interrupt()
- *
- * Reverses the effect of usb_hcd_pnx8550_probe(), first invoking
- * the HCD's stop() method. It is always called from a thread
- * context, normally "rmmod", "apmd", or something similar.
- *
- */
-void usb_hcd_pnx8550_remove (struct usb_hcd *hcd, struct platform_device *dev)
-{
- usb_remove_hcd(hcd);
- pnx8550_stop_hc(dev);
- iounmap(hcd->regs);
- release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
- usb_put_hcd(hcd);
-}
-
-/*-------------------------------------------------------------------------*/
-
-static int __devinit
-ohci_pnx8550_start (struct usb_hcd *hcd)
-{
- struct ohci_hcd *ohci = hcd_to_ohci (hcd);
- int ret;
-
- ohci_dbg (ohci, "ohci_pnx8550_start, ohci:%p", ohci);
-
- if ((ret = ohci_init(ohci)) < 0)
- return ret;
-
- if ((ret = ohci_run (ohci)) < 0) {
- dev_err(hcd->self.controller, "can't start %s",
- hcd->self.bus_name);
- ohci_stop (hcd);
- return ret;
- }
-
- return 0;
-}
-
-/*-------------------------------------------------------------------------*/
-
-static const struct hc_driver ohci_pnx8550_hc_driver = {
- .description = hcd_name,
- .product_desc = "PNX8550 OHCI",
- .hcd_priv_size = sizeof(struct ohci_hcd),
-
- /*
- * generic hardware linkage
- */
- .irq = ohci_irq,
- .flags = HCD_USB11 | HCD_MEMORY,
-
- /*
- * basic lifecycle operations
- */
- .start = ohci_pnx8550_start,
- .stop = ohci_stop,
-
- /*
- * managing i/o requests and associated device resources
- */
- .urb_enqueue = ohci_urb_enqueue,
- .urb_dequeue = ohci_urb_dequeue,
- .endpoint_disable = ohci_endpoint_disable,
-
- /*
- * scheduling support
- */
- .get_frame_number = ohci_get_frame,
-
- /*
- * root hub support
- */
- .hub_status_data = ohci_hub_status_data,
- .hub_control = ohci_hub_control,
-#ifdef CONFIG_PM
- .bus_suspend = ohci_bus_suspend,
- .bus_resume = ohci_bus_resume,
-#endif
- .start_port_reset = ohci_start_port_reset,
-};
-
-/*-------------------------------------------------------------------------*/
-
-static int ohci_hcd_pnx8550_drv_probe(struct platform_device *pdev)
-{
- int ret;
-
- if (usb_disabled())
- return -ENODEV;
-
- ret = usb_hcd_pnx8550_probe(&ohci_pnx8550_hc_driver, pdev);
- return ret;
-}
-
-static int ohci_hcd_pnx8550_drv_remove(struct platform_device *pdev)
-{
- struct usb_hcd *hcd = platform_get_drvdata(pdev);
-
- usb_hcd_pnx8550_remove(hcd, pdev);
- return 0;
-}
-
-MODULE_ALIAS("platform:pnx8550-ohci");
-
-static struct platform_driver ohci_hcd_pnx8550_driver = {
- .driver = {
- .name = "pnx8550-ohci",
- .owner = THIS_MODULE,
- },
- .probe = ohci_hcd_pnx8550_drv_probe,
- .remove = ohci_hcd_pnx8550_drv_remove,
-};
-
--
1.7.9.5
^ permalink raw reply related [flat|nested] 44+ messages in thread
* [PATCH 16/25] ARM: cns3xxx: use OHCI platform driver
[not found] <1349276601-8371-1-git-send-email-florian@openwrt.org>
` (15 preceding siblings ...)
2012-10-03 15:03 ` [PATCH 15/25] USB: ohci: remove PNX8550 OHCI driver Florian Fainelli
@ 2012-10-03 15:03 ` Florian Fainelli
2012-10-03 15:03 ` [PATCH 17/25] USB: ohci: remove CNS3xxx " Florian Fainelli
` (8 subsequent siblings)
25 siblings, 0 replies; 44+ messages in thread
From: Florian Fainelli @ 2012-10-03 15:03 UTC (permalink / raw)
To: stern
Cc: linux-usb, Florian Fainelli, Anton Vorontsov, Russell King,
linux-arm-kernel, linux-kernel
Since both the EHCI and OHCI platform drivers use the same power_{on,off}
callbacks, rename them to cns3xx_usb_power_{on,off} to show that they are
shared.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
arch/arm/mach-cns3xxx/cns3420vb.c | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-cns3xxx/cns3420vb.c b/arch/arm/mach-cns3xxx/cns3420vb.c
index 906094c..8a00cee8 100644
--- a/arch/arm/mach-cns3xxx/cns3420vb.c
+++ b/arch/arm/mach-cns3xxx/cns3420vb.c
@@ -25,6 +25,7 @@
#include <linux/mtd/physmap.h>
#include <linux/mtd/partitions.h>
#include <linux/usb/ehci_pdriver.h>
+#include <linux/usb/ohci_pdriver.h>
#include <asm/setup.h>
#include <asm/mach-types.h>
#include <asm/hardware/gic.h>
@@ -127,7 +128,7 @@ static struct resource cns3xxx_usb_ehci_resources[] = {
static u64 cns3xxx_usb_ehci_dma_mask = DMA_BIT_MASK(32);
-static int csn3xxx_usb_ehci_power_on(struct platform_device *pdev)
+static int csn3xxx_usb_power_on(struct platform_device *pdev)
{
/*
* EHCI and OHCI share the same clock and power,
@@ -148,7 +149,7 @@ static int csn3xxx_usb_ehci_power_on(struct platform_device *pdev)
return 0;
}
-static void csn3xxx_usb_ehci_power_off(struct platform_device *pdev)
+static void csn3xxx_usb_power_off(struct platform_device *pdev)
{
/*
* EHCI and OHCI share the same clock and power,
@@ -162,8 +163,8 @@ static void csn3xxx_usb_ehci_power_off(struct platform_device *pdev)
static struct usb_ehci_pdata cns3xxx_usb_ehci_pdata = {
.port_power_off = 1,
- .power_on = csn3xxx_usb_ehci_power_on,
- .power_off = csn3xxx_usb_ehci_power_off,
+ .power_on = csn3xxx_usb_power_on,
+ .power_off = csn3xxx_usb_power_off,
};
static struct platform_device cns3xxx_usb_ehci_device = {
@@ -191,13 +192,20 @@ static struct resource cns3xxx_usb_ohci_resources[] = {
static u64 cns3xxx_usb_ohci_dma_mask = DMA_BIT_MASK(32);
+static struct usb_ohci_pdata cns3xxx_usb_ohci_pdata = {
+ .num_ports = 1,
+ .power_on = csn3xxx_usb_power_on,
+ .power_off = csn3xxx_usb_power_off,
+};
+
static struct platform_device cns3xxx_usb_ohci_device = {
- .name = "cns3xxx-ohci",
+ .name = "ohci-platform",
.num_resources = ARRAY_SIZE(cns3xxx_usb_ohci_resources),
.resource = cns3xxx_usb_ohci_resources,
.dev = {
.dma_mask = &cns3xxx_usb_ohci_dma_mask,
.coherent_dma_mask = DMA_BIT_MASK(32),
+ .platform_data = &cns3xxx_usb_ohci_pdata,
},
};
--
1.7.9.5
^ permalink raw reply related [flat|nested] 44+ messages in thread
* [PATCH 17/25] USB: ohci: remove CNS3xxx OHCI platform driver
[not found] <1349276601-8371-1-git-send-email-florian@openwrt.org>
` (16 preceding siblings ...)
2012-10-03 15:03 ` [PATCH 16/25] ARM: cns3xxx: use OHCI platform driver Florian Fainelli
@ 2012-10-03 15:03 ` Florian Fainelli
2012-10-03 15:03 ` [PATCH 18/25] MIPS: Octeon: use " Florian Fainelli
` (7 subsequent siblings)
25 siblings, 0 replies; 44+ messages in thread
From: Florian Fainelli @ 2012-10-03 15:03 UTC (permalink / raw)
To: stern
Cc: linux-usb, Florian Fainelli, Greg Kroah-Hartman, Hauke Mehrtens,
Felipe Balbi, linux-kernel
All users have been converted to use the OHCI platform driver instead.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/usb/host/Kconfig | 6 +-
drivers/usb/host/ohci-cns3xxx.c | 166 ---------------------------------------
drivers/usb/host/ohci-hcd.c | 5 --
3 files changed, 5 insertions(+), 172 deletions(-)
delete mode 100644 drivers/usb/host/ohci-cns3xxx.c
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 0754dd1..3742f73 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -410,9 +410,13 @@ config USB_OHCI_EXYNOS
Enable support for the Samsung Exynos SOC's on-chip OHCI controller.
config USB_CNS3XXX_OHCI
- bool "Cavium CNS3XXX OHCI Module"
+ bool "Cavium CNS3XXX OHCI Module (DEPRECATED)"
depends on USB_OHCI_HCD && ARCH_CNS3XXX
+ select USB_OHCI_HCD_PLATFORM
---help---
+ This option is deprecated now and the driver was removed, use
+ USB_OHCI_HCD_PLATFORM instead.
+
Enable support for the CNS3XXX SOC's on-chip OHCI controller.
It is needed for low-speed USB 1.0 device support.
diff --git a/drivers/usb/host/ohci-cns3xxx.c b/drivers/usb/host/ohci-cns3xxx.c
deleted file mode 100644
index 2c9f233..0000000
--- a/drivers/usb/host/ohci-cns3xxx.c
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Copyright 2008 Cavium Networks
- *
- * 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/platform_device.h>
-#include <linux/atomic.h>
-#include <mach/cns3xxx.h>
-#include <mach/pm.h>
-
-static int __devinit
-cns3xxx_ohci_start(struct usb_hcd *hcd)
-{
- struct ohci_hcd *ohci = hcd_to_ohci(hcd);
- int ret;
-
- /*
- * EHCI and OHCI share the same clock and power,
- * resetting twice would cause the 1st controller been reset.
- * Therefore only do power up at the first up device, and
- * power down at the last down device.
- *
- * Set USB AHB INCR length to 16
- */
- if (atomic_inc_return(&usb_pwr_ref) == 1) {
- cns3xxx_pwr_power_up(1 << PM_PLL_HM_PD_CTRL_REG_OFFSET_PLL_USB);
- cns3xxx_pwr_clk_en(1 << PM_CLK_GATE_REG_OFFSET_USB_HOST);
- cns3xxx_pwr_soft_rst(1 << PM_SOFT_RST_REG_OFFST_USB_HOST);
- __raw_writel((__raw_readl(MISC_CHIP_CONFIG_REG) | (0X2 << 24)),
- MISC_CHIP_CONFIG_REG);
- }
-
- ret = ohci_init(ohci);
- if (ret < 0)
- return ret;
-
- ohci->num_ports = 1;
-
- ret = ohci_run(ohci);
- if (ret < 0) {
- dev_err(hcd->self.controller, "can't start %s\n",
- hcd->self.bus_name);
- ohci_stop(hcd);
- return ret;
- }
- return 0;
-}
-
-static const struct hc_driver cns3xxx_ohci_hc_driver = {
- .description = hcd_name,
- .product_desc = "CNS3XXX OHCI Host controller",
- .hcd_priv_size = sizeof(struct ohci_hcd),
- .irq = ohci_irq,
- .flags = HCD_USB11 | HCD_MEMORY,
- .start = cns3xxx_ohci_start,
- .stop = ohci_stop,
- .shutdown = ohci_shutdown,
- .urb_enqueue = ohci_urb_enqueue,
- .urb_dequeue = ohci_urb_dequeue,
- .endpoint_disable = ohci_endpoint_disable,
- .get_frame_number = ohci_get_frame,
- .hub_status_data = ohci_hub_status_data,
- .hub_control = ohci_hub_control,
-#ifdef CONFIG_PM
- .bus_suspend = ohci_bus_suspend,
- .bus_resume = ohci_bus_resume,
-#endif
- .start_port_reset = ohci_start_port_reset,
-};
-
-static int cns3xxx_ohci_probe(struct platform_device *pdev)
-{
- struct device *dev = &pdev->dev;
- struct usb_hcd *hcd;
- const struct hc_driver *driver = &cns3xxx_ohci_hc_driver;
- struct resource *res;
- int irq;
- int retval;
-
- if (usb_disabled())
- return -ENODEV;
-
- res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
- if (!res) {
- dev_err(dev, "Found HC with no IRQ.\n");
- return -ENODEV;
- }
- irq = res->start;
-
- hcd = usb_create_hcd(driver, dev, dev_name(dev));
- if (!hcd)
- return -ENOMEM;
-
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res) {
- dev_err(dev, "Found HC with no register addr.\n");
- retval = -ENODEV;
- goto err1;
- }
- hcd->rsrc_start = res->start;
- hcd->rsrc_len = resource_size(res);
-
- if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len,
- driver->description)) {
- dev_dbg(dev, "controller already in use\n");
- retval = -EBUSY;
- goto err1;
- }
-
- hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
- if (!hcd->regs) {
- dev_dbg(dev, "error mapping memory\n");
- retval = -EFAULT;
- goto err2;
- }
-
- ohci_hcd_init(hcd_to_ohci(hcd));
-
- retval = usb_add_hcd(hcd, irq, IRQF_SHARED);
- if (retval == 0)
- return retval;
-
- iounmap(hcd->regs);
-err2:
- release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
-err1:
- usb_put_hcd(hcd);
- return retval;
-}
-
-static int cns3xxx_ohci_remove(struct platform_device *pdev)
-{
- struct usb_hcd *hcd = platform_get_drvdata(pdev);
-
- usb_remove_hcd(hcd);
- iounmap(hcd->regs);
- release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
-
- /*
- * EHCI and OHCI share the same clock and power,
- * resetting twice would cause the 1st controller been reset.
- * Therefore only do power up at the first up device, and
- * power down at the last down device.
- */
- if (atomic_dec_return(&usb_pwr_ref) == 0)
- cns3xxx_pwr_clk_dis(1 << PM_CLK_GATE_REG_OFFSET_USB_HOST);
-
- usb_put_hcd(hcd);
-
- platform_set_drvdata(pdev, NULL);
-
- return 0;
-}
-
-MODULE_ALIAS("platform:cns3xxx-ohci");
-
-static struct platform_driver ohci_hcd_cns3xxx_driver = {
- .probe = cns3xxx_ohci_probe,
- .remove = cns3xxx_ohci_remove,
- .driver = {
- .name = "cns3xxx-ohci",
- },
-};
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 17ed0a8..5648f09 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -1100,11 +1100,6 @@ MODULE_LICENSE ("GPL");
#define PLATFORM_DRIVER ohci_hcd_tilegx_driver
#endif
-#ifdef CONFIG_USB_CNS3XXX_OHCI
-#include "ohci-cns3xxx.c"
-#define PLATFORM_DRIVER ohci_hcd_cns3xxx_driver
-#endif
-
#ifdef CONFIG_CPU_XLR
#include "ohci-xls.c"
#define PLATFORM_DRIVER ohci_xls_driver
--
1.7.9.5
^ permalink raw reply related [flat|nested] 44+ messages in thread
* [PATCH 18/25] MIPS: Octeon: use OHCI platform driver
[not found] <1349276601-8371-1-git-send-email-florian@openwrt.org>
` (17 preceding siblings ...)
2012-10-03 15:03 ` [PATCH 17/25] USB: ohci: remove CNS3xxx " Florian Fainelli
@ 2012-10-03 15:03 ` Florian Fainelli
2012-10-03 16:47 ` David Daney
2012-10-03 15:03 ` [PATCH 19/25] USB: ohci: remove Octeon " Florian Fainelli
` (6 subsequent siblings)
25 siblings, 1 reply; 44+ messages in thread
From: Florian Fainelli @ 2012-10-03 15:03 UTC (permalink / raw)
To: stern
Cc: linux-usb, Florian Fainelli, Ralf Baechle, David Daney,
David S. Miller, Wolfram Sang, linux-mips, linux-kernel
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
arch/mips/cavium-octeon/octeon-platform.c | 37 ++++++++++++++++++++++++++++-
1 file changed, 36 insertions(+), 1 deletion(-)
diff --git a/arch/mips/cavium-octeon/octeon-platform.c b/arch/mips/cavium-octeon/octeon-platform.c
index 539e1bc..07b0a3b 100644
--- a/arch/mips/cavium-octeon/octeon-platform.c
+++ b/arch/mips/cavium-octeon/octeon-platform.c
@@ -19,6 +19,7 @@
#include <linux/of_fdt.h>
#include <linux/libfdt.h>
#include <linux/usb/ehci_pdriver.h>
+#include <linux/usb/ohci_pdriver.h>
#include <asm/octeon/octeon.h>
#include <asm/octeon/cvmx-rnm-defs.h>
@@ -260,6 +261,36 @@ out:
}
device_initcall(octeon_ehci_device_init);
+static int octeon_ohci_power_on(struct platform_device *pdev)
+{
+ union cvmx_uctlx_ohci_ctl ohci_ctl;
+
+ octeon2_usb_clocks_start();
+
+ ohci_ctl.u64 = cvmx_read_csr(CVMX_UCTLX_OHCI_CTL(0));
+ ohci_ctl.s.l2c_addr_msb = 0;
+ ohci_ctl.s.l2c_buff_emod = 1; /* Byte swapped. */
+ ohci_ctl.s.l2c_desc_emod = 1; /* Byte swapped. */
+ cvmx_write_csr(CVMX_UCTLX_OHCI_CTL(0), ohci_ctl.u64);
+
+ return 0;
+}
+
+static octeon_ohci_power_off(struct platform_device *pdev)
+{
+ octeon2_usb_clocks_stop();
+}
+
+static struct usb_ohci_pdata octeon_ohci_pdata = {
+#ifdef __BIG_ENDIAN
+ .big_endian_mmio = 1,
+#endif
+ .power_on = octeon_ohci_power_on,
+ .power_off = octeon_ohci_power_off,
+};
+
+static u32 octeon_ohci_dma_mask = DMA_BIT_MASK(32);
+
static int __init octeon_ohci_device_init(void)
{
struct platform_device *pd;
@@ -280,7 +311,7 @@ static int __init octeon_ohci_device_init(void)
if (octeon_is_simulation() || usb_disabled())
return 0; /* No USB in the simulator. */
- pd = platform_device_alloc("octeon-ohci", 0);
+ pd = platform_device_alloc("ohci-platform", 0);
if (!pd) {
ret = -ENOMEM;
goto out;
@@ -297,6 +328,10 @@ static int __init octeon_ohci_device_init(void)
if (ret)
goto fail;
+ pd.dev.platform_data = &octeon_ohci_pdata;
+ pd.dev.coherent_dma_mask = DMA_BIT_MASK(32);
+ pd.dev.dma_mask = &octeon_ohci_dma_mask;
+
ret = platform_device_add(pd);
if (ret)
goto fail;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 44+ messages in thread
* [PATCH 19/25] USB: ohci: remove Octeon OHCI platform driver
[not found] <1349276601-8371-1-git-send-email-florian@openwrt.org>
` (18 preceding siblings ...)
2012-10-03 15:03 ` [PATCH 18/25] MIPS: Octeon: use " Florian Fainelli
@ 2012-10-03 15:03 ` Florian Fainelli
2012-10-03 15:03 ` [PATCH 20/25] MIPS: Netlogic: convert to use " Florian Fainelli
` (5 subsequent siblings)
25 siblings, 0 replies; 44+ messages in thread
From: Florian Fainelli @ 2012-10-03 15:03 UTC (permalink / raw)
To: stern
Cc: linux-usb, Florian Fainelli, Greg Kroah-Hartman, Hauke Mehrtens,
Felipe Balbi, linux-kernel
All users have been converted to use the OHCI platform driver instead.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/usb/host/Kconfig | 6 +-
drivers/usb/host/ohci-hcd.c | 5 -
drivers/usb/host/ohci-octeon.c | 214 ----------------------------------------
3 files changed, 5 insertions(+), 220 deletions(-)
delete mode 100644 drivers/usb/host/ohci-octeon.c
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 3742f73..e9c277b 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -650,12 +650,16 @@ config USB_OCTEON_EHCI
supported.
config USB_OCTEON_OHCI
- bool "Octeon on-chip OHCI support"
+ bool "Octeon on-chip OHCI support (DEPRECATED)"
depends on USB && USB_OHCI_HCD && CPU_CAVIUM_OCTEON
default USB_OCTEON_EHCI
select USB_OHCI_BIG_ENDIAN_MMIO
select USB_OHCI_LITTLE_ENDIAN
+ select USB_EHCI_HCD_PLATFORM if USB_OHCI_HCD
help
+ This option is deprecated now and the driver was removed, use
+ USB_OHCI_HCD_PLATFORM instead.
+
Enable support for the Octeon II SOC's on-chip OHCI
controller. It is needed for low-speed USB 1.0 device
support. All CN6XXX based chips with USB are supported.
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 5648f09..b099024 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -1090,11 +1090,6 @@ MODULE_LICENSE ("GPL");
#define PLATFORM_DRIVER ohci_hcd_jz4740_driver
#endif
-#ifdef CONFIG_USB_OCTEON_OHCI
-#include "ohci-octeon.c"
-#define PLATFORM_DRIVER ohci_octeon_driver
-#endif
-
#ifdef CONFIG_TILE_USB
#include "ohci-tilegx.c"
#define PLATFORM_DRIVER ohci_hcd_tilegx_driver
diff --git a/drivers/usb/host/ohci-octeon.c b/drivers/usb/host/ohci-octeon.c
deleted file mode 100644
index d469bf9..0000000
--- a/drivers/usb/host/ohci-octeon.c
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- * EHCI HCD glue for Cavium Octeon II SOCs.
- *
- * Loosely based on ehci-au1xxx.c
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2010 Cavium Networks
- *
- */
-
-#include <linux/platform_device.h>
-
-#include <asm/octeon/octeon.h>
-#include <asm/octeon/cvmx-uctlx-defs.h>
-
-#define OCTEON_OHCI_HCD_NAME "octeon-ohci"
-
-/* Common clock init code. */
-void octeon2_usb_clocks_start(void);
-void octeon2_usb_clocks_stop(void);
-
-static void ohci_octeon_hw_start(void)
-{
- union cvmx_uctlx_ohci_ctl ohci_ctl;
-
- octeon2_usb_clocks_start();
-
- ohci_ctl.u64 = cvmx_read_csr(CVMX_UCTLX_OHCI_CTL(0));
- ohci_ctl.s.l2c_addr_msb = 0;
- ohci_ctl.s.l2c_buff_emod = 1; /* Byte swapped. */
- ohci_ctl.s.l2c_desc_emod = 1; /* Byte swapped. */
- cvmx_write_csr(CVMX_UCTLX_OHCI_CTL(0), ohci_ctl.u64);
-
-}
-
-static void ohci_octeon_hw_stop(void)
-{
- /* Undo ohci_octeon_start() */
- octeon2_usb_clocks_stop();
-}
-
-static int __devinit ohci_octeon_start(struct usb_hcd *hcd)
-{
- struct ohci_hcd *ohci = hcd_to_ohci(hcd);
- int ret;
-
- ret = ohci_init(ohci);
-
- if (ret < 0)
- return ret;
-
- ret = ohci_run(ohci);
-
- if (ret < 0) {
- ohci_err(ohci, "can't start %s", hcd->self.bus_name);
- ohci_stop(hcd);
- return ret;
- }
-
- return 0;
-}
-
-static const struct hc_driver ohci_octeon_hc_driver = {
- .description = hcd_name,
- .product_desc = "Octeon OHCI",
- .hcd_priv_size = sizeof(struct ohci_hcd),
-
- /*
- * generic hardware linkage
- */
- .irq = ohci_irq,
- .flags = HCD_USB11 | HCD_MEMORY,
-
- /*
- * basic lifecycle operations
- */
- .start = ohci_octeon_start,
- .stop = ohci_stop,
- .shutdown = ohci_shutdown,
-
- /*
- * managing i/o requests and associated device resources
- */
- .urb_enqueue = ohci_urb_enqueue,
- .urb_dequeue = ohci_urb_dequeue,
- .endpoint_disable = ohci_endpoint_disable,
-
- /*
- * scheduling support
- */
- .get_frame_number = ohci_get_frame,
-
- /*
- * root hub support
- */
- .hub_status_data = ohci_hub_status_data,
- .hub_control = ohci_hub_control,
-
- .start_port_reset = ohci_start_port_reset,
-};
-
-static int ohci_octeon_drv_probe(struct platform_device *pdev)
-{
- struct usb_hcd *hcd;
- struct ohci_hcd *ohci;
- void *reg_base;
- struct resource *res_mem;
- int irq;
- int ret;
-
- if (usb_disabled())
- return -ENODEV;
-
- irq = platform_get_irq(pdev, 0);
- if (irq < 0) {
- dev_err(&pdev->dev, "No irq assigned\n");
- return -ENODEV;
- }
-
- res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (res_mem == NULL) {
- dev_err(&pdev->dev, "No register space assigned\n");
- return -ENODEV;
- }
-
- /* Ohci is a 32-bit device. */
- pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
- pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask;
-
- hcd = usb_create_hcd(&ohci_octeon_hc_driver, &pdev->dev, "octeon");
- if (!hcd)
- return -ENOMEM;
-
- hcd->rsrc_start = res_mem->start;
- hcd->rsrc_len = resource_size(res_mem);
-
- if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len,
- OCTEON_OHCI_HCD_NAME)) {
- dev_err(&pdev->dev, "request_mem_region failed\n");
- ret = -EBUSY;
- goto err1;
- }
-
- reg_base = ioremap(hcd->rsrc_start, hcd->rsrc_len);
- if (!reg_base) {
- dev_err(&pdev->dev, "ioremap failed\n");
- ret = -ENOMEM;
- goto err2;
- }
-
- ohci_octeon_hw_start();
-
- hcd->regs = reg_base;
-
- ohci = hcd_to_ohci(hcd);
-
- /* Octeon OHCI matches CPU endianness. */
-#ifdef __BIG_ENDIAN
- ohci->flags |= OHCI_QUIRK_BE_MMIO;
-#endif
-
- ohci_hcd_init(ohci);
-
- ret = usb_add_hcd(hcd, irq, IRQF_SHARED);
- if (ret) {
- dev_dbg(&pdev->dev, "failed to add hcd with err %d\n", ret);
- goto err3;
- }
-
- platform_set_drvdata(pdev, hcd);
-
- return 0;
-
-err3:
- ohci_octeon_hw_stop();
-
- iounmap(hcd->regs);
-err2:
- release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
-err1:
- usb_put_hcd(hcd);
- return ret;
-}
-
-static int ohci_octeon_drv_remove(struct platform_device *pdev)
-{
- struct usb_hcd *hcd = platform_get_drvdata(pdev);
-
- usb_remove_hcd(hcd);
-
- ohci_octeon_hw_stop();
- iounmap(hcd->regs);
- release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
- usb_put_hcd(hcd);
-
- platform_set_drvdata(pdev, NULL);
-
- return 0;
-}
-
-static struct platform_driver ohci_octeon_driver = {
- .probe = ohci_octeon_drv_probe,
- .remove = ohci_octeon_drv_remove,
- .shutdown = usb_hcd_platform_shutdown,
- .driver = {
- .name = OCTEON_OHCI_HCD_NAME,
- .owner = THIS_MODULE,
- }
-};
-
-MODULE_ALIAS("platform:" OCTEON_OHCI_HCD_NAME);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 44+ messages in thread
* [PATCH 20/25] MIPS: Netlogic: convert to use OHCI platform driver
[not found] <1349276601-8371-1-git-send-email-florian@openwrt.org>
` (19 preceding siblings ...)
2012-10-03 15:03 ` [PATCH 19/25] USB: ohci: remove Octeon " Florian Fainelli
@ 2012-10-03 15:03 ` Florian Fainelli
2012-10-04 10:53 ` Jonas Gorski
2012-10-03 15:03 ` [PATCH 21/25] USB: ohci: remove Netlogic XLS " Florian Fainelli
` (4 subsequent siblings)
25 siblings, 1 reply; 44+ messages in thread
From: Florian Fainelli @ 2012-10-03 15:03 UTC (permalink / raw)
To: stern
Cc: linux-usb, Florian Fainelli, Ralf Baechle, Jayachandran C,
linux-mips, linux-kernel
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
arch/mips/netlogic/xlr/platform.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/mips/netlogic/xlr/platform.c b/arch/mips/netlogic/xlr/platform.c
index 320b7ef..755ddcc 100644
--- a/arch/mips/netlogic/xlr/platform.c
+++ b/arch/mips/netlogic/xlr/platform.c
@@ -16,6 +16,7 @@
#include <linux/serial_reg.h>
#include <linux/i2c.h>
#include <linux/usb/ehci_pdriver.h>
+#include <linux/usb/ohci_pdriver.h>
#include <asm/netlogic/haldefs.h>
#include <asm/netlogic/xlr/iomap.h>
@@ -129,6 +130,8 @@ static struct usb_ehci_pdata xls_usb_ehci_pdata = {
.need_io_watchdog = 1,
};
+static struct usb_ohci_pdata xls_usb_ohci_pdata;
+
static struct platform_device xls_usb_ehci_device =
USB_PLATFORM_DEV("ehci-xls", 0, PIC_USB_IRQ);
static struct platform_device xls_usb_ohci_device_0 =
@@ -183,10 +186,12 @@ int xls_platform_usb_init(void)
memres += 0x400;
xls_usb_ohci_device_0.resource[0].start = memres;
xls_usb_ohci_device_0.resource[0].end = memres + 0x400 - 1;
+ xls_usb_ohci_device_0.dev.platform_data = &xls_usb_ohci_pdata;
memres += 0x400;
xls_usb_ohci_device_1.resource[0].start = memres;
xls_usb_ohci_device_1.resource[0].end = memres + 0x400 - 1;
+ xls_usb_ohci_device_1.dev.platform_data = &xls_usb_ohci_pdata;
return platform_add_devices(xls_platform_devices,
ARRAY_SIZE(xls_platform_devices));
--
1.7.9.5
^ permalink raw reply related [flat|nested] 44+ messages in thread
* [PATCH 21/25] USB: ohci: remove Netlogic XLS OHCI platform driver
[not found] <1349276601-8371-1-git-send-email-florian@openwrt.org>
` (20 preceding siblings ...)
2012-10-03 15:03 ` [PATCH 20/25] MIPS: Netlogic: convert to use " Florian Fainelli
@ 2012-10-03 15:03 ` Florian Fainelli
2012-10-03 15:03 ` [PATCH 22/25] sh: convert boards to use the " Florian Fainelli
` (3 subsequent siblings)
25 siblings, 0 replies; 44+ messages in thread
From: Florian Fainelli @ 2012-10-03 15:03 UTC (permalink / raw)
To: stern; +Cc: linux-usb, Florian Fainelli, Greg Kroah-Hartman, linux-kernel
All users have been converted to use the OHCI platform driver instead.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/usb/host/ohci-hcd.c | 5 --
drivers/usb/host/ohci-xls.c | 152 -------------------------------------------
2 files changed, 157 deletions(-)
delete mode 100644 drivers/usb/host/ohci-xls.c
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index b099024..2cafe98 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -1095,11 +1095,6 @@ MODULE_LICENSE ("GPL");
#define PLATFORM_DRIVER ohci_hcd_tilegx_driver
#endif
-#ifdef CONFIG_CPU_XLR
-#include "ohci-xls.c"
-#define PLATFORM_DRIVER ohci_xls_driver
-#endif
-
#ifdef CONFIG_USB_OHCI_HCD_PLATFORM
#include "ohci-platform.c"
#define PLATFORM_DRIVER ohci_platform_driver
diff --git a/drivers/usb/host/ohci-xls.c b/drivers/usb/host/ohci-xls.c
deleted file mode 100644
index 84201cd..0000000
--- a/drivers/usb/host/ohci-xls.c
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * OHCI HCD for Netlogic XLS processors.
- *
- * (C) Copyright 2011 Netlogic Microsystems Inc.
- *
- * Based on ohci-au1xxx.c, and other Linux OHCI drivers.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file COPYING in the main directory of this archive for
- * more details.
- */
-
-#include <linux/platform_device.h>
-#include <linux/signal.h>
-
-static int ohci_xls_probe_internal(const struct hc_driver *driver,
- struct platform_device *dev)
-{
- struct resource *res;
- struct usb_hcd *hcd;
- int retval, irq;
-
- /* Get our IRQ from an earlier registered Platform Resource */
- irq = platform_get_irq(dev, 0);
- if (irq < 0) {
- dev_err(&dev->dev, "Found HC with no IRQ\n");
- return -ENODEV;
- }
-
- /* Get our Memory Handle */
- res = platform_get_resource(dev, IORESOURCE_MEM, 0);
- if (!res) {
- dev_err(&dev->dev, "MMIO Handle incorrect!\n");
- return -ENODEV;
- }
-
- hcd = usb_create_hcd(driver, &dev->dev, "XLS");
- if (!hcd) {
- retval = -ENOMEM;
- goto err1;
- }
- hcd->rsrc_start = res->start;
- hcd->rsrc_len = resource_size(res);
-
- if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len,
- driver->description)) {
- dev_dbg(&dev->dev, "Controller already in use\n");
- retval = -EBUSY;
- goto err2;
- }
-
- hcd->regs = ioremap_nocache(hcd->rsrc_start, hcd->rsrc_len);
- if (hcd->regs == NULL) {
- dev_dbg(&dev->dev, "error mapping memory\n");
- retval = -EFAULT;
- goto err3;
- }
-
- retval = usb_add_hcd(hcd, irq, IRQF_SHARED);
- if (retval != 0)
- goto err4;
- return retval;
-
-err4:
- iounmap(hcd->regs);
-err3:
- release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
-err2:
- usb_put_hcd(hcd);
-err1:
- dev_err(&dev->dev, "init fail, %d\n", retval);
- return retval;
-}
-
-static int ohci_xls_reset(struct usb_hcd *hcd)
-{
- struct ohci_hcd *ohci = hcd_to_ohci(hcd);
-
- ohci_hcd_init(ohci);
- return ohci_init(ohci);
-}
-
-static int __devinit ohci_xls_start(struct usb_hcd *hcd)
-{
- struct ohci_hcd *ohci;
- int ret;
-
- ohci = hcd_to_ohci(hcd);
- ret = ohci_run(ohci);
- if (ret < 0) {
- dev_err(hcd->self.controller, "can't start %s\n",
- hcd->self.bus_name);
- ohci_stop(hcd);
- return ret;
- }
- return 0;
-}
-
-static struct hc_driver ohci_xls_hc_driver = {
- .description = hcd_name,
- .product_desc = "XLS OHCI Host Controller",
- .hcd_priv_size = sizeof(struct ohci_hcd),
- .irq = ohci_irq,
- .flags = HCD_MEMORY | HCD_USB11,
- .reset = ohci_xls_reset,
- .start = ohci_xls_start,
- .stop = ohci_stop,
- .shutdown = ohci_shutdown,
- .urb_enqueue = ohci_urb_enqueue,
- .urb_dequeue = ohci_urb_dequeue,
- .endpoint_disable = ohci_endpoint_disable,
- .get_frame_number = ohci_get_frame,
- .hub_status_data = ohci_hub_status_data,
- .hub_control = ohci_hub_control,
-#ifdef CONFIG_PM
- .bus_suspend = ohci_bus_suspend,
- .bus_resume = ohci_bus_resume,
-#endif
- .start_port_reset = ohci_start_port_reset,
-};
-
-static int ohci_xls_probe(struct platform_device *dev)
-{
- int ret;
-
- pr_debug("In ohci_xls_probe");
- if (usb_disabled())
- return -ENODEV;
- ret = ohci_xls_probe_internal(&ohci_xls_hc_driver, dev);
- return ret;
-}
-
-static int ohci_xls_remove(struct platform_device *dev)
-{
- struct usb_hcd *hcd = platform_get_drvdata(dev);
-
- usb_remove_hcd(hcd);
- iounmap(hcd->regs);
- release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
- usb_put_hcd(hcd);
- return 0;
-}
-
-static struct platform_driver ohci_xls_driver = {
- .probe = ohci_xls_probe,
- .remove = ohci_xls_remove,
- .shutdown = usb_hcd_platform_shutdown,
- .driver = {
- .name = "ohci-xls-0",
- .owner = THIS_MODULE,
- },
-};
--
1.7.9.5
^ permalink raw reply related [flat|nested] 44+ messages in thread
* [PATCH 22/25] sh: convert boards to use the OHCI platform driver
[not found] <1349276601-8371-1-git-send-email-florian@openwrt.org>
` (21 preceding siblings ...)
2012-10-03 15:03 ` [PATCH 21/25] USB: ohci: remove Netlogic XLS " Florian Fainelli
@ 2012-10-03 15:03 ` Florian Fainelli
2012-10-03 15:03 ` [PATCH 23/25] USB: ohci: remove OHCI SH " Florian Fainelli
` (2 subsequent siblings)
25 siblings, 0 replies; 44+ messages in thread
From: Florian Fainelli @ 2012-10-03 15:03 UTC (permalink / raw)
To: stern
Cc: linux-usb, Florian Fainelli, Paul Mundt, Nobuhiro Iwamatsu,
Yoshihiro Shimoda, linux-sh, linux-kernel
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
arch/sh/kernel/cpu/sh3/setup-sh7720.c | 6 +++++-
arch/sh/kernel/cpu/sh4a/setup-sh7757.c | 6 +++++-
arch/sh/kernel/cpu/sh4a/setup-sh7763.c | 6 +++++-
arch/sh/kernel/cpu/sh4a/setup-sh7786.c | 6 +++++-
4 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7720.c b/arch/sh/kernel/cpu/sh3/setup-sh7720.c
index 0c2f1b2..42d991f 100644
--- a/arch/sh/kernel/cpu/sh3/setup-sh7720.c
+++ b/arch/sh/kernel/cpu/sh3/setup-sh7720.c
@@ -20,6 +20,7 @@
#include <linux/serial_sci.h>
#include <linux/sh_timer.h>
#include <linux/sh_intc.h>
+#include <linux/usb/ohci_pdriver.h>
#include <asm/rtc.h>
#include <cpu/serial.h>
@@ -103,12 +104,15 @@ static struct resource usb_ohci_resources[] = {
static u64 usb_ohci_dma_mask = 0xffffffffUL;
+static struct usb_ohci_pdata usb_ohci_pdata;
+
static struct platform_device usb_ohci_device = {
- .name = "sh_ohci",
+ .name = "ohci-platform",
.id = -1,
.dev = {
.dma_mask = &usb_ohci_dma_mask,
.coherent_dma_mask = 0xffffffff,
+ .platform_data = &usb_ohci_pdata,
},
.num_resources = ARRAY_SIZE(usb_ohci_resources),
.resource = usb_ohci_resources,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c b/arch/sh/kernel/cpu/sh4a/setup-sh7757.c
index 4a2f357..9079a0f 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7757.c
@@ -19,6 +19,7 @@
#include <linux/sh_timer.h>
#include <linux/sh_dma.h>
#include <linux/sh_intc.h>
+#include <linux/usb/ohci_pdriver.h>
#include <cpu/dma-register.h>
#include <cpu/sh7757.h>
@@ -750,12 +751,15 @@ static struct resource usb_ohci_resources[] = {
},
};
+static struct usb_ohci_pdata usb_ohci_pdata;
+
static struct platform_device usb_ohci_device = {
- .name = "sh_ohci",
+ .name = "ohci-platform",
.id = -1,
.dev = {
.dma_mask = &usb_ohci_device.dev.coherent_dma_mask,
.coherent_dma_mask = DMA_BIT_MASK(32),
+ .platform_data = &usb_ohci_pdata,
},
.num_resources = ARRAY_SIZE(usb_ohci_resources),
.resource = usb_ohci_resources,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7763.c b/arch/sh/kernel/cpu/sh4a/setup-sh7763.c
index bd0a8fb..1686aca 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7763.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7763.c
@@ -16,6 +16,7 @@
#include <linux/sh_intc.h>
#include <linux/io.h>
#include <linux/serial_sci.h>
+#include <linux/usb/ohci_pdriver.h>
static struct plat_sci_port scif0_platform_data = {
.mapbase = 0xffe00000,
@@ -106,12 +107,15 @@ static struct resource usb_ohci_resources[] = {
static u64 usb_ohci_dma_mask = 0xffffffffUL;
+static struct usb_ohci_pdata usb_ohci_pdata;
+
static struct platform_device usb_ohci_device = {
- .name = "sh_ohci",
+ .name = "ohci-platform",
.id = -1,
.dev = {
.dma_mask = &usb_ohci_dma_mask,
.coherent_dma_mask = 0xffffffff,
+ .platform_data = &usb_ohci_pdata,
},
.num_resources = ARRAY_SIZE(usb_ohci_resources),
.resource = usb_ohci_resources,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c
index 2e6952f..ab52d4d 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c
@@ -23,6 +23,7 @@
#include <linux/sh_timer.h>
#include <linux/sh_dma.h>
#include <linux/sh_intc.h>
+#include <linux/usb/ohci_pdriver.h>
#include <cpu/dma-register.h>
#include <asm/mmzone.h>
@@ -583,12 +584,15 @@ static struct resource usb_ohci_resources[] = {
},
};
+static struct usb_ohci_pdata usb_ohci_pdata;
+
static struct platform_device usb_ohci_device = {
- .name = "sh_ohci",
+ .name = "ohci-platform",
.id = -1,
.dev = {
.dma_mask = &usb_ohci_device.dev.coherent_dma_mask,
.coherent_dma_mask = DMA_BIT_MASK(32),
+ .platform_data = &usb_ohci_pdata,
},
.num_resources = ARRAY_SIZE(usb_ohci_resources),
.resource = usb_ohci_resources,
--
1.7.9.5
^ permalink raw reply related [flat|nested] 44+ messages in thread
* [PATCH 23/25] USB: ohci: remove OHCI SH platform driver
[not found] <1349276601-8371-1-git-send-email-florian@openwrt.org>
` (22 preceding siblings ...)
2012-10-03 15:03 ` [PATCH 22/25] sh: convert boards to use the " Florian Fainelli
@ 2012-10-03 15:03 ` Florian Fainelli
2012-10-03 15:03 ` [PATCH 24/25] MIPS: Alchemy: use the OHCI " Florian Fainelli
2012-10-03 15:03 ` [PATCH 25/25] USB: ohci: remove Alchemy " Florian Fainelli
25 siblings, 0 replies; 44+ messages in thread
From: Florian Fainelli @ 2012-10-03 15:03 UTC (permalink / raw)
To: stern
Cc: linux-usb, Florian Fainelli, Greg Kroah-Hartman, Hauke Mehrtens,
Felipe Balbi, linux-kernel
All users have been converted to use the OHCI platform driver instead.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/usb/host/Kconfig | 6 +-
drivers/usb/host/ohci-hcd.c | 5 --
drivers/usb/host/ohci-sh.c | 141 -------------------------------------------
3 files changed, 5 insertions(+), 147 deletions(-)
delete mode 100644 drivers/usb/host/ohci-sh.c
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index e9c277b..437533e 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -397,9 +397,13 @@ config USB_OHCI_HCD_SSB
If unsure, say N.
config USB_OHCI_SH
- bool "OHCI support for SuperH USB controller"
+ bool "OHCI support for SuperH USB controller (DEPRECATED)"
depends on USB_OHCI_HCD && SUPERH
+ select USB_OHCI_HCD_PLATFORM
---help---
+ This option is deprecated now and the driver was removed, use
+ USB_OHCI_HCD_PLATFORM instead.
+
Enables support for the on-chip OHCI controller on the SuperH.
If you use the PCI OHCI controller, this option is not necessary.
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 2cafe98..028f60d 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -1054,11 +1054,6 @@ MODULE_LICENSE ("GPL");
#define PLATFORM_DRIVER ohci_hcd_da8xx_driver
#endif
-#ifdef CONFIG_USB_OHCI_SH
-#include "ohci-sh.c"
-#define PLATFORM_DRIVER ohci_hcd_sh_driver
-#endif
-
#ifdef CONFIG_USB_OHCI_HCD_PPC_OF
#include "ohci-ppc-of.c"
diff --git a/drivers/usb/host/ohci-sh.c b/drivers/usb/host/ohci-sh.c
deleted file mode 100644
index 76a20c2..0000000
--- a/drivers/usb/host/ohci-sh.c
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * OHCI HCD (Host Controller Driver) for USB.
- *
- * Copyright (C) 2008 Renesas Solutions Corp.
- *
- * Author : Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-#include <linux/platform_device.h>
-
-static int ohci_sh_start(struct usb_hcd *hcd)
-{
- struct ohci_hcd *ohci = hcd_to_ohci(hcd);
-
- ohci_hcd_init(ohci);
- ohci_init(ohci);
- ohci_run(ohci);
- return 0;
-}
-
-static const struct hc_driver ohci_sh_hc_driver = {
- .description = hcd_name,
- .product_desc = "SuperH OHCI",
- .hcd_priv_size = sizeof(struct ohci_hcd),
-
- /*
- * generic hardware linkage
- */
- .irq = ohci_irq,
- .flags = HCD_USB11 | HCD_MEMORY,
-
- /*
- * basic lifecycle operations
- */
- .start = ohci_sh_start,
- .stop = ohci_stop,
- .shutdown = ohci_shutdown,
-
- /*
- * managing i/o requests and associated device resources
- */
- .urb_enqueue = ohci_urb_enqueue,
- .urb_dequeue = ohci_urb_dequeue,
- .endpoint_disable = ohci_endpoint_disable,
-
- /*
- * scheduling support
- */
- .get_frame_number = ohci_get_frame,
-
- /*
- * root hub support
- */
- .hub_status_data = ohci_hub_status_data,
- .hub_control = ohci_hub_control,
-#ifdef CONFIG_PM
- .bus_suspend = ohci_bus_suspend,
- .bus_resume = ohci_bus_resume,
-#endif
- .start_port_reset = ohci_start_port_reset,
-};
-
-/*-------------------------------------------------------------------------*/
-
-static int ohci_hcd_sh_probe(struct platform_device *pdev)
-{
- struct resource *res = NULL;
- struct usb_hcd *hcd = NULL;
- int irq = -1;
- int ret;
-
- if (usb_disabled())
- return -ENODEV;
-
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res) {
- dev_err(&pdev->dev, "platform_get_resource error.\n");
- return -ENODEV;
- }
-
- irq = platform_get_irq(pdev, 0);
- if (irq < 0) {
- dev_err(&pdev->dev, "platform_get_irq error.\n");
- return -ENODEV;
- }
-
- /* initialize hcd */
- hcd = usb_create_hcd(&ohci_sh_hc_driver, &pdev->dev, (char *)hcd_name);
- if (!hcd) {
- dev_err(&pdev->dev, "Failed to create hcd\n");
- return -ENOMEM;
- }
-
- hcd->regs = (void __iomem *)res->start;
- hcd->rsrc_start = res->start;
- hcd->rsrc_len = resource_size(res);
- ret = usb_add_hcd(hcd, irq, IRQF_SHARED);
- if (ret != 0) {
- dev_err(&pdev->dev, "Failed to add hcd\n");
- usb_put_hcd(hcd);
- return ret;
- }
-
- return ret;
-}
-
-static int ohci_hcd_sh_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 ohci_hcd_sh_driver = {
- .probe = ohci_hcd_sh_probe,
- .remove = ohci_hcd_sh_remove,
- .shutdown = usb_hcd_platform_shutdown,
- .driver = {
- .name = "sh_ohci",
- .owner = THIS_MODULE,
- },
-};
-
-MODULE_ALIAS("platform:sh_ohci");
--
1.7.9.5
^ permalink raw reply related [flat|nested] 44+ messages in thread
* [PATCH 24/25] MIPS: Alchemy: use the OHCI platform driver
[not found] <1349276601-8371-1-git-send-email-florian@openwrt.org>
` (23 preceding siblings ...)
2012-10-03 15:03 ` [PATCH 23/25] USB: ohci: remove OHCI SH " Florian Fainelli
@ 2012-10-03 15:03 ` Florian Fainelli
2012-10-03 15:21 ` Manuel Lauss
2012-10-03 16:07 ` Manuel Lauss
2012-10-03 15:03 ` [PATCH 25/25] USB: ohci: remove Alchemy " Florian Fainelli
25 siblings, 2 replies; 44+ messages in thread
From: Florian Fainelli @ 2012-10-03 15:03 UTC (permalink / raw)
To: stern
Cc: linux-usb, Florian Fainelli, Ralf Baechle, Manuel Lauss,
Thomas Meyer, David S. Miller, linux-mips, linux-kernel
This also greatly simplifies the power_{on,off} callbacks and make them
work on platform device id instead of checking the OHCI controller base
address like what was done in ohci-au1xxx.c.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
arch/mips/alchemy/common/platform.c | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/arch/mips/alchemy/common/platform.c b/arch/mips/alchemy/common/platform.c
index 57335a2..cd12458 100644
--- a/arch/mips/alchemy/common/platform.c
+++ b/arch/mips/alchemy/common/platform.c
@@ -18,6 +18,7 @@
#include <linux/serial_8250.h>
#include <linux/slab.h>
#include <linux/usb/ehci_pdriver.h>
+#include <linux/usb/ohci_pdriver.h>
#include <asm/mach-au1x00/au1000.h>
#include <asm/mach-au1x00/au1xxx_dbdma.h>
@@ -142,6 +143,34 @@ static struct usb_ehci_pdata alchemy_ehci_pdata = {
.power_suspend = alchemy_ehci_power_off,
};
+/* Power on callback for the ohci platform driver */
+static int alchemy_ohci_power_on(struct platform_device *pdev)
+{
+ int unit;
+
+ unit = (pdev->id == 1) ?
+ ALCHEMY_USB_OHCI1 : ALCHEMY_USB_OHCI0;
+
+ return alchemy_usb_control(unit, 1);
+}
+
+/* Power off/suspend callback for the ohci platform driver */
+static void alchemy_ohci_power_off(struct platform_device *pdev)
+{
+ int unit;
+
+ unit = (pdev->id == 1) ?
+ ALCHEMY_USB_OHCI1 : ALCHEMY_USB_OHCI0;
+
+ alchemy_usb_control(unit, 0);
+}
+
+static struct usb_ohci_pdata alchemy_ohci_pdata = {
+ .power_on = alchemy_ohci_power_on,
+ .power_off = alchemy_ohci_power_off,
+ .power_suspend = alchemy_ohci_power_off,
+};
+
static unsigned long alchemy_ohci_data[][2] __initdata = {
[ALCHEMY_CPU_AU1000] = { AU1000_USB_OHCI_PHYS_ADDR, AU1000_USB_HOST_INT },
[ALCHEMY_CPU_AU1500] = { AU1000_USB_OHCI_PHYS_ADDR, AU1500_USB_HOST_INT },
@@ -192,6 +221,7 @@ static void __init alchemy_setup_usb(int ctype)
pdev->name = "au1xxx-ohci";
pdev->id = 0;
pdev->dev.dma_mask = &alchemy_ohci_dmamask;
+ pdev->dev.platform_data = &alchemy_ohci_pdata;
if (platform_device_register(pdev))
printk(KERN_INFO "Alchemy USB: cannot add OHCI0\n");
@@ -231,6 +261,7 @@ static void __init alchemy_setup_usb(int ctype)
pdev->name = "au1xxx-ohci";
pdev->id = 1;
pdev->dev.dma_mask = &alchemy_ohci_dmamask;
+ pdev->dev.platform_data = &alchemy_ohci_pdata;
if (platform_device_register(pdev))
printk(KERN_INFO "Alchemy USB: cannot add OHCI1\n");
--
1.7.9.5
^ permalink raw reply related [flat|nested] 44+ messages in thread
* [PATCH 25/25] USB: ohci: remove Alchemy OHCI platform driver.
[not found] <1349276601-8371-1-git-send-email-florian@openwrt.org>
` (24 preceding siblings ...)
2012-10-03 15:03 ` [PATCH 24/25] MIPS: Alchemy: use the OHCI " Florian Fainelli
@ 2012-10-03 15:03 ` Florian Fainelli
2012-10-03 16:47 ` Alan Stern
25 siblings, 1 reply; 44+ messages in thread
From: Florian Fainelli @ 2012-10-03 15:03 UTC (permalink / raw)
To: stern; +Cc: linux-usb, Florian Fainelli, Greg Kroah-Hartman, linux-kernel
All users have been converted to use the OHCI platform driver instead.
The driver was also doing quirky things with the internal OHCI hcd
structure during suspend/resume, work that is taken care of by the
core OHCI code in ohci-hub.c.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/usb/host/ohci-au1xxx.c | 234 ----------------------------------------
drivers/usb/host/ohci-hcd.c | 5 -
2 files changed, 239 deletions(-)
delete mode 100644 drivers/usb/host/ohci-au1xxx.c
diff --git a/drivers/usb/host/ohci-au1xxx.c b/drivers/usb/host/ohci-au1xxx.c
deleted file mode 100644
index c611699..0000000
--- a/drivers/usb/host/ohci-au1xxx.c
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- * OHCI HCD (Host Controller Driver) for USB.
- *
- * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
- * (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
- * (C) Copyright 2002 Hewlett-Packard Company
- *
- * Bus Glue for AMD Alchemy Au1xxx
- *
- * Written by Christopher Hoover <ch@hpl.hp.com>
- * Based on fragments of previous driver by Russell King et al.
- *
- * Modified for LH7A404 from ohci-sa1111.c
- * by Durgesh Pattamatta <pattamattad@sharpsec.com>
- * Modified for AMD Alchemy Au1xxx
- * by Matt Porter <mporter@kernel.crashing.org>
- *
- * This file is licenced under the GPL.
- */
-
-#include <linux/platform_device.h>
-#include <linux/signal.h>
-
-#include <asm/mach-au1x00/au1000.h>
-
-
-extern int usb_disabled(void);
-
-static int __devinit ohci_au1xxx_start(struct usb_hcd *hcd)
-{
- struct ohci_hcd *ohci = hcd_to_ohci(hcd);
- int ret;
-
- ohci_dbg(ohci, "ohci_au1xxx_start, ohci:%p", ohci);
-
- if ((ret = ohci_init(ohci)) < 0)
- return ret;
-
- if ((ret = ohci_run(ohci)) < 0) {
- dev_err(hcd->self.controller, "can't start %s",
- hcd->self.bus_name);
- ohci_stop(hcd);
- return ret;
- }
-
- return 0;
-}
-
-static const struct hc_driver ohci_au1xxx_hc_driver = {
- .description = hcd_name,
- .product_desc = "Au1xxx OHCI",
- .hcd_priv_size = sizeof(struct ohci_hcd),
-
- /*
- * generic hardware linkage
- */
- .irq = ohci_irq,
- .flags = HCD_USB11 | HCD_MEMORY,
-
- /*
- * basic lifecycle operations
- */
- .start = ohci_au1xxx_start,
- .stop = ohci_stop,
- .shutdown = ohci_shutdown,
-
- /*
- * managing i/o requests and associated device resources
- */
- .urb_enqueue = ohci_urb_enqueue,
- .urb_dequeue = ohci_urb_dequeue,
- .endpoint_disable = ohci_endpoint_disable,
-
- /*
- * scheduling support
- */
- .get_frame_number = ohci_get_frame,
-
- /*
- * root hub support
- */
- .hub_status_data = ohci_hub_status_data,
- .hub_control = ohci_hub_control,
-#ifdef CONFIG_PM
- .bus_suspend = ohci_bus_suspend,
- .bus_resume = ohci_bus_resume,
-#endif
- .start_port_reset = ohci_start_port_reset,
-};
-
-static int ohci_hcd_au1xxx_drv_probe(struct platform_device *pdev)
-{
- int ret, unit;
- struct usb_hcd *hcd;
-
- if (usb_disabled())
- return -ENODEV;
-
- if (pdev->resource[1].flags != IORESOURCE_IRQ) {
- pr_debug("resource[1] is not IORESOURCE_IRQ\n");
- return -ENOMEM;
- }
-
- hcd = usb_create_hcd(&ohci_au1xxx_hc_driver, &pdev->dev, "au1xxx");
- if (!hcd)
- return -ENOMEM;
-
- hcd->rsrc_start = pdev->resource[0].start;
- hcd->rsrc_len = pdev->resource[0].end - pdev->resource[0].start + 1;
-
- if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
- pr_debug("request_mem_region failed\n");
- ret = -EBUSY;
- goto err1;
- }
-
- hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
- if (!hcd->regs) {
- pr_debug("ioremap failed\n");
- ret = -ENOMEM;
- goto err2;
- }
-
- unit = (hcd->rsrc_start == AU1300_USB_OHCI1_PHYS_ADDR) ?
- ALCHEMY_USB_OHCI1 : ALCHEMY_USB_OHCI0;
- if (alchemy_usb_control(unit, 1)) {
- printk(KERN_INFO "%s: controller init failed!\n", pdev->name);
- ret = -ENODEV;
- goto err3;
- }
-
- ohci_hcd_init(hcd_to_ohci(hcd));
-
- ret = usb_add_hcd(hcd, pdev->resource[1].start,
- IRQF_SHARED);
- if (ret == 0) {
- platform_set_drvdata(pdev, hcd);
- return ret;
- }
-
- alchemy_usb_control(unit, 0);
-err3:
- iounmap(hcd->regs);
-err2:
- release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
-err1:
- usb_put_hcd(hcd);
- return ret;
-}
-
-static int ohci_hcd_au1xxx_drv_remove(struct platform_device *pdev)
-{
- struct usb_hcd *hcd = platform_get_drvdata(pdev);
- int unit;
-
- unit = (hcd->rsrc_start == AU1300_USB_OHCI1_PHYS_ADDR) ?
- ALCHEMY_USB_OHCI1 : ALCHEMY_USB_OHCI0;
- usb_remove_hcd(hcd);
- alchemy_usb_control(unit, 0);
- iounmap(hcd->regs);
- release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
- usb_put_hcd(hcd);
- platform_set_drvdata(pdev, NULL);
-
- return 0;
-}
-
-#ifdef CONFIG_PM
-static int ohci_hcd_au1xxx_drv_suspend(struct device *dev)
-{
- struct usb_hcd *hcd = dev_get_drvdata(dev);
- struct ohci_hcd *ohci = hcd_to_ohci(hcd);
- unsigned long flags;
- int rc;
-
- rc = 0;
-
- /* Root hub was already suspended. Disable irq emission and
- * mark HW unaccessible, bail out if RH has been resumed. Use
- * the spinlock to properly synchronize with possible pending
- * RH suspend or resume activity.
- */
- spin_lock_irqsave(&ohci->lock, flags);
- if (ohci->rh_state != OHCI_RH_SUSPENDED) {
- rc = -EINVAL;
- goto bail;
- }
- ohci_writel(ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable);
- (void)ohci_readl(ohci, &ohci->regs->intrdisable);
-
- clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
-
- alchemy_usb_control(ALCHEMY_USB_OHCI0, 0);
-bail:
- spin_unlock_irqrestore(&ohci->lock, flags);
-
- return rc;
-}
-
-static int ohci_hcd_au1xxx_drv_resume(struct device *dev)
-{
- struct usb_hcd *hcd = dev_get_drvdata(dev);
-
- alchemy_usb_control(ALCHEMY_USB_OHCI0, 1);
-
- set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
- ohci_finish_controller_resume(hcd);
-
- return 0;
-}
-
-static const struct dev_pm_ops au1xxx_ohci_pmops = {
- .suspend = ohci_hcd_au1xxx_drv_suspend,
- .resume = ohci_hcd_au1xxx_drv_resume,
-};
-
-#define AU1XXX_OHCI_PMOPS &au1xxx_ohci_pmops
-
-#else
-#define AU1XXX_OHCI_PMOPS NULL
-#endif
-
-static struct platform_driver ohci_hcd_au1xxx_driver = {
- .probe = ohci_hcd_au1xxx_drv_probe,
- .remove = ohci_hcd_au1xxx_drv_remove,
- .shutdown = usb_hcd_platform_shutdown,
- .driver = {
- .name = "au1xxx-ohci",
- .owner = THIS_MODULE,
- .pm = AU1XXX_OHCI_PMOPS,
- },
-};
-
-MODULE_ALIAS("platform:au1xxx-ohci");
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 028f60d..f0084c8 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -1029,11 +1029,6 @@ MODULE_LICENSE ("GPL");
#define PLATFORM_DRIVER ohci_hcd_ep93xx_driver
#endif
-#ifdef CONFIG_MIPS_ALCHEMY
-#include "ohci-au1xxx.c"
-#define PLATFORM_DRIVER ohci_hcd_au1xxx_driver
-#endif
-
#ifdef CONFIG_USB_OHCI_HCD_PPC_SOC
#include "ohci-ppc-soc.c"
#define PLATFORM_DRIVER ohci_hcd_ppc_soc_driver
--
1.7.9.5
^ permalink raw reply related [flat|nested] 44+ messages in thread
* Re: [PATCH 07/25] MIPS: Alchemy: use the ehci platform driver
2012-10-03 15:03 ` [PATCH 07/25] MIPS: Alchemy: use the ehci platform driver Florian Fainelli
@ 2012-10-03 15:14 ` Manuel Lauss
2012-10-03 15:20 ` Florian Fainelli
0 siblings, 1 reply; 44+ messages in thread
From: Manuel Lauss @ 2012-10-03 15:14 UTC (permalink / raw)
To: Florian Fainelli
Cc: stern, linux-usb, Ralf Baechle, Manuel Lauss, Thomas Meyer,
David S. Miller, linux-mips, linux-kernel
On Wed, Oct 3, 2012 at 5:03 PM, Florian Fainelli <florian@openwrt.org> wrote:
> Use the ehci platform driver power_{on,suspend,off} callbacks to perform the
> USB block gate enabling/disabling as what the ehci-au1xxx.c driver does.
>
> Signed-off-by: Florian Fainelli <florian@openwrt.org>
> ---
> arch/mips/alchemy/common/platform.c | 23 ++++++++++++++++++++++-
> 1 file changed, 22 insertions(+), 1 deletion(-)
>
> diff --git a/arch/mips/alchemy/common/platform.c b/arch/mips/alchemy/common/platform.c
> index c0f3ce6..57335a2 100644
> --- a/arch/mips/alchemy/common/platform.c
> +++ b/arch/mips/alchemy/common/platform.c
> @@ -17,6 +17,7 @@
> #include <linux/platform_device.h>
> #include <linux/serial_8250.h>
> #include <linux/slab.h>
> +#include <linux/usb/ehci_pdriver.h>
>
> #include <asm/mach-au1x00/au1000.h>
> #include <asm/mach-au1x00/au1xxx_dbdma.h>
> @@ -122,6 +123,25 @@ static void __init alchemy_setup_uarts(int ctype)
> static u64 alchemy_ohci_dmamask = DMA_BIT_MASK(32);
> static u64 __maybe_unused alchemy_ehci_dmamask = DMA_BIT_MASK(32);
>
> +/* Power on callback for the ehci platform driver */
> +static int alchemy_ehci_power_on(struct platform_device *pdev)
> +{
> + return alchemy_usb_control(ALCHEMY_USB_EHCI0, 1);
> +}
> +
> +/* Power off/suspend callback for the ehci platform driver */
> +static void alchemy_ehci_power_off(struct platform_device *pdev)
> +{
> + alchemy_usb_control(ALCHEMY_USB_EHCI0, 0);
> +}
> +
> +static struct usb_ehci_pdata alchemy_ehci_pdata = {
> + .need_io_watchdog = 0,
This member doesn't exist.
Manuel
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 07/25] MIPS: Alchemy: use the ehci platform driver
2012-10-03 15:14 ` Manuel Lauss
@ 2012-10-03 15:20 ` Florian Fainelli
0 siblings, 0 replies; 44+ messages in thread
From: Florian Fainelli @ 2012-10-03 15:20 UTC (permalink / raw)
To: Manuel Lauss
Cc: stern, linux-usb, Ralf Baechle, Manuel Lauss, Thomas Meyer,
David S. Miller, linux-mips, linux-kernel
On Wednesday 03 October 2012 17:14:21 Manuel Lauss wrote:
> On Wed, Oct 3, 2012 at 5:03 PM, Florian Fainelli <florian@openwrt.org> wrote:
> > Use the ehci platform driver power_{on,suspend,off} callbacks to perform
the
> > USB block gate enabling/disabling as what the ehci-au1xxx.c driver does.
> >
> > Signed-off-by: Florian Fainelli <florian@openwrt.org>
> > ---
> > arch/mips/alchemy/common/platform.c | 23 ++++++++++++++++++++++-
> > 1 file changed, 22 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/mips/alchemy/common/platform.c
b/arch/mips/alchemy/common/platform.c
> > index c0f3ce6..57335a2 100644
> > --- a/arch/mips/alchemy/common/platform.c
> > +++ b/arch/mips/alchemy/common/platform.c
> > @@ -17,6 +17,7 @@
> > #include <linux/platform_device.h>
> > #include <linux/serial_8250.h>
> > #include <linux/slab.h>
> > +#include <linux/usb/ehci_pdriver.h>
> >
> > #include <asm/mach-au1x00/au1000.h>
> > #include <asm/mach-au1x00/au1xxx_dbdma.h>
> > @@ -122,6 +123,25 @@ static void __init alchemy_setup_uarts(int ctype)
> > static u64 alchemy_ohci_dmamask = DMA_BIT_MASK(32);
> > static u64 __maybe_unused alchemy_ehci_dmamask = DMA_BIT_MASK(32);
> >
> > +/* Power on callback for the ehci platform driver */
> > +static int alchemy_ehci_power_on(struct platform_device *pdev)
> > +{
> > + return alchemy_usb_control(ALCHEMY_USB_EHCI0, 1);
> > +}
> > +
> > +/* Power off/suspend callback for the ehci platform driver */
> > +static void alchemy_ehci_power_off(struct platform_device *pdev)
> > +{
> > + alchemy_usb_control(ALCHEMY_USB_EHCI0, 0);
> > +}
> > +
> > +static struct usb_ehci_pdata alchemy_ehci_pdata = {
> > + .need_io_watchdog = 0,
>
> This member doesn't exist.
Thanks to get_maintainers.pl you did not get the patch that adds it, and it
seems like the mailing-list archives did not get it everywhere too, I can
ensure you that's is there, it's actually PATCH 6/25 of this serie.
--
Florian
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 24/25] MIPS: Alchemy: use the OHCI platform driver
2012-10-03 15:03 ` [PATCH 24/25] MIPS: Alchemy: use the OHCI " Florian Fainelli
@ 2012-10-03 15:21 ` Manuel Lauss
2012-10-03 15:24 ` Florian Fainelli
2012-10-03 16:07 ` Manuel Lauss
1 sibling, 1 reply; 44+ messages in thread
From: Manuel Lauss @ 2012-10-03 15:21 UTC (permalink / raw)
To: Florian Fainelli
Cc: stern, linux-usb, Ralf Baechle, Manuel Lauss, Thomas Meyer,
David S. Miller, linux-mips, linux-kernel
On Wed, Oct 3, 2012 at 5:03 PM, Florian Fainelli <florian@openwrt.org> wrote:
> This also greatly simplifies the power_{on,off} callbacks and make them
> work on platform device id instead of checking the OHCI controller base
> address like what was done in ohci-au1xxx.c.
That was by design -- the base address is far more reliable in identifying the
correct controller instance than the platform device id. There are systems
in the field which don't use the alchemy/common/platform.c file at all.
Manuel
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 24/25] MIPS: Alchemy: use the OHCI platform driver
2012-10-03 15:21 ` Manuel Lauss
@ 2012-10-03 15:24 ` Florian Fainelli
2012-10-03 15:26 ` Manuel Lauss
0 siblings, 1 reply; 44+ messages in thread
From: Florian Fainelli @ 2012-10-03 15:24 UTC (permalink / raw)
To: Manuel Lauss
Cc: stern, linux-usb, Ralf Baechle, Manuel Lauss, Thomas Meyer,
David S. Miller, linux-mips, linux-kernel
On Wednesday 03 October 2012 17:21:37 Manuel Lauss wrote:
> On Wed, Oct 3, 2012 at 5:03 PM, Florian Fainelli <florian@openwrt.org> wrote:
> > This also greatly simplifies the power_{on,off} callbacks and make them
> > work on platform device id instead of checking the OHCI controller base
> > address like what was done in ohci-au1xxx.c.
>
> That was by design -- the base address is far more reliable in identifying
the
> correct controller instance than the platform device id. There are systems
> in the field which don't use the alchemy/common/platform.c file at all.
Fair enough, but the way it was done previously was very error-prone if the
base address changed for any reason in the platform code, and you did not
notice it had to be changed in the OHCI driver too, then it simply did not
work. By systems in the field you mean out of tree users? If so, I'd say that
it's up to you to get them maintained or merged.
--
Florian
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 24/25] MIPS: Alchemy: use the OHCI platform driver
2012-10-03 15:24 ` Florian Fainelli
@ 2012-10-03 15:26 ` Manuel Lauss
0 siblings, 0 replies; 44+ messages in thread
From: Manuel Lauss @ 2012-10-03 15:26 UTC (permalink / raw)
To: Florian Fainelli
Cc: stern, linux-usb, Ralf Baechle, Manuel Lauss, Thomas Meyer,
David S. Miller, linux-mips, linux-kernel
On Wed, Oct 3, 2012 at 5:24 PM, Florian Fainelli <florian@openwrt.org> wrote:
> On Wednesday 03 October 2012 17:21:37 Manuel Lauss wrote:
>> On Wed, Oct 3, 2012 at 5:03 PM, Florian Fainelli <florian@openwrt.org> wrote:
>> > This also greatly simplifies the power_{on,off} callbacks and make them
>> > work on platform device id instead of checking the OHCI controller base
>> > address like what was done in ohci-au1xxx.c.
>>
>> That was by design -- the base address is far more reliable in identifying
> the
>> correct controller instance than the platform device id. There are systems
>> in the field which don't use the alchemy/common/platform.c file at all.
>
> Fair enough, but the way it was done previously was very error-prone if the
> base address changed for any reason in the platform code, and you did not
> notice it had to be changed in the OHCI driver too, then it simply did not
Since the Alchemy line is dead this point is moot.
> work. By systems in the field you mean out of tree users? If so, I'd say that
> it's up to you to get them maintained or merged.
I'm not against the patch at all, quite the contrary.
Manuel
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 06/25] USB: ehci: allow need_io_watchdog to be passed to ehci-platform driver
2012-10-03 15:03 ` [PATCH 06/25] USB: ehci: allow need_io_watchdog to be passed to ehci-platform driver Florian Fainelli
@ 2012-10-03 16:01 ` Alan Stern
2012-10-03 16:12 ` Florian Fainelli
0 siblings, 1 reply; 44+ messages in thread
From: Alan Stern @ 2012-10-03 16:01 UTC (permalink / raw)
To: Florian Fainelli
Cc: linux-usb, Ralf Baechle, Greg Kroah-Hartman, Gabor Juhos,
Hauke Mehrtens, Kelvin Cheung, Jayachandran C, Dan Carpenter,
Geert Uytterhoeven, linux-mips, linux-kernel
On Wed, 3 Oct 2012, Florian Fainelli wrote:
> And convert all the existing users of ehci-platform to specify a correct
> need_io_watchdog value.
IMO (and I realize that not everybody agrees), the patch description
should not be considered an extension of the patch title, as though the
title were the first sentence and the description the remainder of the
same paragraph. Descriptions should stand on their own and be
comprehensible even to somebody who hasn't read the title.
> Signed-off-by: Florian Fainelli <florian@openwrt.org>
> ---
> arch/mips/ath79/dev-usb.c | 2 ++
> arch/mips/loongson1/common/platform.c | 1 +
> arch/mips/netlogic/xlr/platform.c | 1 +
> drivers/usb/host/bcma-hcd.c | 1 +
> drivers/usb/host/ehci-platform.c | 1 +
> drivers/usb/host/ssb-hcd.c | 1 +
> include/linux/usb/ehci_pdriver.h | 3 +++
> 7 files changed, 10 insertions(+)
More importantly... Nearly every driver will have need_io_watchdog
set. Only a few of them explicitly turn it off. The approach you're
using puts an extra burden on most of the drivers.
> diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c
> index 764e010..08d5dec 100644
> --- a/drivers/usb/host/ehci-platform.c
> +++ b/drivers/usb/host/ehci-platform.c
> @@ -32,6 +32,7 @@ static int ehci_platform_reset(struct usb_hcd *hcd)
> ehci->has_synopsys_hc_bug = pdata->has_synopsys_hc_bug;
> ehci->big_endian_desc = pdata->big_endian_desc;
> ehci->big_endian_mmio = pdata->big_endian_mmio;
> + ehci->need_io_watchdog = pdata->need_io_watchdog;
> --- a/include/linux/usb/ehci_pdriver.h
> +++ b/include/linux/usb/ehci_pdriver.h
> @@ -29,6 +29,8 @@
> * initialization.
> * @port_power_off: set to 1 if the controller needs to be powered down
> * after initialization.
> + * @need_io_watchdog: set to 1 if the controller needs the I/O watchdog to
> + * run.
Instead, how about adding a no_io_watchdog flag? Then after
ehci-platform.c calls ehci_setup(), it can see whether to turn off
ehci->need_io_watchdog.
This way, most of this patch would become unnecessary.
Alan Stern
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 24/25] MIPS: Alchemy: use the OHCI platform driver
2012-10-03 15:03 ` [PATCH 24/25] MIPS: Alchemy: use the OHCI " Florian Fainelli
2012-10-03 15:21 ` Manuel Lauss
@ 2012-10-03 16:07 ` Manuel Lauss
2012-10-03 16:13 ` Florian Fainelli
1 sibling, 1 reply; 44+ messages in thread
From: Manuel Lauss @ 2012-10-03 16:07 UTC (permalink / raw)
To: Florian Fainelli
Cc: stern, linux-usb, Ralf Baechle, Manuel Lauss, Thomas Meyer,
David S. Miller, linux-mips, linux-kernel
On Wed, Oct 3, 2012 at 5:03 PM, Florian Fainelli <florian@openwrt.org> wrote:
> This also greatly simplifies the power_{on,off} callbacks and make them
> work on platform device id instead of checking the OHCI controller base
> address like what was done in ohci-au1xxx.c.
>
> Signed-off-by: Florian Fainelli <florian@openwrt.org>
> ---
> arch/mips/alchemy/common/platform.c | 31 +++++++++++++++++++++++++++++++
> 1 file changed, 31 insertions(+)
>
> diff --git a/arch/mips/alchemy/common/platform.c b/arch/mips/alchemy/common/platform.c
> index 57335a2..cd12458 100644
> --- a/arch/mips/alchemy/common/platform.c
> +++ b/arch/mips/alchemy/common/platform.c
> @@ -18,6 +18,7 @@
> #include <linux/serial_8250.h>
> #include <linux/slab.h>
> #include <linux/usb/ehci_pdriver.h>
> +#include <linux/usb/ohci_pdriver.h>
>
> #include <asm/mach-au1x00/au1000.h>
> #include <asm/mach-au1x00/au1xxx_dbdma.h>
> @@ -142,6 +143,34 @@ static struct usb_ehci_pdata alchemy_ehci_pdata = {
> .power_suspend = alchemy_ehci_power_off,
> };
>
> +/* Power on callback for the ohci platform driver */
> +static int alchemy_ohci_power_on(struct platform_device *pdev)
> +{
> + int unit;
> +
> + unit = (pdev->id == 1) ?
> + ALCHEMY_USB_OHCI1 : ALCHEMY_USB_OHCI0;
> +
> + return alchemy_usb_control(unit, 1);
> +}
> +
> +/* Power off/suspend callback for the ohci platform driver */
> +static void alchemy_ohci_power_off(struct platform_device *pdev)
> +{
> + int unit;
> +
> + unit = (pdev->id == 1) ?
> + ALCHEMY_USB_OHCI1 : ALCHEMY_USB_OHCI0;
> +
> + alchemy_usb_control(unit, 0);
> +}
> +
> +static struct usb_ohci_pdata alchemy_ohci_pdata = {
> + .power_on = alchemy_ohci_power_on,
> + .power_off = alchemy_ohci_power_off,
> + .power_suspend = alchemy_ohci_power_off,
> +};
> +
> static unsigned long alchemy_ohci_data[][2] __initdata = {
> [ALCHEMY_CPU_AU1000] = { AU1000_USB_OHCI_PHYS_ADDR, AU1000_USB_HOST_INT },
> [ALCHEMY_CPU_AU1500] = { AU1000_USB_OHCI_PHYS_ADDR, AU1500_USB_HOST_INT },
> @@ -192,6 +221,7 @@ static void __init alchemy_setup_usb(int ctype)
> pdev->name = "au1xxx-ohci";
Should be "ohci-platform" (2x). With this change USB works on all my
Alchemy boards.
I'd also suggest to move drivers/usb/host/alchemy-common.c to
arch/mips/alchemy/common/usb.c.
(same for octeon2-common.c)
Manuel
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 06/25] USB: ehci: allow need_io_watchdog to be passed to ehci-platform driver
2012-10-03 16:01 ` Alan Stern
@ 2012-10-03 16:12 ` Florian Fainelli
0 siblings, 0 replies; 44+ messages in thread
From: Florian Fainelli @ 2012-10-03 16:12 UTC (permalink / raw)
To: Alan Stern
Cc: linux-usb, Ralf Baechle, Greg Kroah-Hartman, Gabor Juhos,
Hauke Mehrtens, Kelvin Cheung, Jayachandran C, Dan Carpenter,
Geert Uytterhoeven, linux-mips, linux-kernel
On Wednesday 03 October 2012 12:01:22 Alan Stern wrote:
> On Wed, 3 Oct 2012, Florian Fainelli wrote:
>
> > And convert all the existing users of ehci-platform to specify a correct
> > need_io_watchdog value.
>
> IMO (and I realize that not everybody agrees), the patch description
> should not be considered an extension of the patch title, as though the
> title were the first sentence and the description the remainder of the
> same paragraph. Descriptions should stand on their own and be
> comprehensible even to somebody who hasn't read the title.
>
> > Signed-off-by: Florian Fainelli <florian@openwrt.org>
> > ---
> > arch/mips/ath79/dev-usb.c | 2 ++
> > arch/mips/loongson1/common/platform.c | 1 +
> > arch/mips/netlogic/xlr/platform.c | 1 +
> > drivers/usb/host/bcma-hcd.c | 1 +
> > drivers/usb/host/ehci-platform.c | 1 +
> > drivers/usb/host/ssb-hcd.c | 1 +
> > include/linux/usb/ehci_pdriver.h | 3 +++
> > 7 files changed, 10 insertions(+)
>
> More importantly... Nearly every driver will have need_io_watchdog
> set. Only a few of them explicitly turn it off. The approach you're
> using puts an extra burden on most of the drivers.
>
> > diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-
platform.c
> > index 764e010..08d5dec 100644
> > --- a/drivers/usb/host/ehci-platform.c
> > +++ b/drivers/usb/host/ehci-platform.c
> > @@ -32,6 +32,7 @@ static int ehci_platform_reset(struct usb_hcd *hcd)
> > ehci->has_synopsys_hc_bug = pdata->has_synopsys_hc_bug;
> > ehci->big_endian_desc = pdata->big_endian_desc;
> > ehci->big_endian_mmio = pdata->big_endian_mmio;
> > + ehci->need_io_watchdog = pdata->need_io_watchdog;
>
> > --- a/include/linux/usb/ehci_pdriver.h
> > +++ b/include/linux/usb/ehci_pdriver.h
> > @@ -29,6 +29,8 @@
> > * initialization.
> > * @port_power_off: set to 1 if the controller needs to be powered down
> > * after initialization.
> > + * @need_io_watchdog: set to 1 if the controller needs the I/O
watchdog to
> > + * run.
>
> Instead, how about adding a no_io_watchdog flag? Then after
> ehci-platform.c calls ehci_setup(), it can see whether to turn off
> ehci->need_io_watchdog.
Sounds good, you are right, this also greatly reduces the chances to miss one
user of this "feature".
>
> This way, most of this patch would become unnecessary.
>
> Alan Stern
>
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 24/25] MIPS: Alchemy: use the OHCI platform driver
2012-10-03 16:07 ` Manuel Lauss
@ 2012-10-03 16:13 ` Florian Fainelli
0 siblings, 0 replies; 44+ messages in thread
From: Florian Fainelli @ 2012-10-03 16:13 UTC (permalink / raw)
To: Manuel Lauss
Cc: stern, linux-usb, Ralf Baechle, Manuel Lauss, Thomas Meyer,
David S. Miller, linux-mips, linux-kernel
On Wednesday 03 October 2012 18:07:28 Manuel Lauss wrote:
> On Wed, Oct 3, 2012 at 5:03 PM, Florian Fainelli <florian@openwrt.org> wrote:
> > This also greatly simplifies the power_{on,off} callbacks and make them
> > work on platform device id instead of checking the OHCI controller base
> > address like what was done in ohci-au1xxx.c.
> >
> > Signed-off-by: Florian Fainelli <florian@openwrt.org>
> > ---
> > arch/mips/alchemy/common/platform.c | 31
+++++++++++++++++++++++++++++++
> > 1 file changed, 31 insertions(+)
> >
> > diff --git a/arch/mips/alchemy/common/platform.c
b/arch/mips/alchemy/common/platform.c
> > index 57335a2..cd12458 100644
> > --- a/arch/mips/alchemy/common/platform.c
> > +++ b/arch/mips/alchemy/common/platform.c
> > @@ -18,6 +18,7 @@
> > #include <linux/serial_8250.h>
> > #include <linux/slab.h>
> > #include <linux/usb/ehci_pdriver.h>
> > +#include <linux/usb/ohci_pdriver.h>
> >
> > #include <asm/mach-au1x00/au1000.h>
> > #include <asm/mach-au1x00/au1xxx_dbdma.h>
> > @@ -142,6 +143,34 @@ static struct usb_ehci_pdata alchemy_ehci_pdata = {
> > .power_suspend = alchemy_ehci_power_off,
> > };
> >
> > +/* Power on callback for the ohci platform driver */
> > +static int alchemy_ohci_power_on(struct platform_device *pdev)
> > +{
> > + int unit;
> > +
> > + unit = (pdev->id == 1) ?
> > + ALCHEMY_USB_OHCI1 : ALCHEMY_USB_OHCI0;
> > +
> > + return alchemy_usb_control(unit, 1);
> > +}
> > +
> > +/* Power off/suspend callback for the ohci platform driver */
> > +static void alchemy_ohci_power_off(struct platform_device *pdev)
> > +{
> > + int unit;
> > +
> > + unit = (pdev->id == 1) ?
> > + ALCHEMY_USB_OHCI1 : ALCHEMY_USB_OHCI0;
> > +
> > + alchemy_usb_control(unit, 0);
> > +}
> > +
> > +static struct usb_ohci_pdata alchemy_ohci_pdata = {
> > + .power_on = alchemy_ohci_power_on,
> > + .power_off = alchemy_ohci_power_off,
> > + .power_suspend = alchemy_ohci_power_off,
> > +};
> > +
> > static unsigned long alchemy_ohci_data[][2] __initdata = {
> > [ALCHEMY_CPU_AU1000] = { AU1000_USB_OHCI_PHYS_ADDR,
AU1000_USB_HOST_INT },
> > [ALCHEMY_CPU_AU1500] = { AU1000_USB_OHCI_PHYS_ADDR,
AU1500_USB_HOST_INT },
> > @@ -192,6 +221,7 @@ static void __init alchemy_setup_usb(int ctype)
> > pdev->name = "au1xxx-ohci";
>
> Should be "ohci-platform" (2x). With this change USB works on all my
> Alchemy boards.
Yes, Hauke Merthens just pointed this issue at me.
> I'd also suggest to move drivers/usb/host/alchemy-common.c to
> arch/mips/alchemy/common/usb.c.
> (same for octeon2-common.c)
Ok, sounds good.
--
Florian
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 12/25] USB: ehci: remove CNS3xxx EHCI platform driver
2012-10-03 15:03 ` [PATCH 12/25] USB: ehci: remove CNS3xxx EHCI " Florian Fainelli
@ 2012-10-03 16:16 ` Alan Stern
0 siblings, 0 replies; 44+ messages in thread
From: Alan Stern @ 2012-10-03 16:16 UTC (permalink / raw)
To: Florian Fainelli
Cc: linux-usb, Greg Kroah-Hartman, Hauke Mehrtens, Felipe Balbi,
linux-kernel
On Wed, 3 Oct 2012, Florian Fainelli wrote:
> The users have been converted to use the ehci platform driver instead.
>
> Signed-off-by: Florian Fainelli <florian@openwrt.org>
> --- a/drivers/usb/host/ehci-hcd.c
> +++ b/drivers/usb/host/ehci-hcd.c
> @@ -1254,16 +1254,6 @@ MODULE_LICENSE ("GPL");
> #define PLATFORM_DRIVER ehci_atmel_driver
> #endif
>
> -#ifdef CONFIG_USB_OCTEON_EHCI
> -#include "ehci-octeon.c"
> -#define PLATFORM_DRIVER ehci_octeon_driver
> -#endif
Looks like this crept in here by mistake. It belong in patch 10/25.
Alan Stern
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 09/25] MIPS: Octeon: use ehci-platform driver
2012-10-03 15:03 ` [PATCH 09/25] MIPS: Octeon: use ehci-platform driver Florian Fainelli
@ 2012-10-03 16:45 ` David Daney
2012-10-03 18:30 ` Florian Fainelli
0 siblings, 1 reply; 44+ messages in thread
From: David Daney @ 2012-10-03 16:45 UTC (permalink / raw)
To: Florian Fainelli
Cc: stern, linux-usb, Ralf Baechle, David Daney, David S. Miller,
Wolfram Sang, linux-mips, linux-kernel
On 10/03/2012 08:03 AM, Florian Fainelli wrote:
> Signed-off-by: Florian Fainelli <florian@openwrt.org>
> ---
> arch/mips/cavium-octeon/octeon-platform.c | 43 ++++++++++++++++++++++++++++-
> 1 file changed, 42 insertions(+), 1 deletion(-)
NACK.
OCTEON uses device tree now (or as soon as I send in the corresponding
patches), so this would just be churning the code.
David Daney
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 18/25] MIPS: Octeon: use OHCI platform driver
2012-10-03 15:03 ` [PATCH 18/25] MIPS: Octeon: use " Florian Fainelli
@ 2012-10-03 16:47 ` David Daney
0 siblings, 0 replies; 44+ messages in thread
From: David Daney @ 2012-10-03 16:47 UTC (permalink / raw)
To: Florian Fainelli
Cc: stern, linux-usb, Ralf Baechle, David Daney, David S. Miller,
Wolfram Sang, linux-mips, linux-kernel
On 10/03/2012 08:03 AM, Florian Fainelli wrote:
> Signed-off-by: Florian Fainelli <florian@openwrt.org>
> ---
> arch/mips/cavium-octeon/octeon-platform.c | 37 ++++++++++++++++++++++++++++-
> 1 file changed, 36 insertions(+), 1 deletion(-)
>
NACK.
Same reason as for the EHCI one (09/25):
OCTEON uses device tree now (or as soon as I send in the corresponding
patches), so this would just be churning the code.
David Daney
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 25/25] USB: ohci: remove Alchemy OHCI platform driver.
2012-10-03 15:03 ` [PATCH 25/25] USB: ohci: remove Alchemy " Florian Fainelli
@ 2012-10-03 16:47 ` Alan Stern
0 siblings, 0 replies; 44+ messages in thread
From: Alan Stern @ 2012-10-03 16:47 UTC (permalink / raw)
To: Florian Fainelli; +Cc: linux-usb, Greg Kroah-Hartman, linux-kernel
On Wed, 3 Oct 2012, Florian Fainelli wrote:
> All users have been converted to use the OHCI platform driver instead.
> The driver was also doing quirky things with the internal OHCI hcd
> structure during suspend/resume, work that is taken care of by the
> core OHCI code in ohci-hub.c.
This is highly questionable. It depends on the platform's details (how
wakeup signals are transmitted).
> -#ifdef CONFIG_PM
> -static int ohci_hcd_au1xxx_drv_suspend(struct device *dev)
> -{
> - struct usb_hcd *hcd = dev_get_drvdata(dev);
> - struct ohci_hcd *ohci = hcd_to_ohci(hcd);
> - unsigned long flags;
> - int rc;
> -
> - rc = 0;
> -
> - /* Root hub was already suspended. Disable irq emission and
> - * mark HW unaccessible, bail out if RH has been resumed. Use
> - * the spinlock to properly synchronize with possible pending
> - * RH suspend or resume activity.
> - */
> - spin_lock_irqsave(&ohci->lock, flags);
> - if (ohci->rh_state != OHCI_RH_SUSPENDED) {
> - rc = -EINVAL;
> - goto bail;
> - }
This stuff about checking the root hub isn't needed.
> - ohci_writel(ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable);
> - (void)ohci_readl(ohci, &ohci->regs->intrdisable);
> -
> - clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
But this stuff _is_ needed.
The right way to do this is to move the contents of ohci_pci_suspend()
and ohci_pci_resume() into ohci-hcd.c; call them ohci_suspend() and
ohci_resume(). The ohci_finish_controller_resume() routine should be
merged into ohci_resume(); there's no reason to have two separate
functions for this. Then the platform drivers can call these new
routines at the appropriate times.
The part about checking that the root hub is suspended can be removed.
That bug hasn't shown up in years.
Alan Stern
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 04/25] MIPS: Netlogic: use ehci-platform driver
2012-10-03 15:02 ` [PATCH 04/25] MIPS: Netlogic: use ehci-platform driver Florian Fainelli
@ 2012-10-03 16:47 ` Alan Stern
2012-10-04 14:51 ` Florian Fainelli
2012-10-04 10:51 ` Jonas Gorski
1 sibling, 1 reply; 44+ messages in thread
From: Alan Stern @ 2012-10-03 16:47 UTC (permalink / raw)
To: Florian Fainelli
Cc: linux-usb, Ralf Baechle, Jayachandran C, linux-mips, linux-kernel
On Wed, 3 Oct 2012, Florian Fainelli wrote:
> Signed-off-by: Florian Fainelli <florian@openwrt.org>
IMO, patches should always have a non-empty changelog. Even if it is
relatively trivial. The same comment applies to several other patches
in this series.
> ---
> arch/mips/netlogic/xlr/platform.c | 6 ++++++
> 1 file changed, 6 insertions(+)
Does this need to enable CONFIG_USB_EHCI_HCD_PLATFORM is some
defconfig file, like you did with the MIPS Loongson 1B?
And likewise for quite a few of the other patches in this series.
> diff --git a/arch/mips/netlogic/xlr/platform.c b/arch/mips/netlogic/xlr/platform.c
> index 71b44d8..1731dfd 100644
> --- a/arch/mips/netlogic/xlr/platform.c
> +++ b/arch/mips/netlogic/xlr/platform.c
> @@ -15,6 +15,7 @@
> #include <linux/serial_8250.h>
> #include <linux/serial_reg.h>
> #include <linux/i2c.h>
> +#include <linux/usb/ehci_pdriver.h>
>
> #include <asm/netlogic/haldefs.h>
> #include <asm/netlogic/xlr/iomap.h>
> @@ -123,6 +124,10 @@ static u64 xls_usb_dmamask = ~(u32)0;
> }, \
> }
>
> +static struct usb_ehci_pdata xls_usb_ehci_pdata = {
> + .caps_offset = 0,
> +};
> +
> static struct platform_device xls_usb_ehci_device =
> USB_PLATFORM_DEV("ehci-xls", 0, PIC_USB_IRQ);
> static struct platform_device xls_usb_ohci_device_0 =
> @@ -172,6 +177,7 @@ int xls_platform_usb_init(void)
> memres = CPHYSADDR((unsigned long)usb_mmio);
> xls_usb_ehci_device.resource[0].start = memres;
> xls_usb_ehci_device.resource[0].end = memres + 0x400 - 1;
> + xls_usb_ehci_device.dev.platform_data = &xls_usb_ehci_pdata;
>
> memres += 0x400;
> xls_usb_ohci_device_0.resource[0].start = memres;
Don't you need to change/set the pdev name also? Likewise for patch
20/25 and 24/25.
Alan Stern
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 09/25] MIPS: Octeon: use ehci-platform driver
2012-10-03 16:45 ` David Daney
@ 2012-10-03 18:30 ` Florian Fainelli
0 siblings, 0 replies; 44+ messages in thread
From: Florian Fainelli @ 2012-10-03 18:30 UTC (permalink / raw)
To: David Daney
Cc: stern, linux-usb, Ralf Baechle, David Daney, David S. Miller,
Wolfram Sang, linux-mips, linux-kernel
On Wednesday 03 October 2012 09:45:48 David Daney wrote:
> On 10/03/2012 08:03 AM, Florian Fainelli wrote:
> > Signed-off-by: Florian Fainelli <florian@openwrt.org>
> > ---
> > arch/mips/cavium-octeon/octeon-platform.c | 43
++++++++++++++++++++++++++++-
> > 1 file changed, 42 insertions(+), 1 deletion(-)
>
>
> NACK.
>
> OCTEON uses device tree now (or as soon as I send in the corresponding
> patches), so this would just be churning the code.
Please send the changes to enable Device Tree for EHCI and OHCI, and when both
platform drivers get Device Tree capability we can easily change them.
--
Florian
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 04/25] MIPS: Netlogic: use ehci-platform driver
2012-10-03 15:02 ` [PATCH 04/25] MIPS: Netlogic: use ehci-platform driver Florian Fainelli
2012-10-03 16:47 ` Alan Stern
@ 2012-10-04 10:51 ` Jonas Gorski
1 sibling, 0 replies; 44+ messages in thread
From: Jonas Gorski @ 2012-10-04 10:51 UTC (permalink / raw)
To: Florian Fainelli
Cc: stern, linux-usb, Ralf Baechle, Jayachandran C, linux-mips,
linux-kernel
On 3 October 2012 17:02, Florian Fainelli <florian@openwrt.org> wrote:
> Signed-off-by: Florian Fainelli <florian@openwrt.org>
> ---
> arch/mips/netlogic/xlr/platform.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/arch/mips/netlogic/xlr/platform.c b/arch/mips/netlogic/xlr/platform.c
> index 71b44d8..1731dfd 100644
> --- a/arch/mips/netlogic/xlr/platform.c
> +++ b/arch/mips/netlogic/xlr/platform.c
> @@ -15,6 +15,7 @@
> #include <linux/serial_8250.h>
> #include <linux/serial_reg.h>
> #include <linux/i2c.h>
> +#include <linux/usb/ehci_pdriver.h>
>
> #include <asm/netlogic/haldefs.h>
> #include <asm/netlogic/xlr/iomap.h>
> @@ -123,6 +124,10 @@ static u64 xls_usb_dmamask = ~(u32)0;
> }, \
> }
>
> +static struct usb_ehci_pdata xls_usb_ehci_pdata = {
> + .caps_offset = 0,
> +};
> +
> static struct platform_device xls_usb_ehci_device =
> USB_PLATFORM_DEV("ehci-xls", 0, PIC_USB_IRQ);
Don't you also need to change this to "ehci-platform"?
> static struct platform_device xls_usb_ohci_device_0 =
> @@ -172,6 +177,7 @@ int xls_platform_usb_init(void)
> memres = CPHYSADDR((unsigned long)usb_mmio);
> xls_usb_ehci_device.resource[0].start = memres;
> xls_usb_ehci_device.resource[0].end = memres + 0x400 - 1;
> + xls_usb_ehci_device.dev.platform_data = &xls_usb_ehci_pdata;
>
> memres += 0x400;
> xls_usb_ohci_device_0.resource[0].start = memres;
> --
> 1.7.9.5
Jonas
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 20/25] MIPS: Netlogic: convert to use OHCI platform driver
2012-10-03 15:03 ` [PATCH 20/25] MIPS: Netlogic: convert to use " Florian Fainelli
@ 2012-10-04 10:53 ` Jonas Gorski
0 siblings, 0 replies; 44+ messages in thread
From: Jonas Gorski @ 2012-10-04 10:53 UTC (permalink / raw)
To: Florian Fainelli
Cc: stern, linux-usb, Ralf Baechle, Jayachandran C, linux-mips,
linux-kernel
On 3 October 2012 17:03, Florian Fainelli <florian@openwrt.org> wrote:
> Signed-off-by: Florian Fainelli <florian@openwrt.org>
> ---
> arch/mips/netlogic/xlr/platform.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/arch/mips/netlogic/xlr/platform.c b/arch/mips/netlogic/xlr/platform.c
> index 320b7ef..755ddcc 100644
> --- a/arch/mips/netlogic/xlr/platform.c
> +++ b/arch/mips/netlogic/xlr/platform.c
> @@ -16,6 +16,7 @@
> #include <linux/serial_reg.h>
> #include <linux/i2c.h>
> #include <linux/usb/ehci_pdriver.h>
> +#include <linux/usb/ohci_pdriver.h>
>
> #include <asm/netlogic/haldefs.h>
> #include <asm/netlogic/xlr/iomap.h>
> @@ -129,6 +130,8 @@ static struct usb_ehci_pdata xls_usb_ehci_pdata = {
> .need_io_watchdog = 1,
> };
>
> +static struct usb_ohci_pdata xls_usb_ohci_pdata;
> +
> static struct platform_device xls_usb_ehci_device =
> USB_PLATFORM_DEV("ehci-xls", 0, PIC_USB_IRQ);
> static struct platform_device xls_usb_ohci_device_0 =
And change after the device names of the ohci devices to "ohci-platform"?
> @@ -183,10 +186,12 @@ int xls_platform_usb_init(void)
> memres += 0x400;
> xls_usb_ohci_device_0.resource[0].start = memres;
> xls_usb_ohci_device_0.resource[0].end = memres + 0x400 - 1;
> + xls_usb_ohci_device_0.dev.platform_data = &xls_usb_ohci_pdata;
>
> memres += 0x400;
> xls_usb_ohci_device_1.resource[0].start = memres;
> xls_usb_ohci_device_1.resource[0].end = memres + 0x400 - 1;
> + xls_usb_ohci_device_1.dev.platform_data = &xls_usb_ohci_pdata;
>
> return platform_add_devices(xls_platform_devices,
> ARRAY_SIZE(xls_platform_devices));
> --
> 1.7.9.5
Jonas
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 04/25] MIPS: Netlogic: use ehci-platform driver
2012-10-03 16:47 ` Alan Stern
@ 2012-10-04 14:51 ` Florian Fainelli
0 siblings, 0 replies; 44+ messages in thread
From: Florian Fainelli @ 2012-10-04 14:51 UTC (permalink / raw)
To: Alan Stern
Cc: linux-usb, Ralf Baechle, Jayachandran C, linux-mips, linux-kernel
On Wednesday 03 October 2012 12:47:58 Alan Stern wrote:
> On Wed, 3 Oct 2012, Florian Fainelli wrote:
>
> > Signed-off-by: Florian Fainelli <florian@openwrt.org>
>
> IMO, patches should always have a non-empty changelog. Even if it is
> relatively trivial. The same comment applies to several other patches
> in this series.
>
> > ---
> > arch/mips/netlogic/xlr/platform.c | 6 ++++++
> > 1 file changed, 6 insertions(+)
>
> Does this need to enable CONFIG_USB_EHCI_HCD_PLATFORM is some
> defconfig file, like you did with the MIPS Loongson 1B?
Netlogic platforms have USB disabled by default in their defconfig, so I'd say
no, but only for them.
>
> And likewise for quite a few of the other patches in this series.
>
> > diff --git a/arch/mips/netlogic/xlr/platform.c
b/arch/mips/netlogic/xlr/platform.c
> > index 71b44d8..1731dfd 100644
> > --- a/arch/mips/netlogic/xlr/platform.c
> > +++ b/arch/mips/netlogic/xlr/platform.c
> > @@ -15,6 +15,7 @@
> > #include <linux/serial_8250.h>
> > #include <linux/serial_reg.h>
> > #include <linux/i2c.h>
> > +#include <linux/usb/ehci_pdriver.h>
> >
> > #include <asm/netlogic/haldefs.h>
> > #include <asm/netlogic/xlr/iomap.h>
> > @@ -123,6 +124,10 @@ static u64 xls_usb_dmamask = ~(u32)0;
> > }, \
> > }
> >
> > +static struct usb_ehci_pdata xls_usb_ehci_pdata = {
> > + .caps_offset = 0,
> > +};
> > +
> > static struct platform_device xls_usb_ehci_device =
> > USB_PLATFORM_DEV("ehci-xls", 0, PIC_USB_IRQ);
> > static struct platform_device xls_usb_ohci_device_0 =
> > @@ -172,6 +177,7 @@ int xls_platform_usb_init(void)
> > memres = CPHYSADDR((unsigned long)usb_mmio);
> > xls_usb_ehci_device.resource[0].start = memres;
> > xls_usb_ehci_device.resource[0].end = memres + 0x400 - 1;
> > + xls_usb_ehci_device.dev.platform_data = &xls_usb_ehci_pdata;
> >
> > memres += 0x400;
> > xls_usb_ohci_device_0.resource[0].start = memres;
>
> Don't you need to change/set the pdev name also? Likewise for patch
> 20/25 and 24/25.
>
> Alan Stern
>
^ permalink raw reply [flat|nested] 44+ messages in thread
end of thread, other threads:[~2012-10-04 14:51 UTC | newest]
Thread overview: 44+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1349276601-8371-1-git-send-email-florian@openwrt.org>
2012-10-03 15:02 ` [PATCH 01/25] USB: ehci: remove IXP4xx EHCI driver Florian Fainelli
2012-10-03 15:02 ` [PATCH 02/25] MIPS: Loongson 1B: use ehci-platform instead of ehci-ls1x Florian Fainelli
2012-10-03 15:02 ` [PATCH 03/25] USB: ehci: remove Loongson 1B EHCI driver Florian Fainelli
2012-10-03 15:02 ` [PATCH 04/25] MIPS: Netlogic: use ehci-platform driver Florian Fainelli
2012-10-03 16:47 ` Alan Stern
2012-10-04 14:51 ` Florian Fainelli
2012-10-04 10:51 ` Jonas Gorski
2012-10-03 15:03 ` [PATCH 05/25] USB: ehci: remove Netlogic XLS EHCI driver Florian Fainelli
2012-10-03 15:03 ` [PATCH 06/25] USB: ehci: allow need_io_watchdog to be passed to ehci-platform driver Florian Fainelli
2012-10-03 16:01 ` Alan Stern
2012-10-03 16:12 ` Florian Fainelli
2012-10-03 15:03 ` [PATCH 07/25] MIPS: Alchemy: use the ehci platform driver Florian Fainelli
2012-10-03 15:14 ` Manuel Lauss
2012-10-03 15:20 ` Florian Fainelli
2012-10-03 15:03 ` [PATCH 08/25] USB: ehci: remove Alchemy EHCI driver Florian Fainelli
2012-10-03 15:03 ` [PATCH 09/25] MIPS: Octeon: use ehci-platform driver Florian Fainelli
2012-10-03 16:45 ` David Daney
2012-10-03 18:30 ` Florian Fainelli
2012-10-03 15:03 ` [PATCH 10/25] USB: ehci: remove Octeon EHCI driver Florian Fainelli
2012-10-03 15:03 ` [PATCH 11/25] ARM: cns3xxx: use ehci platform driver Florian Fainelli
2012-10-03 15:03 ` [PATCH 12/25] USB: ehci: remove CNS3xxx EHCI " Florian Fainelli
2012-10-03 16:16 ` Alan Stern
2012-10-03 15:03 ` [PATCH 13/25] USB: ohci: allow platform driver to specify the number of ports Florian Fainelli
2012-10-03 15:03 ` [PATCH 14/25] MIPS: PNX8550: use OHCI platform driver Florian Fainelli
2012-10-03 15:03 ` [PATCH 14/25] MIPS: PNX8550: useOHCI " Florian Fainelli
2012-10-03 15:03 ` [PATCH 15/25] USB: ohci: remove PNX8550 OHCI driver Florian Fainelli
2012-10-03 15:03 ` [PATCH 16/25] ARM: cns3xxx: use OHCI platform driver Florian Fainelli
2012-10-03 15:03 ` [PATCH 17/25] USB: ohci: remove CNS3xxx " Florian Fainelli
2012-10-03 15:03 ` [PATCH 18/25] MIPS: Octeon: use " Florian Fainelli
2012-10-03 16:47 ` David Daney
2012-10-03 15:03 ` [PATCH 19/25] USB: ohci: remove Octeon " Florian Fainelli
2012-10-03 15:03 ` [PATCH 20/25] MIPS: Netlogic: convert to use " Florian Fainelli
2012-10-04 10:53 ` Jonas Gorski
2012-10-03 15:03 ` [PATCH 21/25] USB: ohci: remove Netlogic XLS " Florian Fainelli
2012-10-03 15:03 ` [PATCH 22/25] sh: convert boards to use the " Florian Fainelli
2012-10-03 15:03 ` [PATCH 23/25] USB: ohci: remove OHCI SH " Florian Fainelli
2012-10-03 15:03 ` [PATCH 24/25] MIPS: Alchemy: use the OHCI " Florian Fainelli
2012-10-03 15:21 ` Manuel Lauss
2012-10-03 15:24 ` Florian Fainelli
2012-10-03 15:26 ` Manuel Lauss
2012-10-03 16:07 ` Manuel Lauss
2012-10-03 16:13 ` Florian Fainelli
2012-10-03 15:03 ` [PATCH 25/25] USB: ohci: remove Alchemy " Florian Fainelli
2012-10-03 16:47 ` Alan Stern
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox