Fix spelling mistake, BCM2835_PASWORD -> BCM2835_PASSWORD

This commit is contained in:
Gavin Atkinson 2017-04-03 22:36:45 +00:00
parent 548b549ade
commit 5613f78480

View File

@ -43,7 +43,7 @@ __FBSDID("$FreeBSD$");
#include <arm/broadcom/bcm2835/bcm2835_wdog.h>
#define BCM2835_PASWORD 0x5a
#define BCM2835_PASSWORD 0x5a
#define BCM2835_WDOG_RESET 0
#define BCM2835_PASSWORD_MASK 0xff000000
@ -115,7 +115,7 @@ bcmwd_attach(device_t dev)
sc = device_get_softc(dev);
sc->wdog_period = 7;
sc->wdog_passwd = BCM2835_PASWORD;
sc->wdog_passwd = BCM2835_PASSWORD;
sc->wdog_armed = 0;
sc->dev = dev;
@ -163,27 +163,27 @@ bcmwd_watchdog_fn(void *private, u_int cmd, int *error)
device_printf(sc->dev,
"Can't arm, timeout must be between 1-15 seconds\n");
WRITE(sc, BCM2835_RSTC_REG,
(BCM2835_PASWORD << BCM2835_PASSWORD_SHIFT) |
(BCM2835_PASSWORD << BCM2835_PASSWORD_SHIFT) |
BCM2835_RSTC_RESET);
mtx_unlock(&sc->mtx);
return;
}
ticks = (sec << 16) & BCM2835_WDOG_TIME_MASK;
reg = (BCM2835_PASWORD << BCM2835_PASSWORD_SHIFT) | ticks;
reg = (BCM2835_PASSWORD << BCM2835_PASSWORD_SHIFT) | ticks;
WRITE(sc, BCM2835_WDOG_REG, reg);
reg = READ(sc, BCM2835_RSTC_REG);
reg &= BCM2835_RSTC_WRCFG_CLR;
reg |= BCM2835_RSTC_WRCFG_FULL_RESET;
reg |= (BCM2835_PASWORD << BCM2835_PASSWORD_SHIFT);
reg |= (BCM2835_PASSWORD << BCM2835_PASSWORD_SHIFT);
WRITE(sc, BCM2835_RSTC_REG, reg);
*error = 0;
}
else
WRITE(sc, BCM2835_RSTC_REG,
(BCM2835_PASWORD << BCM2835_PASSWORD_SHIFT) |
(BCM2835_PASSWORD << BCM2835_PASSWORD_SHIFT) |
BCM2835_RSTC_RESET);
mtx_unlock(&sc->mtx);
@ -197,11 +197,11 @@ bcmwd_watchdog_reset(void)
return;
WRITE(bcmwd_lsc, BCM2835_WDOG_REG,
(BCM2835_PASWORD << BCM2835_PASSWORD_SHIFT) | 10);
(BCM2835_PASSWORD << BCM2835_PASSWORD_SHIFT) | 10);
WRITE(bcmwd_lsc, BCM2835_RSTC_REG,
(READ(bcmwd_lsc, BCM2835_RSTC_REG) & BCM2835_RSTC_WRCFG_CLR) |
(BCM2835_PASWORD << BCM2835_PASSWORD_SHIFT) |
(BCM2835_PASSWORD << BCM2835_PASSWORD_SHIFT) |
BCM2835_RSTC_WRCFG_FULL_RESET);
}