From: Alan Cox Date: Wed, 19 Dec 2018 12:28:10 +0000 (+0000) Subject: sbcv2: Fix msr mode X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=7b1e94e9d4378fb58de6e51af315fde1942b65e9;p=FUZIX.git sbcv2: Fix msr mode In timer tick mode the timer only works after you've configured the serial port. If you keep the existing configuration (eg a single user boot) or don't use that port (eg PropIO) it never turns the needed interrupt on --- diff --git a/Kernel/platform-sbcv2/discard.c b/Kernel/platform-sbcv2/discard.c index 84ee59ef..2db01c05 100644 --- a/Kernel/platform-sbcv2/discard.c +++ b/Kernel/platform-sbcv2/discard.c @@ -67,26 +67,31 @@ void pagemap_init(void) */ void platform_swap_found(uint8_t letter, uint8_t m) { - blkdev_t *blk = blk_op.blkdev; - uint16_t n; - if (swap_dev != 0xFFFF) - return; - letter -= 'a'; - kputs("(swap) "); - swap_dev = letter << 4 | m; - n = blk->lba_count[m - 1] / SWAP_SIZE; - if (n > MAX_SWAPS) - n = MAX_SWAPS; - while(n) - swapmap_init(n--); + blkdev_t *blk = blk_op.blkdev; + int16_t n; + if (swap_dev != 0xFFFF) + return; + letter -= 'a'; + kputs("(swap) "); + swap_dev = letter << 4 | m; + n = blk->lba_count[m - 1] / SWAP_SIZE; + if (n > MAX_SWAPS) + n = MAX_SWAPS; + while(n) + swapmap_init(n--); } /* * Called after interrupts are enabled in order to enumerate and set up - * any devices. In our case we simply need to probe the IDE and SD card. + * any devices. In our case we set up the 16550A UART and then probe the + * IDE and SD card. */ + +__sfr __at 0x69 uart_ier; + void device_init(void) { + uart_ier = 0x0D; /* This may be our timer so do it first */ devide_init(); prop_sd_probe(); ds1302_init();