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
This commit is contained in:
Dave Chapman 2008-11-11 14:46:13 +00:00
parent 5c7d9f1015
commit e25c1c6e43
13 changed files with 213 additions and 9 deletions

View file

@ -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 */

View file

@ -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;
}

36
firmware/export/si4700.h Normal file
View file

@ -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_ */

View file

@ -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 */

View file

@ -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

View file

@ -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 */

View file

@ -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 */

View file

@ -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

View file

@ -24,5 +24,7 @@
#include "system-arm.h"
#define CPUFREQ_MAX 250000000
#define CPUFREQ_DEFAULT 250000000
#define CPUFREQ_NORMAL 250000000
#endif /* SYSTEM_TARGET_H */

View file

@ -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();

View file

@ -24,5 +24,7 @@
#include "system-arm.h"
#define CPUFREQ_MAX 250000000
#define CPUFREQ_DEFAULT 250000000
#define CPUFREQ_NORMAL 250000000
#endif /* SYSTEM_TARGET_H */

View file

@ -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 */

2
tools/configure vendored
View file

@ -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"