From patchwork Thu Nov 17 14:05:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 9434269 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0657B60469 for ; Thu, 17 Nov 2016 14:13:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA36129303 for ; Thu, 17 Nov 2016 14:13:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC7E0294BB; Thu, 17 Nov 2016 14:13:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5FF4D29552 for ; Thu, 17 Nov 2016 14:13:52 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c7NQ3-000107-7x; Thu, 17 Nov 2016 14:12:03 +0000 Received: from kirsty.vergenet.net ([202.4.237.240]) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c7NKY-0001vP-RG for linux-arm-kernel@lists.infradead.org; Thu, 17 Nov 2016 14:06:25 +0000 Received: from penelope.kanocho.kobe.vergenet.net (52D9BC73.cm-11-1c.dynamic.ziggo.nl [82.217.188.115]) by kirsty.vergenet.net (Postfix) with ESMTPSA id 1E5B525BF5C; Fri, 18 Nov 2016 01:05:13 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=verge.net.au; s=mail; t=1479391513; bh=kkdDhqxHrfd9wgQqXUPFfUasPYn7b4kw2eKQPBLINDQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O46KEotT3G0IJsT5yFWKj5uhITFgj8AJ5rNsEjOba9QX4tb1ZF5hch0Qvf5Fa1Gib BSQCcZOj5SU83GRmK9AWBolufFesdMWkRbGtu0V0GoLI4mobuQfjuYlHG8I4PEI+/4 oPsiCuhGEY5BQNdUcHIUICFB+6zt6wRxZ0nYG9FU= Received: by penelope.kanocho.kobe.vergenet.net (Postfix, from userid 7100) id A60AF6077C; Thu, 17 Nov 2016 15:05:09 +0100 (CET) From: Simon Horman To: linux-renesas-soc@vger.kernel.org Subject: [PATCH] ravb: Support 1Gbps on R-Car H3 ES1.1+ and R-Car M3-W Date: Thu, 17 Nov 2016 15:05:09 +0100 Message-Id: <735ea633e42060546cabe8430efbc00d4be1790a.1479390880.git.horms+renesas@verge.net.au> X-Mailer: git-send-email 2.7.0.rc3.207.g0ac5344 In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161117_060623_324917_9E6DB36D X-CRM114-Status: GOOD ( 11.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Simon Horman , Magnus Damm , Geert Uytterhoeven , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Geert Uytterhoeven The limitation to 10/100Mbit speeds on R-Car Gen3 is valid for R-Car H3 ES1.0 only. Check for the exact SoC model to allow 1Gbps on newer revisions of R-Car H3, and on R-Car M3-W. Signed-off-by: Geert Uytterhoeven Acked-by: David S. Miller Signed-off-by: Simon Horman --- drivers/net/ethernet/renesas/ravb_main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index 630536bc72f9..83c45edba6ef 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -31,6 +31,7 @@ #include #include #include +#include #include @@ -977,6 +978,11 @@ static void ravb_adjust_link(struct net_device *ndev) phy_print_status(phydev); } +static const struct soc_device_attribute r8a7795es10[] = { + { .soc_id = "r8a7795", .revision = "ES1.0", }, + { /* sentinel */ } +}; + /* PHY init function */ static int ravb_phy_init(struct net_device *ndev) { @@ -1011,10 +1017,10 @@ static int ravb_phy_init(struct net_device *ndev) return -ENOENT; } - /* This driver only support 10/100Mbit speeds on Gen3 + /* This driver only support 10/100Mbit speeds on R-Car H3 ES1.0 * at this time. */ - if (priv->chip_id == RCAR_GEN3) { + if (soc_device_match(r8a7795es10)) { int err; err = phy_set_max_speed(phydev, SPEED_100);