Author: stuge Date: 2009-11-25 09:35:59 +0100 (Wed, 25 Nov 2009) New Revision: 4956
Modified: trunk/src/mainboard/technexion/tim5690/mainboard.c trunk/src/mainboard/technexion/tim5690/speaker.c Log: Trivial style changes, replace a few C++ type comments, and some code reuse
Signed-off-by: Peter Stuge peter@stuge.se Acked-by: Peter Stuge peter@stuge.se
Modified: trunk/src/mainboard/technexion/tim5690/mainboard.c =================================================================== --- trunk/src/mainboard/technexion/tim5690/mainboard.c 2009-11-25 08:14:04 UTC (rev 4955) +++ trunk/src/mainboard/technexion/tim5690/mainboard.c 2009-11-25 08:35:59 UTC (rev 4956) @@ -28,7 +28,6 @@ #include <../southbridge/amd/sb600/sb600.h> #include "chip.h" #include "tn_post_code.h" -//#include "speaker.h" // test buzzer
#define ADT7461_ADDRESS 0x4C #define ARA_ADDRESS 0x0C /* Alert Response Address */ @@ -185,12 +184,6 @@ uma_memory_base, uma_memory_size); #endif technexion_post_code(LED_MESSAGE_FINISH); - // test buzzer - //speaker_on_delay(); - //speaker_off_delay(); - //speaker_on_delay(); - //speaker_off_nodelay(); - }
struct chip_operations mainboard_ops = {
Modified: trunk/src/mainboard/technexion/tim5690/speaker.c =================================================================== --- trunk/src/mainboard/technexion/tim5690/speaker.c 2009-11-25 08:14:04 UTC (rev 4955) +++ trunk/src/mainboard/technexion/tim5690/speaker.c 2009-11-25 08:35:59 UTC (rev 4956) @@ -32,7 +32,7 @@ #include <../southbridge/amd/sb600/sb600.h> #include <delay.h>
-#endif // __PRE_RAM__ +#endif /* __PRE_RAM__ */
#include "speaker.h"
@@ -41,11 +41,11 @@ * Options_0 - RW - 8 bits - [PM_Reg: 60h]. * SpkrEn, bit[5]=1b, Setting this bit will configure GPIO2 to be speaker output. */ -#ifndef __PRE_RAM__ - pm_iowrite(0x60, (pm_ioread(0x60) | (1<<5))); -#else +#ifdef __PRE_RAM__ pmio_write(0x60, (pmio_read(0x60) | (1<<5))); -#endif // __PRE_RAM__ +#else + pm_iowrite(0x60, (pm_ioread(0x60) | (1<<5))); +#endif /* __PRE_RAM__ */
/* SB600 RRG. * Tmr1CntrlWord - RW - 8 bits - [IO_Reg: 43h]. @@ -72,12 +72,7 @@ }
void speaker_on_delay(void) { - /* SB600 RRG. - * Nmi_Status - RW - 8 bits - [IO_Reg: 61h]. - * SpkrEnable, bit[0]=1b, Enable counter 2 - * SpkrTmrEnable, bit[1]=1b, Speaker timer on - */ - outb(inb(0x61) | 0x03, 0x61); + speaker_on_nodelay(); mdelay(100); }
@@ -91,12 +86,6 @@ }
void speaker_off_delay(void) { - /* SB600 RRG. - * Nmi_Status - RW - 8 bits - [IO_Reg: 61h]. - * SpkrEnable, bit[0]=0b, Disable counter 2 - * SpkrTmrEnable, bit[1]=0b, Speaker timer off - */ - outb(inb(0x61) & ~0x03, 0x61); + speaker_off_nodelay(); mdelay(100); } -