summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--firmware/drivers/power.c6
-rw-r--r--firmware/export/hwcompat.h3
2 files changed, 5 insertions, 4 deletions
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