[U-Boot] [PATCH v2 06/16] ARM: UniPhier: remove EHCI platform devices
Masahiro Yamada
yamada.m at jp.panasonic.com
Fri Feb 20 13:43:17 CET 2015
Now UniPhier platform highly depends on Device Tree configuration
(CONFIG_OF_CONTROL is select'ed by Kconfig). Since the EHCI is only
used on main U-Boot, we can drop platform devices of the EHCI
controllers. We still keep UART platform devices because they might
be useful for SPL.
Signed-off-by: Masahiro Yamada <yamada.m at jp.panasonic.com>
---
Changes in v2: None
arch/arm/cpu/armv7/uniphier/ph1-ld4/platdevice.c | 14 +-------------
arch/arm/cpu/armv7/uniphier/ph1-pro4/platdevice.c | 11 +----------
arch/arm/cpu/armv7/uniphier/ph1-sld8/platdevice.c | 14 +-------------
arch/arm/include/asm/arch-uniphier/ehci-uniphier.h | 8 +-------
arch/arm/include/asm/arch-uniphier/platdevice.h | 2 --
drivers/usb/host/Kconfig | 2 +-
drivers/usb/host/ehci-uniphier.c | 14 +-------------
7 files changed, 6 insertions(+), 59 deletions(-)
diff --git a/arch/arm/cpu/armv7/uniphier/ph1-ld4/platdevice.c b/arch/arm/cpu/armv7/uniphier/ph1-ld4/platdevice.c
index 9d51299..6b69d3c 100644
--- a/arch/arm/cpu/armv7/uniphier/ph1-ld4/platdevice.c
+++ b/arch/arm/cpu/armv7/uniphier/ph1-ld4/platdevice.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2014 Panasonic Corporation
+ * Copyright (C) 2014-2015 Panasonic Corporation
* Author: Masahiro Yamada <yamada.m at jp.panasonic.com>
*
* SPDX-License-Identifier: GPL-2.0+
@@ -13,15 +13,3 @@ SERIAL_DEVICE(0, 0x54006800, UART_MASTER_CLK)
SERIAL_DEVICE(1, 0x54006900, UART_MASTER_CLK)
SERIAL_DEVICE(2, 0x54006a00, UART_MASTER_CLK)
SERIAL_DEVICE(3, 0x54006b00, UART_MASTER_CLK)
-
-struct uniphier_ehci_platform_data uniphier_ehci_platdata[] = {
- {
- .base = 0x5a800100,
- },
- {
- .base = 0x5a810100,
- },
- {
- .base = 0x5a820100,
- },
-};
diff --git a/arch/arm/cpu/armv7/uniphier/ph1-pro4/platdevice.c b/arch/arm/cpu/armv7/uniphier/ph1-pro4/platdevice.c
index 31ee2a2..8625255 100644
--- a/arch/arm/cpu/armv7/uniphier/ph1-pro4/platdevice.c
+++ b/arch/arm/cpu/armv7/uniphier/ph1-pro4/platdevice.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2014 Panasonic Corporation
+ * Copyright (C) 2014-2015 Panasonic Corporation
* Author: Masahiro Yamada <yamada.m at jp.panasonic.com>
*
* SPDX-License-Identifier: GPL-2.0+
@@ -13,12 +13,3 @@ SERIAL_DEVICE(0, 0x54006800, UART_MASTER_CLK)
SERIAL_DEVICE(1, 0x54006900, UART_MASTER_CLK)
SERIAL_DEVICE(2, 0x54006a00, UART_MASTER_CLK)
SERIAL_DEVICE(3, 0x54006b00, UART_MASTER_CLK)
-
-struct uniphier_ehci_platform_data uniphier_ehci_platdata[] = {
- {
- .base = 0x5a800100,
- },
- {
- .base = 0x5a810100,
- },
-};
diff --git a/arch/arm/cpu/armv7/uniphier/ph1-sld8/platdevice.c b/arch/arm/cpu/armv7/uniphier/ph1-sld8/platdevice.c
index ea0691d..b3847d4 100644
--- a/arch/arm/cpu/armv7/uniphier/ph1-sld8/platdevice.c
+++ b/arch/arm/cpu/armv7/uniphier/ph1-sld8/platdevice.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2014 Panasonic Corporation
+ * Copyright (C) 2014-2015 Panasonic Corporation
* Author: Masahiro Yamada <yamada.m at jp.panasonic.com>
*
* SPDX-License-Identifier: GPL-2.0+
@@ -13,15 +13,3 @@ SERIAL_DEVICE(0, 0x54006800, UART_MASTER_CLK)
SERIAL_DEVICE(1, 0x54006900, UART_MASTER_CLK)
SERIAL_DEVICE(2, 0x54006a00, UART_MASTER_CLK)
SERIAL_DEVICE(3, 0x54006b00, UART_MASTER_CLK)
-
-struct uniphier_ehci_platform_data uniphier_ehci_platdata[] = {
- {
- .base = 0x5a800100,
- },
- {
- .base = 0x5a810100,
- },
- {
- .base = 0x5a820100,
- },
-};
diff --git a/arch/arm/include/asm/arch-uniphier/ehci-uniphier.h b/arch/arm/include/asm/arch-uniphier/ehci-uniphier.h
index e9c5fb4..3ba3183 100644
--- a/arch/arm/include/asm/arch-uniphier/ehci-uniphier.h
+++ b/arch/arm/include/asm/arch-uniphier/ehci-uniphier.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2014 Panasonic Corporation
+ * Copyright (C) 2014-2015 Panasonic Corporation
* Author: Masahiro Yamada <yamada.m at jp.panasonic.com>
*
* SPDX-License-Identifier: GPL-2.0+
@@ -12,12 +12,6 @@
#include <asm/io.h>
#include "mio-regs.h"
-struct uniphier_ehci_platform_data {
- unsigned long base;
-};
-
-extern struct uniphier_ehci_platform_data uniphier_ehci_platdata[];
-
static inline void uniphier_ehci_reset(int index, int on)
{
u32 tmp;
diff --git a/arch/arm/include/asm/arch-uniphier/platdevice.h b/arch/arm/include/asm/arch-uniphier/platdevice.h
index 62a5126..cdf7d13 100644
--- a/arch/arm/include/asm/arch-uniphier/platdevice.h
+++ b/arch/arm/include/asm/arch-uniphier/platdevice.h
@@ -21,6 +21,4 @@ U_BOOT_DEVICE(serial##n) = { \
.platdata = &serial_device##n \
};
-#include <asm/arch/ehci-uniphier.h>
-
#endif /* ARCH_PLATDEVICE_H */
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 30d1457..0e005c2 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -47,7 +47,7 @@ if USB_EHCI_HCD
config USB_EHCI_UNIPHIER
bool "Support for Panasonic UniPhier on-chip EHCI USB controller"
- depends on ARCH_UNIPHIER
+ depends on ARCH_UNIPHIER && OF_CONTROL
default y
---help---
Enables support for the on-chip EHCI controller on Panasonic
diff --git a/drivers/usb/host/ehci-uniphier.c b/drivers/usb/host/ehci-uniphier.c
index 32a4375..d40b540 100644
--- a/drivers/usb/host/ehci-uniphier.c
+++ b/drivers/usb/host/ehci-uniphier.c
@@ -9,10 +9,9 @@
#include <linux/err.h>
#include <usb.h>
#include <asm/arch/ehci-uniphier.h>
+#include <fdtdec.h>
#include "ehci.h"
-#ifdef CONFIG_OF_CONTROL
-#include <fdtdec.h>
DECLARE_GLOBAL_DATA_PTR;
#define FDT gd->fdt_blob
@@ -35,18 +34,7 @@ static int get_uniphier_ehci_base(int index, struct ehci_hccr **base)
return -ENODEV; /* not found */
}
-#else
-static int get_uniphier_ehci_base(int index, struct ehci_hccr **base)
-{
- *base = (struct ehci_hccr *)uniphier_ehci_platdata[index].base;
- return 0;
-}
-#endif
-/*
- * Create the appropriate control structures to manage
- * a new EHCI host controller.
- */
int ehci_hcd_init(int index, enum usb_init_type init, struct ehci_hccr **hccr,
struct ehci_hcor **hcor)
{
--
1.9.1
More information about the U-Boot
mailing list