Commit 52a07812 authored by Mike Frysinger's avatar Mike Frysinger Committed by Bryan Wu

Blackfin arch: move more of our startup code to .init so it can be freed once we are up and running

Signed-off-by: default avatarMike Frysinger <michael.frysinger@analog.com>
Signed-off-by: default avatarBryan Wu <bryan.wu@analog.com>
parent 83a5c3e3
...@@ -90,7 +90,7 @@ void __init bf53x_cache_init(void) ...@@ -90,7 +90,7 @@ void __init bf53x_cache_init(void)
#endif #endif
} }
void bf53x_relocate_l1_mem(void) void __init bf53x_relocate_l1_mem(void)
{ {
unsigned long l1_code_length; unsigned long l1_code_length;
unsigned long l1_data_a_length; unsigned long l1_data_a_length;
...@@ -411,7 +411,7 @@ static int __init topology_init(void) ...@@ -411,7 +411,7 @@ static int __init topology_init(void)
subsys_initcall(topology_init); subsys_initcall(topology_init);
#if defined(CONFIG_BLKFIN_DCACHE) || defined(CONFIG_BLKFIN_CACHE) #if defined(CONFIG_BLKFIN_DCACHE) || defined(CONFIG_BLKFIN_CACHE)
u16 lock_kernel_check(u32 start, u32 end) static u16 __init lock_kernel_check(u32 start, u32 end)
{ {
if ((start <= (u32) _stext && end >= (u32) _end) if ((start <= (u32) _stext && end >= (u32) _end)
|| (start >= (u32) _stext && end <= (u32) _end)) || (start >= (u32) _stext && end <= (u32) _end))
...@@ -681,7 +681,7 @@ static void __init generate_cpl_tables(void) ...@@ -681,7 +681,7 @@ static void __init generate_cpl_tables(void)
#endif #endif
static inline u_long get_vco(void) static u_long get_vco(void)
{ {
u_long msel; u_long msel;
u_long vco; u_long vco;
...@@ -889,8 +889,8 @@ struct seq_operations cpuinfo_op = { ...@@ -889,8 +889,8 @@ struct seq_operations cpuinfo_op = {
.show = show_cpuinfo, .show = show_cpuinfo,
}; };
void cmdline_init(unsigned long r0) void __init cmdline_init(char *r0)
{ {
if (r0) if (r0)
strncpy(command_line, (char *)r0, COMMAND_LINE_SIZE); strncpy(command_line, r0, COMMAND_LINE_SIZE);
} }
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
*/ */
#include <linux/linkage.h> #include <linux/linkage.h>
#include <linux/init.h>
#include <asm/blackfin.h> #include <asm/blackfin.h>
#if CONFIG_BFIN_KERNEL_CLOCK #if CONFIG_BFIN_KERNEL_CLOCK
#include <asm/mach/mem_init.h> #include <asm/mach/mem_init.h>
...@@ -45,10 +46,9 @@ ...@@ -45,10 +46,9 @@
#define INITIAL_STACK 0xFFB01000 #define INITIAL_STACK 0xFFB01000
.text __INIT
ENTRY(__start) ENTRY(__start)
ENTRY(__stext)
/* R0: argument of command line string, passed from uboot, save it */ /* R0: argument of command line string, passed from uboot, save it */
R7 = R0; R7 = R0;
/* Set the SYSCFG register: /* Set the SYSCFG register:
...@@ -266,6 +266,7 @@ ENTRY(__stext) ...@@ -266,6 +266,7 @@ ENTRY(__stext)
.LWAIT_HERE: .LWAIT_HERE:
jump .LWAIT_HERE; jump .LWAIT_HERE;
ENDPROC(__start)
ENTRY(_real_start) ENTRY(_real_start)
[ -- sp ] = reti; [ -- sp ] = reti;
...@@ -334,9 +335,10 @@ ENTRY(_real_start) ...@@ -334,9 +335,10 @@ ENTRY(_real_start)
sp = r1; sp = r1;
usp = sp; usp = sp;
fp = sp; fp = sp;
call _start_kernel; jump.l _start_kernel;
.L_exit: ENDPROC(_real_start)
jump.s .L_exit;
__FINIT
.section .l1.text .section .l1.text
#if CONFIG_BFIN_KERNEL_CLOCK #if CONFIG_BFIN_KERNEL_CLOCK
...@@ -446,6 +448,7 @@ ENTRY(_start_dma_code) ...@@ -446,6 +448,7 @@ ENTRY(_start_dma_code)
SSYNC; SSYNC;
RTS; RTS;
ENDPROC(_start_dma_code)
#endif /* CONFIG_BFIN_KERNEL_CLOCK */ #endif /* CONFIG_BFIN_KERNEL_CLOCK */
ENTRY(_bfin_reset) ENTRY(_bfin_reset)
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
*/ */
#include <linux/linkage.h> #include <linux/linkage.h>
#include <linux/init.h>
#include <asm/blackfin.h> #include <asm/blackfin.h>
#if CONFIG_BFIN_KERNEL_CLOCK #if CONFIG_BFIN_KERNEL_CLOCK
#include <asm/mach/mem_init.h> #include <asm/mach/mem_init.h>
...@@ -42,10 +43,9 @@ ...@@ -42,10 +43,9 @@
#define INITIAL_STACK 0xFFB01000 #define INITIAL_STACK 0xFFB01000
.text __INIT
ENTRY(__start) ENTRY(__start)
ENTRY(__stext)
/* R0: argument of command line string, passed from uboot, save it */ /* R0: argument of command line string, passed from uboot, save it */
R7 = R0; R7 = R0;
/* Set the SYSCFG register: /* Set the SYSCFG register:
...@@ -275,6 +275,7 @@ ENTRY(__stext) ...@@ -275,6 +275,7 @@ ENTRY(__stext)
.LWAIT_HERE: .LWAIT_HERE:
jump .LWAIT_HERE; jump .LWAIT_HERE;
ENDPROC(__start)
ENTRY(_real_start) ENTRY(_real_start)
[ -- sp ] = reti; [ -- sp ] = reti;
...@@ -343,9 +344,10 @@ ENTRY(_real_start) ...@@ -343,9 +344,10 @@ ENTRY(_real_start)
sp = r1; sp = r1;
usp = sp; usp = sp;
fp = sp; fp = sp;
call _start_kernel; jump.l _start_kernel;
.L_exit: ENDPROC(_real_start)
jump.s .L_exit;
__FINIT
.section .l1.text .section .l1.text
#if CONFIG_BFIN_KERNEL_CLOCK #if CONFIG_BFIN_KERNEL_CLOCK
...@@ -464,6 +466,7 @@ ENTRY(_start_dma_code) ...@@ -464,6 +466,7 @@ ENTRY(_start_dma_code)
SSYNC; SSYNC;
RTS; RTS;
ENDPROC(_start_dma_code)
#endif /* CONFIG_BFIN_KERNEL_CLOCK */ #endif /* CONFIG_BFIN_KERNEL_CLOCK */
ENTRY(_bfin_reset) ENTRY(_bfin_reset)
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
*/ */
#include <linux/linkage.h> #include <linux/linkage.h>
#include <linux/init.h>
#include <asm/blackfin.h> #include <asm/blackfin.h>
#if CONFIG_BFIN_KERNEL_CLOCK #if CONFIG_BFIN_KERNEL_CLOCK
#include <asm/mach/mem_init.h> #include <asm/mach/mem_init.h>
...@@ -42,10 +43,9 @@ ...@@ -42,10 +43,9 @@
#define INITIAL_STACK 0xFFB01000 #define INITIAL_STACK 0xFFB01000
.text __INIT
ENTRY(__start) ENTRY(__start)
ENTRY(__stext)
/* R0: argument of command line string, passed from uboot, save it */ /* R0: argument of command line string, passed from uboot, save it */
R7 = R0; R7 = R0;
/* Set the SYSCFG register: /* Set the SYSCFG register:
...@@ -221,6 +221,7 @@ ENTRY(__stext) ...@@ -221,6 +221,7 @@ ENTRY(__stext)
.LWAIT_HERE: .LWAIT_HERE:
jump .LWAIT_HERE; jump .LWAIT_HERE;
ENDPROC(__start)
ENTRY(_real_start) ENTRY(_real_start)
[ -- sp ] = reti; [ -- sp ] = reti;
...@@ -289,9 +290,10 @@ ENTRY(_real_start) ...@@ -289,9 +290,10 @@ ENTRY(_real_start)
sp = r1; sp = r1;
usp = sp; usp = sp;
fp = sp; fp = sp;
call _start_kernel; jump.l _start_kernel;
.L_exit: ENDPROC(_real_start)
jump.s .L_exit;
__FINIT
.section .l1.text .section .l1.text
#if CONFIG_BFIN_KERNEL_CLOCK #if CONFIG_BFIN_KERNEL_CLOCK
...@@ -393,6 +395,7 @@ ENTRY(_start_dma_code) ...@@ -393,6 +395,7 @@ ENTRY(_start_dma_code)
SSYNC; SSYNC;
RTS; RTS;
ENDPROC(_start_dma_code)
#endif /* CONFIG_BFIN_KERNEL_CLOCK */ #endif /* CONFIG_BFIN_KERNEL_CLOCK */
ENTRY(_bfin_reset) ENTRY(_bfin_reset)
......
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