summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2004-11-21 09:22:50 +0000
committerJens Arnold <amiconn@rockbox.org>2004-11-21 09:22:50 +0000
commit14c72f277c4131ea4680099761302b74e5d91a5c (patch)
treec89516f59b38ac5f97b0faa9dd40356bf9484447 /firmware
parent61753a893edb980d447d3db80020527d32fb810b (diff)
downloadrockbox-14c72f277c4131ea4680099761302b74e5d91a5c.tar.gz
rockbox-14c72f277c4131ea4680099761302b74e5d91a5c.tar.bz2
rockbox-14c72f277c4131ea4680099761302b74e5d91a5c.zip
Code cleanup
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5454 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-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