From 33ef5c4e3a6a36596ab20faf4b8edd3f32c189d3 Mon Sep 17 00:00:00 2001 From: Mario Scheithauer Date: Wed, 25 Jan 2023 10:19:51 +0100 Subject: [PATCH] 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/73017 Reviewed-by: Werner Zeh Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans --- src/drivers/net/phy/m88e1512/m88e1512.c | 9 +++------ 1 file 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(®, 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(®, 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 = {