diff options
author | Mike Frysinger <michael.frysinger@analog.com> | 2007-06-11 03:31:30 -0400 |
---|---|---|
committer | Bryan Wu <bryan.wu@analog.com> | 2007-06-11 03:31:30 -0400 |
commit | 52a078120c33b06a9abb721357adaafc3b55b7c1 (patch) | |
tree | 5a17d6b1c5c0beb639507d9c54b3c26bd99aa8fc /arch | |
parent | 83a5c3e3218f138b1a99f787c76e380d6a6ecec9 (diff) |
Blackfin arch: move more of our startup code to .init so it can be freed once we are up and running
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/blackfin/kernel/setup.c | 10 | ||||
-rw-r--r-- | arch/blackfin/mach-bf533/head.S | 13 | ||||
-rw-r--r-- | arch/blackfin/mach-bf537/head.S | 13 | ||||
-rw-r--r-- | arch/blackfin/mach-bf561/head.S | 13 |
4 files changed, 29 insertions, 20 deletions
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index 02dc74301920..d9517e7c792b 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c | |||
@@ -90,7 +90,7 @@ void __init bf53x_cache_init(void) | |||
90 | #endif | 90 | #endif |
91 | } | 91 | } |
92 | 92 | ||
93 | void bf53x_relocate_l1_mem(void) | 93 | void __init bf53x_relocate_l1_mem(void) |
94 | { | 94 | { |
95 | unsigned long l1_code_length; | 95 | unsigned long l1_code_length; |
96 | unsigned long l1_data_a_length; | 96 | unsigned long l1_data_a_length; |
@@ -411,7 +411,7 @@ static int __init topology_init(void) | |||
411 | subsys_initcall(topology_init); | 411 | subsys_initcall(topology_init); |
412 | 412 | ||
413 | #if defined(CONFIG_BLKFIN_DCACHE) || defined(CONFIG_BLKFIN_CACHE) | 413 | #if defined(CONFIG_BLKFIN_DCACHE) || defined(CONFIG_BLKFIN_CACHE) |
414 | u16 lock_kernel_check(u32 start, u32 end) | 414 | static u16 __init lock_kernel_check(u32 start, u32 end) |
415 | { | 415 | { |
416 | if ((start <= (u32) _stext && end >= (u32) _end) | 416 | if ((start <= (u32) _stext && end >= (u32) _end) |
417 | || (start >= (u32) _stext && end <= (u32) _end)) | 417 | || (start >= (u32) _stext && end <= (u32) _end)) |
@@ -681,7 +681,7 @@ static void __init generate_cpl_tables(void) | |||
681 | 681 | ||
682 | #endif | 682 | #endif |
683 | 683 | ||
684 | static inline u_long get_vco(void) | 684 | static u_long get_vco(void) |
685 | { | 685 | { |
686 | u_long msel; | 686 | u_long msel; |
687 | u_long vco; | 687 | u_long vco; |
@@ -889,8 +889,8 @@ struct seq_operations cpuinfo_op = { | |||
889 | .show = show_cpuinfo, | 889 | .show = show_cpuinfo, |
890 | }; | 890 | }; |
891 | 891 | ||
892 | void cmdline_init(unsigned long r0) | 892 | void __init cmdline_init(char *r0) |
893 | { | 893 | { |
894 | if (r0) | 894 | if (r0) |
895 | strncpy(command_line, (char *)r0, COMMAND_LINE_SIZE); | 895 | strncpy(command_line, r0, COMMAND_LINE_SIZE); |
896 | } | 896 | } |
diff --git a/arch/blackfin/mach-bf533/head.S b/arch/blackfin/mach-bf533/head.S index 33d1f623fe4e..7e2aa8d0f44f 100644 --- a/arch/blackfin/mach-bf533/head.S +++ b/arch/blackfin/mach-bf533/head.S | |||
@@ -28,6 +28,7 @@ | |||
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/linkage.h> | 30 | #include <linux/linkage.h> |
31 | #include <linux/init.h> | ||
31 | #include <asm/blackfin.h> | 32 | #include <asm/blackfin.h> |
32 | #if CONFIG_BFIN_KERNEL_CLOCK | 33 | #if CONFIG_BFIN_KERNEL_CLOCK |
33 | #include <asm/mach/mem_init.h> | 34 | #include <asm/mach/mem_init.h> |
@@ -45,10 +46,9 @@ | |||
45 | 46 | ||
46 | #define INITIAL_STACK 0xFFB01000 | 47 | #define INITIAL_STACK 0xFFB01000 |
47 | 48 | ||
48 | .text | 49 | __INIT |
49 | 50 | ||
50 | ENTRY(__start) | 51 | ENTRY(__start) |
51 | ENTRY(__stext) | ||
52 | /* R0: argument of command line string, passed from uboot, save it */ | 52 | /* R0: argument of command line string, passed from uboot, save it */ |
53 | R7 = R0; | 53 | R7 = R0; |
54 | /* Set the SYSCFG register: | 54 | /* Set the SYSCFG register: |
@@ -266,6 +266,7 @@ ENTRY(__stext) | |||
266 | 266 | ||
267 | .LWAIT_HERE: | 267 | .LWAIT_HERE: |
268 | jump .LWAIT_HERE; | 268 | jump .LWAIT_HERE; |
269 | ENDPROC(__start) | ||
269 | 270 | ||
270 | ENTRY(_real_start) | 271 | ENTRY(_real_start) |
271 | [ -- sp ] = reti; | 272 | [ -- sp ] = reti; |
@@ -334,9 +335,10 @@ ENTRY(_real_start) | |||
334 | sp = r1; | 335 | sp = r1; |
335 | usp = sp; | 336 | usp = sp; |
336 | fp = sp; | 337 | fp = sp; |
337 | call _start_kernel; | 338 | jump.l _start_kernel; |
338 | .L_exit: | 339 | ENDPROC(_real_start) |
339 | jump.s .L_exit; | 340 | |
341 | __FINIT | ||
340 | 342 | ||
341 | .section .l1.text | 343 | .section .l1.text |
342 | #if CONFIG_BFIN_KERNEL_CLOCK | 344 | #if CONFIG_BFIN_KERNEL_CLOCK |
@@ -446,6 +448,7 @@ ENTRY(_start_dma_code) | |||
446 | SSYNC; | 448 | SSYNC; |
447 | 449 | ||
448 | RTS; | 450 | RTS; |
451 | ENDPROC(_start_dma_code) | ||
449 | #endif /* CONFIG_BFIN_KERNEL_CLOCK */ | 452 | #endif /* CONFIG_BFIN_KERNEL_CLOCK */ |
450 | 453 | ||
451 | ENTRY(_bfin_reset) | 454 | ENTRY(_bfin_reset) |
diff --git a/arch/blackfin/mach-bf537/head.S b/arch/blackfin/mach-bf537/head.S index 3f490bfb73fa..7d902bbd860f 100644 --- a/arch/blackfin/mach-bf537/head.S +++ b/arch/blackfin/mach-bf537/head.S | |||
@@ -28,6 +28,7 @@ | |||
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/linkage.h> | 30 | #include <linux/linkage.h> |
31 | #include <linux/init.h> | ||
31 | #include <asm/blackfin.h> | 32 | #include <asm/blackfin.h> |
32 | #if CONFIG_BFIN_KERNEL_CLOCK | 33 | #if CONFIG_BFIN_KERNEL_CLOCK |
33 | #include <asm/mach/mem_init.h> | 34 | #include <asm/mach/mem_init.h> |
@@ -42,10 +43,9 @@ | |||
42 | 43 | ||
43 | #define INITIAL_STACK 0xFFB01000 | 44 | #define INITIAL_STACK 0xFFB01000 |
44 | 45 | ||
45 | .text | 46 | __INIT |
46 | 47 | ||
47 | ENTRY(__start) | 48 | ENTRY(__start) |
48 | ENTRY(__stext) | ||
49 | /* R0: argument of command line string, passed from uboot, save it */ | 49 | /* R0: argument of command line string, passed from uboot, save it */ |
50 | R7 = R0; | 50 | R7 = R0; |
51 | /* Set the SYSCFG register: | 51 | /* Set the SYSCFG register: |
@@ -275,6 +275,7 @@ ENTRY(__stext) | |||
275 | 275 | ||
276 | .LWAIT_HERE: | 276 | .LWAIT_HERE: |
277 | jump .LWAIT_HERE; | 277 | jump .LWAIT_HERE; |
278 | ENDPROC(__start) | ||
278 | 279 | ||
279 | ENTRY(_real_start) | 280 | ENTRY(_real_start) |
280 | [ -- sp ] = reti; | 281 | [ -- sp ] = reti; |
@@ -343,9 +344,10 @@ ENTRY(_real_start) | |||
343 | sp = r1; | 344 | sp = r1; |
344 | usp = sp; | 345 | usp = sp; |
345 | fp = sp; | 346 | fp = sp; |
346 | call _start_kernel; | 347 | jump.l _start_kernel; |
347 | .L_exit: | 348 | ENDPROC(_real_start) |
348 | jump.s .L_exit; | 349 | |
350 | __FINIT | ||
349 | 351 | ||
350 | .section .l1.text | 352 | .section .l1.text |
351 | #if CONFIG_BFIN_KERNEL_CLOCK | 353 | #if CONFIG_BFIN_KERNEL_CLOCK |
@@ -464,6 +466,7 @@ ENTRY(_start_dma_code) | |||
464 | SSYNC; | 466 | SSYNC; |
465 | 467 | ||
466 | RTS; | 468 | RTS; |
469 | ENDPROC(_start_dma_code) | ||
467 | #endif /* CONFIG_BFIN_KERNEL_CLOCK */ | 470 | #endif /* CONFIG_BFIN_KERNEL_CLOCK */ |
468 | 471 | ||
469 | ENTRY(_bfin_reset) | 472 | ENTRY(_bfin_reset) |
diff --git a/arch/blackfin/mach-bf561/head.S b/arch/blackfin/mach-bf561/head.S index 3029e940ddcd..31cbc75c85cf 100644 --- a/arch/blackfin/mach-bf561/head.S +++ b/arch/blackfin/mach-bf561/head.S | |||
@@ -28,6 +28,7 @@ | |||
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/linkage.h> | 30 | #include <linux/linkage.h> |
31 | #include <linux/init.h> | ||
31 | #include <asm/blackfin.h> | 32 | #include <asm/blackfin.h> |
32 | #if CONFIG_BFIN_KERNEL_CLOCK | 33 | #if CONFIG_BFIN_KERNEL_CLOCK |
33 | #include <asm/mach/mem_init.h> | 34 | #include <asm/mach/mem_init.h> |
@@ -42,10 +43,9 @@ | |||
42 | 43 | ||
43 | #define INITIAL_STACK 0xFFB01000 | 44 | #define INITIAL_STACK 0xFFB01000 |
44 | 45 | ||
45 | .text | 46 | __INIT |
46 | 47 | ||
47 | ENTRY(__start) | 48 | ENTRY(__start) |
48 | ENTRY(__stext) | ||
49 | /* R0: argument of command line string, passed from uboot, save it */ | 49 | /* R0: argument of command line string, passed from uboot, save it */ |
50 | R7 = R0; | 50 | R7 = R0; |
51 | /* Set the SYSCFG register: | 51 | /* Set the SYSCFG register: |
@@ -221,6 +221,7 @@ ENTRY(__stext) | |||
221 | 221 | ||
222 | .LWAIT_HERE: | 222 | .LWAIT_HERE: |
223 | jump .LWAIT_HERE; | 223 | jump .LWAIT_HERE; |
224 | ENDPROC(__start) | ||
224 | 225 | ||
225 | ENTRY(_real_start) | 226 | ENTRY(_real_start) |
226 | [ -- sp ] = reti; | 227 | [ -- sp ] = reti; |
@@ -289,9 +290,10 @@ ENTRY(_real_start) | |||
289 | sp = r1; | 290 | sp = r1; |
290 | usp = sp; | 291 | usp = sp; |
291 | fp = sp; | 292 | fp = sp; |
292 | call _start_kernel; | 293 | jump.l _start_kernel; |
293 | .L_exit: | 294 | ENDPROC(_real_start) |
294 | jump.s .L_exit; | 295 | |
296 | __FINIT | ||
295 | 297 | ||
296 | .section .l1.text | 298 | .section .l1.text |
297 | #if CONFIG_BFIN_KERNEL_CLOCK | 299 | #if CONFIG_BFIN_KERNEL_CLOCK |
@@ -393,6 +395,7 @@ ENTRY(_start_dma_code) | |||
393 | SSYNC; | 395 | SSYNC; |
394 | 396 | ||
395 | RTS; | 397 | RTS; |
398 | ENDPROC(_start_dma_code) | ||
396 | #endif /* CONFIG_BFIN_KERNEL_CLOCK */ | 399 | #endif /* CONFIG_BFIN_KERNEL_CLOCK */ |
397 | 400 | ||
398 | ENTRY(_bfin_reset) | 401 | ENTRY(_bfin_reset) |