From patchwork Sun Dec 16 13:54:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastian Hecht X-Patchwork-Id: 1884781 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 2C62D3FCD5 for ; Sun, 16 Dec 2012 13:54:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753082Ab2LPNy0 (ORCPT ); Sun, 16 Dec 2012 08:54:26 -0500 Received: from mail-ea0-f174.google.com ([209.85.215.174]:36057 "EHLO mail-ea0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753066Ab2LPNyY (ORCPT ); Sun, 16 Dec 2012 08:54:24 -0500 Received: by mail-ea0-f174.google.com with SMTP id e13so1994188eaa.19 for ; Sun, 16 Dec 2012 05:54:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=HCtqXsTE6riyRC3+BmaZllXCHO9jbniFeL09QrVCM+I=; b=G7EqMxaR5acqEKKZhdCrUCEmMRoqtRImjJuw1qB/uyNkYWFanTHtPENq6Dfs9prvmk Fxa+trDIkDQrh9Sg19wM7Gxnry5UOfJIHeBLQfd4sBPgvi9ZXB0ziHuQ/A3Hm8NL040n rOWVp15qWjYapyoWQOoi18HmO3MHk+6G5qwIeWK+mzFqo18zlwjt+4qtt8lhGVvxYxkP D7W7GVppyHWntAfI4anxaYcS4U/GuzCcTUVHleeVYaBqIL7rWBWlIDFXGLrP6+a2q3ae Ejz9KoRme15+5xIhTozUGI1Ll4TIkZxq5Z85KBpCTP4nmBKGXNYKLZpK64nMzQayf4Lk L2Sw== Received: by 10.14.214.132 with SMTP id c4mr32406245eep.18.1355666063090; Sun, 16 Dec 2012 05:54:23 -0800 (PST) Received: from localhost.localdomain (p4FD25859.dip.t-dialin.net. [79.210.88.89]) by mx.google.com with ESMTPS id r1sm22637215eeo.2.2012.12.16.05.54.21 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 16 Dec 2012 05:54:22 -0800 (PST) From: Bastian Hecht To: linux-sh@vger.kernel.org Cc: Simon Horman , Magnus Damm , Bastian Hecht Subject: [PATCH 1/2] ARM: shmobile: Armadillo800eva: DT boot testcase with ethernet support Date: Sun, 16 Dec 2012 14:54:25 +0100 Message-Id: <1355666066-25649-2-git-send-email-hechtb+renesas@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1355666066-25649-1-git-send-email-hechtb+renesas@gmail.com> References: <1355666066-25649-1-git-send-email-hechtb+renesas@gmail.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: 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