From e2632fdbb98a425a27a801d621bb24c32e1d425f Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Sun, 19 Mar 2006 22:30:42 +0000 Subject: redo ts5300 auto.c add ts5300 flag as comment in flashrom utility Makefile git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2215 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/mainboard/technologic/ts5300/auto.c | 289 +++++++++++--------------------- 1 file changed, 100 insertions(+), 189 deletions(-) (limited to 'src/mainboard/technologic/ts5300') diff --git a/src/mainboard/technologic/ts5300/auto.c b/src/mainboard/technologic/ts5300/auto.c index 4ef1a100cc..0bd62f81fc 100644 --- a/src/mainboard/technologic/ts5300/auto.c +++ b/src/mainboard/technologic/ts5300/auto.c @@ -1,5 +1,11 @@ +/* + * TS5300 specific initialization code. + * written by Stefan Reinauer + * (c) 2006 coresystems GmbH + */ + #define ASSEMBLY 1 -#define ASM_CONSOLE_LOGLEVEL 8 +#define ASM_CONSOLE_LOGLEVEL 6 #include #include #include @@ -11,17 +17,20 @@ #include "arch/i386/lib/console.c" #include "ram/ramtest.c" #include "cpu/x86/bist.h" -//#include "lib/delay.c" +#define TS5300_LED_OFF outb((inb(0x77)&0xfe), 0x77) +#define TS5300_LED_ON outb((inb(0x77)|1), 0x77) + +#define TS9500_LED_OFF outb((inb(0x19a)&0xfe), 0x19a) +#define TS9500_LED_ON outb((inb(0x19a)|1), 0x19a) + +/* PAR register setup */ void setup_pars(void) { volatile unsigned long *par; - /* as per the book: */ - /* PAR register setup */ - /* set up the PAR registers as they are on the MSM586SEG */ par = (unsigned long *) 0xfffef088; - /* NOTE: move this to mainboard.c ASAP */ + /* NOTE: Ron says, move this to mainboard.c */ *par++ = 0x00000000; *par++ = 0x340f0070; *par++ = 0x380701f0; @@ -35,7 +44,7 @@ void setup_pars(void) *par++ = 0x00000000; *par++ = 0x00000000; *par++ = 0x00000000; - *par++ = 0x8a07c940; + *par++ = 0x8a07c940; /* Flash setup */ *par++ = 0x00000000; *par++ = 0xee00400e; } @@ -44,218 +53,120 @@ void setup_pars(void) #include "debug.c" -static void hard_reset(void) +static void identify_ts9500(void) { - print_err("Hard reset called.\n"); - while (1) ; + unsigned i, val; + + TS9500_LED_ON; + + print_err("TS-9500 add-on found:\r\n"); + val=inb(0x19b); + for (i=0; i<8; i++) { + print_err(" DIP"); + print_err_char(i+0x31); + print_err(": "); + if((val&(1<