summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2011-01-08 20:42:51 +0000
committerMichael Sevakis <jethead71@rockbox.org>2011-01-08 20:42:51 +0000
commit1b275d8ddb6407ef8965e81e4916949ca343d5f9 (patch)
treedc8f5450508196e2505f823b477978c46d0cde41
parent17585a991cdd045ea5a166dd78d609262ebf3efb (diff)
downloadrockbox-1b275d8ddb6407ef8965e81e4916949ca343d5f9.tar.gz
rockbox-1b275d8ddb6407ef8965e81e4916949ca343d5f9.zip
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.h2
-rw-r--r--firmware/target/arm/imx31/app.lds2
-rw-r--r--firmware/target/arm/imx31/boot.lds3
-rw-r--r--firmware/target/arm/imx31/gigabeat-s/system-gigabeat-s.c2
-rw-r--r--firmware/target/arm/imx31/sdma_script_code.h2
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 */
835 * from crashes to freezes to exploding daps. 835 * from crashes to freezes to exploding daps.
836 */ 836 */
837#define INIT_ATTR __attribute__ ((section(".init"))) 837#define INIT_ATTR __attribute__ ((section(".init")))
838#define INITDATA_ATTR __attribute__ ((section(".initdata")))
838#define HAVE_INIT_ATTR 839#define HAVE_INIT_ATTR
839#else 840#else
840#define INIT_ATTR 841#define INIT_ATTR
842#define INITDATA_ATTR
841#endif 843#endif
842 844
843#if (CONFIG_PLATFORM & PLATFORM_HOSTED) && defined(__APPLE__) 845#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
111 . = ALIGN(4); 111 . = ALIGN(4);
112 _initstart = .; 112 _initstart = .;
113 *(.init) 113 *(.init)
114 *(.sdmacode) 114 *(.initdata)
115 _initend = .; 115 _initend = .;
116 } > INIT AT> DRAM 116 } > INIT AT> DRAM
117 117
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
53 *(.irodata) 53 *(.irodata)
54 *(.idata) 54 *(.idata)
55 *(.data*) 55 *(.data*)
56 . = ALIGN(0x4);
57 *(.sdmacode)
58 . = ALIGN(0x4);
59 _dataend = . ; 56 _dataend = . ;
60 } > DRAM 57 } > DRAM
61 58
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)
139 139
140void INIT_ATTR system_init(void) 140void INIT_ATTR system_init(void)
141{ 141{
142 static const int disable_clocks[] = 142 static const enum IMX31_CG_LIST disable_clocks[] INITDATA_ATTR =
143 { 143 {
144 /* CGR0 */ 144 /* CGR0 */
145 CG_SD_MMC1, 145 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 @@
294/*! 294/*!
295 * Code download 295 * Code download
296 */ 296 */
297static __attribute__((aligned(4), section(".sdmacode"))) 297static __attribute__((aligned(4))) INITDATA_ATTR
298 const short sdma_code_2[RAM_CODE_SIZE_2] = 298 const short sdma_code_2[RAM_CODE_SIZE_2] =
299{ 299{
300 0x0870, 0x0011, 0x5010, 0xc0ec, 0x7d61, 0x5ac0, 0x5bc8, 0x5ef8, 300 0x0870, 0x0011, 0x5010, 0xc0ec, 0x7d61, 0x5ac0, 0x5bc8, 0x5ef8,