summaryrefslogtreecommitdiff
path: root/firmware
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 /firmware
parentf03bc298d66c1e71b0bd6f5495262539e1697b5b (diff)
downloadrockbox-33d4c33504378192bf1bde67954efad8a2c575e1.tar.gz
rockbox-33d4c33504378192bf1bde67954efad8a2c575e1.zip
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
Diffstat (limited to 'firmware')
-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 026be599ae..fecc79a465 100644
--- a/firmware/drivers/power.c
+++ b/firmware/drivers/power.c
@@ -36,9 +36,6 @@ static int fmstatus = 0;
36 36
37void radio_set_status(int status) 37void radio_set_status(int status)
38{ 38{
39#ifdef IRIVER_H100
40 fmstatus = status;
41#else
42 fmstatus = status; 39 fmstatus = status;
43#ifdef HAVE_TUNER_PWR_CTRL 40#ifdef HAVE_TUNER_PWR_CTRL
44 if (status) 41 if (status)
@@ -49,7 +46,6 @@ void radio_set_status(int status)
49 else 46 else
50 or_b(0x04, &PADRL); /* drive PA2 high for tuner disable */ 47 or_b(0x04, &PADRL); /* drive PA2 high for tuner disable */
51#endif 48#endif
52#endif
53} 49}
54 50
55int radio_get_status(void) 51int radio_get_status(void)
@@ -63,7 +59,7 @@ int radio_get_status(void)
63 59
64void power_init(void) 60void power_init(void)
65{ 61{
66#ifdef IRIVER_H100 62#if CONFIG_CPU == MCF5249
67 GPIO1_OUT |= 0x00080000; 63 GPIO1_OUT |= 0x00080000;
68 GPIO1_ENABLE |= 0x00080000; 64 GPIO1_ENABLE |= 0x00080000;
69 GPIO1_FUNCTION |= 0x00080000; 65 GPIO1_FUNCTION |= 0x00080000;
@@ -98,7 +94,7 @@ void power_init(void)
98 94
99bool charger_inserted(void) 95bool charger_inserted(void)
100{ 96{
101#ifdef IRIVER_H100 97#if CONFIG_CPU == MCF5249
102 return (GPIO1_READ & 0x00400000)?true:false; 98 return (GPIO1_READ & 0x00400000)?true:false;
103#elif defined(GMINI_ARCH) 99#elif defined(GMINI_ARCH)
104 return (P7 & 0x80) == 0; 100 return (P7 & 0x80) == 0;
@@ -158,7 +154,7 @@ void ide_power_enable(bool on)
158{ 154{
159 (void)on; 155 (void)on;
160 156
161#ifdef IRIVER_H100 157#if CONFIG_CPU == MCF5249
162 if(on) 158 if(on)
163 GPIO_OUT &= ~0x80000000; 159 GPIO_OUT &= ~0x80000000;
164 else 160 else
@@ -211,7 +207,7 @@ void ide_power_enable(bool on)
211 207
212bool ide_powered(void) 208bool ide_powered(void)
213{ 209{
214#ifdef IRIVER_H100 210#if CONFIG_CPU == MCF5249
215 return (GPIO_OUT & 0x80000000)?false:true; 211 return (GPIO_OUT & 0x80000000)?false:true;
216#elif defined(GMINI_ARCH) 212#elif defined(GMINI_ARCH)
217 return (P1 & 0x08?true:false); 213 return (P1 & 0x08?true:false);
@@ -242,7 +238,7 @@ bool ide_powered(void)
242void power_off(void) 238void power_off(void)
243{ 239{
244 set_irq_level(HIGHEST_IRQ_LEVEL); 240 set_irq_level(HIGHEST_IRQ_LEVEL);
245#ifdef IRIVER_H100 241#if CONFIG_CPU == MCF5249
246 GPIO1_OUT &= ~0x00080000; 242 GPIO1_OUT &= ~0x00080000;
247#elif defined(GMINI_ARCH) 243#elif defined(GMINI_ARCH)
248 P1 &= ~1; 244 P1 &= ~1;