diff options
author | Holger Brunck <holger.brunck@keymile.com> | 2014-01-27 16:58:26 +0100 |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2014-02-13 16:17:39 +0100 |
commit | fa6e0ecb8aeedbc2138c162dc0319920b7e8e34b (patch) | |
tree | b6dc31e04276adaf6068821ff48648ffa7cfa5fe /board/keymile/km_arm | |
parent | 56cde17760deacc45866cdc6a2248d0fc245026d (diff) | |
download | u-boot-imx-fa6e0ecb8aeedbc2138c162dc0319920b7e8e34b.zip u-boot-imx-fa6e0ecb8aeedbc2138c162dc0319920b7e8e34b.tar.gz u-boot-imx-fa6e0ecb8aeedbc2138c162dc0319920b7e8e34b.tar.bz2 |
arm/km: fix wrong error handling
miiphy_read and miiphy_write are returning 0 on success.
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Acked-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Diffstat (limited to 'board/keymile/km_arm')
-rw-r--r-- | board/keymile/km_arm/km_arm.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/board/keymile/km_arm/km_arm.c b/board/keymile/km_arm/km_arm.c index c104896..5f32e70 100644 --- a/board/keymile/km_arm/km_arm.c +++ b/board/keymile/km_arm/km_arm.c @@ -318,15 +318,15 @@ void reset_phy(void) return; /* RGMII clk transition on data stable */ - if (!miiphy_read(name, CONFIG_PHY_BASE_ADR, PHY_SPEC_CTRL_REG, ®)) + if (miiphy_read(name, CONFIG_PHY_BASE_ADR, PHY_SPEC_CTRL_REG, ®)) printf("Error reading PHY spec ctrl reg\n"); - if (!miiphy_write(name, CONFIG_PHY_BASE_ADR, PHY_SPEC_CTRL_REG, - reg | PHY_RGMII_CLK_STABLE | PHY_CLSA)) + if (miiphy_write(name, CONFIG_PHY_BASE_ADR, PHY_SPEC_CTRL_REG, + reg | PHY_RGMII_CLK_STABLE | PHY_CLSA)) printf("Error writing PHY spec ctrl reg\n"); /* leds setup */ - if (!miiphy_write(name, CONFIG_PHY_BASE_ADR, PHY_LED_SEL_REG, - PHY_LED0_LINK | PHY_LED1_ACT | PHY_LED2_INT)) + if (miiphy_write(name, CONFIG_PHY_BASE_ADR, PHY_LED_SEL_REG, + PHY_LED0_LINK | PHY_LED1_ACT | PHY_LED2_INT)) printf("Error writing PHY LED reg\n"); /* reset the phy */ |