Changeset 26e7d6d in mainline for kernel/genarch/src/drivers/s3c24xx_uart/s3c24xx_uart.c
- Timestamp:
- 2011-09-19T16:31:00Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a347a11
- Parents:
- 3842a955 (diff), 086290d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/drivers/s3c24xx_uart/s3c24xx_uart.c
r3842a955 r26e7d6d 44 44 #include <arch/asm.h> 45 45 #include <mm/slab.h> 46 #include <mm/page.h> 46 47 #include <sysinfo/sysinfo.h> 47 48 #include <str.h> … … 59 60 } 60 61 61 static void s3c24xx_uart_putchar(outdev_t *dev, wchar_t ch , bool silent)62 static void s3c24xx_uart_putchar(outdev_t *dev, wchar_t ch) 62 63 { 63 if (!silent) { 64 s3c24xx_uart_t *uart = 65 (s3c24xx_uart_t *) dev->data; 66 67 if ((!uart->parea.mapped) || (console_override)) { 64 68 if (!ascii_check(ch)) { 65 69 s3c24xx_uart_sendb(dev, U_SPECIAL); 66 70 } else { 67 71 if (ch == '\n') 68 72 s3c24xx_uart_sendb(dev, (uint8_t) '\r'); 69 73 s3c24xx_uart_sendb(dev, (uint8_t) ch); … … 93 97 }; 94 98 95 outdev_t *s3c24xx_uart_init( s3c24xx_uart_io_t *io, inr_t inr)99 outdev_t *s3c24xx_uart_init(uintptr_t paddr, inr_t inr) 96 100 { 97 101 outdev_t *uart_dev = malloc(sizeof(outdev_t), FRAME_ATOMIC); … … 109 113 uart_dev->data = uart; 110 114 111 uart->io = io;115 uart->io = (s3c24xx_uart_io_t *) hw_map(paddr, PAGE_SIZE); 112 116 uart->indev = NULL; 113 117 … … 127 131 pio_write_32(&uart->io->ucon, 128 132 pio_read_32(&uart->io->ucon) & ~UCON_RX_INT_LEVEL); 129 133 134 link_initialize(&uart->parea.link); 135 uart->parea.pbase = paddr; 136 uart->parea.frames = 1; 137 uart->parea.unpriv = false; 138 uart->parea.mapped = false; 139 ddi_parea_register(&uart->parea); 140 130 141 if (!fb_exported) { 131 142 /* 132 * This is the necessary evil until the userspace driver is entirely 143 * This is the necessary evil until 144 * the userspace driver is entirely 133 145 * self-sufficient. 134 146 */ 135 147 sysinfo_set_item_val("fb", NULL, true); 136 148 sysinfo_set_item_val("fb.kind", NULL, 3); 137 sysinfo_set_item_val("fb.address.physical", NULL, KA2PA(io));149 sysinfo_set_item_val("fb.address.physical", NULL, paddr); 138 150 139 151 fb_exported = true;
Note:
See TracChangeset
for help on using the changeset viewer.