Module Name: src Committed By: phx Date: Sat Nov 12 23:52:54 UTC 2011
Modified Files: src/sys/arch/sandpoint/stand/altboot: brdsetup.c version Log Message: Improved Iomega microcontroller support. Bumped version to 1.8. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/arch/sandpoint/stand/altboot/brdsetup.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/sandpoint/stand/altboot/version Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/sandpoint/stand/altboot/brdsetup.c diff -u src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.22 src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.23 --- src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.22 Mon Nov 7 21:11:55 2011 +++ src/sys/arch/sandpoint/stand/altboot/brdsetup.c Sat Nov 12 23:52:54 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: brdsetup.c,v 1.22 2011/11/07 21:11:55 phx Exp $ */ +/* $NetBSD: brdsetup.c,v 1.23 2011/11/12 23:52:54 phx Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -141,7 +141,7 @@ static uint32_t ticks_per_sec, ns_per_ti static void brdfixup(void); static void setup(void); -static int send_iomega(int, int, int, int, int, int); +static void send_iomega(int, int, int, int, int, int); static inline uint32_t mfmsr(void); static inline void mtmsr(uint32_t); static inline uint32_t cputype(void); @@ -694,15 +694,15 @@ iomegabrdfix(struct brdprop *brd) { init_uart(uart2base, 9600, LCR_8BITS | LCR_PNONE); - /* LED flashing blue, fan auto, turn on at 60C, turn off at 50C */ - (void)send_iomega('b', 'd', 2, 'a', 60, 50); + /* LED flashing blue, fan auto, turn on at 50C, turn off at 45C */ + send_iomega('b', 'd', 2, 'a', 50, 45); } void iomegareset() { - (void)send_iomega('g', 0, 0, 0, 0, 0); + send_iomega('g', 0, 0, 0, 0, 0); /*NOTREACHED*/ } @@ -901,7 +901,7 @@ iomega_debug(const char *txt, uint8_t bu } #endif /* DEBUG */ -static int +static void send_iomega(int power, int led, int rate, int fan, int high, int low) { uint8_t buf[IOMEGA_PACKETSIZE]; @@ -923,7 +923,7 @@ send_iomega(int power, int led, int rate */ do { putchar(0); - delay(25000); + delay(50000); } while (!tstchar()); for (i = 0; i < IOMEGA_PACKETSIZE; i++) @@ -935,18 +935,12 @@ send_iomega(int power, int led, int rate #endif /* send command */ - if (power >= 0) - buf[IOMEGA_POWER] = power; - if (led >= 0) - buf[IOMEGA_LED] = led; - if (rate >= 0) - buf[IOMEGA_FLASH_RATE] = rate; - if (fan >= 0) - buf[IOMEGA_FAN] = fan; - if (high >= 0) - buf[IOMEGA_HIGH_TEMP] = high; - if (low >= 0) - buf[IOMEGA_LOW_TEMP] = low; + buf[IOMEGA_POWER] = power; + buf[IOMEGA_LED] = led; + buf[IOMEGA_FLASH_RATE] = rate; + buf[IOMEGA_FAN] = fan; + buf[IOMEGA_HIGH_TEMP] = high; + buf[IOMEGA_LOW_TEMP] = low; buf[IOMEGA_ID] = 7; /* host id */ buf[IOMEGA_CHECKSUM] = (buf[IOMEGA_POWER] + buf[IOMEGA_LED] + buf[IOMEGA_FLASH_RATE] + buf[IOMEGA_FAN] + @@ -963,12 +957,15 @@ send_iomega(int power, int led, int rate /* receive the reply */ for (i = 0; i < IOMEGA_PACKETSIZE; i++) buf[i] = getchar(); - - uart1base = savedbase; #ifdef DEBUG + uart1base = savedbase; iomega_debug("68HC908 reply", buf); + uart1base = uart2base; #endif - return buf[0] != '#'; /* error? */ + + if (buf[0] == '#') + goto again; /* try again on error */ + uart1base = savedbase; } void Index: src/sys/arch/sandpoint/stand/altboot/version diff -u src/sys/arch/sandpoint/stand/altboot/version:1.4 src/sys/arch/sandpoint/stand/altboot/version:1.5 --- src/sys/arch/sandpoint/stand/altboot/version:1.4 Sun Mar 13 15:23:43 2011 +++ src/sys/arch/sandpoint/stand/altboot/version Sat Nov 12 23:52:54 2011 @@ -9,3 +9,5 @@ 1.7: ST1023/IP1000A driver, load kernels from memory (mem:), possibility to replace altboot with a new version while running, interactive mode, default boot path is now wd0:netbsd in multiuser mode +1.8: Iomega support, IT821x & VT6410 IDE support, fixed interrupt + issue, exception handler and sat-controller test mode (DEBUG)