summaryrefslogtreecommitdiff
path: root/firmware/drivers
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2005-11-16 23:15:59 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2005-11-16 23:15:59 +0000
commitdf0e5effc550db484ca0d377b9f3547fed27cd66 (patch)
treed54a173927a2091263787f62c9c59fe0c0f57aaa /firmware/drivers
parent59825952f3d98d29e03b094642655968d7abcc02 (diff)
Cleaned up bootloader linker control file and added the H300 target
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7916 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers')
-rw-r--r--firmware/drivers/ata.c8
-rw-r--r--firmware/drivers/i2c-coldfire.c3
-rw-r--r--firmware/drivers/power.c14
3 files changed, 16 insertions, 9 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c
index 9cc49c1731..c0799f30e4 100644
--- a/firmware/drivers/ata.c
+++ b/firmware/drivers/ata.c
@@ -1413,16 +1413,20 @@ int ata_init(void)
or_b(0x02, &PADRH); /* release ATA reset */
PACR2 &= 0xBFFF; /* GPIO function for PA7 (IDE enable) */
#elif CONFIG_CPU == MCF5249
+#ifdef HAVE_ATA_LED_CTRL
/* Enable disk LED & ISD chip power control */
and_l(~0x0000240, &GPIO_OUT);
or_l(0x00000240, &GPIO_ENABLE);
or_l(0x00000200, &GPIO_FUNCTION);
+#endif
/* ATA reset */
- or_l(0x00080000, &GPIO_OUT);
+ and_l(~0x00080000, &GPIO_OUT);
or_l(0x00080000, &GPIO_ENABLE);
or_l(0x00080000, &GPIO_FUNCTION);
-
+ sleep(10);
+ or_l(0x00080000, &GPIO_OUT);
+
/* FYI: The IDECONFIGx registers are set by set_cpu_frequency() */
#elif CONFIG_CPU == PP5020
/* From ipod-ide.c:ipod_ide_register() */
diff --git a/firmware/drivers/i2c-coldfire.c b/firmware/drivers/i2c-coldfire.c
index aecd3a3b3b..0c83c1cb1a 100644
--- a/firmware/drivers/i2c-coldfire.c
+++ b/firmware/drivers/i2c-coldfire.c
@@ -37,6 +37,7 @@ static volatile unsigned char *i2c_get_addr(int device);
void i2c_init(void)
{
+#ifdef IRIVER_H100_SERIES
/* The FM chip has no pullup for SCL, so we have to bit-bang the
I2C for that one. */
or_l(0x00800000, &GPIO1_OUT);
@@ -45,7 +46,7 @@ void i2c_init(void)
or_l(0x00000008, &GPIO_ENABLE);
or_l(0x00800000, &GPIO1_FUNCTION);
or_l(0x00000008, &GPIO_FUNCTION);
-
+#endif
/* I2C Clock divisor = 576 => 119.952 MHz / 2 / 576 = 104.125 kHz */
MFDR = 0x14;
diff --git a/firmware/drivers/power.c b/firmware/drivers/power.c
index 4e5d347d54..2547c11cb0 100644
--- a/firmware/drivers/power.c
+++ b/firmware/drivers/power.c
@@ -62,23 +62,25 @@ int radio_get_status(void)
void power_init(void)
{
#if CONFIG_CPU == MCF5249
-#if IRIVER_H100_SERIES
- or_l(0x00080000, &GPIO1_OUT);
- or_l(0x00080000, &GPIO1_ENABLE);
- or_l(0x00080000, &GPIO1_FUNCTION);
+#if defined(IRIVER_H100_SERIES) || defined(IRIVER_H300_SERIES)
+// or_l(0x00080000, &GPIO1_OUT);
+// or_l(0x00080000, &GPIO1_ENABLE);
+// or_l(0x00080000, &GPIO1_FUNCTION);
#ifndef BOOTLOADER
/* The boot loader controls the power */
- ide_power_enable(true);
+// ide_power_enable(true);
#endif
+ or_l(0x80000000, &GPIO_OUT);
or_l(0x80000000, &GPIO_ENABLE);
or_l(0x80000000, &GPIO_FUNCTION);
#ifdef HAVE_SPDIF_POWER
spdif_power_enable(false);
#endif
-#elif defined(IRIVER_H300_SERIES)
+#ifdef IRIVER_H300_SERIES
pcf50606_init();
#endif
+#endif
#elif CONFIG_CPU == PP5020
/* TODO: Implement power_init() */
#else