filename | src/sh4/scif.c |
changeset | 1078:d8f1cf224e7e |
prev | 1077:136fc24d17ef |
author | nkeynes |
date | Thu Oct 08 08:44:39 2009 +1000 (13 years ago) |
permissions | -rw-r--r-- |
last change | Fix SCIF operation - status updates weren't being written back to the register (oops) - slice cycle not updated on partial tick execution - baudrate computation was always 0 |
file | annotate | diff | log | raw |
1.1 --- a/src/sh4/scif.c Wed Oct 07 17:53:56 2009 +10001.2 +++ b/src/sh4/scif.c Thu Oct 08 08:44:39 2009 +10001.3 @@ -436,6 +436,7 @@1.4 (MMIO_READ( SCIF, SCLSR2 ) & SCLSR2_ORER) == 0 )1.5 intc_clear_interrupt( INT_SCIF_ERI );1.6 }1.7 + MMIO_WRITE( SCIF, SCFSR2, result );1.8 }1.10 /**1.11 @@ -467,12 +468,12 @@1.12 /* Then process the bitrate register */1.13 int bbr = MMIO_READ( SCIF, SCBRR2 ) & 0xFF;1.15 - int baudrate = sh4_peripheral_freq / (32 * mult * (bbr+1) );1.16 + SCIF_tick_period = sh4_peripheral_period * (32 * mult * (bbr+1));1.17 + int baudrate = 1000000000 / SCIF_tick_period;1.19 if( serial_device != NULL && serial_device->set_line_speed != NULL )1.20 serial_device->set_line_speed( serial_device, baudrate );1.22 - SCIF_tick_period = sh4_peripheral_period * (32 * mult * (bbr+1));1.24 /*1.25 clock_set_tick_rate( CLOCK_SCIF, baudrate / 10 );1.26 @@ -666,6 +667,7 @@1.27 SCIF_tick_remainder -= SCIF_tick_period;1.28 SCIF_clock_tick();1.29 }1.30 + SCIF_slice_cycle = nanosecs;1.31 }1.33 void SCIF_run_slice( uint32_t nanosecs )
.