aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/lasat
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/lasat')
-rw-r--r--arch/mips/lasat/lasat_board.c13
-rw-r--r--arch/mips/lasat/prom.c47
-rw-r--r--arch/mips/lasat/prom.h1
-rw-r--r--arch/mips/lasat/setup.c2
4 files changed, 20 insertions, 43 deletions
diff --git a/arch/mips/lasat/lasat_board.c b/arch/mips/lasat/lasat_board.c
index d425120b0282..fbe9a87bd0ad 100644
--- a/arch/mips/lasat/lasat_board.c
+++ b/arch/mips/lasat/lasat_board.c
@@ -110,12 +110,13 @@ int lasat_init_board_info(void)
110 sizeof(struct lasat_eeprom_struct) - 4); 110 sizeof(struct lasat_eeprom_struct) - 4);
111 111
112 if (crc != lasat_board_info.li_eeprom_info.crc32) { 112 if (crc != lasat_board_info.li_eeprom_info.crc32) {
113 prom_printf("WARNING...\nWARNING...\nEEPROM CRC does not match calculated, attempting to soldier on...\n"); 113 printk(KERN_WARNING "WARNING...\nWARNING...\nEEPROM CRC does "
114 "not match calculated, attempting to soldier on...\n");
114 } 115 }
115 116
116 if (lasat_board_info.li_eeprom_info.version != LASAT_EEPROM_VERSION) 117 if (lasat_board_info.li_eeprom_info.version != LASAT_EEPROM_VERSION) {
117 { 118 printk(KERN_WARNING "WARNING...\nWARNING...\nEEPROM version "
118 prom_printf("WARNING...\nWARNING...\nEEPROM version %d, wanted version %d, attempting to soldier on...\n", 119 "%d, wanted version %d, attempting to soldier on...\n",
119 (unsigned int)lasat_board_info.li_eeprom_info.version, 120 (unsigned int)lasat_board_info.li_eeprom_info.version,
120 LASAT_EEPROM_VERSION); 121 LASAT_EEPROM_VERSION);
121 } 122 }
@@ -124,7 +125,9 @@ int lasat_init_board_info(void)
124 cfg1 = lasat_board_info.li_eeprom_info.cfg[1]; 125 cfg1 = lasat_board_info.li_eeprom_info.cfg[1];
125 126
126 if ( LASAT_W0_DSCTYPE(cfg0) != 1) { 127 if ( LASAT_W0_DSCTYPE(cfg0) != 1) {
127 prom_printf("WARNING...\nWARNING...\nInvalid configuration read from EEPROM, attempting to soldier on..."); 128 printk(KERN_WARNING "WARNING...\nWARNING...\n"
129 "Invalid configuration read from EEPROM, attempting to "
130 "soldier on...");
128 } 131 }
129 /* We have a valid configuration */ 132 /* We have a valid configuration */
130 133
diff --git a/arch/mips/lasat/prom.c b/arch/mips/lasat/prom.c
index d47692f73a26..812c6ac366be 100644
--- a/arch/mips/lasat/prom.c
+++ b/arch/mips/lasat/prom.c
@@ -23,10 +23,6 @@
23#define PROM_PUTC_ADDR PROM_JUMP_TABLE_ENTRY(1) 23#define PROM_PUTC_ADDR PROM_JUMP_TABLE_ENTRY(1)
24#define PROM_MONITOR_ADDR PROM_JUMP_TABLE_ENTRY(2) 24#define PROM_MONITOR_ADDR PROM_JUMP_TABLE_ENTRY(2)
25 25
26static void null_prom_printf(const char * fmt, ...)
27{
28}
29
30static void null_prom_display(const char *string, int pos, int clear) 26static void null_prom_display(const char *string, int pos, int clear)
31{ 27{
32} 28}
@@ -40,50 +36,29 @@ static void null_prom_putc(char c)
40} 36}
41 37
42/* these are functions provided by the bootloader */ 38/* these are functions provided by the bootloader */
43static void (* prom_putc)(char c) = null_prom_putc; 39static void (* __prom_putc)(char c) = null_prom_putc;
44void (* prom_printf)(const char * fmt, ...) = null_prom_printf; 40
41void prom_putchar(char c)
42{
43 __prom_putc(c);
44}
45
45void (* prom_display)(const char *string, int pos, int clear) = 46void (* prom_display)(const char *string, int pos, int clear) =
46 null_prom_display; 47 null_prom_display;
47void (* prom_monitor)(void) = null_prom_monitor; 48void (* prom_monitor)(void) = null_prom_monitor;
48 49
49unsigned int lasat_ndelay_divider; 50unsigned int lasat_ndelay_divider;
50 51
51#define PROM_PRINTFBUF_SIZE 256
52static char prom_printfbuf[PROM_PRINTFBUF_SIZE];
53
54static void real_prom_printf(const char * fmt, ...)
55{
56 va_list ap;
57 int len;
58 char *c = prom_printfbuf;
59 int i;
60
61 va_start(ap, fmt);
62 len = vsnprintf(prom_printfbuf, PROM_PRINTFBUF_SIZE, fmt, ap);
63 va_end(ap);
64
65 /* output overflowed the buffer */
66 if (len < 0 || len > PROM_PRINTFBUF_SIZE)
67 len = PROM_PRINTFBUF_SIZE;
68
69 for (i=0; i < len; i++) {
70 if (*c == '\n')
71 prom_putc('\r');
72 prom_putc(*c++);
73 }
74}
75
76static void setup_prom_vectors(void) 52static void setup_prom_vectors(void)
77{ 53{
78 u32 version = *(u32 *)(RESET_VECTOR + 0x90); 54 u32 version = *(u32 *)(RESET_VECTOR + 0x90);
79 55
80 if (version >= 307) { 56 if (version >= 307) {
81 prom_display = (void *)PROM_DISPLAY_ADDR; 57 prom_display = (void *)PROM_DISPLAY_ADDR;
82 prom_putc = (void *)PROM_PUTC_ADDR; 58 __prom_putc = (void *)PROM_PUTC_ADDR;
83 prom_printf = real_prom_printf;
84 prom_monitor = (void *)PROM_MONITOR_ADDR; 59 prom_monitor = (void *)PROM_MONITOR_ADDR;
85 } 60 }
86 prom_printf("prom vectors set up\n"); 61 printk("prom vectors set up\n");
87} 62}
88 63
89static struct at93c_defs at93c_defs[N_MACHTYPES] = { 64static struct at93c_defs at93c_defs[N_MACHTYPES] = {
@@ -101,11 +76,11 @@ void __init prom_init(void)
101 setup_prom_vectors(); 76 setup_prom_vectors();
102 77
103 if (current_cpu_data.cputype == CPU_R5000) { 78 if (current_cpu_data.cputype == CPU_R5000) {
104 prom_printf("LASAT 200 board\n"); 79 printk("LASAT 200 board\n");
105 mips_machtype = MACH_LASAT_200; 80 mips_machtype = MACH_LASAT_200;
106 lasat_ndelay_divider = LASAT_200_DIVIDER; 81 lasat_ndelay_divider = LASAT_200_DIVIDER;
107 } else { 82 } else {
108 prom_printf("LASAT 100 board\n"); 83 printk("LASAT 100 board\n");
109 mips_machtype = MACH_LASAT_100; 84 mips_machtype = MACH_LASAT_100;
110 lasat_ndelay_divider = LASAT_100_DIVIDER; 85 lasat_ndelay_divider = LASAT_100_DIVIDER;
111 } 86 }
diff --git a/arch/mips/lasat/prom.h b/arch/mips/lasat/prom.h
index 07be7bf1e4a3..019d45fbd268 100644
--- a/arch/mips/lasat/prom.h
+++ b/arch/mips/lasat/prom.h
@@ -2,5 +2,4 @@
2#define PROM_H 2#define PROM_H
3extern void (* prom_display)(const char *string, int pos, int clear); 3extern void (* prom_display)(const char *string, int pos, int clear);
4extern void (* prom_monitor)(void); 4extern void (* prom_monitor)(void);
5extern void (* prom_printf)(const char * fmt, ...);
6#endif 5#endif
diff --git a/arch/mips/lasat/setup.c b/arch/mips/lasat/setup.c
index b27b47cd6fb2..488007f13988 100644
--- a/arch/mips/lasat/setup.c
+++ b/arch/mips/lasat/setup.c
@@ -178,5 +178,5 @@ void __init plat_mem_setup(void)
178 /* Switch from prom exception handler to normal mode */ 178 /* Switch from prom exception handler to normal mode */
179 change_c0_status(ST0_BEV,0); 179 change_c0_status(ST0_BEV,0);
180 180
181 prom_printf("Lasat specific initialization complete\n"); 181 pr_info("Lasat specific initialization complete\n");
182} 182}