From patchwork Mon Dec 4 14:17:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 10090491 X-Patchwork-Delegate: geert@linux-m68k.org 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 34CF060327 for ; Mon, 4 Dec 2017 14:18:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2656A288BF for ; Mon, 4 Dec 2017 14:18:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1B10528912; Mon, 4 Dec 2017 14:18:31 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C6C56288BF for ; Mon, 4 Dec 2017 14:18:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752957AbdLDOST (ORCPT ); Mon, 4 Dec 2017 09:18:19 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:54778 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752836AbdLDOSR (ORCPT ); Mon, 4 Dec 2017 09:18:17 -0500 Received: by mail.free-electrons.com (Postfix, from userid 110) id DA6F620D07; Mon, 4 Dec 2017 15:18:15 +0100 (CET) Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 144132036C; Mon, 4 Dec 2017 15:17:45 +0100 (CET) From: Thomas Petazzoni To: "David S. Miller" , Sergei Shtylyov , =?UTF-8?q?Niklas=20S=C3=B6derlund?= , Geert Uytterhoeven , Simon Horman Cc: netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Thomas Petazzoni Subject: [PATCH 1/2] net: sh_eth: add support for SH7786 Date: Mon, 4 Dec 2017 15:17:43 +0100 Message-Id: <20171204141744.18599-2-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171204141744.18599-1-thomas.petazzoni@free-electrons.com> References: <20171204141744.18599-1-thomas.petazzoni@free-electrons.com> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This commit adds the sh_eth_cpu_data structure that describes the SH7786 variant of the IP. Signed-off-by: Thomas Petazzoni Acked-by: Sergei Shtylyov Reviewed-by: Sergei Shtylyov --- drivers/net/ethernet/renesas/sh_eth.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c index 0074c5998481..a3c48b2a713c 100644 --- a/drivers/net/ethernet/renesas/sh_eth.c +++ b/drivers/net/ethernet/renesas/sh_eth.c @@ -710,6 +710,30 @@ static struct sh_eth_cpu_data sh7724_data = { .rpadir_value = 0x00020000, /* NET_IP_ALIGN assumed to be 2 */ }; +static struct sh_eth_cpu_data sh7786_data = { + .set_duplex = sh_eth_set_duplex, + + .register_type = SH_ETH_REG_FAST_SH4, + + .ecsr_value = ECSR_PSRTO | ECSR_LCHNG | ECSR_ICD, + .ecsipr_value = ECSIPR_PSRTOIP | ECSIPR_LCHNGIP | ECSIPR_ICDIP, + .eesipr_value = EESIPR_RFCOFIP | EESIPR_ADEIP | EESIPR_ECIIP | + EESIPR_FTCIP | EESIPR_TDEIP | EESIPR_TFUFIP | + EESIPR_FRIP | EESIPR_RDEIP | EESIPR_RFOFIP | + EESIPR_RMAFIP | EESIPR_RRFIP | + EESIPR_RTLFIP | EESIPR_RTSFIP | + EESIPR_PREIP | EESIPR_CERFIP, + + .tx_check = EESR_FTC | EESR_CND | EESR_DLC | EESR_CD | EESR_RTO, + .eesr_err_check = EESR_TWB | EESR_TABT | EESR_RABT | EESR_RFE | + EESR_RDE | EESR_RFRMER | EESR_TFE | EESR_TDE, + + .apr = 1, + .mpr = 1, + .tpauser = 1, + .hw_swap = 1, +}; + static void sh_eth_set_rate_sh7757(struct net_device *ndev) { struct sh_eth_private *mdp = netdev_priv(ndev); @@ -3418,6 +3442,7 @@ static const struct platform_device_id sh_eth_id_table[] = { { "sh7757-ether", (kernel_ulong_t)&sh7757_data }, { "sh7757-gether", (kernel_ulong_t)&sh7757_data_giga }, { "sh7763-gether", (kernel_ulong_t)&sh7763_data }, + { "sh7786-ether", (kernel_ulong_t)&sh7786_data }, { } }; MODULE_DEVICE_TABLE(platform, sh_eth_id_table);