From patchwork Sat Jun 8 00:03:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 2691741 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 28FADDFF66 for ; Sat, 8 Jun 2013 00:03:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932179Ab3FHADe (ORCPT ); Fri, 7 Jun 2013 20:03:34 -0400 Received: from mail-la0-f50.google.com ([209.85.215.50]:33742 "EHLO mail-la0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757188Ab3FHADc (ORCPT ); Fri, 7 Jun 2013 20:03:32 -0400 Received: by mail-la0-f50.google.com with SMTP id dy20so1989752lab.9 for ; Fri, 07 Jun 2013 17:03:30 -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=LQT7ClhEI4PQq2efv3EGsVMbon6aWJhB+683lboci6w=; b=kKEeBG/NfiMZblCNRfzzED3fUy2xpWdl02aYR3sZfL1/F96Ia93DFfLDUVSwsS2v7w p+b+VX1di00lhSwG0tPsdmXPrOkPE4lHot8fAr0efYEFDEwqXUwhsaWhVvRC45nfoWT4 3EFzXFyuDL24nwj8cHxQ9FVu0aeqzCBWv3jWx+C2zTTVnQ4c93cbSgzHahfAoL2dYDe1 MfMWMA92yF334L7P+fLfLLJ4AMC+pisktikOXv5SfyP93YwvDox9f8dapwrXVmk3V5ha KWyacvmIFeNkXA8zcnNToPx+wW5JQPWwUn4IQmS5hHjiYE1NKsM93mTB0D7pQ8yaxgQh s6Ig== X-Received: by 10.112.159.169 with SMTP id xd9mr1753165lbb.43.1370649810408; Fri, 07 Jun 2013 17:03:30 -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 o6sm349322laj.2.2013.06.07.17.03.28 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 07 Jun 2013 17:03:29 -0700 (PDT) From: Sergei Shtylyov Organization: Cogent Embedded To: netdev@vger.kernel.org, lethal@linux-sh.org Subject: [PATCH 7/9] sh_eth: get SH7724 support out of #ifdef Date: Sat, 8 Jun 2013 04:03:37 +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: <201306080403.37551.sergei.shtylyov@cogentembedded.com> X-Gm-Message-State: ALoCoQml/PaOk8JHwCll9D+uIQLSML9XncPBPFooApzBOCQoK2L8GlRBYoRBGi5tb7PM+AkPGp7O Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org Get the SH7724 code/data in the driver out of #ifdef by adding "r8a7724-ether" to the platform driver's ID table. Change the Ether platform device's name in the SH platform code accordingly. Signed-off-by: Sergei Shtylyov --- Note that the Ether paltform data in the SolutionEngine7724 board code lacks the initializer for the 'register_type' field which means it'll be incorrectly set to SH_ETH_REG_GIGABIT... arch/sh/boards/mach-ecovec24/setup.c | 4 ++-- arch/sh/boards/mach-se/7724/setup.c | 4 ++-- arch/sh/kernel/cpu/sh4a/clock-sh7724.c | 2 +- drivers/net/ethernet/renesas/sh_eth.c | 10 +++++----- 4 files changed, 10 insertions(+), 10 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/sh/boards/mach-ecovec24/setup.c =================================================================== --- net-next.orig/arch/sh/boards/mach-ecovec24/setup.c +++ net-next/arch/sh/boards/mach-ecovec24/setup.c @@ -165,8 +165,8 @@ static struct sh_eth_plat_data sh_eth_pl }; static struct platform_device sh_eth_device = { - .name = "sh-eth", - .id = 0, + .name = "sh7724-ether", + .id = 0, .dev = { .platform_data = &sh_eth_plat, }, Index: net-next/arch/sh/boards/mach-se/7724/setup.c =================================================================== --- net-next.orig/arch/sh/boards/mach-se/7724/setup.c +++ net-next/arch/sh/boards/mach-se/7724/setup.c @@ -380,8 +380,8 @@ static struct sh_eth_plat_data sh_eth_pl }; static struct platform_device sh_eth_device = { - .name = "sh-eth", - .id = 0, + .name = "sh7724-ether", + .id = 0, .dev = { .platform_data = &sh_eth_plat, }, Index: net-next/arch/sh/kernel/cpu/sh4a/clock-sh7724.c =================================================================== --- net-next.orig/arch/sh/kernel/cpu/sh4a/clock-sh7724.c +++ net-next/arch/sh/kernel/cpu/sh4a/clock-sh7724.c @@ -329,7 +329,7 @@ static struct clk_lookup lookups[] = { CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[HWBLK_IIC0]), CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[HWBLK_IIC1]), CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[HWBLK_MMC]), - CLKDEV_DEV_ID("sh-eth.0", &mstp_clks[HWBLK_ETHER]), + CLKDEV_DEV_ID("sh7724-ether.0", &mstp_clks[HWBLK_ETHER]), CLKDEV_CON_ID("atapi0", &mstp_clks[HWBLK_ATAPI]), CLKDEV_CON_ID("tpu0", &mstp_clks[HWBLK_TPU]), CLKDEV_CON_ID("irda0", &mstp_clks[HWBLK_IRDA]), 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 @@ -392,9 +392,9 @@ static struct sh_eth_cpu_data sh_eth_my_ .tpauser = 1, .hw_swap = 1, }; -#elif defined(CONFIG_CPU_SUBTYPE_SH7724) +#endif -static void sh_eth_set_rate(struct net_device *ndev) +static void sh_eth_set_rate_sh7724(struct net_device *ndev) { struct sh_eth_private *mdp = netdev_priv(ndev); @@ -411,9 +411,9 @@ static void sh_eth_set_rate(struct net_d } /* SH7724 */ -static struct sh_eth_cpu_data sh_eth_my_cpu_data = { +static struct sh_eth_cpu_data sh7724_data = { .set_duplex = sh_eth_set_duplex, - .set_rate = sh_eth_set_rate, + .set_rate = sh_eth_set_rate_sh7724, .ecsr_value = ECSR_PSRTO | ECSR_LCHNG | ECSR_ICD, .ecsipr_value = ECSIPR_PSRTOIP | ECSIPR_LCHNGIP | ECSIPR_ICDIP, @@ -431,7 +431,6 @@ static struct sh_eth_cpu_data sh_eth_my_ .rpadir = 1, .rpadir_value = 0x00020000, /* NET_IP_ALIGN assumed to be 2 */ }; -#endif static void sh_eth_set_rate_sh7757(struct net_device *ndev) { @@ -2687,6 +2686,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 }, + { "sh7724-ether", (kernel_ulong_t)&sh7724_data }, { "sh7734-gether", (kernel_ulong_t)&sh7734_data }, { "sh7757-ether", (kernel_ulong_t)&sh7757_data }, { "sh7757-gether", (kernel_ulong_t)&sh7757_data_giga },