summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2015-09-08 16:55:42 +0200
committerMichal Simek <michal.simek@xilinx.com>2015-11-19 14:03:05 +0100
commit242b15476c94752494670a3e419e639d2df08dfd (patch)
tree90eb87ea90995ce5a4f302a22178381a8e2601a1
parente4d2318adbcff084dbbed2f84e4a51da09a1b21b (diff)
downloadu-boot-imx-242b15476c94752494670a3e419e639d2df08dfd.zip
u-boot-imx-242b15476c94752494670a3e419e639d2df08dfd.tar.gz
u-boot-imx-242b15476c94752494670a3e419e639d2df08dfd.tar.bz2
net: zynq: Fix mdc clock division setting for 100Mbit/s
Using set and clear macro is incorrect because it is not overwritting origin mdc clock division setup. For example origin setup is 8(0b001) and new setup is 64(0b100) which means 0b101 is setup which is 96 divider. Using writel to rewrite all setting like for 1000Mbit/s case. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
-rw-r--r--drivers/net/zynq_gem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 56651e9..9d69c84 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -410,8 +410,8 @@ static int zynq_gem_init(struct eth_device *dev, bd_t * bis)
clk_rate = ZYNQ_GEM_FREQUENCY_1000;
break;
case SPEED_100:
- clrsetbits_le32(&regs->nwcfg, ZYNQ_GEM_NWCFG_SPEED1000,
- ZYNQ_GEM_NWCFG_INIT | ZYNQ_GEM_NWCFG_SPEED100);
+ writel(ZYNQ_GEM_NWCFG_INIT | ZYNQ_GEM_NWCFG_SPEED100,
+ &regs->nwcfg);
clk_rate = ZYNQ_GEM_FREQUENCY_100;
break;
case SPEED_10: