diff options
Diffstat (limited to 'firmware/target/arm')
-rw-r--r-- | firmware/target/arm/i2c-pp.c | 2 | ||||
-rw-r--r-- | firmware/target/arm/ipod/1g2g/adc-ipod-1g2g.c | 2 | ||||
-rw-r--r-- | firmware/target/arm/ipod/app.lds | 56 | ||||
-rw-r--r-- | firmware/target/arm/ipod/boot.lds | 2 | ||||
-rw-r--r-- | firmware/target/arm/iriver/app.lds | 56 | ||||
-rw-r--r-- | firmware/target/arm/iriver/boot.lds | 2 | ||||
-rw-r--r-- | firmware/target/arm/iriver/h10/lcd-h10_20gb.c | 2 | ||||
-rw-r--r-- | firmware/target/arm/olympus/app.lds | 56 | ||||
-rw-r--r-- | firmware/target/arm/olympus/boot.lds | 2 | ||||
-rw-r--r-- | firmware/target/arm/pcm-pp.c | 6 | ||||
-rw-r--r-- | firmware/target/arm/sandisk/app.lds | 56 | ||||
-rw-r--r-- | firmware/target/arm/sandisk/ata-c200_e200.c | 2 | ||||
-rw-r--r-- | firmware/target/arm/sandisk/boot.lds | 2 | ||||
-rw-r--r-- | firmware/target/arm/sandisk/sansa-c200/lcd-c200.c | 2 | ||||
-rw-r--r-- | firmware/target/arm/sandisk/sansa-e200/lcd-e200.c | 4 | ||||
-rw-r--r-- | firmware/target/arm/system-target.h | 2 | ||||
-rw-r--r-- | firmware/target/arm/tcc780x/ata-nand-tcc780x.c | 2 |
17 files changed, 204 insertions, 52 deletions
diff --git a/firmware/target/arm/i2c-pp.c b/firmware/target/arm/i2c-pp.c index 450effc32d..40eb80cfe1 100644 --- a/firmware/target/arm/i2c-pp.c +++ b/firmware/target/arm/i2c-pp.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include "as3514.h" | 33 | #include "as3514.h" |
34 | 34 | ||
35 | /* Local functions definitions */ | 35 | /* Local functions definitions */ |
36 | static struct mutex i2c_mtx NOCACHEBSS_ATTR; | 36 | static struct mutex i2c_mtx SHAREDBSS_ATTR; |
37 | 37 | ||
38 | #define POLL_TIMEOUT (HZ) | 38 | #define POLL_TIMEOUT (HZ) |
39 | 39 | ||
diff --git a/firmware/target/arm/ipod/1g2g/adc-ipod-1g2g.c b/firmware/target/arm/ipod/1g2g/adc-ipod-1g2g.c index f80412023d..564eb2e642 100644 --- a/firmware/target/arm/ipod/1g2g/adc-ipod-1g2g.c +++ b/firmware/target/arm/ipod/1g2g/adc-ipod-1g2g.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #include "hwcompat.h" | 22 | #include "hwcompat.h" |
23 | #include "kernel.h" | 23 | #include "kernel.h" |
24 | 24 | ||
25 | static struct mutex adc_mtx NOCACHEBSS_ATTR; | 25 | static struct mutex adc_mtx SHAREDBSS_ATTR; |
26 | 26 | ||
27 | /* used in the 2nd gen ADC interrupt */ | 27 | /* used in the 2nd gen ADC interrupt */ |
28 | static unsigned int_data; | 28 | static unsigned int_data; |
diff --git a/firmware/target/arm/ipod/app.lds b/firmware/target/arm/ipod/app.lds index 765a5f0389..54af494d72 100644 --- a/firmware/target/arm/ipod/app.lds +++ b/firmware/target/arm/ipod/app.lds | |||
@@ -21,6 +21,14 @@ INPUT(target/arm/crt0-pp.o) | |||
21 | #define IRAMORIG 0x40000000 | 21 | #define IRAMORIG 0x40000000 |
22 | #define IRAMSIZE 0xc000 | 22 | #define IRAMSIZE 0xc000 |
23 | 23 | ||
24 | #ifdef CPU_PP502x | ||
25 | #define NOCACHE_BASE 0x10000000 | ||
26 | #else | ||
27 | #define NOCACHE_BASE 0x28000000 | ||
28 | #endif | ||
29 | |||
30 | #define CACHEALIGN_SIZE 16 | ||
31 | |||
24 | /* End of the audio buffer, where the codec buffer starts */ | 32 | /* End of the audio buffer, where the codec buffer starts */ |
25 | #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE) | 33 | #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE) |
26 | 34 | ||
@@ -70,6 +78,18 @@ SECTIONS | |||
70 | _dataend = .; | 78 | _dataend = .; |
71 | } > DRAM | 79 | } > DRAM |
72 | 80 | ||
81 | #if NOCACHE_BASE != 0 | ||
82 | /* .ncdata section is placed at uncached physical alias address and is | ||
83 | * loaded at the proper cached virtual address - no copying is | ||
84 | * performed in the init code */ | ||
85 | .ncdata . + NOCACHE_BASE : | ||
86 | { | ||
87 | . = ALIGN(CACHEALIGN_SIZE); | ||
88 | *(.ncdata*) | ||
89 | . = ALIGN(CACHEALIGN_SIZE); | ||
90 | } AT> DRAM | ||
91 | #endif | ||
92 | |||
73 | /DISCARD/ : | 93 | /DISCARD/ : |
74 | { | 94 | { |
75 | *(.eh_frame) | 95 | *(.eh_frame) |
@@ -103,7 +123,7 @@ SECTIONS | |||
103 | _iend = .; | 123 | _iend = .; |
104 | } > IRAM | 124 | } > IRAM |
105 | 125 | ||
106 | .idle_stacks : | 126 | .idle_stacks (NOLOAD) : |
107 | { | 127 | { |
108 | *(.idle_stacks) | 128 | *(.idle_stacks) |
109 | #if NUM_CORES > 1 | 129 | #if NUM_CORES > 1 |
@@ -116,7 +136,7 @@ SECTIONS | |||
116 | cop_idlestackend = .; | 136 | cop_idlestackend = .; |
117 | } > IRAM | 137 | } > IRAM |
118 | 138 | ||
119 | .stack : | 139 | .stack (NOLOAD) : |
120 | { | 140 | { |
121 | *(.stack) | 141 | *(.stack) |
122 | stackbegin = .; | 142 | stackbegin = .; |
@@ -124,37 +144,53 @@ SECTIONS | |||
124 | stackend = .; | 144 | stackend = .; |
125 | } > IRAM | 145 | } > IRAM |
126 | 146 | ||
127 | .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram) + SIZEOF(.vectors): | 147 | /* .bss and .ncbss are treated as a single section to use one init loop to |
148 | * zero it - note "_edata" and "_end" */ | ||
149 | .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.ncdata) +\ | ||
150 | SIZEOF(.iram) + SIZEOF(.vectors) (NOLOAD) : | ||
128 | { | 151 | { |
129 | _edata = .; | 152 | _edata = .; |
130 | *(.bss*) | 153 | *(.bss*) |
131 | *(COMMON) | 154 | *(COMMON) |
132 | . = ALIGN(0x4); | 155 | . = ALIGN(0x4); |
133 | _end = .; | ||
134 | } > DRAM | 156 | } > DRAM |
135 | 157 | ||
136 | .audiobuf ALIGN(4) : | 158 | #if NOCACHE_BASE != 0 |
159 | .ncbss . + NOCACHE_BASE (NOLOAD): | ||
160 | { | ||
161 | . = ALIGN(CACHEALIGN_SIZE); | ||
162 | *(.ncbss*) | ||
163 | . = ALIGN(CACHEALIGN_SIZE); | ||
164 | } AT> DRAM | ||
165 | #endif | ||
166 | |||
167 | /* This will be aligned by preceding alignments */ | ||
168 | .endaddr . - NOCACHE_BASE (NOLOAD) : | ||
169 | { | ||
170 | _end = .; | ||
171 | } > DRAM | ||
172 | |||
173 | .audiobuf (NOLOAD) : | ||
137 | { | 174 | { |
138 | _audiobuffer = .; | 175 | _audiobuffer = .; |
139 | audiobuffer = .; | 176 | audiobuffer = .; |
140 | } > DRAM | 177 | } > DRAM |
141 | 178 | ||
142 | .audiobufend ENDAUDIOADDR: | 179 | .audiobufend ENDAUDIOADDR (NOLOAD) : |
143 | { | 180 | { |
144 | audiobufend = .; | 181 | audiobufend = .; |
145 | _audiobufend = .; | 182 | _audiobufend = .; |
146 | } > DRAM | 183 | } > DRAM |
147 | 184 | ||
148 | .codec ENDAUDIOADDR: | 185 | .codec ENDAUDIOADDR (NOLOAD) : |
149 | { | 186 | { |
150 | codecbuf = .; | 187 | codecbuf = .; |
151 | _codecbuf = .; | 188 | _codecbuf = .; |
152 | } | 189 | } |
153 | 190 | ||
154 | .plugin ENDADDR: | 191 | .plugin ENDADDR (NOLOAD) : |
155 | { | 192 | { |
156 | _pluginbuf = .; | 193 | _pluginbuf = .; |
157 | pluginbuf = .; | 194 | pluginbuf = .; |
158 | } | 195 | } |
159 | } | 196 | } |
160 | |||
diff --git a/firmware/target/arm/ipod/boot.lds b/firmware/target/arm/ipod/boot.lds index 2f2f4f91a1..1f9c65d31c 100644 --- a/firmware/target/arm/ipod/boot.lds +++ b/firmware/target/arm/ipod/boot.lds | |||
@@ -43,6 +43,7 @@ SECTIONS | |||
43 | *(.irodata) | 43 | *(.irodata) |
44 | *(.idata) | 44 | *(.idata) |
45 | *(.data*) | 45 | *(.data*) |
46 | *(.ncdata*); | ||
46 | _dataend = . ; | 47 | _dataend = . ; |
47 | } | 48 | } |
48 | 49 | ||
@@ -64,6 +65,7 @@ SECTIONS | |||
64 | _edata = .; | 65 | _edata = .; |
65 | *(.bss*); | 66 | *(.bss*); |
66 | *(.ibss); | 67 | *(.ibss); |
68 | *(.ncbss*); | ||
67 | _end = .; | 69 | _end = .; |
68 | } | 70 | } |
69 | } | 71 | } |
diff --git a/firmware/target/arm/iriver/app.lds b/firmware/target/arm/iriver/app.lds index 765a5f0389..54af494d72 100644 --- a/firmware/target/arm/iriver/app.lds +++ b/firmware/target/arm/iriver/app.lds | |||
@@ -21,6 +21,14 @@ INPUT(target/arm/crt0-pp.o) | |||
21 | #define IRAMORIG 0x40000000 | 21 | #define IRAMORIG 0x40000000 |
22 | #define IRAMSIZE 0xc000 | 22 | #define IRAMSIZE 0xc000 |
23 | 23 | ||
24 | #ifdef CPU_PP502x | ||
25 | #define NOCACHE_BASE 0x10000000 | ||
26 | #else | ||
27 | #define NOCACHE_BASE 0x28000000 | ||
28 | #endif | ||
29 | |||
30 | #define CACHEALIGN_SIZE 16 | ||
31 | |||
24 | /* End of the audio buffer, where the codec buffer starts */ | 32 | /* End of the audio buffer, where the codec buffer starts */ |
25 | #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE) | 33 | #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE) |
26 | 34 | ||
@@ -70,6 +78,18 @@ SECTIONS | |||
70 | _dataend = .; | 78 | _dataend = .; |
71 | } > DRAM | 79 | } > DRAM |
72 | 80 | ||
81 | #if NOCACHE_BASE != 0 | ||
82 | /* .ncdata section is placed at uncached physical alias address and is | ||
83 | * loaded at the proper cached virtual address - no copying is | ||
84 | * performed in the init code */ | ||
85 | .ncdata . + NOCACHE_BASE : | ||
86 | { | ||
87 | . = ALIGN(CACHEALIGN_SIZE); | ||
88 | *(.ncdata*) | ||
89 | . = ALIGN(CACHEALIGN_SIZE); | ||
90 | } AT> DRAM | ||
91 | #endif | ||
92 | |||
73 | /DISCARD/ : | 93 | /DISCARD/ : |
74 | { | 94 | { |
75 | *(.eh_frame) | 95 | *(.eh_frame) |
@@ -103,7 +123,7 @@ SECTIONS | |||
103 | _iend = .; | 123 | _iend = .; |
104 | } > IRAM | 124 | } > IRAM |
105 | 125 | ||
106 | .idle_stacks : | 126 | .idle_stacks (NOLOAD) : |
107 | { | 127 | { |
108 | *(.idle_stacks) | 128 | *(.idle_stacks) |
109 | #if NUM_CORES > 1 | 129 | #if NUM_CORES > 1 |
@@ -116,7 +136,7 @@ SECTIONS | |||
116 | cop_idlestackend = .; | 136 | cop_idlestackend = .; |
117 | } > IRAM | 137 | } > IRAM |
118 | 138 | ||
119 | .stack : | 139 | .stack (NOLOAD) : |
120 | { | 140 | { |
121 | *(.stack) | 141 | *(.stack) |
122 | stackbegin = .; | 142 | stackbegin = .; |
@@ -124,37 +144,53 @@ SECTIONS | |||
124 | stackend = .; | 144 | stackend = .; |
125 | } > IRAM | 145 | } > IRAM |
126 | 146 | ||
127 | .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram) + SIZEOF(.vectors): | 147 | /* .bss and .ncbss are treated as a single section to use one init loop to |
148 | * zero it - note "_edata" and "_end" */ | ||
149 | .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.ncdata) +\ | ||
150 | SIZEOF(.iram) + SIZEOF(.vectors) (NOLOAD) : | ||
128 | { | 151 | { |
129 | _edata = .; | 152 | _edata = .; |
130 | *(.bss*) | 153 | *(.bss*) |
131 | *(COMMON) | 154 | *(COMMON) |
132 | . = ALIGN(0x4); | 155 | . = ALIGN(0x4); |
133 | _end = .; | ||
134 | } > DRAM | 156 | } > DRAM |
135 | 157 | ||
136 | .audiobuf ALIGN(4) : | 158 | #if NOCACHE_BASE != 0 |
159 | .ncbss . + NOCACHE_BASE (NOLOAD): | ||
160 | { | ||
161 | . = ALIGN(CACHEALIGN_SIZE); | ||
162 | *(.ncbss*) | ||
163 | . = ALIGN(CACHEALIGN_SIZE); | ||
164 | } AT> DRAM | ||
165 | #endif | ||
166 | |||
167 | /* This will be aligned by preceding alignments */ | ||
168 | .endaddr . - NOCACHE_BASE (NOLOAD) : | ||
169 | { | ||
170 | _end = .; | ||
171 | } > DRAM | ||
172 | |||
173 | .audiobuf (NOLOAD) : | ||
137 | { | 174 | { |
138 | _audiobuffer = .; | 175 | _audiobuffer = .; |
139 | audiobuffer = .; | 176 | audiobuffer = .; |
140 | } > DRAM | 177 | } > DRAM |
141 | 178 | ||
142 | .audiobufend ENDAUDIOADDR: | 179 | .audiobufend ENDAUDIOADDR (NOLOAD) : |
143 | { | 180 | { |
144 | audiobufend = .; | 181 | audiobufend = .; |
145 | _audiobufend = .; | 182 | _audiobufend = .; |
146 | } > DRAM | 183 | } > DRAM |
147 | 184 | ||
148 | .codec ENDAUDIOADDR: | 185 | .codec ENDAUDIOADDR (NOLOAD) : |
149 | { | 186 | { |
150 | codecbuf = .; | 187 | codecbuf = .; |
151 | _codecbuf = .; | 188 | _codecbuf = .; |
152 | } | 189 | } |
153 | 190 | ||
154 | .plugin ENDADDR: | 191 | .plugin ENDADDR (NOLOAD) : |
155 | { | 192 | { |
156 | _pluginbuf = .; | 193 | _pluginbuf = .; |
157 | pluginbuf = .; | 194 | pluginbuf = .; |
158 | } | 195 | } |
159 | } | 196 | } |
160 | |||
diff --git a/firmware/target/arm/iriver/boot.lds b/firmware/target/arm/iriver/boot.lds index 5fbe999333..971ec6627b 100644 --- a/firmware/target/arm/iriver/boot.lds +++ b/firmware/target/arm/iriver/boot.lds | |||
@@ -27,6 +27,7 @@ SECTIONS | |||
27 | *(.irodata) | 27 | *(.irodata) |
28 | *(.idata) | 28 | *(.idata) |
29 | *(.data*) | 29 | *(.data*) |
30 | *(.ncdata*); | ||
30 | _dataend = . ; | 31 | _dataend = . ; |
31 | } | 32 | } |
32 | 33 | ||
@@ -48,6 +49,7 @@ SECTIONS | |||
48 | _edata = .; | 49 | _edata = .; |
49 | *(.bss*); | 50 | *(.bss*); |
50 | *(.ibss); | 51 | *(.ibss); |
52 | *(.ncbss*); | ||
51 | _end = .; | 53 | _end = .; |
52 | } | 54 | } |
53 | } | 55 | } |
diff --git a/firmware/target/arm/iriver/h10/lcd-h10_20gb.c b/firmware/target/arm/iriver/h10/lcd-h10_20gb.c index 1c4116d2e7..1ee43c390f 100644 --- a/firmware/target/arm/iriver/h10/lcd-h10_20gb.c +++ b/firmware/target/arm/iriver/h10/lcd-h10_20gb.c | |||
@@ -34,7 +34,7 @@ static unsigned short disp_control_rev; | |||
34 | /* Contrast setting << 8 */ | 34 | /* Contrast setting << 8 */ |
35 | static int lcd_contrast; | 35 | static int lcd_contrast; |
36 | 36 | ||
37 | static unsigned lcd_yuv_options NOCACHEBSS_ATTR = 0; | 37 | static unsigned lcd_yuv_options SHAREDBSS_ATTR = 0; |
38 | 38 | ||
39 | /* Forward declarations */ | 39 | /* Forward declarations */ |
40 | static void lcd_display_off(void); | 40 | static void lcd_display_off(void); |
diff --git a/firmware/target/arm/olympus/app.lds b/firmware/target/arm/olympus/app.lds index 765a5f0389..54af494d72 100644 --- a/firmware/target/arm/olympus/app.lds +++ b/firmware/target/arm/olympus/app.lds | |||
@@ -21,6 +21,14 @@ INPUT(target/arm/crt0-pp.o) | |||
21 | #define IRAMORIG 0x40000000 | 21 | #define IRAMORIG 0x40000000 |
22 | #define IRAMSIZE 0xc000 | 22 | #define IRAMSIZE 0xc000 |
23 | 23 | ||
24 | #ifdef CPU_PP502x | ||
25 | #define NOCACHE_BASE 0x10000000 | ||
26 | #else | ||
27 | #define NOCACHE_BASE 0x28000000 | ||
28 | #endif | ||
29 | |||
30 | #define CACHEALIGN_SIZE 16 | ||
31 | |||
24 | /* End of the audio buffer, where the codec buffer starts */ | 32 | /* End of the audio buffer, where the codec buffer starts */ |
25 | #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE) | 33 | #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE) |
26 | 34 | ||
@@ -70,6 +78,18 @@ SECTIONS | |||
70 | _dataend = .; | 78 | _dataend = .; |
71 | } > DRAM | 79 | } > DRAM |
72 | 80 | ||
81 | #if NOCACHE_BASE != 0 | ||
82 | /* .ncdata section is placed at uncached physical alias address and is | ||
83 | * loaded at the proper cached virtual address - no copying is | ||
84 | * performed in the init code */ | ||
85 | .ncdata . + NOCACHE_BASE : | ||
86 | { | ||
87 | . = ALIGN(CACHEALIGN_SIZE); | ||
88 | *(.ncdata*) | ||
89 | . = ALIGN(CACHEALIGN_SIZE); | ||
90 | } AT> DRAM | ||
91 | #endif | ||
92 | |||
73 | /DISCARD/ : | 93 | /DISCARD/ : |
74 | { | 94 | { |
75 | *(.eh_frame) | 95 | *(.eh_frame) |
@@ -103,7 +123,7 @@ SECTIONS | |||
103 | _iend = .; | 123 | _iend = .; |
104 | } > IRAM | 124 | } > IRAM |
105 | 125 | ||
106 | .idle_stacks : | 126 | .idle_stacks (NOLOAD) : |
107 | { | 127 | { |
108 | *(.idle_stacks) | 128 | *(.idle_stacks) |
109 | #if NUM_CORES > 1 | 129 | #if NUM_CORES > 1 |
@@ -116,7 +136,7 @@ SECTIONS | |||
116 | cop_idlestackend = .; | 136 | cop_idlestackend = .; |
117 | } > IRAM | 137 | } > IRAM |
118 | 138 | ||
119 | .stack : | 139 | .stack (NOLOAD) : |
120 | { | 140 | { |
121 | *(.stack) | 141 | *(.stack) |
122 | stackbegin = .; | 142 | stackbegin = .; |
@@ -124,37 +144,53 @@ SECTIONS | |||
124 | stackend = .; | 144 | stackend = .; |
125 | } > IRAM | 145 | } > IRAM |
126 | 146 | ||
127 | .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram) + SIZEOF(.vectors): | 147 | /* .bss and .ncbss are treated as a single section to use one init loop to |
148 | * zero it - note "_edata" and "_end" */ | ||
149 | .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.ncdata) +\ | ||
150 | SIZEOF(.iram) + SIZEOF(.vectors) (NOLOAD) : | ||
128 | { | 151 | { |
129 | _edata = .; | 152 | _edata = .; |
130 | *(.bss*) | 153 | *(.bss*) |
131 | *(COMMON) | 154 | *(COMMON) |
132 | . = ALIGN(0x4); | 155 | . = ALIGN(0x4); |
133 | _end = .; | ||
134 | } > DRAM | 156 | } > DRAM |
135 | 157 | ||
136 | .audiobuf ALIGN(4) : | 158 | #if NOCACHE_BASE != 0 |
159 | .ncbss . + NOCACHE_BASE (NOLOAD): | ||
160 | { | ||
161 | . = ALIGN(CACHEALIGN_SIZE); | ||
162 | *(.ncbss*) | ||
163 | . = ALIGN(CACHEALIGN_SIZE); | ||
164 | } AT> DRAM | ||
165 | #endif | ||
166 | |||
167 | /* This will be aligned by preceding alignments */ | ||
168 | .endaddr . - NOCACHE_BASE (NOLOAD) : | ||
169 | { | ||
170 | _end = .; | ||
171 | } > DRAM | ||
172 | |||
173 | .audiobuf (NOLOAD) : | ||
137 | { | 174 | { |
138 | _audiobuffer = .; | 175 | _audiobuffer = .; |
139 | audiobuffer = .; | 176 | audiobuffer = .; |
140 | } > DRAM | 177 | } > DRAM |
141 | 178 | ||
142 | .audiobufend ENDAUDIOADDR: | 179 | .audiobufend ENDAUDIOADDR (NOLOAD) : |
143 | { | 180 | { |
144 | audiobufend = .; | 181 | audiobufend = .; |
145 | _audiobufend = .; | 182 | _audiobufend = .; |
146 | } > DRAM | 183 | } > DRAM |
147 | 184 | ||
148 | .codec ENDAUDIOADDR: | 185 | .codec ENDAUDIOADDR (NOLOAD) : |
149 | { | 186 | { |
150 | codecbuf = .; | 187 | codecbuf = .; |
151 | _codecbuf = .; | 188 | _codecbuf = .; |
152 | } | 189 | } |
153 | 190 | ||
154 | .plugin ENDADDR: | 191 | .plugin ENDADDR (NOLOAD) : |
155 | { | 192 | { |
156 | _pluginbuf = .; | 193 | _pluginbuf = .; |
157 | pluginbuf = .; | 194 | pluginbuf = .; |
158 | } | 195 | } |
159 | } | 196 | } |
160 | |||
diff --git a/firmware/target/arm/olympus/boot.lds b/firmware/target/arm/olympus/boot.lds index 5fbe999333..2c0245072c 100644 --- a/firmware/target/arm/olympus/boot.lds +++ b/firmware/target/arm/olympus/boot.lds | |||
@@ -27,6 +27,7 @@ SECTIONS | |||
27 | *(.irodata) | 27 | *(.irodata) |
28 | *(.idata) | 28 | *(.idata) |
29 | *(.data*) | 29 | *(.data*) |
30 | *(.ncdata*) | ||
30 | _dataend = . ; | 31 | _dataend = . ; |
31 | } | 32 | } |
32 | 33 | ||
@@ -48,6 +49,7 @@ SECTIONS | |||
48 | _edata = .; | 49 | _edata = .; |
49 | *(.bss*); | 50 | *(.bss*); |
50 | *(.ibss); | 51 | *(.ibss); |
52 | *(.ncbss*); | ||
51 | _end = .; | 53 | _end = .; |
52 | } | 54 | } |
53 | } | 55 | } |
diff --git a/firmware/target/arm/pcm-pp.c b/firmware/target/arm/pcm-pp.c index 433e6e1e4f..64c6d0cdc8 100644 --- a/firmware/target/arm/pcm-pp.c +++ b/firmware/target/arm/pcm-pp.c | |||
@@ -72,7 +72,7 @@ void fiq_handler(void) | |||
72 | /**************************************************************************** | 72 | /**************************************************************************** |
73 | ** Playback DMA transfer | 73 | ** Playback DMA transfer |
74 | **/ | 74 | **/ |
75 | struct dma_data dma_play_data NOCACHEBSS_ATTR = | 75 | struct dma_data dma_play_data SHAREDBSS_ATTR = |
76 | { | 76 | { |
77 | /* Initialize to a locked, stopped state */ | 77 | /* Initialize to a locked, stopped state */ |
78 | .p = NULL, | 78 | .p = NULL, |
@@ -84,7 +84,7 @@ struct dma_data dma_play_data NOCACHEBSS_ATTR = | |||
84 | .state = 0 | 84 | .state = 0 |
85 | }; | 85 | }; |
86 | 86 | ||
87 | static unsigned long pcm_freq NOCACHEDATA_ATTR = HW_SAMPR_DEFAULT; /* 44.1 is default */ | 87 | static unsigned long pcm_freq SHAREDDATA_ATTR = HW_SAMPR_DEFAULT; /* 44.1 is default */ |
88 | #ifdef HAVE_WM8751 | 88 | #ifdef HAVE_WM8751 |
89 | /* Samplerate control for audio codec */ | 89 | /* Samplerate control for audio codec */ |
90 | static int sr_ctrl = MROBE100_44100HZ; | 90 | static int sr_ctrl = MROBE100_44100HZ; |
@@ -356,7 +356,7 @@ const void * pcm_play_dma_get_peak_buffer(int *count) | |||
356 | **/ | 356 | **/ |
357 | #ifdef HAVE_RECORDING | 357 | #ifdef HAVE_RECORDING |
358 | /* PCM recording interrupt routine lockout */ | 358 | /* PCM recording interrupt routine lockout */ |
359 | static struct dma_data dma_rec_data NOCACHEBSS_ATTR = | 359 | static struct dma_data dma_rec_data SHAREDBSS_ATTR = |
360 | { | 360 | { |
361 | /* Initialize to a locked, stopped state */ | 361 | /* Initialize to a locked, stopped state */ |
362 | .p = NULL, | 362 | .p = NULL, |
diff --git a/firmware/target/arm/sandisk/app.lds b/firmware/target/arm/sandisk/app.lds index 765a5f0389..54af494d72 100644 --- a/firmware/target/arm/sandisk/app.lds +++ b/firmware/target/arm/sandisk/app.lds | |||
@@ -21,6 +21,14 @@ INPUT(target/arm/crt0-pp.o) | |||
21 | #define IRAMORIG 0x40000000 | 21 | #define IRAMORIG 0x40000000 |
22 | #define IRAMSIZE 0xc000 | 22 | #define IRAMSIZE 0xc000 |
23 | 23 | ||
24 | #ifdef CPU_PP502x | ||
25 | #define NOCACHE_BASE 0x10000000 | ||
26 | #else | ||
27 | #define NOCACHE_BASE 0x28000000 | ||
28 | #endif | ||
29 | |||
30 | #define CACHEALIGN_SIZE 16 | ||
31 | |||
24 | /* End of the audio buffer, where the codec buffer starts */ | 32 | /* End of the audio buffer, where the codec buffer starts */ |
25 | #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE) | 33 | #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE) |
26 | 34 | ||
@@ -70,6 +78,18 @@ SECTIONS | |||
70 | _dataend = .; | 78 | _dataend = .; |
71 | } > DRAM | 79 | } > DRAM |
72 | 80 | ||
81 | #if NOCACHE_BASE != 0 | ||
82 | /* .ncdata section is placed at uncached physical alias address and is | ||
83 | * loaded at the proper cached virtual address - no copying is | ||
84 | * performed in the init code */ | ||
85 | .ncdata . + NOCACHE_BASE : | ||
86 | { | ||
87 | . = ALIGN(CACHEALIGN_SIZE); | ||
88 | *(.ncdata*) | ||
89 | . = ALIGN(CACHEALIGN_SIZE); | ||
90 | } AT> DRAM | ||
91 | #endif | ||
92 | |||
73 | /DISCARD/ : | 93 | /DISCARD/ : |
74 | { | 94 | { |
75 | *(.eh_frame) | 95 | *(.eh_frame) |
@@ -103,7 +123,7 @@ SECTIONS | |||
103 | _iend = .; | 123 | _iend = .; |
104 | } > IRAM | 124 | } > IRAM |
105 | 125 | ||
106 | .idle_stacks : | 126 | .idle_stacks (NOLOAD) : |
107 | { | 127 | { |
108 | *(.idle_stacks) | 128 | *(.idle_stacks) |
109 | #if NUM_CORES > 1 | 129 | #if NUM_CORES > 1 |
@@ -116,7 +136,7 @@ SECTIONS | |||
116 | cop_idlestackend = .; | 136 | cop_idlestackend = .; |
117 | } > IRAM | 137 | } > IRAM |
118 | 138 | ||
119 | .stack : | 139 | .stack (NOLOAD) : |
120 | { | 140 | { |
121 | *(.stack) | 141 | *(.stack) |
122 | stackbegin = .; | 142 | stackbegin = .; |
@@ -124,37 +144,53 @@ SECTIONS | |||
124 | stackend = .; | 144 | stackend = .; |
125 | } > IRAM | 145 | } > IRAM |
126 | 146 | ||
127 | .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram) + SIZEOF(.vectors): | 147 | /* .bss and .ncbss are treated as a single section to use one init loop to |
148 | * zero it - note "_edata" and "_end" */ | ||
149 | .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.ncdata) +\ | ||
150 | SIZEOF(.iram) + SIZEOF(.vectors) (NOLOAD) : | ||
128 | { | 151 | { |
129 | _edata = .; | 152 | _edata = .; |
130 | *(.bss*) | 153 | *(.bss*) |
131 | *(COMMON) | 154 | *(COMMON) |
132 | . = ALIGN(0x4); | 155 | . = ALIGN(0x4); |
133 | _end = .; | ||
134 | } > DRAM | 156 | } > DRAM |
135 | 157 | ||
136 | .audiobuf ALIGN(4) : | 158 | #if NOCACHE_BASE != 0 |
159 | .ncbss . + NOCACHE_BASE (NOLOAD): | ||
160 | { | ||
161 | . = ALIGN(CACHEALIGN_SIZE); | ||
162 | *(.ncbss*) | ||
163 | . = ALIGN(CACHEALIGN_SIZE); | ||
164 | } AT> DRAM | ||
165 | #endif | ||
166 | |||
167 | /* This will be aligned by preceding alignments */ | ||
168 | .endaddr . - NOCACHE_BASE (NOLOAD) : | ||
169 | { | ||
170 | _end = .; | ||
171 | } > DRAM | ||
172 | |||
173 | .audiobuf (NOLOAD) : | ||
137 | { | 174 | { |
138 | _audiobuffer = .; | 175 | _audiobuffer = .; |
139 | audiobuffer = .; | 176 | audiobuffer = .; |
140 | } > DRAM | 177 | } > DRAM |
141 | 178 | ||
142 | .audiobufend ENDAUDIOADDR: | 179 | .audiobufend ENDAUDIOADDR (NOLOAD) : |
143 | { | 180 | { |
144 | audiobufend = .; | 181 | audiobufend = .; |
145 | _audiobufend = .; | 182 | _audiobufend = .; |
146 | } > DRAM | 183 | } > DRAM |
147 | 184 | ||
148 | .codec ENDAUDIOADDR: | 185 | .codec ENDAUDIOADDR (NOLOAD) : |
149 | { | 186 | { |
150 | codecbuf = .; | 187 | codecbuf = .; |
151 | _codecbuf = .; | 188 | _codecbuf = .; |
152 | } | 189 | } |
153 | 190 | ||
154 | .plugin ENDADDR: | 191 | .plugin ENDADDR (NOLOAD) : |
155 | { | 192 | { |
156 | _pluginbuf = .; | 193 | _pluginbuf = .; |
157 | pluginbuf = .; | 194 | pluginbuf = .; |
158 | } | 195 | } |
159 | } | 196 | } |
160 | |||
diff --git a/firmware/target/arm/sandisk/ata-c200_e200.c b/firmware/target/arm/sandisk/ata-c200_e200.c index 747cb17ca1..e4a5388978 100644 --- a/firmware/target/arm/sandisk/ata-c200_e200.c +++ b/firmware/target/arm/sandisk/ata-c200_e200.c | |||
@@ -165,7 +165,7 @@ static struct sd_card_status sd_status[NUM_VOLUMES] = | |||
165 | /* Shoot for around 75% usage */ | 165 | /* Shoot for around 75% usage */ |
166 | static long sd_stack [(DEFAULT_STACK_SIZE*2 + 0x1c0)/sizeof(long)]; | 166 | static long sd_stack [(DEFAULT_STACK_SIZE*2 + 0x1c0)/sizeof(long)]; |
167 | static const char sd_thread_name[] = "ata/sd"; | 167 | static const char sd_thread_name[] = "ata/sd"; |
168 | static struct mutex sd_mtx NOCACHEBSS_ATTR; | 168 | static struct mutex sd_mtx SHAREDBSS_ATTR; |
169 | static struct event_queue sd_queue; | 169 | static struct event_queue sd_queue; |
170 | 170 | ||
171 | /* Posted when card plugged status has changed */ | 171 | /* Posted when card plugged status has changed */ |
diff --git a/firmware/target/arm/sandisk/boot.lds b/firmware/target/arm/sandisk/boot.lds index a087a7250d..1c1066895f 100644 --- a/firmware/target/arm/sandisk/boot.lds +++ b/firmware/target/arm/sandisk/boot.lds | |||
@@ -30,6 +30,7 @@ SECTIONS | |||
30 | *(.irodata) | 30 | *(.irodata) |
31 | *(.idata) | 31 | *(.idata) |
32 | *(.data*) | 32 | *(.data*) |
33 | *(.ncdata*) | ||
33 | _dataend = . ; | 34 | _dataend = . ; |
34 | } | 35 | } |
35 | 36 | ||
@@ -51,6 +52,7 @@ SECTIONS | |||
51 | _edata = .; | 52 | _edata = .; |
52 | *(.bss*); | 53 | *(.bss*); |
53 | *(.ibss); | 54 | *(.ibss); |
55 | *(.ncbss*); | ||
54 | _end = .; | 56 | _end = .; |
55 | } | 57 | } |
56 | } | 58 | } |
diff --git a/firmware/target/arm/sandisk/sansa-c200/lcd-c200.c b/firmware/target/arm/sandisk/sansa-c200/lcd-c200.c index a629739d50..a2110f7e66 100644 --- a/firmware/target/arm/sandisk/sansa-c200/lcd-c200.c +++ b/firmware/target/arm/sandisk/sansa-c200/lcd-c200.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include "system.h" | 23 | #include "system.h" |
24 | 24 | ||
25 | /* Display status */ | 25 | /* Display status */ |
26 | static unsigned lcd_yuv_options NOCACHEBSS_ATTR = 0; | 26 | static unsigned lcd_yuv_options SHAREDBSS_ATTR = 0; |
27 | 27 | ||
28 | /* LCD command set for Samsung S6B33B2 */ | 28 | /* LCD command set for Samsung S6B33B2 */ |
29 | 29 | ||
diff --git a/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c b/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c index f2689eabbf..15263b5533 100644 --- a/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c +++ b/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c | |||
@@ -28,8 +28,8 @@ | |||
28 | 28 | ||
29 | /* Power and display status */ | 29 | /* Power and display status */ |
30 | static bool power_on = false; /* Is the power turned on? */ | 30 | static bool power_on = false; /* Is the power turned on? */ |
31 | static bool display_on NOCACHEBSS_ATTR = false; /* Is the display turned on? */ | 31 | static bool display_on SHAREDBSS_ATTR = false; /* Is the display turned on? */ |
32 | static unsigned lcd_yuv_options NOCACHEBSS_ATTR = 0; | 32 | static unsigned lcd_yuv_options SHAREDBSS_ATTR = 0; |
33 | 33 | ||
34 | /* Reverse Flag */ | 34 | /* Reverse Flag */ |
35 | #define R_DISP_CONTROL_NORMAL 0x0004 | 35 | #define R_DISP_CONTROL_NORMAL 0x0004 |
diff --git a/firmware/target/arm/system-target.h b/firmware/target/arm/system-target.h index 8dcbf0f9da..2a72b524f7 100644 --- a/firmware/target/arm/system-target.h +++ b/firmware/target/arm/system-target.h | |||
@@ -108,7 +108,7 @@ static inline unsigned int processor_id(void) | |||
108 | /* Certain data needs to be out of the way of cache line interference | 108 | /* Certain data needs to be out of the way of cache line interference |
109 | * such as data for COP use or for use with UNCACHED_ADDR */ | 109 | * such as data for COP use or for use with UNCACHED_ADDR */ |
110 | #define PROC_NEEDS_CACHEALIGN | 110 | #define PROC_NEEDS_CACHEALIGN |
111 | #define CACHEALIGN_BITS (5) /* 2^5 = 32 bytes */ | 111 | #define CACHEALIGN_BITS (4) /* 2^4 = 16 bytes */ |
112 | 112 | ||
113 | /** cache functions **/ | 113 | /** cache functions **/ |
114 | #ifndef BOOTLOADER | 114 | #ifndef BOOTLOADER |
diff --git a/firmware/target/arm/tcc780x/ata-nand-tcc780x.c b/firmware/target/arm/tcc780x/ata-nand-tcc780x.c index f6d1df96ce..b47444f3a8 100644 --- a/firmware/target/arm/tcc780x/ata-nand-tcc780x.c +++ b/firmware/target/arm/tcc780x/ata-nand-tcc780x.c | |||
@@ -42,7 +42,7 @@ static bool initialized = false; | |||
42 | static long next_yield = 0; | 42 | static long next_yield = 0; |
43 | #define MIN_YIELD_PERIOD 2000 | 43 | #define MIN_YIELD_PERIOD 2000 |
44 | 44 | ||
45 | static struct mutex ata_mtx NOCACHEBSS_ATTR; | 45 | static struct mutex ata_mtx SHAREDBSS_ATTR; |
46 | 46 | ||
47 | #define SECTOR_SIZE 512 | 47 | #define SECTOR_SIZE 512 |
48 | 48 | ||