From 33d4c33504378192bf1bde67954efad8a2c575e1 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 18 Jun 2005 21:16:51 +0000 Subject: 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 --- firmware/drivers/power.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'firmware') diff --git a/firmware/drivers/power.c b/firmware/drivers/power.c index 026be599ae..fecc79a465 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; -- cgit v1.2.3