Changeset 3156582 in mainline for arch/mips/src/console.c
- Timestamp:
- 2005-09-11T12:48:42Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8e3fb24c
- Parents:
- 8491c48
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/mips/src/console.c
r8491c48 r3156582 32 32 #include <arch/console.h> 33 33 #include <arch.h> 34 #include <arch/drivers/arc.h> 35 #include <arch/arch.h> 34 36 35 static void arc_putchar(const char ch) 36 { 37 int cnt; 38 pri_t pri; 39 40 /* TODO: Should be spinlock? */ 41 pri = cpu_priority_high(); 42 bios_write(1, &ch, 1, &cnt); 43 cpu_priority_restore(pri); 44 45 } 46 37 /** Putchar that works with MSIM & gxemul */ 47 38 static void cons_putchar(const char ch) 48 39 { … … 50 41 } 51 42 52 43 /** Putchar that works with simics */ 53 44 static void serial_putchar(const char ch) 54 45 { … … 68 59 void console_init(void) 69 60 { 61 if (arc_enabled()) 62 putchar_func = arc_putchar; 70 63 /* The LSR on the start usually contains this value */ 71 if (*SERIAL_LSR == 0x60)64 else if (*SERIAL_LSR == 0x60) 72 65 putchar_func = serial_putchar; 73 66 else
Note:
See TracChangeset
for help on using the changeset viewer.