code cleanups, remove debug messages
This commit is contained in:
parent
15073197a9
commit
44cc72b94e
1 changed files with 2 additions and 9 deletions
|
@ -163,7 +163,6 @@ static void uart_handler(struct state *s)
|
||||||
unsigned char c = read_from_uart(UART_IIR);
|
unsigned char c = read_from_uart(UART_IIR);
|
||||||
|
|
||||||
while (!(c & UART_IIR_NO_INT)) {
|
while (!(c & UART_IIR_NO_INT)) {
|
||||||
kprintf("c = 0x%x\n", c);
|
|
||||||
if (c & UART_IIR_RDI) {
|
if (c & UART_IIR_RDI) {
|
||||||
c = uart_getchar();
|
c = uart_getchar();
|
||||||
|
|
||||||
|
@ -252,20 +251,14 @@ int uart_init(void)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
Lsuccess:
|
Lsuccess:
|
||||||
|
iobase = pci_info.base[bar];
|
||||||
|
irq_install_handler(32+pci_info.irq, uart_handler);
|
||||||
if (pci_info.type[0]) {
|
if (pci_info.type[0]) {
|
||||||
mmio = 0;
|
mmio = 0;
|
||||||
iobase = pci_info.base[bar];
|
|
||||||
irq_install_handler(32+pci_info.irq, uart_handler);
|
|
||||||
//iobase = 0x3F8;
|
|
||||||
//irq_install_handler(32+4, uart_handler);
|
|
||||||
|
|
||||||
kprintf("UART uses io address 0x%x\n", iobase);
|
kprintf("UART uses io address 0x%x\n", iobase);
|
||||||
} else {
|
} else {
|
||||||
mmio = 1;
|
mmio = 1;
|
||||||
iobase = 0x9010b000; //pci_info.base[0];
|
|
||||||
irq_install_handler(32+pci_info.irq, uart_handler);
|
|
||||||
page_map(iobase & PAGE_MASK, iobase & PAGE_MASK, 1, PG_GLOBAL | PG_RW | PG_PCD);
|
page_map(iobase & PAGE_MASK, iobase & PAGE_MASK, 1, PG_GLOBAL | PG_RW | PG_PCD);
|
||||||
|
|
||||||
kprintf("UART uses mmio address 0x%x\n", iobase);
|
kprintf("UART uses mmio address 0x%x\n", iobase);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue