summaryrefslogtreecommitdiff
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
parentd79f3a1e845bcad2d64cbaf467c0f0dae596f537 (diff)
downloadrockbox-73a35a1aa445932176fca78688d43c636a3fda5e.zip
rockbox-73a35a1aa445932176fca78688d43c636a3fda5e.tar.gz
rockbox-73a35a1aa445932176fca78688d43c636a3fda5e.tar.bz2
rockbox-73a35a1aa445932176fca78688d43c636a3fda5e.tar.xz
Reverted erroneous commit
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7918 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/backlight.c9
-rw-r--r--firmware/drivers/ata.c8
-rw-r--r--firmware/drivers/i2c-coldfire.c3
-rw-r--r--firmware/drivers/power.c14
-rw-r--r--firmware/export/config-h100.h2
-rw-r--r--firmware/export/config-h120.h2
-rw-r--r--firmware/pcm_playback.c8
7 files changed, 10 insertions, 36 deletions
diff --git a/firmware/backlight.c b/firmware/backlight.c
index 26d0362..fa6a42b 100644
--- a/firmware/backlight.c
+++ b/firmware/backlight.c
@@ -456,14 +456,7 @@ void backlight_init(void)
#else /* no backlight, empty dummy functions */
-void backlight_init(void)
-{
-#if defined(IRIVER_H300_SERIES) && defined(BOOTLOADER)
- or_l(0x00020000, &GPIO1_OUT);
- or_l(0x00020000, &GPIO1_ENABLE);
- or_l(0x00020000, &GPIO1_FUNCTION);
-#endif
-}
+void backlight_init(void) {}
void backlight_on(void) {}
void backlight_off(void) {}
void backlight_tick(void) {}
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c
index c0799f3..9cc49c1 100644
--- a/firmware/drivers/ata.c
+++ b/firmware/drivers/ata.c
@@ -1413,20 +1413,16 @@ 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 */
- and_l(~0x00080000, &GPIO_OUT);
+ or_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 0c83c1c..aecd3a3 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);
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);
@@ -46,7 +45,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 2547c11..4e5d347 100644
--- a/firmware/drivers/power.c
+++ b/firmware/drivers/power.c
@@ -62,25 +62,23 @@ int radio_get_status(void)
void power_init(void)
{
#if CONFIG_CPU == MCF5249
-#if defined(IRIVER_H100_SERIES) || defined(IRIVER_H300_SERIES)
-// or_l(0x00080000, &GPIO1_OUT);
-// or_l(0x00080000, &GPIO1_ENABLE);
-// or_l(0x00080000, &GPIO1_FUNCTION);
+#if IRIVER_H100_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
-#ifdef IRIVER_H300_SERIES
+#elif defined(IRIVER_H300_SERIES)
pcf50606_init();
#endif
-#endif
#elif CONFIG_CPU == PP5020
/* TODO: Implement power_init() */
#else
diff --git a/firmware/export/config-h100.h b/firmware/export/config-h100.h
index 35b35e0..19bb99b 100644
--- a/firmware/export/config-h100.h
+++ b/firmware/export/config-h100.h
@@ -91,8 +91,6 @@
#define USB_IRIVERSTYLE
-#define HAVE_ATA_LED_CTRL
-
/* Define this if you have adjustable CPU frequency */
#define HAVE_ADJUSTABLE_CPU_FREQ
diff --git a/firmware/export/config-h120.h b/firmware/export/config-h120.h
index e6c829a..b2c34c5 100644
--- a/firmware/export/config-h120.h
+++ b/firmware/export/config-h120.h
@@ -88,8 +88,6 @@
#define USB_IRIVERSTYLE
-#define HAVE_ATA_LED_CTRL
-
/* Define this if you have adjustable CPU frequency */
#define HAVE_ADJUSTABLE_CPU_FREQ
diff --git a/firmware/pcm_playback.c b/firmware/pcm_playback.c
index 5f87917..05c5447 100644
--- a/firmware/pcm_playback.c
+++ b/firmware/pcm_playback.c
@@ -77,10 +77,8 @@ static void dma_start(const void *addr, long size)
/* Enable the FIFO and force one write to it */
IIS2CONFIG = IIS_DEFPARM(pcm_freq);
-#ifdef HAVE_SPDIF_OUT
/* Also send the audio to S/PDIF */
EBU1CONFIG = EBU_DEFPARM;
-#endif
DCR0 = DMA_INT | DMA_EEXT | DMA_CS | DMA_SINC | DMA_START;
}
@@ -92,9 +90,7 @@ static void dma_stop(void)
DCR0 = 0;
/* Reset the FIFO */
IIS2CONFIG = IIS_RESET | IIS_DEFPARM(pcm_freq);
-#ifdef HAVE_SPDIF_OUT
EBU1CONFIG = IIS_RESET;
-#endif
next_start = NULL;
next_size = 0;
@@ -224,9 +220,7 @@ void pcm_play_pause(bool play)
//BCR0 = next_size;
/* Enable the FIFO and force one write to it */
IIS2CONFIG = IIS_DEFPARM(pcm_freq);
-#ifdef HAVE_SPDIF_OUT
EBU1CONFIG = EBU_DEFPARM;
-#endif
DCR0 |= DMA_EEXT | DMA_START;
}
else if(!pcm_paused && !play)
@@ -236,9 +230,7 @@ void pcm_play_pause(bool play)
/* Disable DMA peripheral request. */
DCR0 &= ~DMA_EEXT;
IIS2CONFIG = IIS_RESET | IIS_DEFPARM(pcm_freq);
-#ifdef HAVE_SPDIF_OUT
EBU1CONFIG = IIS_RESET;
-#endif
}
pcm_paused = !play;
}