summaryrefslogtreecommitdiff
path: root/firmware/drivers
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2005-11-16 23:42:19 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2005-11-16 23:42:19 +0000
commit73a35a1aa445932176fca78688d43c636a3fda5e (patch)
treeba8cca63507301045a685883b3b23b79eb3e476e /firmware/drivers
parentd79f3a1e845bcad2d64cbaf467c0f0dae596f537 (diff)
downloadrockbox-73a35a1aa445932176fca78688d43c636a3fda5e.tar.gz
rockbox-73a35a1aa445932176fca78688d43c636a3fda5e.zip
Reverted erroneous commit
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7918 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, 9 insertions, 16 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c
index c0799f30e4..9cc49c1731 100644
--- a/firmware/drivers/ata.c
+++ b/firmware/drivers/ata.c
@@ -1413,20 +1413,16 @@ int ata_init(void)
1413 or_b(0x02, &PADRH); /* release ATA reset */ 1413 or_b(0x02, &PADRH); /* release ATA reset */
1414 PACR2 &= 0xBFFF; /* GPIO function for PA7 (IDE enable) */ 1414 PACR2 &= 0xBFFF; /* GPIO function for PA7 (IDE enable) */
1415#elif CONFIG_CPU == MCF5249 1415#elif CONFIG_CPU == MCF5249
1416#ifdef HAVE_ATA_LED_CTRL
1417 /* Enable disk LED & ISD chip power control */ 1416 /* Enable disk LED & ISD chip power control */
1418 and_l(~0x0000240, &GPIO_OUT); 1417 and_l(~0x0000240, &GPIO_OUT);
1419 or_l(0x00000240, &GPIO_ENABLE); 1418 or_l(0x00000240, &GPIO_ENABLE);
1420 or_l(0x00000200, &GPIO_FUNCTION); 1419 or_l(0x00000200, &GPIO_FUNCTION);
1421#endif
1422 1420
1423 /* ATA reset */ 1421 /* ATA reset */
1424 and_l(~0x00080000, &GPIO_OUT); 1422 or_l(0x00080000, &GPIO_OUT);
1425 or_l(0x00080000, &GPIO_ENABLE); 1423 or_l(0x00080000, &GPIO_ENABLE);
1426 or_l(0x00080000, &GPIO_FUNCTION); 1424 or_l(0x00080000, &GPIO_FUNCTION);
1427 sleep(10); 1425
1428 or_l(0x00080000, &GPIO_OUT);
1429
1430 /* FYI: The IDECONFIGx registers are set by set_cpu_frequency() */ 1426 /* FYI: The IDECONFIGx registers are set by set_cpu_frequency() */
1431#elif CONFIG_CPU == PP5020 1427#elif CONFIG_CPU == PP5020
1432 /* From ipod-ide.c:ipod_ide_register() */ 1428 /* From ipod-ide.c:ipod_ide_register() */
diff --git a/firmware/drivers/i2c-coldfire.c b/firmware/drivers/i2c-coldfire.c
index 0c83c1cb1a..aecd3a3b3b 100644
--- a/firmware/drivers/i2c-coldfire.c
+++ b/firmware/drivers/i2c-coldfire.c
@@ -37,7 +37,6 @@ static volatile unsigned char *i2c_get_addr(int device);
37 37
38void i2c_init(void) 38void i2c_init(void)
39{ 39{
40#ifdef IRIVER_H100_SERIES
41 /* The FM chip has no pullup for SCL, so we have to bit-bang the 40 /* The FM chip has no pullup for SCL, so we have to bit-bang the
42 I2C for that one. */ 41 I2C for that one. */
43 or_l(0x00800000, &GPIO1_OUT); 42 or_l(0x00800000, &GPIO1_OUT);
@@ -46,7 +45,7 @@ void i2c_init(void)
46 or_l(0x00000008, &GPIO_ENABLE); 45 or_l(0x00000008, &GPIO_ENABLE);
47 or_l(0x00800000, &GPIO1_FUNCTION); 46 or_l(0x00800000, &GPIO1_FUNCTION);
48 or_l(0x00000008, &GPIO_FUNCTION); 47 or_l(0x00000008, &GPIO_FUNCTION);
49#endif 48
50 /* I2C Clock divisor = 576 => 119.952 MHz / 2 / 576 = 104.125 kHz */ 49 /* I2C Clock divisor = 576 => 119.952 MHz / 2 / 576 = 104.125 kHz */
51 MFDR = 0x14; 50 MFDR = 0x14;
52 51
diff --git a/firmware/drivers/power.c b/firmware/drivers/power.c
index 2547c11cb0..4e5d347d54 100644
--- a/firmware/drivers/power.c
+++ b/firmware/drivers/power.c
@@ -62,25 +62,23 @@ int radio_get_status(void)
62void power_init(void) 62void power_init(void)
63{ 63{
64#if CONFIG_CPU == MCF5249 64#if CONFIG_CPU == MCF5249
65#if defined(IRIVER_H100_SERIES) || defined(IRIVER_H300_SERIES) 65#if IRIVER_H100_SERIES
66// or_l(0x00080000, &GPIO1_OUT); 66 or_l(0x00080000, &GPIO1_OUT);
67// or_l(0x00080000, &GPIO1_ENABLE); 67 or_l(0x00080000, &GPIO1_ENABLE);
68// or_l(0x00080000, &GPIO1_FUNCTION); 68 or_l(0x00080000, &GPIO1_FUNCTION);
69 69
70#ifndef BOOTLOADER 70#ifndef BOOTLOADER
71 /* The boot loader controls the power */ 71 /* The boot loader controls the power */
72// ide_power_enable(true); 72 ide_power_enable(true);
73#endif 73#endif
74 or_l(0x80000000, &GPIO_OUT);
75 or_l(0x80000000, &GPIO_ENABLE); 74 or_l(0x80000000, &GPIO_ENABLE);
76 or_l(0x80000000, &GPIO_FUNCTION); 75 or_l(0x80000000, &GPIO_FUNCTION);
77#ifdef HAVE_SPDIF_POWER 76#ifdef HAVE_SPDIF_POWER
78 spdif_power_enable(false); 77 spdif_power_enable(false);
79#endif 78#endif
80#ifdef IRIVER_H300_SERIES 79#elif defined(IRIVER_H300_SERIES)
81 pcf50606_init(); 80 pcf50606_init();
82#endif 81#endif
83#endif
84#elif CONFIG_CPU == PP5020 82#elif CONFIG_CPU == PP5020
85 /* TODO: Implement power_init() */ 83 /* TODO: Implement power_init() */
86#else 84#else