Search
lxdream.org :: lxdream :: r32:bf0bc2c524b8
lxdream 0.9.1
released Jun 29
Download Now
changeset32:bf0bc2c524b8
parent31:495e480360d7
child33:e74b5bc9d14b
authornkeynes
dateMon Dec 26 03:10:23 2005 +0000 (14 years ago)
Reset SCIF properly on SH4 reset
src/sh4/scif.c
src/sh4/sh4core.c
src/sh4/sh4core.h
1.1 --- a/src/sh4/scif.c Sun Dec 25 08:24:11 2005 +0000
1.2 +++ b/src/sh4/scif.c Mon Dec 26 03:10:23 2005 +0000
1.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 the
1.8 * SH4 standard on-chip peripheral set. The SCIF is hooked up to the DCs
1.9 * external serial port
1.10 @@ -443,7 +443,6 @@
1.11
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.15
1.16 SCIF_tick_period = sh4_peripheral_period * (32 * mult * (bbr+1));
1.17
1.18 @@ -618,7 +617,9 @@
1.19
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.27
1.28 void SCIF_run_slice( uint32_t nanosecs )
2.1 --- a/src/sh4/sh4core.c Sun Dec 25 08:24:11 2005 +0000
2.2 +++ b/src/sh4/sh4core.c Mon Dec 26 03:10:23 2005 +0000
2.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 peripheral
2.9 * modules.
2.10 @@ -87,6 +87,7 @@
2.11
2.12 /* Peripheral modules */
2.13 intc_reset();
2.14 + SCIF_reset();
2.15 }
2.16
2.17 uint32_t sh4_run_slice( uint32_t nanosecs )
3.1 --- a/src/sh4/sh4core.h Sun Dec 25 08:24:11 2005 +0000
3.2 +++ b/src/sh4/sh4core.h Mon Dec 26 03:10:23 2005 +0000
3.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, except
3.9 * for disassembly functions defined in sh4dasm.h
3.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 );
.