]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
usb: ehci: Split out struct ehci_ctrl definition
authorMarek Vasut <marex@denx.de>
Wed, 10 Jul 2013 01:16:31 +0000 (03:16 +0200)
committerMarek Vasut <marex@denx.de>
Mon, 29 Jul 2013 21:01:31 +0000 (23:01 +0200)
Move the struct ehci_ctrl defition from ehci-hcd.c into ehci.h
so it can be re-used by drivers. In particular, the mv_udc driver
can benefit from this move.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
drivers/usb/host/ehci-hcd.c
drivers/usb/host/ehci.h

index 706cf0cb7dba246c2c567b5da4111590bb9679b9..05d3f0bd53a29eb83962f2146fa33793279b6c94 100644 (file)
 #define CONFIG_USB_MAX_CONTROLLER_COUNT 1
 #endif
 
-static struct ehci_ctrl {
-       struct ehci_hccr *hccr; /* R/O registers, not need for volatile */
-       struct ehci_hcor *hcor;
-       int rootdev;
-       uint16_t portreset;
-       struct QH qh_list __aligned(USB_DMA_MINALIGN);
-       struct QH periodic_queue __aligned(USB_DMA_MINALIGN);
-       uint32_t *periodic_list;
-       int ntds;
-} ehcic[CONFIG_USB_MAX_CONTROLLER_COUNT];
+static struct ehci_ctrl ehcic[CONFIG_USB_MAX_CONTROLLER_COUNT];
 
 #define ALIGN_END_ADDR(type, ptr, size)                        \
        ((uint32_t)(ptr) + roundup((size) * sizeof(type), USB_DMA_MINALIGN))
index d090f0a53e87349ee96a5bfe7d64a917bf153d0e..bd52afe2626fa58df48b23357cf3c987f4c4bdcf 100644 (file)
@@ -22,6 +22,8 @@
 #ifndef USB_EHCI_H
 #define USB_EHCI_H
 
+#include <usb.h>
+
 #if !defined(CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS)
 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS     2
 #endif
@@ -252,6 +254,17 @@ struct QH {
        };
 };
 
+struct ehci_ctrl {
+       struct ehci_hccr *hccr; /* R/O registers, not need for volatile */
+       struct ehci_hcor *hcor;
+       int rootdev;
+       uint16_t portreset;
+       struct QH qh_list __aligned(USB_DMA_MINALIGN);
+       struct QH periodic_queue __aligned(USB_DMA_MINALIGN);
+       uint32_t *periodic_list;
+       int ntds;
+};
+
 /* Low level init functions */
 int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor);
 int ehci_hcd_stop(int index);