Skip to contentSkip to conversation

Patches to support QE USB Host Controller

PATCH In review Anton Vorontsov 4 participants 15 messages Sep 18, 2008 – Sep 24, 2008

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover Patches to support QE USB Host Controller

Hi all,

More than a month has passed since the first post. Unfortunately David didn't comment on the "1/3" patch, and Greg said that he have to wait for it...

(Laurent Pinchart also said that he is interested in the first patch, so here are at least two users for that call.)

So I'm reposting this again. The first patch has changed in a way that now it exports gpio_desc instead of just a function, this keeps the gpiolib code optimized.

Previous patchset and discussion can be found here:

http://linux.derkeiler.com/Mailing-Lists/Kernel/2008-08/msg03687.html

Thanks,

Signature · 3 lines
Anton Vorontsov
email: [email protected]
irc://irc.freenode.net/bd2
#1 lore raw

PATCH 1/3 gpiolib: make gpio_to_chip() public

We'll need this function to write platform-specific hooks to deal with pin's dedicated functions. Quite obviously this will work only for the platforms with 1-to-1 GPIO to PIN mapping.

This is stopgap solution till we think out and implement a proper api (pinlib?).

p.s. This patch actually exports gpio_desc and places gpio_to_chip into the asm-generic/gpio.h as `static inline'. This is needed to not cause function calls for this trivial translation.

Also, the patch does not export FLAG_*s... the names are too generic, and nobody is using them outside of gpiolib.c.

---
 drivers/gpio/gpiolib.c     |   16 ++--------------
 include/asm-generic/gpio.h |   17 +++++++++++++++++
 2 files changed, 19 insertions(+), 14 deletions(-)
drivers/gpio/gpiolib.c +2 -14
index 8d29405..fb36a90 100644
@@ -40,9 +40,6 @@
  */
 static DEFINE_SPINLOCK(gpio_lock);
 
-struct gpio_desc {
-	struct gpio_chip	*chip;
-	unsigned long		flags;
 /* flag symbols are bit numbers */
 #define FLAG_REQUESTED	0
 #define FLAG_IS_OUT	1
@@ -50,11 +47,8 @@ struct gpio_desc {
 #define FLAG_EXPORT	3	/* protected by sysfs_lock */
 #define FLAG_SYSFS	4	/* exported via /sys/class/gpio/control */
 
-#ifdef CONFIG_DEBUG_FS
-	const char		*label;
-#endif
-};
-static struct gpio_desc gpio_desc[ARCH_NR_GPIOS];
+struct gpio_desc gpio_desc[ARCH_NR_GPIOS];
+EXPORT_SYMBOL_GPL(gpio_desc);
 
 static inline void desc_set_label(struct gpio_desc *d, const char *label)
 {
@@ -80,12 +74,6 @@ static void gpio_ensure_requested(struct gpio_desc *desc)
 	}
 }
 
-/* caller holds gpio_lock *OR* gpio is marked as requested */
-static inline struct gpio_chip *gpio_to_chip(unsigned gpio)
-{
-	return gpio_desc[gpio].chip;
-}
-
 /* dynamic allocation of GPIOs, e.g. on a hotplugged device */
 static int gpiochip_find_base(int ngpio)
 {
include/asm-generic/gpio.h +17 -0
index 0f99ad3..88962f0 100644
@@ -81,6 +81,23 @@ struct gpio_chip {
 	unsigned		exported:1;
 };
 
+struct gpio_desc {
+	struct gpio_chip	*chip;
+	unsigned long		flags;
+
+#ifdef CONFIG_DEBUG_FS
+	const char		*label;
+#endif
+};
+
+extern struct gpio_desc gpio_desc[ARCH_NR_GPIOS];
+
+/* caller holds gpio_lock *OR* gpio is marked as requested */
+static inline struct gpio_chip *gpio_to_chip(unsigned gpio)
+{
+	return gpio_desc[gpio].chip;
+}
+
 extern const char *gpiochip_is_requested(struct gpio_chip *chip,
 			unsigned offset);
 extern int __must_check gpiochip_reserve(int start, int ngpio);
Signature · 1 line
1.5.6.3
#2 lore raw

PATCH 2/3 powerpc/qe: new call to revert a gpio to a dedicated function

In reply to Anton Vorontsov

qe_gpio_set_dedicated() is a platform specific function, which is used to revert a pin to a dedicated function. Caller should have already obtained the gpio via gpio_request().

This is needed to support Freescale USB Host Controller.

---
 arch/powerpc/include/asm/qe.h     |    1 +
 arch/powerpc/sysdev/qe_lib/gpio.c |   46 +++++++++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+), 0 deletions(-)
arch/powerpc/include/asm/qe.h +1 -0
index edee15d..c926147 100644
@@ -111,6 +111,7 @@ extern void __par_io_config_pin(struct qe_pio_regs __iomem *par_io, u8 pin,
 extern int par_io_config_pin(u8 port, u8 pin, int dir, int open_drain,
 			     int assignment, int has_irq);
 extern int par_io_data_set(u8 port, u8 pin, u8 val);
+extern int qe_gpio_set_dedicated(unsigned int gpio);
 
 /* QE internal API */
 int qe_issue_cmd(u32 cmd, u32 device, u8 mcn_protocol, u32 cmd_input);
arch/powerpc/sysdev/qe_lib/gpio.c +46 -0

64 lines not on this page · raw message

Signature · 1 line
1.5.6.3
#3 lore raw

PATCH 3/3 USB: driver for Freescale QUICC Engine USB Host Controller

In reply to Anton Vorontsov

This patch adds support for the FHCI USB controller, as found in the Freescale MPC836x and MPC832x processors. It can support Full or Low speed modes.

Quite a lot the hardware is doing by itself (SOF generation, CRC generation and checking), though scheduling and retransmission is on software's shoulders.

This controller does not integrate the root hub, so this driver also fakes one-port hub. External hub is required to support more than one device.

---
 drivers/usb/Makefile          |    1 +
 drivers/usb/host/Kconfig      |   17 +
 drivers/usb/host/Makefile     |    1 +
 drivers/usb/host/fhci-cq.c    |  105 +++++
 drivers/usb/host/fhci-dbg.c   |  144 +++++++
 drivers/usb/host/fhci-hcd.c   |  798 +++++++++++++++++++++++++++++++++++++
 drivers/usb/host/fhci-hub.c   |  338 ++++++++++++++++
 drivers/usb/host/fhci-mem.c   |  105 +++++
 drivers/usb/host/fhci-q.c     |  242 ++++++++++++
 drivers/usb/host/fhci-sched.c |  866 +++++++++++++++++++++++++++++++++++++++++
 drivers/usb/host/fhci-tds.c   |  633 ++++++++++++++++++++++++++++++
 drivers/usb/host/fhci.h       |  526 +++++++++++++++++++++++++
 12 files changed, 3776 insertions(+), 0 deletions(-)
 create mode 100644 drivers/usb/host/fhci-cq.c
 create mode 100644 drivers/usb/host/fhci-dbg.c
 create mode 100644 drivers/usb/host/fhci-hcd.c
 create mode 100644 drivers/usb/host/fhci-hub.c
 create mode 100644 drivers/usb/host/fhci-mem.c
 create mode 100644 drivers/usb/host/fhci-q.c
 create mode 100644 drivers/usb/host/fhci-sched.c
 create mode 100644 drivers/usb/host/fhci-tds.c
 create mode 100644 drivers/usb/host/fhci.h
drivers/usb/Makefile +1 -0
index a419c42..7b14564 100644
@@ -16,6 +16,7 @@ obj-$(CONFIG_USB_UHCI_HCD)	+= host/
 obj-$(CONFIG_USB_SL811_HCD)	+= host/
 obj-$(CONFIG_USB_U132_HCD)	+= host/
 obj-$(CONFIG_USB_R8A66597_HCD)	+= host/
+obj-$(CONFIG_USB_FHCI_HCD)	+= host/
 
 obj-$(CONFIG_USB_C67X00_HCD)	+= c67x00/
 
drivers/usb/host/Kconfig +17 -0
index 228797e..594c263 100644
@@ -305,3 +305,20 @@ config SUPERH_ON_CHIP_R8A66597
 	help
 	   This driver enables support for the on-chip R8A66597 in the
 	   SH7366 and SH7723 processors.
+
+config USB_FHCI_HCD
+	tristate "Freescale QE USB Host Controller support"
+	depends on USB && OF_GPIO && QUICC_ENGINE
+	select FSL_GTM
+	select QE_USB
+	help
+	  This driver enables support for Freescale QE USB Host Controller
+	  (as found on MPC8360 and MPC8323 processors), the driver supports
+	  Full and Low Speed USB.
+
+config FHCI_DEBUG
+	bool "Freescale QE USB Host Controller debug support"
+	depends on USB_FHCI_HCD && DEBUG_FS
+	help
+	  Say "y" to see some FHCI debug information and statistics
+	  throught debugfs.
drivers/usb/host/Makefile +1 -0
index f1edda2..b71dfed 100644
@@ -19,3 +19,4 @@ obj-$(CONFIG_USB_SL811_CS)	+= sl811_cs.o
 obj-$(CONFIG_USB_U132_HCD)	+= u132-hcd.o
 obj-$(CONFIG_USB_R8A66597_HCD)	+= r8a66597-hcd.o
 obj-$(CONFIG_USB_ISP1760_HCD)	+= isp1760.o
+obj-$(CONFIG_USB_FHCI_HCD)	+= fhci-hcd.o
drivers/usb/host/fhci-cq.c new file +105 -0

105 lines not on this page · raw message

drivers/usb/host/fhci-dbg.c new file +144 -0

144 lines not on this page · raw message

drivers/usb/host/fhci-hcd.c new file +798 -0

798 lines not on this page · raw message

drivers/usb/host/fhci-hub.c new file +338 -0

338 lines not on this page · raw message

drivers/usb/host/fhci-mem.c new file +105 -0

105 lines not on this page · raw message

drivers/usb/host/fhci-q.c new file +242 -0

242 lines not on this page · raw message

drivers/usb/host/fhci-sched.c new file +866 -0

866 lines not on this page · raw message

drivers/usb/host/fhci-tds.c new file +633 -0

371 lines not on this page · raw message

drivers/usb/host/fhci.h new file +526 -0

526 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.5.6.3

Part of the diff is not shown here. View the raw message.

#4 lore raw

Re: [PATCH 3/3] USB: driver for Freescale QUICC Engine USB Host Controller

Quoted 8 lines · On Thu, 18 Sep 2008 19:17:46 +0400 Anton Vorontsov <[email protected]>…

This patch adds support for the FHCI USB controller, as found in the Freescale MPC836x and MPC832x processors. It can support Full or Low speed modes.

Quite a lot the hardware is doing by itself (SOF generation, CRC generation and checking), though scheduling and retransmission is on software's shoulders.

Quoted 6 lines

This controller does not integrate the root hub, so this driver also fakes one-port hub. External hub is required to support more than one device.

...

Please, no.

Quoted 13 lines

new file mode 100644
index 0000000..23716fa

drivers/usb/host/fhci-cq.c new file +8 -0
@@ -0,0 +1,105 @@
+/*
+ * Freescale QUICC Engine USB Host Controller Driver
+ *
+ * Copyright (c) Freescale Semicondutor, Inc. 2006.
+ *               Shlomi Gridish <[email protected]>
+ *               Jerry Huang <[email protected]>
+ * Copyright (c) Logic Product Development, Inc. 2007
+ *               Peter Barada <[email protected]>

drivers/usb/host/fhci-cq.c line 18

Quoted 10 lines
drivers/usb/host/fhci-cq.c new file +10 -0
+ * Copyright (c) MontaVista Software, Inc. 2008.
+ *               Anton Vorontsov <[email protected]>
+ *
+ * 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;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+/* circular queue structure */

Yet another private ringbuffer implementation. Sigh.

Quoted 19 lines
drivers/usb/host/fhci-cq.c new file +19 -0
+struct cir_q {
+       int max;		/* size of queue */
+       int max_in;	/* max items in queue */
+       int first;	/* index of first in queue */
+       int last;	/* index after last in queue */
+       int read;	/* current reading position */
+       void *table[1];	/* fake size */
+};
+
+/* circular queue handle */
+static int cq_howmany(struct cir_q *cq)
+{
+	int l = cq->last;
+	int f = cq->first;
+
+	return l >= f ? l - f : l + cq->max - f;
+}
+
+static struct cir_q *cq_new(int size)

drivers/usb/host/fhci-cq.c line 47

Quoted 10 lines
drivers/usb/host/fhci-cq.c new file +10 -0
+{
+	struct cir_q *cq;
+
+	cq = kzalloc((sizeof(*cq) + size * sizeof(void *)), GFP_KERNEL);
+	if (cq) {
+		cq->max = size;
+		cq->first = 0;
+		cq->last = 0;
+		cq->read = 0;
+		cq->max_in = 0;

The above four statements are unneeded.

Quoted 41 lines
drivers/usb/host/fhci-cq.c new file +37 -0
+	}
+
+	return cq;
+}
 
...
 
+++ b/drivers/usb/host/fhci-hcd.c
@@ -0,0 +1,798 @@
+/*
+ * Freescale QUICC Engine USB Host Controller Driver
+ *
+ * Copyright (c) Freescale Semicondutor, Inc. 2006.
+ *               Shlomi Gridish <[email protected]>
+ *               Jerry Huang <[email protected]>
+ * Copyright (c) Logic Product Development, Inc. 2007
+ *               Peter Barada <[email protected]>
+ * Copyright (c) MontaVista Software, Inc. 2008.
+ *               Anton Vorontsov <[email protected]>
+ *
+ * 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;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+#if defined(CONFIG_FHCI_DEBUG) && !defined(DEBUG)
+#define DEBUG
+#endif
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/delay.h>
+#include <linux/errno.h>
+#include <linux/list.h>
+#include <linux/interrupt.h>
+#include <linux/io.h>
+#include <linux/usb.h>
+#include <linux/of_platform.h>
+#include <linux/of_gpio.h>
+#include <asm/qe.h>

drivers/usb/host/fhci-cq.c line 42

Quoted 10 lines
drivers/usb/host/fhci-cq.c new file +10 -0
+#include <asm/fsl_gtm.h>
+#include "../core/hcd.h"
+#include "fhci.h"
+#include "fhci-hub.c"
+#include "fhci-q.c"
+#include "fhci-dbg.c"
+#include "fhci-mem.c"
+#include "fhci-cq.c"
+#include "fhci-tds.c"
+#include "fhci-sched.c"

hack, gack, nack.

We know that USB likes to prevertedly #include C files all over the place, but this doesn't mean that it's a sane, tasteful or desirable thing to do.

I stopped looking there. Guys - get a grip :(

#5 lore raw

Re: [PATCH 3/3] USB: driver for Freescale QUICC Engine USB Host Controller

Quoted 11 lines · Andrew Morton
Quoted 8 lines · On Thu, 18 Sep 2008 19:17:46 +0400 Anton Vorontsov <[email protected]>…

This patch adds support for the FHCI USB controller, as found in the Freescale MPC836x and MPC832x processors. It can support Full or Low speed modes.

Quite a lot the hardware is doing by itself (SOF generation, CRC generation and checking), though scheduling and retransmission is on software's shoulders.

Quoted 8 lines
Quoted 6 lines

This controller does not integrate the root hub, so this driver also fakes one-port hub. External hub is required to support more than one device.

...

Please, no.

What exactly 'no'? ;-)

Quoted 17 lines
Quoted 17 lines

new file mode 100644
index 0000000..23716fa

drivers/usb/host/fhci-cq.c new file +12 -0
@@ -0,0 +1,105 @@
+/*
+ * Freescale QUICC Engine USB Host Controller Driver
+ *
+ * Copyright (c) Freescale Semicondutor, Inc. 2006.
+ *               Shlomi Gridish <[email protected]>
+ *               Jerry Huang <[email protected]>
+ * Copyright (c) Logic Product Development, Inc. 2007
+ *               Peter Barada <[email protected]>
+ * Copyright (c) MontaVista Software, Inc. 2008.
+ *               Anton Vorontsov <[email protected]>
+ *
+ * This program is free software; you can redistribute  it and/or modify it
Quoted 8 lines

drivers/usb/host/fhci-cq.c line 18

Quoted 6 lines
drivers/usb/host/fhci-cq.c new file +6 -0
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+/* circular queue structure */

Yet another private ringbuffer implementation. Sigh.

Heh. I changed this to kfifo, though I don't quite like it, since it feels heavy to hold mere pointers...

[...]

Quoted 47 lines
Quoted 34 lines
drivers/usb/host/fhci-cq.c new file +33 -0
+++ b/drivers/usb/host/fhci-hcd.c
@@ -0,0 +1,798 @@
+/*
+ * Freescale QUICC Engine USB Host Controller Driver
+ *
+ * Copyright (c) Freescale Semicondutor, Inc. 2006.
+ *               Shlomi Gridish <[email protected]>
+ *               Jerry Huang <[email protected]>
+ * Copyright (c) Logic Product Development, Inc. 2007
+ *               Peter Barada <[email protected]>
+ * Copyright (c) MontaVista Software, Inc. 2008.
+ *               Anton Vorontsov <[email protected]>
+ *
+ * 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;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+#if defined(CONFIG_FHCI_DEBUG) && !defined(DEBUG)
+#define DEBUG
+#endif
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/delay.h>
+#include <linux/errno.h>
+#include <linux/list.h>
+#include <linux/interrupt.h>
+#include <linux/io.h>
+#include <linux/usb.h>
+#include <linux/of_platform.h>
+#include <linux/of_gpio.h>
+#include <asm/qe.h>

drivers/usb/host/fhci-cq.c line 42

Quoted 10 lines
drivers/usb/host/fhci-cq.c new file +10 -0
+#include <asm/fsl_gtm.h>
+#include "../core/hcd.h"
+#include "fhci.h"
+#include "fhci-hub.c"
+#include "fhci-q.c"
+#include "fhci-dbg.c"
+#include "fhci-mem.c"
+#include "fhci-cq.c"
+#include "fhci-tds.c"
+#include "fhci-sched.c"

hack, gack, nack.

Quoted 3 lines

We know that USB likes to prevertedly #include C files all over the place, but this doesn't mean that it's a sane, tasteful or desirable thing to do.

Hm. I fixed this, but for lengthy drivers, where we want split the driver in multiple logical files, this sometimes makes sense (for example, we don't need externed functions. plus gcc automatically might inline some of them, etc).

Thanks!

Signature · 3 lines
Anton Vorontsov
email: [email protected]
irc://irc.freenode.net/bd2
#6 lore raw

PATCH 1/2 USB: Protect hcd.h from multiple inclusions

This will let us use this header in other header files. Will be needed for the FHCI USB Host driver.

---
 drivers/usb/core/hcd.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/usb/core/hcd.h +4 -0
index e710ce0..66b64d7 100644
@@ -16,6 +16,8 @@
  * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#ifndef __USB_CORE_HCD_H
+#define __USB_CORE_HCD_H
 
 #ifdef __KERNEL__
 
@@ -483,3 +485,5 @@ static inline void usbmon_urb_complete(struct usb_bus *bus, struct urb *urb,
 extern struct rw_semaphore ehci_cf_port_reset_rwsem;
 
 #endif /* __KERNEL__ */
+
+#endif /* __USB_CORE_HCD_H */
Signature · 1 line
1.5.6.3
#7 lore raw

PATCH 2/2 USB: driver for Freescale QUICC Engine USB Host Controller

In reply to Anton Vorontsov

This patch adds support for the FHCI USB controller, as found in the Freescale MPC836x and MPC832x processors. It can support Full or Low speed modes.

Quite a lot the hardware is doing by itself (SOF generation, CRC generation and checking), though scheduling and retransmission is on software's shoulders.

This controller does not integrate the root hub, so this driver also fakes one-port hub. External hub is required to support more than one device.

---
 drivers/usb/Makefile          |    1 +
 drivers/usb/host/Kconfig      |   17 +
 drivers/usb/host/Makefile     |    8 +
 drivers/usb/host/fhci-dbg.c   |  139 +++++++
 drivers/usb/host/fhci-hcd.c   |  789 ++++++++++++++++++++++++++++++++++++
 drivers/usb/host/fhci-hub.c   |  349 ++++++++++++++++
 drivers/usb/host/fhci-mem.c   |  112 ++++++
 drivers/usb/host/fhci-q.c     |  280 +++++++++++++
 drivers/usb/host/fhci-sched.c |  889 +++++++++++++++++++++++++++++++++++++++++
 drivers/usb/host/fhci-tds.c   |  626 +++++++++++++++++++++++++++++
 drivers/usb/host/fhci.h       |  597 +++++++++++++++++++++++++++
 11 files changed, 3807 insertions(+), 0 deletions(-)
 create mode 100644 drivers/usb/host/fhci-dbg.c
 create mode 100644 drivers/usb/host/fhci-hcd.c
 create mode 100644 drivers/usb/host/fhci-hub.c
 create mode 100644 drivers/usb/host/fhci-mem.c
 create mode 100644 drivers/usb/host/fhci-q.c
 create mode 100644 drivers/usb/host/fhci-sched.c
 create mode 100644 drivers/usb/host/fhci-tds.c
 create mode 100644 drivers/usb/host/fhci.h
drivers/usb/Makefile +1 -0
index a419c42..7b14564 100644
@@ -16,6 +16,7 @@ obj-$(CONFIG_USB_UHCI_HCD)	+= host/
 obj-$(CONFIG_USB_SL811_HCD)	+= host/
 obj-$(CONFIG_USB_U132_HCD)	+= host/
 obj-$(CONFIG_USB_R8A66597_HCD)	+= host/
+obj-$(CONFIG_USB_FHCI_HCD)	+= host/
 
 obj-$(CONFIG_USB_C67X00_HCD)	+= c67x00/
 
drivers/usb/host/Kconfig +17 -0
index 228797e..594c263 100644
@@ -305,3 +305,20 @@ config SUPERH_ON_CHIP_R8A66597
 	help
 	   This driver enables support for the on-chip R8A66597 in the
 	   SH7366 and SH7723 processors.
+
+config USB_FHCI_HCD
+	tristate "Freescale QE USB Host Controller support"
+	depends on USB && OF_GPIO && QUICC_ENGINE
+	select FSL_GTM
+	select QE_USB
+	help
+	  This driver enables support for Freescale QE USB Host Controller
+	  (as found on MPC8360 and MPC8323 processors), the driver supports
+	  Full and Low Speed USB.
+
+config FHCI_DEBUG
+	bool "Freescale QE USB Host Controller debug support"
+	depends on USB_FHCI_HCD && DEBUG_FS
+	help
+	  Say "y" to see some FHCI debug information and statistics
+	  throught debugfs.
drivers/usb/host/Makefile +8 -0
index f1edda2..2e1eaa7 100644
@@ -8,6 +8,13 @@ endif
 
 isp1760-objs := isp1760-hcd.o isp1760-if.o
 
+fhci-objs := fhci-hcd.o fhci-hub.o fhci-q.o fhci-mem.o \
+	     fhci-tds.o fhci-sched.o
+
+ifeq ($(CONFIG_FHCI_DEBUG),y)
+fhci-objs += fhci-dbg.o
+endif
+
 obj-$(CONFIG_PCI)		+= pci-quirks.o
 
 obj-$(CONFIG_USB_EHCI_HCD)	+= ehci-hcd.o
@@ -19,3 +26,4 @@ obj-$(CONFIG_USB_SL811_CS)	+= sl811_cs.o
 obj-$(CONFIG_USB_U132_HCD)	+= u132-hcd.o
 obj-$(CONFIG_USB_R8A66597_HCD)	+= r8a66597-hcd.o
 obj-$(CONFIG_USB_ISP1760_HCD)	+= isp1760.o
+obj-$(CONFIG_USB_FHCI_HCD)	+= fhci.o
drivers/usb/host/fhci-dbg.c new file +139 -0

139 lines not on this page · raw message

drivers/usb/host/fhci-hcd.c new file +789 -0

789 lines not on this page · raw message

drivers/usb/host/fhci-hub.c new file +349 -0

349 lines not on this page · raw message

drivers/usb/host/fhci-mem.c new file +112 -0

112 lines not on this page · raw message

drivers/usb/host/fhci-q.c new file +280 -0

280 lines not on this page · raw message

drivers/usb/host/fhci-sched.c new file +889 -0

889 lines not on this page · raw message

drivers/usb/host/fhci-tds.c new file +626 -0

398 lines not on this page · raw message

drivers/usb/host/fhci.h new file +597 -0

597 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.5.6.3

Part of the diff is not shown here. View the raw message.

#8 lore raw

Re: [PATCH 3/3] USB: driver for Freescale QUICC Engine USB Host Controller

In reply to Anton Vorontsov

Hello.

Quoted 12 lines · Anton Vorontsov
Quoted 12 lines
Quoted 12 lines

This patch adds support for the FHCI USB controller, as found in the Freescale MPC836x and MPC832x processors. It can support Full or Low speed modes.

Quite a lot the hardware is doing by itself (SOF generation, CRC generation and checking), though scheduling and retransmission is on software's shoulders.

This controller does not integrate the root hub, so this driver also fakes one-port hub. External hub is required to support more than one device.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

...

Please, no.

What exactly 'no'? ;-)

No one-port hubs I guess -- they are pointless. Though e.g. MUSB
driver creates one -- I guess to impersonate a transaction translating high-speed hub...

WBR, Sergei

#9 lore raw

Re: [PATCH 3/3] USB: driver for Freescale QUICC Engine USB Host Controller

Quoted 3 lines · Hello, I wrote:
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

This patch adds support for the FHCI USB controller, as found in the Freescale MPC836x and MPC832x processors. It can support Full or Low speed modes.

Ah, it's not even high-speed?

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

Quite a lot the hardware is doing by itself (SOF generation, CRC generation and checking), though scheduling and retransmission is on software's shoulders.

I imagine that must be worse than MUSB... :-/

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

This controller does not integrate the root hub, so this driver also fakes one-port hub. External hub is required to support more than one device.

...

Quoted 9 lines
Quoted 5 lines
Quoted 2 lines

Please, no.

What exactly 'no'? ;-)

No one-port hubs I guess -- they are pointless. Though e.g. MUSB
driver creates one -- I guess to impersonate a transaction translating high-speed hub...

... then the root hub emulation is completely pointless.

WBR, Sergei

#10 lore raw

Re: [PATCH 3/3] USB: driver for Freescale QUICC Engine USB Host Controller

On Wed, Sep 24, 2008 at 01:35:41AM +0400, Sergei Shtylyov wrote:
[...]

Quoted 13 lines
Quoted 13 lines
Quoted 12 lines
Quoted 9 lines
Quoted 7 lines

This controller does not integrate the root hub, so this driver also fakes one-port hub. External hub is required to support more than one device.

...

Please, no.

What exactly 'no'? ;-)

Quoted 6 lines
Quoted 4 lines

No one-port hubs I guess -- they are pointless. Though e.g. MUSB
driver creates one -- I guess to impersonate a transaction translating high-speed hub...

... then the root hub emulation is completely pointless.

It isn't. We always should emulate the root hub. The root hub is part and parcel of any USB Host. Even the one-port one.

Signature · 3 lines
Anton Vorontsov
email: [email protected]
irc://irc.freenode.net/bd2
#11 lore raw

Re: [PATCH 3/3] USB: driver for Freescale QUICC Engine USB Host Controller

Hello.

Quoted 18 lines · Anton Vorontsov
Quoted 18 lines
Quoted 18 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

This controller does not integrate the root hub, so this driver also fakes one-port hub. External hub is required to support more than one device.

Quoted 10 lines
Quoted 7 lines
Quoted 4 lines

...

Please, no.

What exactly 'no'? ;-)

No one-port hubs I guess -- they are pointless. Though e.g. MUSB
driver creates one -- I guess to impersonate a transaction translating high-speed hub...

Quoted 5 lines
Quoted 2 lines

... then the root hub emulation is completely pointless.

It isn't. We always should emulate the root hub. The root hub is part and parcel of any USB Host. Even the one-port one.

Hm, maybe that's what USB core thinks (because UHCI/OHCI/EHCI all
have it) but e.g. MUSB doesn't have the root hub registers...
I looked at the core and figured that USB core seems to use the root hub interface for port PM, etc. and expects it to bee present, so it seems unavoidable indeed... :-/

WBR, Sergei

#12 lore raw

Re: [PATCH 3/3] USB: driver for Freescale QUICC Engine USB Host Controller

Quoted 15 lines · Hello, I wrote:
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
Quoted 11 lines
Quoted 9 lines
Quoted 7 lines

This controller does not integrate the root hub, so this driver also fakes one-port hub. External hub is required to support more than one device.

...

Please, no.

What exactly 'no'? ;-)

No one-port hubs I guess -- they are pointless. Though e.g. MUSB
driver creates one -- I guess to impersonate a transaction translating high-speed hub...

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

... then the root hub emulation is completely pointless.

It isn't. We always should emulate the root hub. The root hub is part and parcel of any USB Host. Even the one-port one.

Hm, maybe that's what USB core thinks (because UHCI/OHCI/EHCI all
have it) but e.g. MUSB doesn't have the root hub registers...

Oops, I stand corrected. Even USB 1.1 specifies that it must be a
part the host...

WBR, Sergei

#13 lore raw

Re: [PATCH 3/3] USB: driver for Freescale QUICC Engine USB Host Controller

In reply to Sergei Shtylyov
Quoted 9 lines · Sergei Shtylyov
Quoted 6 lines
Quoted 3 lines

  ... then the root hub emulation is completely pointless.

It isn't. We always should emulate the root hub. The root hub is part and parcel of any USB Host. Even the one-port one.

   Hm, maybe that's what USB core thinks (because UHCI/OHCI/EHCI all have it) but e.g. MUSB doesn't have the root hub registers...

Only the OHCI registers have bit positions matching what the USB spec says for hub status bits. Everything else, including musb_hdrc, has the relevant status encoded in other bits.

Quoted 3 lines

I looked at the core and figured that USB core seems to use the root hub interface for port PM, etc. and expects it to bee present, so it seems unavoidable indeed... :-/

Or more fundamentally: for enumeration. "Unavoidable" is correct. ;)

#14 lore raw

Re: [PATCH 3/3] USB: driver for Freescale QUICC Engine USB Host Controller

Hello.

Quoted 10 lines · David Brownell
Quoted 7 lines
Quoted 4 lines
Quoted 1 line

... then the root hub emulation is completely pointless.

It isn't. We always should emulate the root hub. The root hub is part and parcel of any USB Host. Even the one-port one.

Hm, maybe that's what USB core thinks (because UHCI/OHCI/EHCI all
have it) but e.g. MUSB doesn't have the root hub registers...

Only the OHCI registers have bit positions matching what the USB spec says for hub status bits.

Oh, didn't know that.

Quoted 1 line

Everything else, including musb_hdrc, has the relevant status encoded in other bits.

Yes, but I thought that if there are no multiple ports, having the hub is
just pointless.

Quoted 3 lines
Quoted 1 line

I looked at the core and figured that USB core seems to use the root hub interface for port PM, etc. and expects it to bee present, so it seems unavoidable indeed... :-/

Or more fundamentally: for enumeration. "Unavoidable" is correct. ;)

Not sure what you mean here but I guess having a root hub alows an uniform
model of controlling the ports... anyway, USB specifies that it must be present in the host.

WBR, Sergei