drivers: net: ls1088ardb: Fix EC1 and EC2 RCW offset
authorPramod Kumar <pramod.kumar_1@nxp.com>
Thu, 28 Feb 2019 09:06:40 +0000 (09:06 +0000)
committerPrabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Fri, 15 Mar 2019 06:22:01 +0000 (11:52 +0530)
Fix EC1 and EC2 read from correct offset 26, instead of 25

Signed-off-by: Pramod Kumar <pramod.kumar_1@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
drivers/net/ldpaa_eth/ls1088a.c

index 43210532ba48fff14b5fe968c4d8185b003a9881..c3260d318cc2f93bc1e3e436fe03c0fb4b9d4a34 100644 (file)
@@ -93,7 +93,7 @@ void fsl_rgmii_init(void)
        u32 ec;
 
 #ifdef CONFIG_SYS_FSL_EC1
-       ec = gur_in32(&gur->rcwsr[FSL_CHASSIS3_EC1_REGSR - 1])
+       ec = gur_in32(&gur->rcwsr[FSL_CHASSIS3_EC1_REGSR])
                & FSL_CHASSIS3_RCWSR25_EC1_PRTCL_MASK;
        ec >>= FSL_CHASSIS3_RCWSR25_EC1_PRTCL_SHIFT;
 
@@ -102,7 +102,7 @@ void fsl_rgmii_init(void)
 #endif
 
 #ifdef CONFIG_SYS_FSL_EC2
-       ec = gur_in32(&gur->rcwsr[FSL_CHASSIS3_EC2_REGSR - 1])
+       ec = gur_in32(&gur->rcwsr[FSL_CHASSIS3_EC2_REGSR])
                & FSL_CHASSIS3_RCWSR25_EC2_PRTCL_MASK;
        ec >>= FSL_CHASSIS3_RCWSR25_EC2_PRTCL_SHIFT;