diff --git a/firmware/export/config.h b/firmware/export/config.h index 8e9afe5937..eca736ddae 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h @@ -835,9 +835,11 @@ Lyre prototype 1 */ * from crashes to freezes to exploding daps. */ #define INIT_ATTR __attribute__ ((section(".init"))) +#define INITDATA_ATTR __attribute__ ((section(".initdata"))) #define HAVE_INIT_ATTR #else #define INIT_ATTR +#define INITDATA_ATTR #endif #if (CONFIG_PLATFORM & PLATFORM_HOSTED) && defined(__APPLE__) diff --git a/firmware/target/arm/imx31/app.lds b/firmware/target/arm/imx31/app.lds index ebfd2e9c60..0325f89b66 100644 --- a/firmware/target/arm/imx31/app.lds +++ b/firmware/target/arm/imx31/app.lds @@ -111,7 +111,7 @@ SECTIONS . = ALIGN(4); _initstart = .; *(.init) - *(.sdmacode) + *(.initdata) _initend = .; } > INIT AT> DRAM diff --git a/firmware/target/arm/imx31/boot.lds b/firmware/target/arm/imx31/boot.lds index 6030044c85..03b92c8dea 100644 --- a/firmware/target/arm/imx31/boot.lds +++ b/firmware/target/arm/imx31/boot.lds @@ -53,9 +53,6 @@ SECTIONS *(.irodata) *(.idata) *(.data*) - . = ALIGN(0x4); - *(.sdmacode) - . = ALIGN(0x4); _dataend = . ; } > DRAM diff --git a/firmware/target/arm/imx31/gigabeat-s/system-gigabeat-s.c b/firmware/target/arm/imx31/gigabeat-s/system-gigabeat-s.c index 37491907e3..978c7f77cd 100644 --- a/firmware/target/arm/imx31/gigabeat-s/system-gigabeat-s.c +++ b/firmware/target/arm/imx31/gigabeat-s/system-gigabeat-s.c @@ -139,7 +139,7 @@ void system_exception_wait(void) void INIT_ATTR system_init(void) { - static const int disable_clocks[] = + static const enum IMX31_CG_LIST disable_clocks[] INITDATA_ATTR = { /* CGR0 */ CG_SD_MMC1, diff --git a/firmware/target/arm/imx31/sdma_script_code.h b/firmware/target/arm/imx31/sdma_script_code.h index 82826e0bce..ee61b2d116 100644 --- a/firmware/target/arm/imx31/sdma_script_code.h +++ b/firmware/target/arm/imx31/sdma_script_code.h @@ -294,7 +294,7 @@ /*! * Code download */ -static __attribute__((aligned(4), section(".sdmacode"))) +static __attribute__((aligned(4))) INITDATA_ATTR const short sdma_code_2[RAM_CODE_SIZE_2] = { 0x0870, 0x0011, 0x5010, 0xc0ec, 0x7d61, 0x5ac0, 0x5bc8, 0x5ef8,