diff options
author | Mike Frysinger <vapier.adi@gmail.com> | 2008-08-06 05:17:10 -0400 |
---|---|---|
committer | Bryan Wu <cooloney@kernel.org> | 2008-08-06 05:17:10 -0400 |
commit | 7e64acabfdb530b1b7d3db2592d75d102827baf3 (patch) | |
tree | 9cd5d29f86a700fa474f063462bad928d292b567 /arch | |
parent | 1375204611f417541e55ee09e248acdbbb94356d (diff) |
Blackfin arch: move async memory programming into common setup_arch() as the banks dont really need to be setup fully as early as head.S
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/blackfin/kernel/setup.c | 10 | ||||
-rw-r--r-- | arch/blackfin/mach-bf527/head.S | 22 | ||||
-rw-r--r-- | arch/blackfin/mach-bf533/head.S | 22 | ||||
-rw-r--r-- | arch/blackfin/mach-bf537/head.S | 22 | ||||
-rw-r--r-- | arch/blackfin/mach-bf548/head.S | 42 | ||||
-rw-r--r-- | arch/blackfin/mach-bf561/head.S | 22 |
6 files changed, 10 insertions, 130 deletions
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index 23e637eb78da..15967e7578cd 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c | |||
@@ -738,6 +738,16 @@ void __init setup_arch(char **cmdline_p) | |||
738 | 738 | ||
739 | memory_setup(); | 739 | memory_setup(); |
740 | 740 | ||
741 | /* Initialize Async memory banks */ | ||
742 | bfin_write_EBIU_AMBCTL0(AMBCTL0VAL); | ||
743 | bfin_write_EBIU_AMBCTL1(AMBCTL1VAL); | ||
744 | bfin_write_EBIU_AMGCTL(AMGCTLVAL); | ||
745 | #ifdef CONFIG_EBIU_MBSCTLVAL | ||
746 | bfin_write_EBIU_MBSCTL(CONFIG_EBIU_MBSCTLVAL); | ||
747 | bfin_write_EBIU_MODE(CONFIG_EBIU_MODEVAL); | ||
748 | bfin_write_EBIU_FCTL(CONFIG_EBIU_FCTLVAL); | ||
749 | #endif | ||
750 | |||
741 | cclk = get_cclk(); | 751 | cclk = get_cclk(); |
742 | sclk = get_sclk(); | 752 | sclk = get_sclk(); |
743 | 753 | ||
diff --git a/arch/blackfin/mach-bf527/head.S b/arch/blackfin/mach-bf527/head.S index 180d3c85a4c1..9173dcecd158 100644 --- a/arch/blackfin/mach-bf527/head.S +++ b/arch/blackfin/mach-bf527/head.S | |||
@@ -170,28 +170,6 @@ ENTRY(__start) | |||
170 | call _start_dma_code; | 170 | call _start_dma_code; |
171 | #endif | 171 | #endif |
172 | 172 | ||
173 | /* Code for initializing Async memory banks */ | ||
174 | |||
175 | p2.h = hi(EBIU_AMBCTL1); | ||
176 | p2.l = lo(EBIU_AMBCTL1); | ||
177 | r0.h = hi(AMBCTL1VAL); | ||
178 | r0.l = lo(AMBCTL1VAL); | ||
179 | [p2] = r0; | ||
180 | ssync; | ||
181 | |||
182 | p2.h = hi(EBIU_AMBCTL0); | ||
183 | p2.l = lo(EBIU_AMBCTL0); | ||
184 | r0.h = hi(AMBCTL0VAL); | ||
185 | r0.l = lo(AMBCTL0VAL); | ||
186 | [p2] = r0; | ||
187 | ssync; | ||
188 | |||
189 | p2.h = hi(EBIU_AMGCTL); | ||
190 | p2.l = lo(EBIU_AMGCTL); | ||
191 | r0 = AMGCTLVAL; | ||
192 | w[p2] = r0; | ||
193 | ssync; | ||
194 | |||
195 | /* This section keeps the processor in supervisor mode | 173 | /* This section keeps the processor in supervisor mode |
196 | * during kernel boot. Switches to user mode at end of boot. | 174 | * during kernel boot. Switches to user mode at end of boot. |
197 | * See page 3-9 of Hardware Reference manual for documentation. | 175 | * See page 3-9 of Hardware Reference manual for documentation. |
diff --git a/arch/blackfin/mach-bf533/head.S b/arch/blackfin/mach-bf533/head.S index 0ffbe7a205ba..7f0a7a0c6fd6 100644 --- a/arch/blackfin/mach-bf533/head.S +++ b/arch/blackfin/mach-bf533/head.S | |||
@@ -172,28 +172,6 @@ ENTRY(__start) | |||
172 | call _start_dma_code; | 172 | call _start_dma_code; |
173 | #endif | 173 | #endif |
174 | 174 | ||
175 | /* Code for initializing Async memory banks */ | ||
176 | |||
177 | p2.h = hi(EBIU_AMBCTL1); | ||
178 | p2.l = lo(EBIU_AMBCTL1); | ||
179 | r0.h = hi(AMBCTL1VAL); | ||
180 | r0.l = lo(AMBCTL1VAL); | ||
181 | [p2] = r0; | ||
182 | ssync; | ||
183 | |||
184 | p2.h = hi(EBIU_AMBCTL0); | ||
185 | p2.l = lo(EBIU_AMBCTL0); | ||
186 | r0.h = hi(AMBCTL0VAL); | ||
187 | r0.l = lo(AMBCTL0VAL); | ||
188 | [p2] = r0; | ||
189 | ssync; | ||
190 | |||
191 | p2.h = hi(EBIU_AMGCTL); | ||
192 | p2.l = lo(EBIU_AMGCTL); | ||
193 | r0 = AMGCTLVAL; | ||
194 | w[p2] = r0; | ||
195 | ssync; | ||
196 | |||
197 | /* This section keeps the processor in supervisor mode | 175 | /* This section keeps the processor in supervisor mode |
198 | * during kernel boot. Switches to user mode at end of boot. | 176 | * during kernel boot. Switches to user mode at end of boot. |
199 | * See page 3-9 of Hardware Reference manual for documentation. | 177 | * See page 3-9 of Hardware Reference manual for documentation. |
diff --git a/arch/blackfin/mach-bf537/head.S b/arch/blackfin/mach-bf537/head.S index c11f0fd82255..c062acb04836 100644 --- a/arch/blackfin/mach-bf537/head.S +++ b/arch/blackfin/mach-bf537/head.S | |||
@@ -184,28 +184,6 @@ ENTRY(__start) | |||
184 | call _start_dma_code; | 184 | call _start_dma_code; |
185 | #endif | 185 | #endif |
186 | 186 | ||
187 | /* Code for initializing Async memory banks */ | ||
188 | |||
189 | p2.h = hi(EBIU_AMBCTL1); | ||
190 | p2.l = lo(EBIU_AMBCTL1); | ||
191 | r0.h = hi(AMBCTL1VAL); | ||
192 | r0.l = lo(AMBCTL1VAL); | ||
193 | [p2] = r0; | ||
194 | ssync; | ||
195 | |||
196 | p2.h = hi(EBIU_AMBCTL0); | ||
197 | p2.l = lo(EBIU_AMBCTL0); | ||
198 | r0.h = hi(AMBCTL0VAL); | ||
199 | r0.l = lo(AMBCTL0VAL); | ||
200 | [p2] = r0; | ||
201 | ssync; | ||
202 | |||
203 | p2.h = hi(EBIU_AMGCTL); | ||
204 | p2.l = lo(EBIU_AMGCTL); | ||
205 | r0 = AMGCTLVAL; | ||
206 | w[p2] = r0; | ||
207 | ssync; | ||
208 | |||
209 | /* This section keeps the processor in supervisor mode | 187 | /* This section keeps the processor in supervisor mode |
210 | * during kernel boot. Switches to user mode at end of boot. | 188 | * during kernel boot. Switches to user mode at end of boot. |
211 | * See page 3-9 of Hardware Reference manual for documentation. | 189 | * See page 3-9 of Hardware Reference manual for documentation. |
diff --git a/arch/blackfin/mach-bf548/head.S b/arch/blackfin/mach-bf548/head.S index 96fbdb790a98..832a8d7212ac 100644 --- a/arch/blackfin/mach-bf548/head.S +++ b/arch/blackfin/mach-bf548/head.S | |||
@@ -133,48 +133,6 @@ ENTRY(__start) | |||
133 | #ifdef CONFIG_BFIN_KERNEL_CLOCK | 133 | #ifdef CONFIG_BFIN_KERNEL_CLOCK |
134 | call _start_dma_code; | 134 | call _start_dma_code; |
135 | #endif | 135 | #endif |
136 | /* Code for initializing Async memory banks */ | ||
137 | |||
138 | p2.h = hi(EBIU_AMBCTL1); | ||
139 | p2.l = lo(EBIU_AMBCTL1); | ||
140 | r0.h = hi(AMBCTL1VAL); | ||
141 | r0.l = lo(AMBCTL1VAL); | ||
142 | [p2] = r0; | ||
143 | ssync; | ||
144 | |||
145 | p2.h = hi(EBIU_AMBCTL0); | ||
146 | p2.l = lo(EBIU_AMBCTL0); | ||
147 | r0.h = hi(AMBCTL0VAL); | ||
148 | r0.l = lo(AMBCTL0VAL); | ||
149 | [p2] = r0; | ||
150 | ssync; | ||
151 | |||
152 | p2.h = hi(EBIU_AMGCTL); | ||
153 | p2.l = lo(EBIU_AMGCTL); | ||
154 | r0 = AMGCTLVAL; | ||
155 | w[p2] = r0; | ||
156 | ssync; | ||
157 | |||
158 | p2.h = hi(EBIU_MBSCTL); | ||
159 | p2.l = lo(EBIU_MBSCTL); | ||
160 | r0.h = hi(CONFIG_EBIU_MBSCTLVAL); | ||
161 | r0.l = lo(CONFIG_EBIU_MBSCTLVAL); | ||
162 | [p2] = r0; | ||
163 | ssync; | ||
164 | |||
165 | p2.h = hi(EBIU_MODE); | ||
166 | p2.l = lo(EBIU_MODE); | ||
167 | r0.h = hi(CONFIG_EBIU_MODEVAL); | ||
168 | r0.l = lo(CONFIG_EBIU_MODEVAL); | ||
169 | [p2] = r0; | ||
170 | ssync; | ||
171 | |||
172 | p2.h = hi(EBIU_FCTL); | ||
173 | p2.l = lo(EBIU_FCTL); | ||
174 | r0.h = hi(CONFIG_EBIU_FCTLVAL); | ||
175 | r0.l = lo(CONFIG_EBIU_FCTLVAL); | ||
176 | [p2] = r0; | ||
177 | ssync; | ||
178 | 136 | ||
179 | /* This section keeps the processor in supervisor mode | 137 | /* This section keeps the processor in supervisor mode |
180 | * during kernel boot. Switches to user mode at end of boot. | 138 | * during kernel boot. Switches to user mode at end of boot. |
diff --git a/arch/blackfin/mach-bf561/head.S b/arch/blackfin/mach-bf561/head.S index 553b2d149d71..c541b312c25d 100644 --- a/arch/blackfin/mach-bf561/head.S +++ b/arch/blackfin/mach-bf561/head.S | |||
@@ -161,28 +161,6 @@ ENTRY(__start) | |||
161 | call _start_dma_code; | 161 | call _start_dma_code; |
162 | #endif | 162 | #endif |
163 | 163 | ||
164 | /* Code for initializing Async memory banks */ | ||
165 | |||
166 | p2.h = hi(EBIU_AMBCTL1); | ||
167 | p2.l = lo(EBIU_AMBCTL1); | ||
168 | r0.h = hi(AMBCTL1VAL); | ||
169 | r0.l = lo(AMBCTL1VAL); | ||
170 | [p2] = r0; | ||
171 | ssync; | ||
172 | |||
173 | p2.h = hi(EBIU_AMBCTL0); | ||
174 | p2.l = lo(EBIU_AMBCTL0); | ||
175 | r0.h = hi(AMBCTL0VAL); | ||
176 | r0.l = lo(AMBCTL0VAL); | ||
177 | [p2] = r0; | ||
178 | ssync; | ||
179 | |||
180 | p2.h = hi(EBIU_AMGCTL); | ||
181 | p2.l = lo(EBIU_AMGCTL); | ||
182 | r0 = AMGCTLVAL; | ||
183 | w[p2] = r0; | ||
184 | ssync; | ||
185 | |||
186 | /* This section keeps the processor in supervisor mode | 164 | /* This section keeps the processor in supervisor mode |
187 | * during kernel boot. Switches to user mode at end of boot. | 165 | * during kernel boot. Switches to user mode at end of boot. |
188 | * See page 3-9 of Hardware Reference manual for documentation. | 166 | * See page 3-9 of Hardware Reference manual for documentation. |