summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2008-11-11 14:46:13 +0000
committerDave Chapman <dave@dchapman.com>2008-11-11 14:46:13 +0000
commite25c1c6e43aafbbe6de077f142776da2e00c75cd (patch)
tree3d86e41239ae55e2e19cb4f5f7c27fec03d294fd
parent5c7d9f10150df77ad4ddc92fb3b2943225d0ed39 (diff)
downloadrockbox-e25c1c6e43aafbbe6de077f142776da2e00c75cd.zip
rockbox-e25c1c6e43aafbbe6de077f142776da2e00c75cd.tar.gz
rockbox-e25c1c6e43aafbbe6de077f142776da2e00c75cd.tar.bz2
rockbox-e25c1c6e43aafbbe6de077f142776da2e00c75cd.tar.xz
Add more driver stubs to make the Fuze and e200v2 main builds compile; Correct the memory definition for the Fuze (8MB)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19090 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/SOURCES3
-rw-r--r--firmware/drivers/tuner/si4700.c47
-rw-r--r--firmware/export/si4700.h36
-rw-r--r--firmware/export/tuner.h5
-rw-r--r--firmware/export/usb.h1
-rw-r--r--firmware/target/arm/as3525/ata_sd_as3525.c24
-rw-r--r--firmware/target/arm/as3525/pcm-as3525.c46
-rw-r--r--firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c5
-rw-r--r--firmware/target/arm/as3525/sansa-e200v2/system-target.h2
-rw-r--r--firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c33
-rw-r--r--firmware/target/arm/as3525/sansa-fuze/system-target.h2
-rw-r--r--firmware/target/arm/as3525/system-as3525.c16
-rwxr-xr-xtools/configure2
13 files changed, 213 insertions, 9 deletions
diff --git a/firmware/SOURCES b/firmware/SOURCES
index f43f331..1a3a85f 100644
--- a/firmware/SOURCES
+++ b/firmware/SOURCES
@@ -179,6 +179,9 @@ drivers/tuner/s1a0903x01.c
#if (CONFIG_TUNER & TEA5767)
drivers/tuner/tea5767.c
#endif /* (CONFIG_TUNER & TEA5767) */
+#if (CONFIG_TUNER & SI4700)
+drivers/tuner/si4700.c
+#endif /* (CONFIG_TUNER & SI4700) */
#endif /*SIMULATOR */
#endif /* CONFIG_TUNER */
diff --git a/firmware/drivers/tuner/si4700.c b/firmware/drivers/tuner/si4700.c
new file mode 100644
index 0000000..9233afa
--- /dev/null
+++ b/firmware/drivers/tuner/si4700.c
@@ -0,0 +1,47 @@
+/***************************************************************************
+ * __________ __ ___.
+ * Open \______ \ ____ ____ | | _\_ |__ _______ ___
+ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+ * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+ * \/ \/ \/ \/ \/
+ * $Id$
+ *
+ * Tuner "middleware" for Silicon Labs SI4700 chip
+ *
+ * Copyright (C) 2008 ???
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****************************************************************************/
+#include "config.h"
+#include <stdbool.h>
+#include <string.h>
+#include <stdlib.h>
+#include "kernel.h"
+#include "tuner.h" /* tuner abstraction interface */
+#include "fmradio.h"
+#include "fmradio_i2c.h" /* physical interface driver */
+
+/* tuner abstraction layer: set something to the tuner */
+int si4700_set(int setting, int value)
+{
+ (void)setting;
+ (void)value;
+
+ return 1;
+}
+
+/* tuner abstraction layer: read something from the tuner */
+int si4700_get(int setting)
+{
+ (void)setting;
+
+ return -1;
+}
diff --git a/firmware/export/si4700.h b/firmware/export/si4700.h
new file mode 100644
index 0000000..a740ae0
--- /dev/null
+++ b/firmware/export/si4700.h
@@ -0,0 +1,36 @@
+/***************************************************************************
+ * __________ __ ___.
+ * Open \______ \ ____ ____ | | _\_ |__ _______ ___
+ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+ * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+ * \/ \/ \/ \/ \/
+ *
+ * $Id$
+ *
+ * Tuner header for the Silicon Labs SI4700
+ *
+ * Copyright (C) 2008 Dave Chapman
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****************************************************************************/
+
+#ifndef _SI4700_H_
+#define _SI4700_H_
+
+int si4700_set(int setting, int value);
+int si4700_get(int setting);
+
+#ifndef CONFIG_TUNER_MULTI
+#define tuner_set si4700_set
+#define tuner_get si4700_get
+#endif
+
+#endif /* _SI4700_H_ */
diff --git a/firmware/export/tuner.h b/firmware/export/tuner.h
index a081472..8f1839a 100644
--- a/firmware/export/tuner.h
+++ b/firmware/export/tuner.h
@@ -102,6 +102,11 @@ extern int (*tuner_get)(int setting);
#include "tea5767.h"
#endif
+/* Silicon Labs 4700 */
+#if (CONFIG_TUNER & SI4700)
+#include "si4700.h"
+#endif
+
#endif /* SIMULATOR */
/* Additional messages that get enumerated after tuner driver headers */
diff --git a/firmware/export/usb.h b/firmware/export/usb.h
index 4275fa9..00517b2 100644
--- a/firmware/export/usb.h
+++ b/firmware/export/usb.h
@@ -64,6 +64,7 @@ enum {
#elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \
(CONFIG_KEYPAD == SANSA_C200_PAD) || \
(CONFIG_KEYPAD == SANSA_CLIP_PAD) || \
+ (CONFIG_KEYPAD == SANSA_FUZE_PAD) || \
(CONFIG_KEYPAD == PHILIPS_SA9200_PAD)
#define USBPOWER_BUTTON BUTTON_SELECT
#define USBPOWER_BTN_IGNORE BUTTON_POWER
diff --git a/firmware/target/arm/as3525/ata_sd_as3525.c b/firmware/target/arm/as3525/ata_sd_as3525.c
index 828e025..291b7cb 100644
--- a/firmware/target/arm/as3525/ata_sd_as3525.c
+++ b/firmware/target/arm/as3525/ata_sd_as3525.c
@@ -690,4 +690,28 @@ tCardInfo *card_get_info_target(int card_no)
return &card;
}
+bool card_detect_target(void)
+{
+#ifdef HAVE_HOTSWAP
+ /* TODO */
+ return false;
+#else
+ return false;
+#endif
+}
+
+#ifdef HAVE_HOTSWAP
+void card_enable_monitoring_target(bool on)
+{
+ if (on)
+ {
+ /* TODO */
+ }
+ else
+ {
+ /* TODO */
+ }
+}
+#endif
+
#endif /* BOOTLOADER */
diff --git a/firmware/target/arm/as3525/pcm-as3525.c b/firmware/target/arm/as3525/pcm-as3525.c
index e2c31ad..d91450c 100644
--- a/firmware/target/arm/as3525/pcm-as3525.c
+++ b/firmware/target/arm/as3525/pcm-as3525.c
@@ -74,3 +74,49 @@ const void * pcm_play_dma_get_peak_buffer(int *count)
{
return NULL;
}
+
+
+/****************************************************************************
+ ** Recording DMA transfer
+ **/
+#ifdef HAVE_RECORDING
+void pcm_rec_lock(void)
+{
+}
+
+void pcm_rec_unlock(void)
+{
+}
+
+void pcm_record_more(void *start, size_t size)
+{
+ (void)start;
+ (void)size;
+}
+
+void pcm_rec_dma_stop(void)
+{
+}
+
+void pcm_rec_dma_start(void *addr, size_t size)
+{
+ (void)addr;
+ (void)size;
+}
+
+void pcm_rec_dma_close(void)
+{
+}
+
+
+void pcm_rec_dma_init(void)
+{
+}
+
+
+const void * pcm_rec_dma_get_peak_buffer(int *count)
+{
+ (void)count;
+}
+
+#endif /* HAVE_RECORDING */
diff --git a/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c b/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c
index 7a5c115..84ef108 100644
--- a/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c
+++ b/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c
@@ -338,6 +338,11 @@ bool lcd_enabled(void)
return display_on;
}
+void lcd_sleep(void)
+{
+ /* TODO */
+}
+
/*** update functions ***/
/* Performance function to blit a YUV bitmap directly to the LCD
diff --git a/firmware/target/arm/as3525/sansa-e200v2/system-target.h b/firmware/target/arm/as3525/sansa-e200v2/system-target.h
index b712d1c1..19ddd03 100644
--- a/firmware/target/arm/as3525/sansa-e200v2/system-target.h
+++ b/firmware/target/arm/as3525/sansa-e200v2/system-target.h
@@ -24,5 +24,7 @@
#include "system-arm.h"
#define CPUFREQ_MAX 250000000
+#define CPUFREQ_DEFAULT 250000000
+#define CPUFREQ_NORMAL 250000000
#endif /* SYSTEM_TARGET_H */
diff --git a/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c b/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c
index 36006be..dd6d455 100644
--- a/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c
+++ b/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c
@@ -199,8 +199,9 @@ static void _display_on(void)
}
/* I'm guessing this function is lcd_enable, but it may not be... */
-void lcd_enable(int r0)
+void lcd_enable(bool on)
{
+ int r0 = on;
#if 0
r4 = 0x1db12;
[r4] = 1;
@@ -249,6 +250,36 @@ void lcd_enable(int r0)
#endif
}
+bool lcd_enabled(void)
+{
+ return display_on;
+}
+
+void lcd_sleep(void)
+{
+ /* TODO */
+}
+
+/*** update functions ***/
+
+/* Performance function to blit a YUV bitmap directly to the LCD
+ * src_x, src_y, width and height should be even
+ * x, y, width and height have to be within LCD bounds
+ */
+void lcd_blit_yuv(unsigned char * const src[3],
+ int src_x, int src_y, int stride,
+ int x, int y, int width, int height)
+{
+ (void)src;
+ (void)src_x;
+ (void)src_y;
+ (void)stride;
+ (void)x;
+ (void)y;
+ (void)width;
+ (void)height;
+}
+
void lcd_init_device()
{
as3525_dbop_init();
diff --git a/firmware/target/arm/as3525/sansa-fuze/system-target.h b/firmware/target/arm/as3525/sansa-fuze/system-target.h
index b712d1c1..553ce90 100644
--- a/firmware/target/arm/as3525/sansa-fuze/system-target.h
+++ b/firmware/target/arm/as3525/sansa-fuze/system-target.h
@@ -24,5 +24,7 @@
#include "system-arm.h"
#define CPUFREQ_MAX 250000000
+#define CPUFREQ_DEFAULT 250000000
+#define CPUFREQ_NORMAL 250000000
#endif /* SYSTEM_TARGET_H */
diff --git a/firmware/target/arm/as3525/system-as3525.c b/firmware/target/arm/as3525/system-as3525.c
index 7653985..f42387d 100644
--- a/firmware/target/arm/as3525/system-as3525.c
+++ b/firmware/target/arm/as3525/system-as3525.c
@@ -167,14 +167,16 @@ static void sdram_init(void)
MPMC_DYNAMIC_tRRD = 2;
MPMC_DYNAMIC_tMRD = 2;
-#if defined(SANSA_CLIP) || defined(SANSA_M200V4) || defined(SANSA_FUZE)
-# define MEMORY_MODEL 0x21
- /* 16 bits external bus, low power SDRAM, 16 Mbits = 2 Mbytes */
-#elif defined(SANSA_E200V2)
-# define MEMORY_MODEL 0x5
- /* 16 bits external bus, high performance SDRAM, 64 Mbits = 8 Mbytes */
+#if defined(SANSA_CLIP) || defined(SANSA_M200V4)
+/* 16 bits external bus, low power SDRAM, 16 Mbits = 2 Mbytes */
+#define MEMORY_MODEL 0x21
+
+#elif defined(SANSA_E200V2) || defined(SANSA_FUZE)
+/* 16 bits external bus, high performance SDRAM, 64 Mbits = 8 Mbytes */
+#define MEMORY_MODEL 0x5
+
#else
-# error "The external memory in your player is unknown"
+#error "The external memory in your player is unknown"
#endif
MPMC_DYNAMIC_RASCAS_0 = (2<<8)|2; /* CAS & RAS latency = 2 clock cycles */
diff --git a/tools/configure b/tools/configure
index 42015df..a817f5d 100755
--- a/tools/configure
+++ b/tools/configure
@@ -1743,7 +1743,7 @@ fi
target_id=53
modelname="fuze"
target="-DSANSA_FUZE"
- memory=2
+ memory=8
arm9tdmicc
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
bmp2rb_native="$rootdir/tools/bmp2rb -f 4"