Configure Gigabeat S with EABI compiler by default. Implement the INIT section that this enables (due to selective need for long calls). Remove pcm_postinit from INIT section since it's asynchronous. Disable strict aliasing on SPC codec for now just to shut it up.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26779 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sevakis 2010-06-11 14:39:35 +00:00
parent d5a27c2fb1
commit 60f843bf18
17 changed files with 50 additions and 43 deletions

View file

@ -17,7 +17,7 @@ $(SPCLIB): $(SPCLIB_OBJ)
$(SILENT)$(shell rm -f $@)
$(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null
SPCFLAGS = $(filter-out -O%,$(CODECFLAGS))
SPCFLAGS = $(filter-out -O%,$(CODECFLAGS)) -fno-strict-aliasing
SPCFLAGS += -O1
$(CODECDIR)/libspc/%.o: $(ROOTDIR)/apps/codecs/libspc/%.c

View file

@ -778,7 +778,8 @@ Lyre prototype 1 */
#define IBSS_ATTR
#define STATICIRAM static
#endif
#if (defined(CPU_PP) || (CONFIG_CPU == AS3525) || (CONFIG_CPU == AS3525v2)) \
#if (defined(CPU_PP) || (CONFIG_CPU == AS3525) || (CONFIG_CPU == AS3525v2) || \
(CONFIG_CPU == IMX31L)) \
&& !defined(SIMULATOR) && !defined(BOOTLOADER)
/* Functions that have INIT_ATTR attached are NOT guaranteed to survive after
* root_menu() has been called. Their code may be overwritten by other data or

View file

@ -68,7 +68,7 @@ void pcm_play_lock(void);
void pcm_play_unlock(void);
void pcm_init(void) INIT_ATTR;
void pcm_postinit(void) INIT_ATTR;
void pcm_postinit(void);
/* This is for playing "raw" PCM data */
void pcm_play_data(pcm_play_callback_type get_more,

View file

@ -32,9 +32,14 @@ STARTUP(target/arm/imx31/crt0.o)
/* Where the codec buffer ends, and the plugin buffer starts */
#define ENDADDR (ENDAUDIOADDR + CODECSIZE)
/* INIT section is the codec buffer */
#define INITSIZE CODECSIZE
#define INITSTART ENDAUDIOADDR
MEMORY
{
DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
INIT : ORIGIN = INITSTART, LENGTH = INITSIZE
QHARRAY : ORIGIN = QHARRAY_PHYS_ADDR, LENGTH = QHARRAY_SIZE
}
@ -97,25 +102,35 @@ SECTIONS
.vectors 0x0 :
{
_vectorsstart = .;
*(.vectors);
*(.vectors)
_vectorsend = .;
} AT> DRAM
_vectorscopy = LOADADDR(.vectors);
.init :
{
. = ALIGN(4);
_initstart = .;
*(.init)
*(.sdmacode)
_initend = .;
} > INIT AT> DRAM
_initcopy = LOADADDR(.init);
.stack (NOLOAD) :
{
*(.stack)
stackbegin = .;
. += 0x2000;
stackend = .;
. = ALIGN(4);
*(.stack)
stackbegin = .;
. += 0x2000;
stackend = .;
} > DRAM
_sdmacodecopy = stackbegin;
.bss (NOLOAD) :
{
_edata = .;
_edata = .;
*(.bss*)
*(.ibss)
*(COMMON)
@ -158,13 +173,6 @@ SECTIONS
pluginbuf = .;
}
.sdma _pluginbuf : AT( _sdmacodecopy )
{
_sdmacodestart = .;
*(.sdmacode);
_sdmacodeend = .;
}
.qharray (NOLOAD) :
{
_qharray = .;

View file

@ -116,7 +116,7 @@ void __attribute__((naked)) fiq_handler(void)
);
}
void avic_init(void)
void INIT_ATTR avic_init(void)
{
int i;

View file

@ -231,20 +231,18 @@ remap_end:
bhi 1b
#endif /* BOOTLOADER */
#ifndef BOOTLOADER
/* Copy discardable SDMA code - loaded in the stack section
* and so must be done first. Destination is the plugin buffer
* which is safe when SDMA init takes place just after kernel
* init. */
ldr r4, =_sdmacodecopy
ldr r3, =_sdmacodeend
ldr r2, =_sdmacodestart
#ifdef HAVE_INIT_ATTR
/* copy init data to codec buffer */
/* must be done before bss is zeroed */
ldr r4, =_initcopy
ldr r3, =_initend
ldr r2, =_initstart
1:
cmp r3, r2
ldrhi r5, [r4], #4
strhi r5, [r2], #4
bhi 1b
#endif /* BOOTLOADER */
#endif /* HAVE_INIT_ATTR */
/* Initialise bss and ncbss sections to zero */
ldr r2, =_edata

View file

@ -248,7 +248,7 @@ static __attribute__((naked, interrupt("IRQ"))) void CCM_DVFS_HANDLER(void)
/* Initialize the DVFS hardware */
static void dvfs_init(void)
static void INIT_ATTR dvfs_init(void)
{
if (CCM_PMCR0 & CCM_PMCR0_DVFEN)
{
@ -514,7 +514,7 @@ static __attribute__((interrupt("IRQ"))) void CCM_CLK_HANDLER(void)
/* Initialize the DPTC hardware */
static void dptc_init(void)
static void INIT_ATTR dptc_init(void)
{
/* Force DPTC off if running for some reason. */
imx31_regmod32(&CCM_PMCR0, CCM_PMCR0_PTVAIM,
@ -590,7 +590,7 @@ static void dptc_stop(void)
/** Main module interface **/
/* Initialize DVFS and DPTC */
void dvfs_dptc_init(void)
void INIT_ATTR dvfs_dptc_init(void)
{
dptc_init();
dvfs_init();

View file

@ -184,7 +184,7 @@ bool headphones_inserted(void)
return headphones_detect;
}
void headphone_init(void)
void INIT_ATTR headphone_init(void)
{
/* A thread is required to monitor the remote ADC and jack state. */
wakeup_init(&headphone_wakeup);

View file

@ -37,7 +37,7 @@ static __attribute__((interrupt("IRQ"))) void EPIT1_HANDLER(void)
call_tick_tasks();
}
void tick_start(unsigned int interval_in_ms)
void INIT_ATTR tick_start(unsigned int interval_in_ms)
{
ccm_module_clock_gating(CG_EPIT1, CGM_ON_RUN_WAIT); /* EPIT1 module
clock ON - before writing
@ -65,7 +65,7 @@ void tick_start(unsigned int interval_in_ms)
EPITCR1 |= EPITCR_EN; /* Enable the counter */
}
void kernel_device_init(void)
void INIT_ATTR kernel_device_init(void)
{
sdma_init();
spi_init();

View file

@ -147,7 +147,7 @@ static void lcd_set_power(bool powered)
}
/* LCD init */
void lcd_init_device(void)
void INIT_ATTR lcd_init_device(void)
{
/* Move the framebuffer */
#ifdef BOOTLOADER

View file

@ -606,7 +606,7 @@ static bool charging_ok(void)
return ok;
}
void powermgmt_init_target(void)
void INIT_ATTR powermgmt_init_target(void)
{
last_inputs = power_thread_inputs;

View file

@ -48,7 +48,7 @@ unsigned int iim_prod_rev(void)
return product_rev;
}
static void iim_init(void)
static void INIT_ATTR iim_init(void)
{
/* Initialize the IC revision info (required by SDMA) */
ccm_module_clock_gating(CG_IIM, CGM_ON_RUN_WAIT);
@ -136,7 +136,7 @@ void system_exception_wait(void)
system_halt();
}
void system_init(void)
void INIT_ATTR system_init(void)
{
static const int disable_clocks[] =
{

View file

@ -150,7 +150,7 @@ static __attribute__((interrupt("IRQ"))) void GPIO3_HANDLER(void)
}
#endif
void gpio_init(void)
void INIT_ATTR gpio_init(void)
{
/* Mask-out GPIO interrupts - enable what's wanted later */
int i;

View file

@ -143,7 +143,7 @@ void mc13783_event(void)
wakeup_signal(&mc13783_svc_wake);
}
void mc13783_init(void)
void INIT_ATTR mc13783_init(void)
{
/* Serial interface must have been initialized first! */
wakeup_init(&mc13783_svc_wake);

View file

@ -500,7 +500,7 @@ static bool setup_channel(struct channel_control_block *ccb_p)
}
/** Public routines **/
void sdma_init(void)
void INIT_ATTR sdma_init(void)
{
int i;
unsigned long acr;

View file

@ -331,7 +331,7 @@ static __attribute__((interrupt("IRQ"))) void CSPI3_HANDLER(void)
#endif
/* Initialize the SPI driver */
void spi_init(void)
void INIT_ATTR spi_init(void)
{
unsigned i;
for (i = 0; i < SPI_NUM_CSPI; i++)

2
tools/configure vendored
View file

@ -40,7 +40,7 @@ prefixtools () {
}
findarmgcc() {
models_not_checked_with_eabi="iriverh10 iriverh10_5gb ipodcolor ipodnano1g ipodvideo ipod3g ipod4g ipodmini1g ipodmini2g ipod1g2g ipodnano2g iaudio7 cowond2 gigabeatfx gigabeats mrobe500 mrobe100 sansae200 sansac200 sansae200r vibe500"
models_not_checked_with_eabi="iriverh10 iriverh10_5gb ipodcolor ipodnano1g ipodvideo ipod3g ipod4g ipodmini1g ipodmini2g ipod1g2g ipodnano2g iaudio7 cowond2 gigabeatfx mrobe500 mrobe100 sansae200 sansac200 sansae200r vibe500"
if [ "$ARG_ARM_EABI" != 1 ]; then # eabi not explicitely enabled
for model in $models_not_checked_with_eabi; do
if [ "$modelname" = "$model" ]; then