summaryrefslogtreecommitdiff
path: root/firmware/target/coldfire/iaudio
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/coldfire/iaudio')
-rw-r--r--firmware/target/coldfire/iaudio/m3/power-m3.c11
-rw-r--r--firmware/target/coldfire/iaudio/m5/power-m5.c11
-rw-r--r--firmware/target/coldfire/iaudio/x5/power-x5.c11
3 files changed, 12 insertions, 21 deletions
diff --git a/firmware/target/coldfire/iaudio/m3/power-m3.c b/firmware/target/coldfire/iaudio/m3/power-m3.c
index 5dbeadf732..4c446e54d0 100644
--- a/firmware/target/coldfire/iaudio/m3/power-m3.c
+++ b/firmware/target/coldfire/iaudio/m3/power-m3.c
@@ -27,8 +27,6 @@
27#include "power.h" 27#include "power.h"
28#include "system.h" 28#include "system.h"
29 29
30#ifndef SIMULATOR
31
32void power_init(void) 30void power_init(void)
33{ 31{
34 /* Set KEEPACT */ 32 /* Set KEEPACT */
@@ -47,9 +45,10 @@ void power_init(void)
47#endif 45#endif
48} 46}
49 47
50bool charger_inserted(void) 48unsigned int power_input_status(void)
51{ 49{
52 return (GPIO1_READ & 0x00000020) == 0; 50 return ((GPIO1_READ & 0x00000020) == 0) ?
51 POWER_INPUT_MAIN_CHARGER : POWER_INPUT_NONE;
53} 52}
54 53
55void ide_power_enable(bool on) 54void ide_power_enable(bool on)
@@ -77,8 +76,6 @@ void power_off(void)
77 asm("halt"); 76 asm("halt");
78} 77}
79 78
80#endif /* SIMULATOR */
81
82bool tuner_power(bool status) 79bool tuner_power(bool status)
83{ 80{
84 (void)status; 81 (void)status;
diff --git a/firmware/target/coldfire/iaudio/m5/power-m5.c b/firmware/target/coldfire/iaudio/m5/power-m5.c
index 987ce0f3c5..8bb36c663d 100644
--- a/firmware/target/coldfire/iaudio/m5/power-m5.c
+++ b/firmware/target/coldfire/iaudio/m5/power-m5.c
@@ -27,8 +27,6 @@
27#include "pcf50606.h" 27#include "pcf50606.h"
28#include "lcd-remote-target.h" 28#include "lcd-remote-target.h"
29 29
30#ifndef SIMULATOR
31
32void power_init(void) 30void power_init(void)
33{ 31{
34 /* Charger detect */ 32 /* Charger detect */
@@ -38,9 +36,10 @@ void power_init(void)
38 pcf50606_init(); 36 pcf50606_init();
39} 37}
40 38
41bool charger_inserted(void) 39unsigned int power_input_status(void)
42{ 40{
43 return (GPIO1_READ & 0x01000000) != 0; 41 return (GPIO1_READ & 0x01000000) ?
42 POWER_INPUT_MAIN_CHARGER : POWER_INPUT_NONE;
44} 43}
45 44
46void ide_power_enable(bool on) 45void ide_power_enable(bool on)
@@ -66,5 +65,3 @@ void power_off(void)
66 and_l(~0x00000008, &GPIO_OUT); /* Set KEEPACT low */ 65 and_l(~0x00000008, &GPIO_OUT); /* Set KEEPACT low */
67 asm("halt"); 66 asm("halt");
68} 67}
69
70#endif /* SIMULATOR */
diff --git a/firmware/target/coldfire/iaudio/x5/power-x5.c b/firmware/target/coldfire/iaudio/x5/power-x5.c
index 22f56961bf..4feb9c15d0 100644
--- a/firmware/target/coldfire/iaudio/x5/power-x5.c
+++ b/firmware/target/coldfire/iaudio/x5/power-x5.c
@@ -27,8 +27,6 @@
27#include "pcf50606.h" 27#include "pcf50606.h"
28#include "lcd-remote-target.h" 28#include "lcd-remote-target.h"
29 29
30#ifndef SIMULATOR
31
32void power_init(void) 30void power_init(void)
33{ 31{
34 /* Charger detect */ 32 /* Charger detect */
@@ -38,9 +36,10 @@ void power_init(void)
38 pcf50606_init(); 36 pcf50606_init();
39} 37}
40 38
41bool charger_inserted(void) 39unsigned int power_input_status(void)
42{ 40{
43 return (GPIO1_READ & 0x01000000) != 0; 41 return (GPIO1_READ & 0x01000000) ?
42 POWER_INPUT_MAIN_CHARGER : POWER_INPUT_NONE;
44} 43}
45 44
46void ide_power_enable(bool on) 45void ide_power_enable(bool on)
@@ -67,8 +66,6 @@ void power_off(void)
67 asm("halt"); 66 asm("halt");
68} 67}
69 68
70#endif /* SIMULATOR */
71
72bool tuner_power(bool status) 69bool tuner_power(bool status)
73{ 70{
74 (void)status; 71 (void)status;