From 14c72f277c4131ea4680099761302b74e5d91a5c Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Sun, 21 Nov 2004 09:22:50 +0000 Subject: Code cleanup git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5454 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/power.c | 6 +++--- firmware/export/hwcompat.h | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'firmware') diff --git a/firmware/drivers/power.c b/firmware/drivers/power.c index 5c7b6ef514..c67dd8be05 100644 --- a/firmware/drivers/power.c +++ b/firmware/drivers/power.c @@ -119,7 +119,7 @@ void ide_power_enable(bool on) if(on) { #ifdef ATA_POWER_PLAYERSTYLE - if (read_rom_version() > 451) /* new players only */ + if (has_ata_power_control()) { or_b(0x10, &PBDRL); touched = true; @@ -134,7 +134,7 @@ void ide_power_enable(bool on) if(!on) { #ifdef ATA_POWER_PLAYERSTYLE - if (read_rom_version() > 451) /* new players only */ + if (has_ata_power_control()) { and_b(~0x10, &PBDRL); touched = true; @@ -166,7 +166,7 @@ bool ide_powered(void) { #if defined(NEEDS_ATA_POWER_ON) || defined(HAVE_ATA_POWER_OFF) #ifdef ATA_POWER_PLAYERSTYLE - if (read_rom_version() > 451) /* new players only */ + if (has_ata_power_control()) { if ((PBCR2 & 0x0300) || !(PBIOR & 0x0010)) /* not configured for output */ return false; /* would be floating low, disk off */ diff --git a/firmware/export/hwcompat.h b/firmware/export/hwcompat.h index 01e26df6e0..f33bb9cc6e 100644 --- a/firmware/export/hwcompat.h +++ b/firmware/export/hwcompat.h @@ -33,8 +33,9 @@ int read_rom_version(void); int read_hw_mask(void); -#ifdef HAVE_LCD_CHARCELLS +#ifdef ARCHOS_PLAYER bool has_new_lcd(void); +bool has_ata_power_control(void) __attribute__ ((alias ("has_new_lcd"))); #endif #endif -- cgit v1.2.3