summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-06-18 21:16:51 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-06-18 21:16:51 +0000
commit33d4c33504378192bf1bde67954efad8a2c575e1 (patch)
treeea669aeab1c86166c868ad3743cd7853609414ad
parentf03bc298d66c1e71b0bd6f5495262539e1697b5b (diff)
downloadrockbox-33d4c33504378192bf1bde67954efad8a2c575e1.zip
rockbox-33d4c33504378192bf1bde67954efad8a2c575e1.tar.gz
rockbox-33d4c33504378192bf1bde67954efad8a2c575e1.tar.bz2
rockbox-33d4c33504378192bf1bde67954efad8a2c575e1.tar.xz
Made the (iriver) use of GPIO1 depend on the presense of a coldfire cpu instead
of comparing for exact player model. This assumption might not be correct, it might been to check for some other hardware-specific feature. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6753 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/drivers/power.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/firmware/drivers/power.c b/firmware/drivers/power.c
index 026be59..fecc79a 100644
--- a/firmware/drivers/power.c
+++ b/firmware/drivers/power.c
@@ -36,9 +36,6 @@ static int fmstatus = 0;
void radio_set_status(int status)
{
-#ifdef IRIVER_H100
- fmstatus = status;
-#else
fmstatus = status;
#ifdef HAVE_TUNER_PWR_CTRL
if (status)
@@ -49,7 +46,6 @@ void radio_set_status(int status)
else
or_b(0x04, &PADRL); /* drive PA2 high for tuner disable */
#endif
-#endif
}
int radio_get_status(void)
@@ -63,7 +59,7 @@ int radio_get_status(void)
void power_init(void)
{
-#ifdef IRIVER_H100
+#if CONFIG_CPU == MCF5249
GPIO1_OUT |= 0x00080000;
GPIO1_ENABLE |= 0x00080000;
GPIO1_FUNCTION |= 0x00080000;
@@ -98,7 +94,7 @@ void power_init(void)
bool charger_inserted(void)
{
-#ifdef IRIVER_H100
+#if CONFIG_CPU == MCF5249
return (GPIO1_READ & 0x00400000)?true:false;
#elif defined(GMINI_ARCH)
return (P7 & 0x80) == 0;
@@ -158,7 +154,7 @@ void ide_power_enable(bool on)
{
(void)on;
-#ifdef IRIVER_H100
+#if CONFIG_CPU == MCF5249
if(on)
GPIO_OUT &= ~0x80000000;
else
@@ -211,7 +207,7 @@ void ide_power_enable(bool on)
bool ide_powered(void)
{
-#ifdef IRIVER_H100
+#if CONFIG_CPU == MCF5249
return (GPIO_OUT & 0x80000000)?false:true;
#elif defined(GMINI_ARCH)
return (P1 & 0x08?true:false);
@@ -242,7 +238,7 @@ bool ide_powered(void)
void power_off(void)
{
set_irq_level(HIGHEST_IRQ_LEVEL);
-#ifdef IRIVER_H100
+#if CONFIG_CPU == MCF5249
GPIO1_OUT &= ~0x00080000;
#elif defined(GMINI_ARCH)
P1 &= ~1;