summaryrefslogtreecommitdiff
path: root/firmware/target/arm
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm')
-rw-r--r--firmware/target/arm/philips/power-hdd.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/firmware/target/arm/philips/power-hdd.c b/firmware/target/arm/philips/power-hdd.c
index d38c6de2b4..05ada4b674 100644
--- a/firmware/target/arm/philips/power-hdd.c
+++ b/firmware/target/arm/philips/power-hdd.c
@@ -99,14 +99,31 @@ unsigned int power_input_status(void)
99 99
100void ide_power_enable(bool on) 100void ide_power_enable(bool on)
101{ 101{
102#if defined(PHILIPS_HDD6330)
103 if (on)
104 {
105 GPIO_SET_BITWISE(GPIOC_OUTPUT_VAL, 0x08);
106 DEV_EN |= DEV_IDE0;
107 }
108 else
109 {
110 DEV_EN &= ~DEV_IDE0;
111 GPIO_CLEAR_BITWISE(GPIOC_OUTPUT_VAL, 0x08);
112 }
113#else
102 (void)on; 114 (void)on;
103 /* We do nothing */ 115 /* We do nothing */
116#endif
104} 117}
105 118
106bool ide_powered(void) 119bool ide_powered(void)
107{ 120{
121#if defined(PHILIPS_HDD6330)
122 return ((GPIOC_INPUT_VAL & 0x08) != 0);
123#else
108 /* pretend we are always powered - we don't turn it off */ 124 /* pretend we are always powered - we don't turn it off */
109 return true; 125 return true;
126#endif
110} 127}
111 128
112void power_off(void) 129void power_off(void)