Commit 493a2f81 authored by Eugeniy Paltsev's avatar Eugeniy Paltsev Committed by Vineet Gupta

ARC: enable uboot support unconditionally

After reworking U-boot args handling code and adding paranoid
arguments check we can eliminate CONFIG_ARC_UBOOT_SUPPORT and
enable uboot support unconditionally.

For JTAG case we can assume that core registers will come up
reset value of 0 or in worst case we rely on user passing
'-on=clear_regs' to Metaware debugger.

Cc: stable@vger.kernel.org
Tested-by: default avatarCorentin LABBE <clabbe@baylibre.com>
Signed-off-by: default avatarEugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
parent a66f2e57
...@@ -191,7 +191,6 @@ config NR_CPUS ...@@ -191,7 +191,6 @@ config NR_CPUS
config ARC_SMP_HALT_ON_RESET config ARC_SMP_HALT_ON_RESET
bool "Enable Halt-on-reset boot mode" bool "Enable Halt-on-reset boot mode"
default y if ARC_UBOOT_SUPPORT
help help
In SMP configuration cores can be configured as Halt-on-reset In SMP configuration cores can be configured as Halt-on-reset
or they could all start at same time. For Halt-on-reset, non or they could all start at same time. For Halt-on-reset, non
...@@ -523,17 +522,6 @@ config ARC_DBG_TLB_PARANOIA ...@@ -523,17 +522,6 @@ config ARC_DBG_TLB_PARANOIA
endif endif
config ARC_UBOOT_SUPPORT
bool "Support uboot arg Handling"
help
ARC Linux by default checks for uboot provided args as pointers to
external cmdline or DTB. This however breaks in absence of uboot,
when booting from Metaware debugger directly, as the registers are
not zeroed out on reset by mdb and/or ARCv2 based cores. The bogus
registers look like uboot args to kernel which then chokes.
So only enable the uboot arg checking/processing if users are sure
of uboot being in play.
config ARC_BUILTIN_DTB_NAME config ARC_BUILTIN_DTB_NAME
string "Built in DTB" string "Built in DTB"
help help
......
...@@ -31,7 +31,6 @@ CONFIG_ARC_CACHE_LINE_SHIFT=5 ...@@ -31,7 +31,6 @@ CONFIG_ARC_CACHE_LINE_SHIFT=5
# CONFIG_ARC_HAS_LLSC is not set # CONFIG_ARC_HAS_LLSC is not set
CONFIG_ARC_KVADDR_SIZE=402 CONFIG_ARC_KVADDR_SIZE=402
CONFIG_ARC_EMUL_UNALIGNED=y CONFIG_ARC_EMUL_UNALIGNED=y
CONFIG_ARC_UBOOT_SUPPORT=y
CONFIG_PREEMPT=y CONFIG_PREEMPT=y
CONFIG_NET=y CONFIG_NET=y
CONFIG_UNIX=y CONFIG_UNIX=y
......
...@@ -13,7 +13,6 @@ CONFIG_PARTITION_ADVANCED=y ...@@ -13,7 +13,6 @@ CONFIG_PARTITION_ADVANCED=y
CONFIG_ARC_PLAT_AXS10X=y CONFIG_ARC_PLAT_AXS10X=y
CONFIG_AXS103=y CONFIG_AXS103=y
CONFIG_ISA_ARCV2=y CONFIG_ISA_ARCV2=y
CONFIG_ARC_UBOOT_SUPPORT=y
CONFIG_ARC_BUILTIN_DTB_NAME="vdk_hs38" CONFIG_ARC_BUILTIN_DTB_NAME="vdk_hs38"
CONFIG_PREEMPT=y CONFIG_PREEMPT=y
CONFIG_NET=y CONFIG_NET=y
......
...@@ -15,8 +15,6 @@ CONFIG_AXS103=y ...@@ -15,8 +15,6 @@ CONFIG_AXS103=y
CONFIG_ISA_ARCV2=y CONFIG_ISA_ARCV2=y
CONFIG_SMP=y CONFIG_SMP=y
# CONFIG_ARC_TIMERS_64BIT is not set # CONFIG_ARC_TIMERS_64BIT is not set
# CONFIG_ARC_SMP_HALT_ON_RESET is not set
CONFIG_ARC_UBOOT_SUPPORT=y
CONFIG_ARC_BUILTIN_DTB_NAME="vdk_hs38_smp" CONFIG_ARC_BUILTIN_DTB_NAME="vdk_hs38_smp"
CONFIG_PREEMPT=y CONFIG_PREEMPT=y
CONFIG_NET=y CONFIG_NET=y
......
...@@ -100,7 +100,6 @@ ENTRY(stext) ...@@ -100,7 +100,6 @@ ENTRY(stext)
st.ab 0, [r5, 4] st.ab 0, [r5, 4]
1: 1:
#ifdef CONFIG_ARC_UBOOT_SUPPORT
; Uboot - kernel ABI ; Uboot - kernel ABI
; r0 = [0] No uboot interaction, [1] cmdline in r2, [2] DTB in r2 ; r0 = [0] No uboot interaction, [1] cmdline in r2, [2] DTB in r2
; r1 = magic number (always zero as of now) ; r1 = magic number (always zero as of now)
...@@ -108,7 +107,6 @@ ENTRY(stext) ...@@ -108,7 +107,6 @@ ENTRY(stext)
; These are handled later in handle_uboot_args() ; These are handled later in handle_uboot_args()
st r0, [@uboot_tag] st r0, [@uboot_tag]
st r2, [@uboot_arg] st r2, [@uboot_arg]
#endif
; setup "current" tsk and optionally cache it in dedicated r25 ; setup "current" tsk and optionally cache it in dedicated r25
mov r9, @init_task mov r9, @init_task
......
...@@ -487,7 +487,6 @@ void __init handle_uboot_args(void) ...@@ -487,7 +487,6 @@ void __init handle_uboot_args(void)
bool use_embedded_dtb = true; bool use_embedded_dtb = true;
bool append_cmdline = false; bool append_cmdline = false;
#ifdef CONFIG_ARC_UBOOT_SUPPORT
/* check that we know this tag */ /* check that we know this tag */
if (uboot_tag != UBOOT_TAG_NONE && if (uboot_tag != UBOOT_TAG_NONE &&
uboot_tag != UBOOT_TAG_CMDLINE && uboot_tag != UBOOT_TAG_CMDLINE &&
...@@ -514,7 +513,6 @@ void __init handle_uboot_args(void) ...@@ -514,7 +513,6 @@ void __init handle_uboot_args(void)
append_cmdline = true; append_cmdline = true;
ignore_uboot_args: ignore_uboot_args:
#endif
if (use_embedded_dtb) { if (use_embedded_dtb) {
machine_desc = setup_machine_fdt(__dtb_start); machine_desc = setup_machine_fdt(__dtb_start);
......
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