summaryrefslogtreecommitdiff
path: root/firmware/target/arm/philips/hdd1630/power-hdd1630.c
diff options
context:
space:
mode:
authorMark Arigo <markarigo@gmail.com>2009-02-18 02:19:22 +0000
committerMark Arigo <markarigo@gmail.com>2009-02-18 02:19:22 +0000
commitf34cd80f638a6ca3b336f6ebd14cd958974b2760 (patch)
tree91195848e098a6f0f6372d39424306e32d3df9d2 /firmware/target/arm/philips/hdd1630/power-hdd1630.c
parent42ef5b0c88f92418c79e7414063c808b7c36a9be (diff)
downloadrockbox-f34cd80f638a6ca3b336f6ebd14cd958974b2760.tar.gz
rockbox-f34cd80f638a6ca3b336f6ebd14cd958974b2760.zip
Backlight brightness and button lights for the Philips HDD1630
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20035 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/philips/hdd1630/power-hdd1630.c')
-rwxr-xr-xfirmware/target/arm/philips/hdd1630/power-hdd1630.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/firmware/target/arm/philips/hdd1630/power-hdd1630.c b/firmware/target/arm/philips/hdd1630/power-hdd1630.c
index 22e11c803a..02279fd560 100755
--- a/firmware/target/arm/philips/hdd1630/power-hdd1630.c
+++ b/firmware/target/arm/philips/hdd1630/power-hdd1630.c
@@ -28,6 +28,7 @@
28#include "power.h" 28#include "power.h"
29#include "logf.h" 29#include "logf.h"
30#include "usb.h" 30#include "usb.h"
31#include "synaptics-mep.h"
31 32
32void power_init(void) 33void power_init(void)
33{ 34{
@@ -46,6 +47,27 @@ void power_init(void)
46 GPIOE_OUTPUT_EN |= 0x40; 47 GPIOE_OUTPUT_EN |= 0x40;
47 GPIOE_OUTPUT_VAL &= ~0x40; /* off */ 48 GPIOE_OUTPUT_VAL &= ~0x40; /* off */
48#endif 49#endif
50
51#ifndef BOOTLOADER
52 /* enable touchpad here because we need it for
53 both buttons and button lights */
54 GPO32_ENABLE |= 0x80;
55 GPO32_VAL &= ~0x80;
56 udelay(1000);
57
58 GPIOD_ENABLE |= 0x80; /* enable ACK */
59 GPIOA_ENABLE |= (0x10 | 0x20); /* enable DATA, CLK */
60
61 GPIOD_OUTPUT_EN |= 0x80; /* set ACK */
62 GPIOD_OUTPUT_VAL |= 0x80; /* high */
63
64 GPIOA_OUTPUT_EN &= ~0x20; /* CLK */
65
66 GPIOA_OUTPUT_EN |= 0x10; /* set DATA */
67 GPIOA_OUTPUT_VAL |= 0x10; /* high */
68
69 syn_init();
70#endif
49} 71}
50 72
51unsigned int power_input_status(void) 73unsigned int power_input_status(void)
@@ -70,7 +92,6 @@ void ide_power_enable(bool on)
70 /* We do nothing */ 92 /* We do nothing */
71} 93}
72 94
73
74bool ide_powered(void) 95bool ide_powered(void)
75{ 96{
76 /* pretend we are always powered - we don't turn it off */ 97 /* pretend we are always powered - we don't turn it off */