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.tar.gz
rockbox-e25c1c6e43aafbbe6de077f142776da2e00c75cd.zip
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 f43f331df7..1a3a85f4fb 100644
--- a/firmware/SOURCES
+++ b/firmware/SOURCES
@@ -179,6 +179,9 @@ drivers/tuner/s1a0903x01.c
179#if (CONFIG_TUNER & TEA5767) 179#if (CONFIG_TUNER & TEA5767)
180drivers/tuner/tea5767.c 180drivers/tuner/tea5767.c
181#endif /* (CONFIG_TUNER & TEA5767) */ 181#endif /* (CONFIG_TUNER & TEA5767) */
182#if (CONFIG_TUNER & SI4700)
183drivers/tuner/si4700.c
184#endif /* (CONFIG_TUNER & SI4700) */
182#endif /*SIMULATOR */ 185#endif /*SIMULATOR */
183#endif /* CONFIG_TUNER */ 186#endif /* CONFIG_TUNER */
184 187
diff --git a/firmware/drivers/tuner/si4700.c b/firmware/drivers/tuner/si4700.c
new file mode 100644
index 0000000000..9233afae24
--- /dev/null
+++ b/firmware/drivers/tuner/si4700.c
@@ -0,0 +1,47 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Tuner "middleware" for Silicon Labs SI4700 chip
11 *
12 * Copyright (C) 2008 ???
13 *
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
18 *
19 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
20 * KIND, either express or implied.
21 *
22 ****************************************************************************/
23#include "config.h"
24#include <stdbool.h>
25#include <string.h>
26#include <stdlib.h>
27#include "kernel.h"
28#include "tuner.h" /* tuner abstraction interface */
29#include "fmradio.h"
30#include "fmradio_i2c.h" /* physical interface driver */
31
32/* tuner abstraction layer: set something to the tuner */
33int si4700_set(int setting, int value)
34{
35 (void)setting;
36 (void)value;
37
38 return 1;
39}
40
41/* tuner abstraction layer: read something from the tuner */
42int si4700_get(int setting)
43{
44 (void)setting;
45
46 return -1;
47}
diff --git a/firmware/export/si4700.h b/firmware/export/si4700.h
new file mode 100644
index 0000000000..a740ae03ab
--- /dev/null
+++ b/firmware/export/si4700.h
@@ -0,0 +1,36 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 *
9 * $Id$
10 *
11 * Tuner header for the Silicon Labs SI4700
12 *
13 * Copyright (C) 2008 Dave Chapman
14 *
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version 2
18 * of the License, or (at your option) any later version.
19 *
20 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 * KIND, either express or implied.
22 *
23 ****************************************************************************/
24
25#ifndef _SI4700_H_
26#define _SI4700_H_
27
28int si4700_set(int setting, int value);
29int si4700_get(int setting);
30
31#ifndef CONFIG_TUNER_MULTI
32#define tuner_set si4700_set
33#define tuner_get si4700_get
34#endif
35
36#endif /* _SI4700_H_ */
diff --git a/firmware/export/tuner.h b/firmware/export/tuner.h
index a081472fa1..8f1839a7bb 100644
--- a/firmware/export/tuner.h
+++ b/firmware/export/tuner.h
@@ -102,6 +102,11 @@ extern int (*tuner_get)(int setting);
102#include "tea5767.h" 102#include "tea5767.h"
103#endif 103#endif
104 104
105/* Silicon Labs 4700 */
106#if (CONFIG_TUNER & SI4700)
107#include "si4700.h"
108#endif
109
105#endif /* SIMULATOR */ 110#endif /* SIMULATOR */
106 111
107/* Additional messages that get enumerated after tuner driver headers */ 112/* Additional messages that get enumerated after tuner driver headers */
diff --git a/firmware/export/usb.h b/firmware/export/usb.h
index 4275fa9c6a..00517b2475 100644
--- a/firmware/export/usb.h
+++ b/firmware/export/usb.h
@@ -64,6 +64,7 @@ enum {
64#elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ 64#elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \
65 (CONFIG_KEYPAD == SANSA_C200_PAD) || \ 65 (CONFIG_KEYPAD == SANSA_C200_PAD) || \
66 (CONFIG_KEYPAD == SANSA_CLIP_PAD) || \ 66 (CONFIG_KEYPAD == SANSA_CLIP_PAD) || \
67 (CONFIG_KEYPAD == SANSA_FUZE_PAD) || \
67 (CONFIG_KEYPAD == PHILIPS_SA9200_PAD) 68 (CONFIG_KEYPAD == PHILIPS_SA9200_PAD)
68#define USBPOWER_BUTTON BUTTON_SELECT 69#define USBPOWER_BUTTON BUTTON_SELECT
69#define USBPOWER_BTN_IGNORE BUTTON_POWER 70#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 828e025870..291b7cbef0 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)
690 return &card; 690 return &card;
691} 691}
692 692
693bool card_detect_target(void)
694{
695#ifdef HAVE_HOTSWAP
696 /* TODO */
697 return false;
698#else
699 return false;
700#endif
701}
702
703#ifdef HAVE_HOTSWAP
704void card_enable_monitoring_target(bool on)
705{
706 if (on)
707 {
708 /* TODO */
709 }
710 else
711 {
712 /* TODO */
713 }
714}
715#endif
716
693#endif /* BOOTLOADER */ 717#endif /* BOOTLOADER */
diff --git a/firmware/target/arm/as3525/pcm-as3525.c b/firmware/target/arm/as3525/pcm-as3525.c
index e2c31ad047..d91450c9cf 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)
74{ 74{
75 return NULL; 75 return NULL;
76} 76}
77
78
79/****************************************************************************
80 ** Recording DMA transfer
81 **/
82#ifdef HAVE_RECORDING
83void pcm_rec_lock(void)
84{
85}
86
87void pcm_rec_unlock(void)
88{
89}
90
91void pcm_record_more(void *start, size_t size)
92{
93 (void)start;
94 (void)size;
95}
96
97void pcm_rec_dma_stop(void)
98{
99}
100
101void pcm_rec_dma_start(void *addr, size_t size)
102{
103 (void)addr;
104 (void)size;
105}
106
107void pcm_rec_dma_close(void)
108{
109}
110
111
112void pcm_rec_dma_init(void)
113{
114}
115
116
117const void * pcm_rec_dma_get_peak_buffer(int *count)
118{
119 (void)count;
120}
121
122#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 7a5c1156ff..84ef108b62 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)
338 return display_on; 338 return display_on;
339} 339}
340 340
341void lcd_sleep(void)
342{
343 /* TODO */
344}
345
341/*** update functions ***/ 346/*** update functions ***/
342 347
343/* Performance function to blit a YUV bitmap directly to the LCD 348/* 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 b712d1c124..19ddd03b7c 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 @@
24#include "system-arm.h" 24#include "system-arm.h"
25 25
26#define CPUFREQ_MAX 250000000 26#define CPUFREQ_MAX 250000000
27#define CPUFREQ_DEFAULT 250000000
28#define CPUFREQ_NORMAL 250000000
27 29
28#endif /* SYSTEM_TARGET_H */ 30#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 36006beffb..dd6d4552e0 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)
199} 199}
200 200
201/* I'm guessing this function is lcd_enable, but it may not be... */ 201/* I'm guessing this function is lcd_enable, but it may not be... */
202void lcd_enable(int r0) 202void lcd_enable(bool on)
203{ 203{
204 int r0 = on;
204#if 0 205#if 0
205 r4 = 0x1db12; 206 r4 = 0x1db12;
206 [r4] = 1; 207 [r4] = 1;
@@ -249,6 +250,36 @@ void lcd_enable(int r0)
249#endif 250#endif
250} 251}
251 252
253bool lcd_enabled(void)
254{
255 return display_on;
256}
257
258void lcd_sleep(void)
259{
260 /* TODO */
261}
262
263/*** update functions ***/
264
265/* Performance function to blit a YUV bitmap directly to the LCD
266 * src_x, src_y, width and height should be even
267 * x, y, width and height have to be within LCD bounds
268 */
269void lcd_blit_yuv(unsigned char * const src[3],
270 int src_x, int src_y, int stride,
271 int x, int y, int width, int height)
272{
273 (void)src;
274 (void)src_x;
275 (void)src_y;
276 (void)stride;
277 (void)x;
278 (void)y;
279 (void)width;
280 (void)height;
281}
282
252void lcd_init_device() 283void lcd_init_device()
253{ 284{
254 as3525_dbop_init(); 285 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 b712d1c124..553ce90846 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 @@
24#include "system-arm.h" 24#include "system-arm.h"
25 25
26#define CPUFREQ_MAX 250000000 26#define CPUFREQ_MAX 250000000
27#define CPUFREQ_DEFAULT 250000000
28#define CPUFREQ_NORMAL 250000000
27 29
28#endif /* SYSTEM_TARGET_H */ 30#endif /* SYSTEM_TARGET_H */
diff --git a/firmware/target/arm/as3525/system-as3525.c b/firmware/target/arm/as3525/system-as3525.c
index 7653985d19..f42387d024 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)
167 MPMC_DYNAMIC_tRRD = 2; 167 MPMC_DYNAMIC_tRRD = 2;
168 MPMC_DYNAMIC_tMRD = 2; 168 MPMC_DYNAMIC_tMRD = 2;
169 169
170#if defined(SANSA_CLIP) || defined(SANSA_M200V4) || defined(SANSA_FUZE) 170#if defined(SANSA_CLIP) || defined(SANSA_M200V4)
171# define MEMORY_MODEL 0x21 171/* 16 bits external bus, low power SDRAM, 16 Mbits = 2 Mbytes */
172 /* 16 bits external bus, low power SDRAM, 16 Mbits = 2 Mbytes */ 172#define MEMORY_MODEL 0x21
173#elif defined(SANSA_E200V2) 173
174# define MEMORY_MODEL 0x5 174#elif defined(SANSA_E200V2) || defined(SANSA_FUZE)
175 /* 16 bits external bus, high performance SDRAM, 64 Mbits = 8 Mbytes */ 175/* 16 bits external bus, high performance SDRAM, 64 Mbits = 8 Mbytes */
176#define MEMORY_MODEL 0x5
177
176#else 178#else
177# error "The external memory in your player is unknown" 179#error "The external memory in your player is unknown"
178#endif 180#endif
179 181
180 MPMC_DYNAMIC_RASCAS_0 = (2<<8)|2; /* CAS & RAS latency = 2 clock cycles */ 182 MPMC_DYNAMIC_RASCAS_0 = (2<<8)|2; /* CAS & RAS latency = 2 clock cycles */
diff --git a/tools/configure b/tools/configure
index 42015df145..a817f5db67 100755
--- a/tools/configure
+++ b/tools/configure
@@ -1743,7 +1743,7 @@ fi
1743 target_id=53 1743 target_id=53
1744 modelname="fuze" 1744 modelname="fuze"
1745 target="-DSANSA_FUZE" 1745 target="-DSANSA_FUZE"
1746 memory=2 1746 memory=8
1747 arm9tdmicc 1747 arm9tdmicc
1748 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 1748 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
1749 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 1749 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"