From patchwork Thu Nov 14 23:11:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 3185611 X-Patchwork-Delegate: lethal@linux-sh.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1CBDBC045B for ; Thu, 14 Nov 2013 22:12:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 331852088A for ; Thu, 14 Nov 2013 22:12:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 35BDC20942 for ; Thu, 14 Nov 2013 22:12:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757082Ab3KNWL4 (ORCPT ); Thu, 14 Nov 2013 17:11:56 -0500 Received: from mail-la0-f45.google.com ([209.85.215.45]:51027 "EHLO mail-la0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758196Ab3KNWLc (ORCPT ); Thu, 14 Nov 2013 17:11:32 -0500 Received: by mail-la0-f45.google.com with SMTP id eh20so2125818lab.4 for ; Thu, 14 Nov 2013 14:11:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:subject:cc:from:organization:date :mime-version:content-type:content-transfer-encoding:message-id; bh=ZNsSzNZuzoVdmHEARhyRfFcY33FijO2qtj8MWUpgPqk=; b=Da4Nj632vGCWCzjBzkYN/E7CAz6R6vX4g61c5jbdYO1qBVj2MZTzGdx/nhGuCjh7sp 2+bOxbST9i5mgcgZZWun0U/PyX5QarNl8t0Dgi3lfHiN64pcdGmEdR+ebQ348lnqAJb2 Ez78AmSNDMlNT4wuTSkVAZl/vvPmAHZgWTuT+DAwkkpTnWMULKjq+Tn8h3FEUYs8XTec cBTFjuaYUlHjEpQzouyLQDdPNWcq6bJCSw9tlON3cftavlDRmd6JIiIHO8uhdJcq+bS5 Mz2DKK6xMDPh+IjJupJNohBFlXa4+rbc/AioDmmzFZzDohHDyN5wvhX09GjEBolyNYK5 QDuw== X-Gm-Message-State: ALoCoQkyigZ+QJIBXTBlzWHcewCfaz4T5ulE91ZWVMDAER4RE9Q9lsu/Laz/CWGhx2ldWksoZaIw X-Received: by 10.152.28.194 with SMTP id d2mr2155157lah.2.1384467091306; Thu, 14 Nov 2013 14:11:31 -0800 (PST) Received: from wasted.dev.rtsoft.ru (ppp83-237-55-178.pppoe.mtu-net.ru. [83.237.55.178]) by mx.google.com with ESMTPSA id h4sm1588753lbe.15.2013.11.14.14.11.30 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 14 Nov 2013 14:11:30 -0800 (PST) To: linux-sh@vger.kernel.org, davem@davemloft.net, horms@verge.net.au Subject: [PATCH] sh_eth: add R8A7791 support Cc: magnus.damm@gmail.com, linux@arm.linux.org.uk, linux-arm-kernel@lists.infradead.org From: Sergei Shtylyov Organization: Cogent Embedded Date: Fri, 15 Nov 2013 02:11:35 +0300 MIME-Version: 1.0 Message-Id: <201311150211.36049.sergei.shtylyov@cogentembedded.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add support for yet another ARM member of the R-Car family, R-Car M2, also known as R8A7791 -- it will share the code and data with previously added R8A7790. Since the Ether devices in these SoCs are indistinguishable at least from the driver's point of view, do not introduce a new platform device ID but modify device name "r8a7790-ether" to "r8a779x-ether" throughout the files (and also 'r8a7790_data' to 'r8a779x_data' in the driver), just like the names used for R8A7778/9 SoCs. Signed-off-by: Sergei Shtylyov --- This patch is atop of 'renesas-devel-v3.12-20131112' tag of Simon Horman's 'renesas.git' repo and I intend to push it thru this tree in order to satisfy runtime dependencies of the R8A7791/Koelsch Ether support patches to follow. Not posting this to netdev@vger.kernel.org since Dave has closed 'net-next.git' for now; Dave, I hope you'll ACK this patch... arch/arm/mach-shmobile/board-lager.c | 12 ++++++------ arch/arm/mach-shmobile/clock-r8a7790.c | 2 +- drivers/net/ethernet/renesas/Kconfig | 2 +- drivers/net/ethernet/renesas/sh_eth.c | 6 +++--- 4 files changed, 11 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: renesas/arch/arm/mach-shmobile/board-lager.c =================================================================== --- renesas.orig/arch/arm/mach-shmobile/board-lager.c +++ renesas/arch/arm/mach-shmobile/board-lager.c @@ -186,13 +186,13 @@ static const struct pinctrl_map lager_pi PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.1", "pfc-r8a7790", "mmc1_ctrl", "mmc1"), /* Ether */ - PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-ether", "pfc-r8a7790", + PIN_MAP_MUX_GROUP_DEFAULT("r8a779x-ether", "pfc-r8a7790", "eth_link", "eth"), - PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-ether", "pfc-r8a7790", + PIN_MAP_MUX_GROUP_DEFAULT("r8a779x-ether", "pfc-r8a7790", "eth_mdio", "eth"), - PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-ether", "pfc-r8a7790", + PIN_MAP_MUX_GROUP_DEFAULT("r8a779x-ether", "pfc-r8a7790", "eth_rmii", "eth"), - PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-ether", "pfc-r8a7790", + PIN_MAP_MUX_GROUP_DEFAULT("r8a779x-ether", "pfc-r8a7790", "intc_irq0", "intc"), }; @@ -217,7 +217,7 @@ static void __init lager_add_standard_de mmcif1_resources, ARRAY_SIZE(mmcif1_resources), &mmcif1_pdata, sizeof(mmcif1_pdata)); - platform_device_register_resndata(&platform_bus, "r8a7790-ether", -1, + platform_device_register_resndata(&platform_bus, "r8a779x-ether", -1, ether_resources, ARRAY_SIZE(ether_resources), ðer_pdata, sizeof(ether_pdata)); @@ -246,7 +246,7 @@ static void __init lager_init(void) { lager_add_standard_devices(); - phy_register_fixup_for_id("r8a7790-ether-ff:01", lager_ksz8041_fixup); + phy_register_fixup_for_id("r8a779x-ether-ff:01", lager_ksz8041_fixup); } static const char * const lager_boards_compat_dt[] __initconst = { Index: renesas/arch/arm/mach-shmobile/clock-r8a7790.c =================================================================== --- renesas.orig/arch/arm/mach-shmobile/clock-r8a7790.c +++ renesas/arch/arm/mach-shmobile/clock-r8a7790.c @@ -285,7 +285,7 @@ static struct clk_lookup lookups[] = { CLKDEV_DEV_ID("e6518000.i2c", &mstp_clks[MSTP930]), CLKDEV_DEV_ID("e6530000.i2c", &mstp_clks[MSTP929]), CLKDEV_DEV_ID("e6540000.i2c", &mstp_clks[MSTP928]), - CLKDEV_DEV_ID("r8a7790-ether", &mstp_clks[MSTP813]), + CLKDEV_DEV_ID("r8a779x-ether", &mstp_clks[MSTP813]), CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]), CLKDEV_DEV_ID("ee200000.mmc", &mstp_clks[MSTP315]), CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP315]), Index: renesas/drivers/net/ethernet/renesas/Kconfig =================================================================== --- renesas.orig/drivers/net/ethernet/renesas/Kconfig +++ renesas/drivers/net/ethernet/renesas/Kconfig @@ -13,4 +13,4 @@ config SH_ETH Renesas SuperH Ethernet device driver. This driver supporting CPUs are: - SH7619, SH7710, SH7712, SH7724, SH7734, SH7763, SH7757, - R8A7740, R8A777x and R8A7790. + R8A7740, R8A777x and R8A779x. Index: renesas/drivers/net/ethernet/renesas/sh_eth.c =================================================================== --- renesas.orig/drivers/net/ethernet/renesas/sh_eth.c +++ renesas/drivers/net/ethernet/renesas/sh_eth.c @@ -395,8 +395,8 @@ static struct sh_eth_cpu_data r8a777x_da .hw_swap = 1, }; -/* R8A7790 */ -static struct sh_eth_cpu_data r8a7790_data = { +/* R8A7790/1 */ +static struct sh_eth_cpu_data r8a779x_data = { .set_duplex = sh_eth_set_duplex, .set_rate = sh_eth_set_rate_r8a777x, @@ -2807,7 +2807,7 @@ static struct platform_device_id sh_eth_ { "sh7763-gether", (kernel_ulong_t)&sh7763_data }, { "r8a7740-gether", (kernel_ulong_t)&r8a7740_data }, { "r8a777x-ether", (kernel_ulong_t)&r8a777x_data }, - { "r8a7790-ether", (kernel_ulong_t)&r8a7790_data }, + { "r8a779x-ether", (kernel_ulong_t)&r8a779x_data }, { } }; MODULE_DEVICE_TABLE(platform, sh_eth_id_table);