diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-15 19:08:49 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-15 19:08:49 -0500 |
commit | 40787d0099676c9923e31fbdb90422d5c97cdcd5 (patch) | |
tree | 029b96d58712e390878795e76b46e8598601daeb /arch/mips/qemu/q-console.c | |
parent | 3c72f526dfe23f945ad034ae5a88649980d27a50 (diff) | |
parent | 72e510654c814e2c5c9227e95ae02ea77e015ce4 (diff) |
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
[MIPS] N32 needs to use the compat version of sys_nfsservctl.
[MIPS] irq_cpu: use handle_percpu_irq handler to avoid dropping interrupts.
[MIPS] Sibyte: Fix name of clocksource.
[MIPS] SNI: s/achknowledge/acknowledge/
[MIPS] Makefile: Fix canonical system names
[MIPS] vpe: handle halting TCs in an errata safe way.
[MIPS] Sibyte: Stop timers before programming next even.
[MIPS] Sibyte: Increase minimum oneshot timer interval to two ticks.
[MIPS] Lasat: Fix overlap of interrupt number ranges.
[MIPS] SNI PCIT CPLUS: workaround for b0rked irq wiring of onboard PCI bus 1
[MIPS] Fix shadow register support.
[MIPS] Change get_cycles to always return 0.
[MIPS] Fix typo in R3000 TRACE_IRQFLAGS code
[MIPS] Sibyte: Replace use of removed IO_SPACE_BASE with IOADDR.
[MIPS] iounmap if in vr41xx_pciu_init() pci clock is over 33MHz
[MIPS] BCM1480: Remove duplicate acknowledge of timer interrupt.
[MIPS] Sibyte: pin timer interrupt to their cores.
[MIPS] Qemu: Add early printk, your friend in a cold night.
[MIPS] Convert reference to mem_map to pfn_to_page().
[MIPS] Sibyte: resurrect old cache hack.
Diffstat (limited to 'arch/mips/qemu/q-console.c')
-rw-r--r-- | arch/mips/qemu/q-console.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/mips/qemu/q-console.c b/arch/mips/qemu/q-console.c new file mode 100644 index 000000000000..81101ae5017a --- /dev/null +++ b/arch/mips/qemu/q-console.c | |||
@@ -0,0 +1,26 @@ | |||
1 | #include <linux/console.h> | ||
2 | #include <linux/init.h> | ||
3 | #include <linux/serial_reg.h> | ||
4 | #include <asm/io.h> | ||
5 | |||
6 | #define PORT(offset) (0x3f8 + (offset)) | ||
7 | |||
8 | static inline unsigned int serial_in(int offset) | ||
9 | { | ||
10 | return inb(PORT(offset)); | ||
11 | } | ||
12 | |||
13 | static inline void serial_out(int offset, int value) | ||
14 | { | ||
15 | outb(value, PORT(offset)); | ||
16 | } | ||
17 | |||
18 | int prom_putchar(char c) | ||
19 | { | ||
20 | while ((serial_in(UART_LSR) & UART_LSR_THRE) == 0) | ||
21 | ; | ||
22 | |||
23 | serial_out(UART_TX, c); | ||
24 | |||
25 | return 1; | ||
26 | } | ||