diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2011-01-08 20:42:51 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2011-01-08 20:42:51 +0000 |
commit | 1b275d8ddb6407ef8965e81e4916949ca343d5f9 (patch) | |
tree | dc8f5450508196e2505f823b477978c46d0cde41 | |
parent | 17585a991cdd045ea5a166dd78d609262ebf3efb (diff) |
Some static data is only used by .init functions. Add .initdata to declare such data (otherwise section conflicts arise). For i.MX31, use INITDATA_ATTR in the appropriate places.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29008 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/export/config.h | 2 | ||||
-rw-r--r-- | firmware/target/arm/imx31/app.lds | 2 | ||||
-rw-r--r-- | firmware/target/arm/imx31/boot.lds | 3 | ||||
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/system-gigabeat-s.c | 2 | ||||
-rw-r--r-- | firmware/target/arm/imx31/sdma_script_code.h | 2 |
5 files changed, 5 insertions, 6 deletions
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, |