summaryrefslogtreecommitdiff
path: root/src/drivers/net
diff options
context:
space:
mode:
authorMario Scheithauer <mario.scheithauer@siemens.com>2023-01-25 10:19:51 +0100
committerFelix Held <felix-coreboot@felixheld.de>2023-03-02 14:39:59 +0000
commit33ef5c4e3a6a36596ab20faf4b8edd3f32c189d3 (patch)
tree166a3527d7e3182511c2ddc70dec5ace512e9269 /src/drivers/net
parente27f6543b6b10cfdedc2a78c162fa54d66060093 (diff)
drivers/net/phy/m88e1512: Switch the page back to 0 only once
When the configuration of Marvell PHY 88E1512 is finished, then switch the page back to 0 only once at the end of the Init function. Change-Id: I9e516870a7c5928724df2bd3ac9c5c8f3249af2e Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/73017 Reviewed-by: Werner Zeh <werner.zeh@siemens.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Diffstat (limited to 'src/drivers/net')
-rw-r--r--src/drivers/net/phy/m88e1512/m88e1512.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/drivers/net/phy/m88e1512/m88e1512.c b/src/drivers/net/phy/m88e1512/m88e1512.c
index f32991fcd5..5ce9b40c55 100644
--- a/src/drivers/net/phy/m88e1512/m88e1512.c
+++ b/src/drivers/net/phy/m88e1512/m88e1512.c
@@ -52,9 +52,6 @@ static void m88e1512_init(struct device *dev)
clrsetbits16(&reg, LED_FUNC_CTRL_MASK, config->led_0_ctrl |
(config->led_1_ctrl << 4) | (config->led_2_ctrl << 8));
mdio_write(dev, LED_FUNC_CTRL_REG, reg);
-
- /* Switch back to page 0. */
- switch_page(dev, 0);
}
/* INTn can be routed to LED[2] pin. */
@@ -68,10 +65,10 @@ static void m88e1512_init(struct device *dev)
reg = mdio_read(dev, LED_TIMER_CTRL_REG);
setbits16(&reg, LED_IRQ_ENABLE);
mdio_write(dev, LED_TIMER_CTRL_REG, reg);
-
- /* Switch back to page 0. */
- switch_page(dev, 0);
}
+
+ /* Switch back to page 0. */
+ switch_page(dev, 0);
}
struct device_operations m88e1512_ops = {