From patchwork Fri Jun 7 23:57:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 2691711 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 2F6FBDFB78 for ; Fri, 7 Jun 2013 23:57:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757310Ab3FGX5I (ORCPT ); Fri, 7 Jun 2013 19:57:08 -0400 Received: from mail-la0-f46.google.com ([209.85.215.46]:44335 "EHLO mail-la0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756768Ab3FGX5I (ORCPT ); Fri, 7 Jun 2013 19:57:08 -0400 Received: by mail-la0-f46.google.com with SMTP id eg20so4253737lab.33 for ; Fri, 07 Jun 2013 16:57:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:organization:to:subject:date:user-agent:cc:references :in-reply-to:mime-version:content-type:content-transfer-encoding :message-id:x-gm-message-state; bh=uosoETUD3lUkc94DVI7hioMuwmXRcskHToa3xDuyJ08=; b=ARrOGMsde4dDMcH88XouC3U4TqKt2RjRDJrvbROVo1ylrIZxYpIfsazOTE5TgYBYl2 eF1cWOosJyYZV/76dr+6L7TfjxKt6tKjVMWjiIDTkZn4wdNCGFCJNjPVrYk1I9la4W2M R7w4xXeWC441ECRYG80l33yztmgGCEwYDxw15jK3BDuO7wh5D8DEwvwpjl1Zvhm4Yxcd NduHWOm8psGHfrZIC3YD31SVvCBdg0ChBRawPlZca7gBheVqws0rTizFtvM65W01+SXX REwv9kB0vL6arUOrqjN29i+bNUc52cP9dwkwo86dGVxkH5PhIqryv5RWxJl4aq0ZcVVS h92g== X-Received: by 10.152.42.236 with SMTP id r12mr430951lal.46.1370649425274; Fri, 07 Jun 2013 16:57:05 -0700 (PDT) Received: from wasted.dev.rtsoft.ru (ppp91-76-150-46.pppoe.mtu-net.ru. [91.76.150.46]) by mx.google.com with ESMTPSA id n7sm1743853lbd.12.2013.06.07.16.57.03 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 07 Jun 2013 16:57:04 -0700 (PDT) From: Sergei Shtylyov Organization: Cogent Embedded To: netdev@vger.kernel.org Subject: [PATCH 4/9] sh_eth: get R8A7740 support out of #ifdef Date: Sat, 8 Jun 2013 03:57:12 +0400 User-Agent: KMail/1.13.5 (Linux/2.6.32.26-175.fc12.i686.PAE; KDE/4.4.5; i686; ; ) Cc: nobuhiro.iwamatsu.yj@renesas.com, linux-sh@vger.kernel.org References: <201306080351.39018.sergei.shtylyov@cogentembedded.com> In-Reply-To: <201306080351.39018.sergei.shtylyov@cogentembedded.com> MIME-Version: 1.0 Message-Id: <201306080357.12704.sergei.shtylyov@cogentembedded.com> X-Gm-Message-State: ALoCoQlQnYEzp1TFBJhESVvVGVDtjdJOKx2yEP8F28i4dbAvyCwgoH5btiJGdPc0jTcZBzU5LALD Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org Get the R8A7740 code/data in the driver out of #ifdef by adding "r8a7740-gether" to the platform driver's ID table. Change the GEther platform device's name in the ARM platform code accordingly. Signed-off-by: Sergei Shtylyov --- arch/arm/mach-shmobile/board-armadillo800eva.c | 2 +- arch/arm/mach-shmobile/clock-r8a7740.c | 2 +- drivers/net/ethernet/renesas/sh_eth.c | 16 +++++++--------- 3 files changed, 9 insertions(+), 11 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: net-next/arch/arm/mach-shmobile/board-armadillo800eva.c =================================================================== --- net-next.orig/arch/arm/mach-shmobile/board-armadillo800eva.c +++ net-next/arch/arm/mach-shmobile/board-armadillo800eva.c @@ -377,7 +377,7 @@ static struct resource sh_eth_resources[ }; static struct platform_device sh_eth_device = { - .name = "sh-eth", + .name = "r8a7740-gether", .id = -1, .dev = { .platform_data = &sh_eth_platdata, Index: net-next/arch/arm/mach-shmobile/clock-r8a7740.c =================================================================== --- net-next.orig/arch/arm/mach-shmobile/clock-r8a7740.c +++ net-next/arch/arm/mach-shmobile/clock-r8a7740.c @@ -591,7 +591,7 @@ static struct clk_lookup lookups[] = { CLKDEV_DEV_ID("e6860000.sdhi", &mstp_clks[MSTP313]), CLKDEV_DEV_ID("sh_mmcif", &mstp_clks[MSTP312]), CLKDEV_DEV_ID("e6bd0000.mmcif", &mstp_clks[MSTP312]), - CLKDEV_DEV_ID("sh-eth", &mstp_clks[MSTP309]), + CLKDEV_DEV_ID("r8a7740-gether", &mstp_clks[MSTP309]), CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP415]), CLKDEV_DEV_ID("e6870000.sdhi", &mstp_clks[MSTP415]), Index: net-next/drivers/net/ethernet/renesas/sh_eth.c =================================================================== --- net-next.orig/drivers/net/ethernet/renesas/sh_eth.c +++ net-next/drivers/net/ethernet/renesas/sh_eth.c @@ -619,11 +619,9 @@ static struct sh_eth_cpu_data sh_eth_my_ .irq_flags = IRQF_SHARED, #endif }; +#endif - -#elif defined(CONFIG_ARCH_R8A7740) - -static void sh_eth_chip_reset(struct net_device *ndev) +static void sh_eth_chip_reset_r8a7740(struct net_device *ndev) { struct sh_eth_private *mdp = netdev_priv(ndev); @@ -634,7 +632,7 @@ static void sh_eth_chip_reset(struct net sh_eth_select_mii(ndev); } -static void sh_eth_set_rate(struct net_device *ndev) +static void sh_eth_set_rate_gether(struct net_device *ndev) { struct sh_eth_private *mdp = netdev_priv(ndev); @@ -654,10 +652,10 @@ static void sh_eth_set_rate(struct net_d } /* R8A7740 */ -static struct sh_eth_cpu_data sh_eth_my_cpu_data = { - .chip_reset = sh_eth_chip_reset, +static struct sh_eth_cpu_data r8a7740_data = { + .chip_reset = sh_eth_chip_reset_r8a7740, .set_duplex = sh_eth_set_duplex, - .set_rate = sh_eth_set_rate, + .set_rate = sh_eth_set_rate_gether, .ecsr_value = ECSR_ICD | ECSR_MPD, .ecsipr_value = ECSIPR_LCHNGIP | ECSIPR_ICDIP | ECSIPR_MPDIP, @@ -680,7 +678,6 @@ static struct sh_eth_cpu_data sh_eth_my_ .tsu = 1, .select_mii = 1, }; -#endif static struct sh_eth_cpu_data sh7619_data = { .eesipr_value = DMAC_M_RFRMER | DMAC_M_ECI | 0x003fffff, @@ -2701,6 +2698,7 @@ static const struct dev_pm_ops sh_eth_de static struct platform_device_id sh_eth_id_table[] = { { "sh7619-ether", (kernel_ulong_t)&sh7619_data }, { "sh771x-ether", (kernel_ulong_t)&sh771x_data }, + { "r8a7740-gether", (kernel_ulong_t)&r8a7740_data }, { CARDNAME }, { } };