From 93b04a5d32c553b7eaa10361afc57b5efafba064 Mon Sep 17 00:00:00 2001 From: Steve Markgraf Date: Sat, 10 Apr 2010 02:09:33 +0200 Subject: 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 --- src/target/firmware/calypso/clock.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/target/firmware') 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)); } -- cgit v1.2.3