URL
https://opencores.org/ocsvn/or1k_old/or1k_old/trunk
Subversion Repositories or1k_old
Compare Revisions
- This comparison shows the changes necessary to convert path
/
- from Rev 237 to Rev 238
- ↔ Reverse comparison
Rev 237 → Rev 238
/trunk/or1ksim/peripheral/16450.c
62,11 → 62,11
} |
|
/* Set a specific UART register with value. */ |
void uart_write8(unsigned long addr, unsigned char value) |
void uart_write_byte(unsigned long addr, unsigned long value) |
{ |
int chipsel; |
|
debug("uart_write8(%x,%02x)\n", addr, (unsigned)value); |
debug("uart_write_byte(%x,%02x)\n", addr, (unsigned)value); |
|
for(chipsel = 0; chipsel < NR_UARTS; chipsel++) |
if ((addr & ~(UART_ADDR_SPACE-1)) == uarts[chipsel].baseaddr) |
120,12 → 120,12
} |
|
/* Read a specific UART register. */ |
unsigned char uart_read8(unsigned long addr) |
unsigned long uart_read_byte(unsigned long addr) |
{ |
unsigned char value = 0; |
int chipsel; |
|
debug("uart_read8(%x)\n", addr); |
debug("uart_read_byte(%x)\n", addr); |
|
for(chipsel = 0; chipsel < NR_UARTS; chipsel++) |
if ((addr & ~(UART_ADDR_SPACE-1)) == uarts[chipsel].baseaddr) |
209,7 → 209,7
printf("%s for RX and %s for TX.\n", config.uarts[i].rxfile, config.uarts[i].txfile); |
} else |
printf("UART%d has problems with TX file stream.\n", i); |
register_memoryarea(uarts[i].baseaddr, UART_ADDR_SPACE, 1, uart_read8, uart_write8, 0); |
register_memoryarea(uarts[i].baseaddr, UART_ADDR_SPACE, 1, uart_read_byte, uart_write_byte, 0); |
} |
} |
|