]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: sh-eth: Add support R8A7791
authorNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Tue, 24 Sep 2013 06:38:33 +0000 (15:38 +0900)
committerJoe Hershberger <joe.hershberger@ni.com>
Fri, 22 Nov 2013 22:50:54 +0000 (16:50 -0600)
R8A7791 has the same sh-ether IP core as other SH/rmobile.
This patch adds support of R8A7791.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
CC: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
CC: Joe Hershberger <joe.hershberger@gmail.com>
drivers/net/sh_eth.c
drivers/net/sh_eth.h

index 9020752edda59024f9d0841bfa9e8790be443315..5e132f2b5374f1e959e800de7bd156cc2518f9c5 100644 (file)
@@ -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) {
index 43b8ac9ce80c9f26c7329952ac74f730d6474b2b..8aa71098cb3126092e486136dfc7e81b53089b99 100644 (file)
@@ -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