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.zip
rockbox-47af429f2e4b2d88695e8e45a5cf9bb7725609f9.tar.gz
rockbox-47af429f2e4b2d88695e8e45a5cf9bb7725609f9.tar.bz2
rockbox-47af429f2e4b2d88695e8e45a5cf9bb7725609f9.tar.xz
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 885a4af..f24be5b 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)
{
/* Initialize IDE power pin */
/* set GIO17 (ATA power) on and output */
- ide_power_enable(true);
- IO_GIO_DIR1 &= ~(1<<1);
+ /* 17: output, non-inverted, no-irq, falling edge, no-chat, normal */
+ dm320_set_io(17, false, false, false, false, false, 0x00);
+ ide_power_enable(true); /* Power up the drive */
+
/* Charger detect */
+ /* 25: input, non-inverted, no-irq, falling edge, no-chat, normal */
+ dm320_set_io(25, false, false, false, false, false, 0x00);
+
+ /* Power down pin */
+ /* 26: input, non-inverted, no-irq, falling edge, no-chat, normal */
+ dm320_set_io(26, false, false, false, false, false, 0x00);
+ IO_GIO_BITCLR1 = 1<<10; /* Make sure it is not active */
}
unsigned int power_input_status(void)
@@ -79,6 +88,5 @@ void power_off(void)
lcd_sleep();
sleep(HZ);
/* Hard shutdown */
- IO_GIO_DIR1 &= ~(1<<10);
IO_GIO_BITSET1 = 1<<10;
}