fix disabling of the calypso bootrom on targets with nIBOOT tied to low:
authorSteve Markgraf <steve@steve-m.de>
Sat, 10 Apr 2010 00:09:33 +0000 (02:09 +0200)
committerHarald Welte <laforge@gnumonks.org>
Sat, 10 Apr 2010 07:16:12 +0000 (09:16 +0200)
* 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>
src/target/firmware/calypso/clock.c

index 8ea5b9c..246b6e0 100644 (file)
@@ -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));
 }