Commit 7e64acab authored by Mike Frysinger's avatar Mike Frysinger Committed by Bryan Wu

Blackfin arch: move async memory programming into common setup_arch() as the...

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: default avatarMike Frysinger <vapier.adi@gmail.com>
Signed-off-by: default avatarBryan Wu <cooloney@kernel.org>
parent 13752046
...@@ -738,6 +738,16 @@ void __init setup_arch(char **cmdline_p) ...@@ -738,6 +738,16 @@ void __init setup_arch(char **cmdline_p)
memory_setup(); memory_setup();
/* Initialize Async memory banks */
bfin_write_EBIU_AMBCTL0(AMBCTL0VAL);
bfin_write_EBIU_AMBCTL1(AMBCTL1VAL);
bfin_write_EBIU_AMGCTL(AMGCTLVAL);
#ifdef CONFIG_EBIU_MBSCTLVAL
bfin_write_EBIU_MBSCTL(CONFIG_EBIU_MBSCTLVAL);
bfin_write_EBIU_MODE(CONFIG_EBIU_MODEVAL);
bfin_write_EBIU_FCTL(CONFIG_EBIU_FCTLVAL);
#endif
cclk = get_cclk(); cclk = get_cclk();
sclk = get_sclk(); sclk = get_sclk();
......
...@@ -170,28 +170,6 @@ ENTRY(__start) ...@@ -170,28 +170,6 @@ ENTRY(__start)
call _start_dma_code; call _start_dma_code;
#endif #endif
/* Code for initializing Async memory banks */
p2.h = hi(EBIU_AMBCTL1);
p2.l = lo(EBIU_AMBCTL1);
r0.h = hi(AMBCTL1VAL);
r0.l = lo(AMBCTL1VAL);
[p2] = r0;
ssync;
p2.h = hi(EBIU_AMBCTL0);
p2.l = lo(EBIU_AMBCTL0);
r0.h = hi(AMBCTL0VAL);
r0.l = lo(AMBCTL0VAL);
[p2] = r0;
ssync;
p2.h = hi(EBIU_AMGCTL);
p2.l = lo(EBIU_AMGCTL);
r0 = AMGCTLVAL;
w[p2] = r0;
ssync;
/* This section keeps the processor in supervisor mode /* This section keeps the processor in supervisor mode
* during kernel boot. Switches to user mode at end of boot. * during kernel boot. Switches to user mode at end of boot.
* See page 3-9 of Hardware Reference manual for documentation. * See page 3-9 of Hardware Reference manual for documentation.
......
...@@ -172,28 +172,6 @@ ENTRY(__start) ...@@ -172,28 +172,6 @@ ENTRY(__start)
call _start_dma_code; call _start_dma_code;
#endif #endif
/* Code for initializing Async memory banks */
p2.h = hi(EBIU_AMBCTL1);
p2.l = lo(EBIU_AMBCTL1);
r0.h = hi(AMBCTL1VAL);
r0.l = lo(AMBCTL1VAL);
[p2] = r0;
ssync;
p2.h = hi(EBIU_AMBCTL0);
p2.l = lo(EBIU_AMBCTL0);
r0.h = hi(AMBCTL0VAL);
r0.l = lo(AMBCTL0VAL);
[p2] = r0;
ssync;
p2.h = hi(EBIU_AMGCTL);
p2.l = lo(EBIU_AMGCTL);
r0 = AMGCTLVAL;
w[p2] = r0;
ssync;
/* This section keeps the processor in supervisor mode /* This section keeps the processor in supervisor mode
* during kernel boot. Switches to user mode at end of boot. * during kernel boot. Switches to user mode at end of boot.
* See page 3-9 of Hardware Reference manual for documentation. * See page 3-9 of Hardware Reference manual for documentation.
......
...@@ -184,28 +184,6 @@ ENTRY(__start) ...@@ -184,28 +184,6 @@ ENTRY(__start)
call _start_dma_code; call _start_dma_code;
#endif #endif
/* Code for initializing Async memory banks */
p2.h = hi(EBIU_AMBCTL1);
p2.l = lo(EBIU_AMBCTL1);
r0.h = hi(AMBCTL1VAL);
r0.l = lo(AMBCTL1VAL);
[p2] = r0;
ssync;
p2.h = hi(EBIU_AMBCTL0);
p2.l = lo(EBIU_AMBCTL0);
r0.h = hi(AMBCTL0VAL);
r0.l = lo(AMBCTL0VAL);
[p2] = r0;
ssync;
p2.h = hi(EBIU_AMGCTL);
p2.l = lo(EBIU_AMGCTL);
r0 = AMGCTLVAL;
w[p2] = r0;
ssync;
/* This section keeps the processor in supervisor mode /* This section keeps the processor in supervisor mode
* during kernel boot. Switches to user mode at end of boot. * during kernel boot. Switches to user mode at end of boot.
* See page 3-9 of Hardware Reference manual for documentation. * See page 3-9 of Hardware Reference manual for documentation.
......
...@@ -133,48 +133,6 @@ ENTRY(__start) ...@@ -133,48 +133,6 @@ ENTRY(__start)
#ifdef CONFIG_BFIN_KERNEL_CLOCK #ifdef CONFIG_BFIN_KERNEL_CLOCK
call _start_dma_code; call _start_dma_code;
#endif #endif
/* Code for initializing Async memory banks */
p2.h = hi(EBIU_AMBCTL1);
p2.l = lo(EBIU_AMBCTL1);
r0.h = hi(AMBCTL1VAL);
r0.l = lo(AMBCTL1VAL);
[p2] = r0;
ssync;
p2.h = hi(EBIU_AMBCTL0);
p2.l = lo(EBIU_AMBCTL0);
r0.h = hi(AMBCTL0VAL);
r0.l = lo(AMBCTL0VAL);
[p2] = r0;
ssync;
p2.h = hi(EBIU_AMGCTL);
p2.l = lo(EBIU_AMGCTL);
r0 = AMGCTLVAL;
w[p2] = r0;
ssync;
p2.h = hi(EBIU_MBSCTL);
p2.l = lo(EBIU_MBSCTL);
r0.h = hi(CONFIG_EBIU_MBSCTLVAL);
r0.l = lo(CONFIG_EBIU_MBSCTLVAL);
[p2] = r0;
ssync;
p2.h = hi(EBIU_MODE);
p2.l = lo(EBIU_MODE);
r0.h = hi(CONFIG_EBIU_MODEVAL);
r0.l = lo(CONFIG_EBIU_MODEVAL);
[p2] = r0;
ssync;
p2.h = hi(EBIU_FCTL);
p2.l = lo(EBIU_FCTL);
r0.h = hi(CONFIG_EBIU_FCTLVAL);
r0.l = lo(CONFIG_EBIU_FCTLVAL);
[p2] = r0;
ssync;
/* This section keeps the processor in supervisor mode /* This section keeps the processor in supervisor mode
* during kernel boot. Switches to user mode at end of boot. * during kernel boot. Switches to user mode at end of boot.
......
...@@ -161,28 +161,6 @@ ENTRY(__start) ...@@ -161,28 +161,6 @@ ENTRY(__start)
call _start_dma_code; call _start_dma_code;
#endif #endif
/* Code for initializing Async memory banks */
p2.h = hi(EBIU_AMBCTL1);
p2.l = lo(EBIU_AMBCTL1);
r0.h = hi(AMBCTL1VAL);
r0.l = lo(AMBCTL1VAL);
[p2] = r0;
ssync;
p2.h = hi(EBIU_AMBCTL0);
p2.l = lo(EBIU_AMBCTL0);
r0.h = hi(AMBCTL0VAL);
r0.l = lo(AMBCTL0VAL);
[p2] = r0;
ssync;
p2.h = hi(EBIU_AMGCTL);
p2.l = lo(EBIU_AMGCTL);
r0 = AMGCTLVAL;
w[p2] = r0;
ssync;
/* This section keeps the processor in supervisor mode /* This section keeps the processor in supervisor mode
* during kernel boot. Switches to user mode at end of boot. * during kernel boot. Switches to user mode at end of boot.
* See page 3-9 of Hardware Reference manual for documentation. * See page 3-9 of Hardware Reference manual for documentation.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment