summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Kurbjun <kkurbjun@gmail.com>2009-12-15 01:02:39 +0000
committerKarl Kurbjun <kkurbjun@gmail.com>2009-12-15 01:02:39 +0000
commit47af429f2e4b2d88695e8e45a5cf9bb7725609f9 (patch)
tree08549355625cdb77357a7d61ad12b42786b4b57a
parentaa57da3468ae79c6283750eceebb942c4a4ae717 (diff)
downloadrockbox-47af429f2e4b2d88695e8e45a5cf9bb7725609f9.tar.gz
rockbox-47af429f2e4b2d88695e8e45a5cf9bb7725609f9.zip
M:Robe 500: Initialize power related pins with pin setup function
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23996 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/target/arm/tms320dm320/mrobe-500/power-mr500.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/firmware/target/arm/tms320dm320/mrobe-500/power-mr500.c b/firmware/target/arm/tms320dm320/mrobe-500/power-mr500.c
index 885a4af82b..f24be5b74f 100644
--- a/firmware/target/arm/tms320dm320/mrobe-500/power-mr500.c
+++ b/firmware/target/arm/tms320dm320/mrobe-500/power-mr500.c
@@ -35,9 +35,18 @@ void power_init(void)
35{ 35{
36 /* Initialize IDE power pin */ 36 /* Initialize IDE power pin */
37 /* set GIO17 (ATA power) on and output */ 37 /* set GIO17 (ATA power) on and output */
38 ide_power_enable(true); 38 /* 17: output, non-inverted, no-irq, falling edge, no-chat, normal */
39 IO_GIO_DIR1 &= ~(1<<1); 39 dm320_set_io(17, false, false, false, false, false, 0x00);
40 ide_power_enable(true); /* Power up the drive */
41
40 /* Charger detect */ 42 /* Charger detect */
43 /* 25: input, non-inverted, no-irq, falling edge, no-chat, normal */
44 dm320_set_io(25, false, false, false, false, false, 0x00);
45
46 /* Power down pin */
47 /* 26: input, non-inverted, no-irq, falling edge, no-chat, normal */
48 dm320_set_io(26, false, false, false, false, false, 0x00);
49 IO_GIO_BITCLR1 = 1<<10; /* Make sure it is not active */
41} 50}
42 51
43unsigned int power_input_status(void) 52unsigned int power_input_status(void)
@@ -79,6 +88,5 @@ void power_off(void)
79 lcd_sleep(); 88 lcd_sleep();
80 sleep(HZ); 89 sleep(HZ);
81 /* Hard shutdown */ 90 /* Hard shutdown */
82 IO_GIO_DIR1 &= ~(1<<10);
83 IO_GIO_BITSET1 = 1<<10; 91 IO_GIO_BITSET1 = 1<<10;
84} 92}