From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastian Hecht Date: Sun, 16 Dec 2012 13:54:25 +0000 Subject: [PATCH 1/2] ARM: shmobile: Armadillo800eva: DT boot testcase with ethernet support Message-Id: <1355666066-25649-2-git-send-email-hechtb+renesas@gmail.com> List-Id: References: <87bok7lm0h.wl%kuninori.morimoto.gx@renesas.com> In-Reply-To: <87bok7lm0h.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-sh@vger.kernel.org This patch strips off most of the board code. We only keep the GPIO configurations used for the ethernet module sh_eth. We add the ethernet controller in the DT config file r8a7740-armadillo800eva.dts and make sure that clocks are turned on working with the different naming scheme for devices when using DT instead of the old platform code. Never-signed-off-by: Bastian Hecht --- For a better overview - here is what is left: #include #include #include #include #include #include #include /* * board init */ static void __init eva_init(void) { r8a7740_pinmux_init(); r8a7740_meram_workaround(); /* SCIFA1 */ gpio_request(GPIO_FN_SCIFA1_RXD, NULL); gpio_request(GPIO_FN_SCIFA1_TXD, NULL); /* GETHER */ gpio_request(GPIO_FN_ET_CRS, NULL); gpio_request(GPIO_FN_ET_MDC, NULL); gpio_request(GPIO_FN_ET_MDIO, NULL); gpio_request(GPIO_FN_ET_TX_ER, NULL); gpio_request(GPIO_FN_ET_RX_ER, NULL); gpio_request(GPIO_FN_ET_ERXD0, NULL); gpio_request(GPIO_FN_ET_ERXD1, NULL); gpio_request(GPIO_FN_ET_ERXD2, NULL); gpio_request(GPIO_FN_ET_ERXD3, NULL); gpio_request(GPIO_FN_ET_TX_CLK, NULL); gpio_request(GPIO_FN_ET_TX_EN, NULL); gpio_request(GPIO_FN_ET_ETXD0, NULL); gpio_request(GPIO_FN_ET_ETXD1, NULL); gpio_request(GPIO_FN_ET_ETXD2, NULL); gpio_request(GPIO_FN_ET_ETXD3, NULL); gpio_request(GPIO_FN_ET_PHY_INT, NULL); gpio_request(GPIO_FN_ET_COL, NULL); gpio_request(GPIO_FN_ET_RX_DV, NULL); gpio_request(GPIO_FN_ET_RX_CLK, NULL); gpio_request(GPIO_PORT18, NULL); /* PHY_RST */ gpio_direction_output(GPIO_PORT18, 1); #ifdef CONFIG_CACHE_L2X0 /* Early BRESP enable, Shared attribute override enable, 32K*8way */ l2x0_init(__io(0xf0002000), 0x40440000, 0x82000fff); #endif r8a7740_add_standard_devices_dt(); } static const char *eva_boards_compat_dt[] __initdata = { "renesas,armadillo800eva", NULL, }; DT_MACHINE_START(ARMADILLO800EVA_DT, "armadillo800eva") .map_io = r8a7740_map_io, .init_early = r8a7740_add_early_devices_dt, .init_irq = r8a7740_init_irq_of, .nr_irqs = NR_IRQS_LEGACY, .handle_irq = shmobile_handle_irq_intc, .init_machine = eva_init, .init_late = shmobile_init_late, .timer = &shmobile_timer, .dt_compat = eva_boards_compat_dt, MACHINE_END arch/arm/boot/dts/r8a7740-armadillo800eva.dts | 7 + arch/arm/mach-shmobile/board-armadillo800eva.c | 1167 +----------------------- arch/arm/mach-shmobile/clock-r8a7740.c | 1 + arch/arm/mach-shmobile/include/mach/common.h | 2 + 4 files changed, 15 insertions(+), 1162 deletions(-) diff --git a/arch/arm/boot/dts/r8a7740-armadillo800eva.dts b/arch/arm/boot/dts/r8a7740-armadillo800eva.dts index a8e7bd9..0b53952 100644 --- a/arch/arm/boot/dts/r8a7740-armadillo800eva.dts +++ b/arch/arm/boot/dts/r8a7740-armadillo800eva.dts @@ -19,4 +19,11 @@ device_type = "memory"; reg = <0x40000000 0x20000000>; }; + + ethernet@e9a00000 { + compatible = "renesas,sh-eth-r8a7740"; + reg = <0xe9a00000 0x800 0xe9a01800 0x200>; + interrupt-parent = <&intca>; + interrupts = <0x0500>; + }; }; diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c index 2912eab..216d542 100644 --- a/arch/arm/mach-shmobile/board-armadillo800eva.c +++ b/arch/arm/mach-shmobile/board-armadillo800eva.c @@ -19,972 +19,19 @@ * */ -#include -#include -#include #include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include #include -#include #include -#include -#include -#include -#include -#include #include -#include -#include #include -#include