Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/imx fix always false comparison.
details: https://anonhg.NetBSD.org/src/rev/7d9d89e7bb01
branches: trunk
changeset: 343763:7d9d89e7bb01
user: ryo <ryo%NetBSD.org@localhost>
date: Thu Feb 25 13:27:33 2016 +0000
description:
fix always false comparison.
pointed out by joerg@
diffstat:
sys/arch/arm/imx/imx6_ahcisata.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (44 lines):
diff -r 567e95b1a29b -r 7d9d89e7bb01 sys/arch/arm/imx/imx6_ahcisata.c
--- a/sys/arch/arm/imx/imx6_ahcisata.c Thu Feb 25 13:23:27 2016 +0000
+++ b/sys/arch/arm/imx/imx6_ahcisata.c Thu Feb 25 13:27:33 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: imx6_ahcisata.c,v 1.2 2014/10/06 10:27:13 ryo Exp $ */
+/* $NetBSD: imx6_ahcisata.c,v 1.3 2016/02/25 13:27:33 ryo Exp $ */
/*
* Copyright (c) 2014 Ryo Shimizu <ryo%nerv.org@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: imx6_ahcisata.c,v 1.2 2014/10/06 10:27:13 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx6_ahcisata.c,v 1.3 2016/02/25 13:27:33 ryo Exp $");
#include "locators.h"
#include "opt_imx.h"
@@ -259,7 +259,7 @@
ixm6_ahcisata_init(struct imx_ahci_softc *sc)
{
uint32_t v;
- int timeout;
+ int timeout, pllstat;
/* AHCISATA clock enable */
v = imx6_ccm_read(CCM_CCGR5);
@@ -308,13 +308,13 @@
for (timeout = 50; timeout > 0; --timeout) {
delay(100);
- v = imx6_ahcisata_phy_read(sc, SATA_PHY_LANE0_OUT_STAT);
- if (v < 0) {
+ pllstat = imx6_ahcisata_phy_read(sc, SATA_PHY_LANE0_OUT_STAT);
+ if (pllstat < 0) {
aprint_error_dev(sc->sc_dev,
"cannot read LANE0 status\n");
break;
}
- if (v & SATA_PHY_LANE0_OUT_STAT_RX_PLL_STATE)
+ if (pllstat & SATA_PHY_LANE0_OUT_STAT_RX_PLL_STATE)
break;
}
if (timeout <= 0)
Home |
Main Index |
Thread Index |
Old Index