Use HAVE_FLASHED_ROCKBOX when target is flashable. Currenly only used by the H100 series.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11470 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
a32b33bf83
commit
d7e55278f3
4 changed files with 14 additions and 15 deletions
|
@ -100,6 +100,9 @@
|
|||
/* Define this if you want to use coldfire's i2c interface */
|
||||
#define CONFIG_I2C I2C_COLDFIRE
|
||||
|
||||
/* Define this if you can run rockbox from flash memory */
|
||||
#define HAVE_FLASHED_ROCKBOX
|
||||
|
||||
/* Define if we have a hardware defect that causes ticking on the audio line */
|
||||
#define HAVE_REMOTE_LCD_TICKING
|
||||
|
||||
|
|
|
@ -102,6 +102,9 @@
|
|||
#define BATTERY_TYPES_COUNT 1 /* only one type */
|
||||
#define BATTERY_SCALE_FACTOR 16665 /* FIX: this value is picked at random */
|
||||
|
||||
/* Define this if you can run rockbox from flash memory */
|
||||
#define HAVE_FLASHED_ROCKBOX
|
||||
|
||||
/* Define if we have a hardware defect that causes ticking on the audio line */
|
||||
#define HAVE_REMOTE_LCD_TICKING
|
||||
|
||||
|
|
|
@ -126,34 +126,31 @@ void system_init(void) {
|
|||
}
|
||||
|
||||
#endif
|
||||
#if defined(IRIVER_H100_SERIES) && !defined(SIMULATOR)
|
||||
|
||||
bool detect_flashed_rockbox(void)
|
||||
{
|
||||
#ifdef HAVE_FLASHED_ROCKBOX
|
||||
struct flash_header hdr;
|
||||
uint8_t *src = (uint8_t *)FLASH_ENTRYPOINT;
|
||||
|
||||
# ifndef BOOTLOADER
|
||||
int oldmode;
|
||||
oldmode = system_memory_guard(MEMGUARD_NONE);
|
||||
# endif
|
||||
#ifndef BOOTLOADER
|
||||
int oldmode = system_memory_guard(MEMGUARD_NONE);
|
||||
#endif
|
||||
|
||||
memcpy(&hdr, src, sizeof(struct flash_header));
|
||||
|
||||
# ifndef BOOTLOADER
|
||||
#ifndef BOOTLOADER
|
||||
system_memory_guard(oldmode);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
if (hdr.magic != FLASH_MAGIC)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
#else
|
||||
bool detect_flashed_rockbox(void)
|
||||
{
|
||||
return false;
|
||||
#endif /* HAVE_FLASHED_ROCKBOX */
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CONFIG_CPU == TCC730
|
||||
|
||||
|
|
|
@ -147,10 +147,6 @@ static inline void invalidate_icache(void)
|
|||
#endif
|
||||
void coldfire_set_pllcr_audio_bits(long bits);
|
||||
|
||||
#ifdef HRIVER_H100_SERIES
|
||||
bool detect_flashed_rockbox(void);
|
||||
#endif
|
||||
|
||||
/* 11.2896 MHz */
|
||||
#define CPUFREQ_DEFAULT_MULT 1
|
||||
#define CPUFREQ_DEFAULT (CPUFREQ_DEFAULT_MULT * CPU_FREQ)
|
||||
|
|
Loading…
Reference in a new issue