diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2014-01-16 15:01:24 +0530 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2014-01-16 18:49:38 +0530 |
commit | 59ed9413533897823bcdb4c79fd2904718e25b0a (patch) | |
tree | f016337b77b6299e551282c642249ec9327b4784 /arch/arc/kernel/head.S | |
parent | d8e8c7dda11f5d5cf90495f2e89d917a83509bc0 (diff) | |
download | op-kernel-dev-59ed9413533897823bcdb4c79fd2904718e25b0a.zip op-kernel-dev-59ed9413533897823bcdb4c79fd2904718e25b0a.tar.gz |
ARC: [cmdline] uboot cmdline handling rework
* Moved cmdline copy from asm to "C" - allows for more robust checking
of pointer validity etc.
* Remove the Kconfig option to do so, base it on a runtime value passed
by u-boot
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/kernel/head.S')
-rw-r--r-- | arch/arc/kernel/head.S | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/arch/arc/kernel/head.S b/arch/arc/kernel/head.S index 2c878e9..9919972 100644 --- a/arch/arc/kernel/head.S +++ b/arch/arc/kernel/head.S @@ -49,25 +49,13 @@ stext: st.ab 0, [r5,4] brlt r5, r6, 1b -#ifdef CONFIG_CMDLINE_UBOOT - ; support for bootloader provided cmdline - ; If cmdline passed by u-boot, then - ; r0 = 1 (because ATAGS parsing, now retired, used to use 0) - ; r1 = magic number (board identity) - ; r2 = addr of cmdline string (somewhere in memory/flash) - - brne r0, 1, .Lother_bootup_chores ; u-boot didn't pass cmdline - breq r2, 0, .Lother_bootup_chores ; or cmdline is NULL - - mov r5, @command_line -1: - ldb.ab r6, [r2, 1] - breq r6, 0, .Lother_bootup_chores - b.d 1b - stb.ab r6, [r5, 1] -#endif - -.Lother_bootup_chores: + ; Uboot - kernel ABI + ; r0 = [0] No uboot interaction, [1] cmdline in r2, [2] DTB in r2 + ; r1 = magic number (board identity, unused as of now + ; r2 = pointer to uboot provided cmdline or external DTB in mem + ; These are handled later in setup_arch() + st r0, [@uboot_tag] + st r2, [@uboot_arg] ; Identify if running on ISS vs Silicon ; IDENTITY Reg [ 3 2 1 0 ] |