summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/panda/board.c
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-07-23 08:08:15 +0800
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-07-29 14:05:22 +0800
commitee80cbcd61fdad8b6b75be23b8417dc1dc188d59 (patch)
tree358f1ac445640d172eb2ecdbec006d26b1f1a7fc /arch/arm/boards/panda/board.c
parent06c36cf09e08cfd054c2d1e61be8492c4e5dc929 (diff)
downloadbarebox-ee80cbcd61fdad8b6b75be23b8417dc1dc188d59.tar.gz
barebox-ee80cbcd61fdad8b6b75be23b8417dc1dc188d59.tar.xz
resource: introduce add_usb_ehci_device to register echi device
pass the hccr and hcor register base via resource instroduce add_generic_usb_echi_device with hccr = base + 0x100 and hcor = base + 0x140 Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'arch/arm/boards/panda/board.c')
-rw-r--r--arch/arm/boards/panda/board.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/arch/arm/boards/panda/board.c b/arch/arm/boards/panda/board.c
index 1c6cf587f9..de43ca5b8b 100644
--- a/arch/arm/boards/panda/board.c
+++ b/arch/arm/boards/panda/board.c
@@ -61,18 +61,9 @@ static int panda_mmu_init(void)
device_initcall(panda_mmu_init);
#endif
+#ifdef CONFIG_USB_EHCI
static struct ehci_platform_data ehci_pdata = {
.flags = 0,
- .hccr_offset = 0x0,
- .hcor_offset = 0x10,
-};
-
-static struct device_d usbh_dev = {
- .id = -1,
- .name = "ehci",
- .map_base = 0x4a064c00,
- .size = 4 * 1024,
- .platform_data = &ehci_pdata,
};
static void panda_ehci_init(void)
@@ -105,8 +96,13 @@ static void panda_ehci_init(void)
/* enable power to hub */
gpio_set_value(GPIO_HUB_POWER, 1);
- register_device(&usbh_dev);
+ add_usb_ehci_device(-1, 0x4a064c00,
+ 0x4a064c00 + 0x10, &ehci_pdata);
}
+#else
+static void panda_ehci_init(void)
+{}
+#endif
static void __init panda_boardrev_init(void)
{