revision 32:bf0bc2c524b8
summary |
tree |
shortlog |
changelog |
graph |
changeset |
raw | bz2 | zip | gz changeset | 32:bf0bc2c524b8 |
parent | 31:495e480360d7 |
child | 33:e74b5bc9d14b |
author | nkeynes |
date | Mon Dec 26 03:10:23 2005 +0000 (17 years ago) |
Reset SCIF properly on SH4 reset
![]() | src/sh4/scif.c | view | annotate | diff | log | |
![]() | src/sh4/sh4core.c | view | annotate | diff | log | |
![]() | src/sh4/sh4core.h | view | annotate | diff | log |
1.1 --- a/src/sh4/scif.c Sun Dec 25 08:24:11 2005 +00001.2 +++ b/src/sh4/scif.c Mon Dec 26 03:10:23 2005 +00001.3 @@ -1,5 +1,5 @@1.4 /**1.5 - * $Id: scif.c,v 1.5 2005-12-25 05:57:00 nkeynes Exp $1.6 + * $Id: scif.c,v 1.6 2005-12-26 03:10:23 nkeynes Exp $1.7 * SCIF (Serial Communication Interface with FIFO) implementation - part of the1.8 * SH4 standard on-chip peripheral set. The SCIF is hooked up to the DCs1.9 * external serial port1.10 @@ -443,7 +443,6 @@1.12 if( serial_device != NULL && serial_device->set_line_speed != NULL )1.13 serial_device->set_line_speed( baudrate );1.14 - INFO( "SCIF baud rate set to %d", baudrate );1.16 SCIF_tick_period = sh4_peripheral_period * (32 * mult * (bbr+1));1.18 @@ -618,7 +617,9 @@1.20 void SCIF_reset( void )1.21 {1.22 - SCIF_tick_remainder = 0;1.23 + SCIF_recvq_clear();1.24 + SCIF_sendq_clear();1.25 + SCIF_update_line_speed();1.26 }1.28 void SCIF_run_slice( uint32_t nanosecs )
2.1 --- a/src/sh4/sh4core.c Sun Dec 25 08:24:11 2005 +00002.2 +++ b/src/sh4/sh4core.c Mon Dec 26 03:10:23 2005 +00002.3 @@ -1,5 +1,5 @@2.4 /**2.5 - * $Id: sh4core.c,v 1.11 2005-12-25 05:57:00 nkeynes Exp $2.6 + * $Id: sh4core.c,v 1.12 2005-12-26 03:10:23 nkeynes Exp $2.7 *2.8 * SH4 emulation core, and parent module for all the SH4 peripheral2.9 * modules.2.10 @@ -87,6 +87,7 @@2.12 /* Peripheral modules */2.13 intc_reset();2.14 + SCIF_reset();2.15 }2.17 uint32_t sh4_run_slice( uint32_t nanosecs )
3.1 --- a/src/sh4/sh4core.h Sun Dec 25 08:24:11 2005 +00003.2 +++ b/src/sh4/sh4core.h Mon Dec 26 03:10:23 2005 +00003.3 @@ -1,5 +1,5 @@3.4 /**3.5 - * $Id: sh4core.h,v 1.6 2005-12-25 05:57:00 nkeynes Exp $3.6 + * $Id: sh4core.h,v 1.7 2005-12-26 03:10:23 nkeynes Exp $3.7 *3.8 * This file defines the public functions exported by the SH4 core, except3.9 * for disassembly functions defined in sh4dasm.h3.10 @@ -104,6 +104,7 @@3.11 /* Peripheral functions */3.12 void DMAC_run_slice( uint32_t );3.13 void TMU_run_slice( uint32_t );3.14 +void SCIF_reset( void );3.15 void SCIF_run_slice( uint32_t );3.16 void SCIF_save_state( FILE *f );3.17 int SCIF_load_state( FILE *f );
.