From patchwork Tue Sep 24 06:38:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nobuhiro Iwamatsu X-Patchwork-Id: 277356 X-Patchwork-Delegate: joe.hershberger@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 8C7CA2C009C for ; Tue, 24 Sep 2013 16:39:43 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 443ED4A098; Tue, 24 Sep 2013 08:39:42 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ULWp9q1+dIwy; Tue, 24 Sep 2013 08:39:41 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 307914A080; Tue, 24 Sep 2013 08:39:25 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 258594A07F for ; Tue, 24 Sep 2013 08:39:22 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eMklzNZIKVmf for ; Tue, 24 Sep 2013 08:39:17 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 BL_NJABL=ERR(-1.5) (only DNSBL check requested) Received: from mail-pd0-f174.google.com (mail-pd0-f174.google.com [209.85.192.174]) by theia.denx.de (Postfix) with ESMTPS id 0E6764A062 for ; Tue, 24 Sep 2013 08:39:09 +0200 (CEST) Received: by mail-pd0-f174.google.com with SMTP id y13so4215288pdi.33 for ; Mon, 23 Sep 2013 23:39:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=f87FuAb5XLNbrgvQyBQWbNRk9hOWPmtSlSiSByu2ZPg=; b=XZkAUW4w8qEhNHDPCYSU8AmRp7c7pTiUZW8BWEA8LL1uxnuq46bF6Nv5QuNNiylwAe R288XFDeohzE62Ki87mpKvxnoajqJgWPgkAJNlCqwreFM+cUKCO7PMs36zBvRo07/LPE Zz5qbxHzplUCaSUHQRgOTRazXMFRBBaQpO4iiSSvbu9acG7fcBgZKBvzgu7xBj9VvSrD FyC2YnoaGD4mcpotq+MjTmIMhgQDJMDMG6UGVRzWyldSiDtAvw5mh6vT161FNhIcJ2bF gN4gMz2loWYzA1MPpObLTcIYHwBJmCVCLxuua7VyfTiM7DsYqVR+lNCPn9cUufOjCOo0 Gb1Q== X-Gm-Message-State: ALoCoQnsb+fdh1qxRj3flQrrMoprObqNSd4wPXS51B4tYygtr2C/m29YnZpTFtdstf+xcUfRIaId X-Received: by 10.68.247.163 with SMTP id yf3mr3253930pbc.76.1380004747703; Mon, 23 Sep 2013 23:39:07 -0700 (PDT) Received: from xps-iwamatsu.renesas.com (49.14.32.202.bf.2iij.net. [202.32.14.49]) by mx.google.com with ESMTPSA id pu5sm43080108pac.21.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 23 Sep 2013 23:39:06 -0700 (PDT) From: Nobuhiro Iwamatsu To: u-boot@lists.denx.de Date: Tue, 24 Sep 2013 15:38:33 +0900 Message-Id: <1380004715-15014-2-git-send-email-nobuhiro.iwamatsu.yj@renesas.com> X-Mailer: git-send-email 1.8.4.rc3 In-Reply-To: <1380004715-15014-1-git-send-email-nobuhiro.iwamatsu.yj@renesas.com> References: <1380004715-15014-1-git-send-email-nobuhiro.iwamatsu.yj@renesas.com> Cc: Nobuhiro Iwamatsu Subject: [U-Boot] [PATCH 2/4] net: sh-eth: Add support R8A7791 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de R8A7791 has the same sh-ether IP core as other SH/rmobile. This patch adds support of R8A7791. Signed-off-by: Nobuhiro Iwamatsu CC: Nobuhiro Iwamatsu CC: Joe Hershberger --- drivers/net/sh_eth.c | 5 +++-- drivers/net/sh_eth.h | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index b936808..8c23e30 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c @@ -410,7 +410,7 @@ static int sh_eth_config(struct sh_eth_dev *eth, bd_t *bd) #if defined(CONFIG_CPU_SH7734) || defined(CONFIG_R8A7740) sh_eth_write(eth, CONFIG_SH_ETHER_SH7734_MII, RMII_MII); -#elif defined(CONFIG_R8A7790) +#elif defined(CONFIG_R8A7790) || defined(CONFIG_R8A7791) sh_eth_write(eth, sh_eth_read(eth, RMIIMR) | 0x1, RMIIMR); #endif /* Configure phy */ @@ -435,7 +435,8 @@ static int sh_eth_config(struct sh_eth_dev *eth, bd_t *bd) sh_eth_write(eth, GECMR_100B, GECMR); #elif defined(CONFIG_CPU_SH7757) || defined(CONFIG_CPU_SH7752) sh_eth_write(eth, 1, RTRATE); -#elif defined(CONFIG_CPU_SH7724) || defined(CONFIG_R8A7790) +#elif defined(CONFIG_CPU_SH7724) || defined(CONFIG_R8A7790) || \ + defined(CONFIG_R8A7791) val = ECMR_RTM; #endif } else if (phy->speed == 10) { diff --git a/drivers/net/sh_eth.h b/drivers/net/sh_eth.h index 43b8ac9..8aa7109 100644 --- a/drivers/net/sh_eth.h +++ b/drivers/net/sh_eth.h @@ -301,7 +301,7 @@ static const u16 sh_eth_offset_fast_sh4[SH_ETH_MAX_REGISTER_OFFSET] = { #elif defined(CONFIG_R8A7740) #define SH_ETH_TYPE_GETHER #define BASE_IO_ADDR 0xE9A00000 -#elif defined(CONFIG_R8A7790) +#elif defined(CONFIG_R8A7790) || defined(CONFIG_R8A7791) #define SH_ETH_TYPE_ETHER #define BASE_IO_ADDR 0xEE700200 #endif @@ -507,7 +507,7 @@ enum FELIC_MODE_BIT { ECMR_PRM = 0x00000001, #ifdef CONFIG_CPU_SH7724 ECMR_RTM = 0x00000010, -#elif defined(CONFIG_R8A7790) +#elif defined(CONFIG_R8A7790) || defined(CONFIG_R8A7791) ECMR_RTM = 0x00000004, #endif