summaryrefslogtreecommitdiffstats
path: root/src/target/firmware
diff options
context:
space:
mode:
authorSteve Markgraf <steve@steve-m.de>2010-04-10 02:09:33 +0200
committerHarald Welte <laforge@gnumonks.org>2010-04-10 09:16:12 +0200
commit93b04a5d32c553b7eaa10361afc57b5efafba064 (patch)
tree7807e372e5a5d01242d196e2335e687f470236c7 /src/target/firmware
parent5f751d3db87eda867a9bf6f1758c29b7325b8dd1 (diff)
fix disabling of the calypso bootrom on targets with nIBOOT tied to low:
* bit 8 always needs to be 1 when overriding the setting of the nIBOOT pin, so now we set both bits (9 and 8) to 1, and clear bit 9 if we want to enable the romloader * to be sure, this was tested on a target with nIBOOT high (C155) and a Alcatel VLE5 pulled to low, and works fine Signed-off-by: Steve Markgraf <steve@steve-m.de>
Diffstat (limited to 'src/target/firmware')
-rw-r--r--src/target/firmware/calypso/clock.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/target/firmware/calypso/clock.c b/src/target/firmware/calypso/clock.c
index 8ea5b9ca..246b6e00 100644
--- a/src/target/firmware/calypso/clock.c
+++ b/src/target/firmware/calypso/clock.c
@@ -167,12 +167,11 @@ void calypso_bootrom(int enable)
{
uint16_t conf = readw(MEMIF_REG(EXTRA_CONF));
- conf &= ~(3 << 8);
+ conf |= (3 << 8);
if (enable)
- conf |= (1 << 8);
- else
- conf &= ~(1 << 8);
+ conf &= ~(1 << 9);
+
writew(conf, MEMIF_REG(EXTRA_CONF));
}