2 * TS5300 specific initialization code.
3 * written by Stefan Reinauer <stepan@coresystems.de>
4 * (c) 2006 coresystems GmbH
7 #define ASM_CONSOLE_LOGLEVEL 6
9 #include <device/pci_def.h>
11 #include <device/pnp_def.h>
12 #include <arch/romcc_io.h>
14 #include "pc80/mc146818rtc_early.c"
15 #include "pc80/serial.c"
16 #include "arch/i386/lib/console.c"
17 #include "lib/ramtest.c"
18 #include "cpu/x86/bist.h"
20 #define TS5300_LED_OFF outb((inb(0x77)&0xfe), 0x77)
21 #define TS5300_LED_ON outb((inb(0x77)|1), 0x77)
23 #define TS9500_LED_OFF outb((inb(0x19a)&0xfe), 0x19a)
24 #define TS9500_LED_ON outb((inb(0x19a)|1), 0x19a)
26 /* PAR register setup */
29 volatile unsigned long *par;
30 par = (unsigned long *) 0xfffef088;
32 /* NOTE: Ron says, move this to mainboard.c */
46 *par++ = 0x8a07c940; /* Flash setup */
51 #include "cpu/amd/sc520/raminit.c"
53 static void identify_ts9500(void)
59 print_err("TS-9500 add-on found:\r\n");
63 print_err_char(i+0x31);
76 print_err_char(i+0x30-5);
88 static void identify_system(void)
92 print_err("Mainboard: ");
95 case 0x50: print_err("TS-5300\r\n"); break;
96 case 0x40: print_err("TS-5400\r\n"); break;
97 case 0x60: print_err("TS-5500\r\n"); break;
98 case 0x20: print_err("TS-5600\r\n"); break;
99 case 0x70: print_err("TS-5700\r\n"); break;
100 default: print_err("unknown\r\n"); break;
104 print_err(" SRAM option: ");
105 if((val&1)==0) print_err("not ");
106 print_err("installed\r\n");
108 print_err(" RS-485 option: ");
109 if((val&2)==0) print_err("not ");
110 print_err("installed\r\n");
113 print_err(" Temp. range: ");
114 if((val&2)==0) print_err("commercial\r\n");
115 else print_err("industrial\r\n");
120 for (i=1; i<8; i++) {
122 print_err_char(i+0x30);
127 print_err("off\r\n");
138 static void hard_reset(void)
140 print_err("Hard reset called.\n");
144 static void main(unsigned long bist)
151 // Let the hardware settle a bit.
152 for(i = 0; i < 100; i++)
160 print_err("Technologic Systems TS5300 - http://www.embeddedx86.com/\r\n");
162 print_err("Memory initialized: 32MB\r\n");
169 // Check 32MB of memory @ 0 (very slow!)
170 print_err("Checking memory:\r\n");
171 ram_check(0x00000000, 0x000a0000);
172 ram_check(0x000b0000, 0x02000000);