Skip to content

Commit 493a2f8

Browse files
Eugeniy Paltsevvineetgarc
authored andcommitted
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: Corentin LABBE <clabbe@baylibre.com> Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
1 parent a66f2e5 commit 493a2f8

File tree

6 files changed

+0
-20
lines changed

6 files changed

+0
-20
lines changed

arch/arc/Kconfig

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ config NR_CPUS
191191

192192
config ARC_SMP_HALT_ON_RESET
193193
bool "Enable Halt-on-reset boot mode"
194-
default y if ARC_UBOOT_SUPPORT
195194
help
196195
In SMP configuration cores can be configured as Halt-on-reset
197196
or they could all start at same time. For Halt-on-reset, non
@@ -523,17 +522,6 @@ config ARC_DBG_TLB_PARANOIA
523522

524523
endif
525524

526-
config ARC_UBOOT_SUPPORT
527-
bool "Support uboot arg Handling"
528-
help
529-
ARC Linux by default checks for uboot provided args as pointers to
530-
external cmdline or DTB. This however breaks in absence of uboot,
531-
when booting from Metaware debugger directly, as the registers are
532-
not zeroed out on reset by mdb and/or ARCv2 based cores. The bogus
533-
registers look like uboot args to kernel which then chokes.
534-
So only enable the uboot arg checking/processing if users are sure
535-
of uboot being in play.
536-
537525
config ARC_BUILTIN_DTB_NAME
538526
string "Built in DTB"
539527
help

arch/arc/configs/nps_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ CONFIG_ARC_CACHE_LINE_SHIFT=5
3131
# CONFIG_ARC_HAS_LLSC is not set
3232
CONFIG_ARC_KVADDR_SIZE=402
3333
CONFIG_ARC_EMUL_UNALIGNED=y
34-
CONFIG_ARC_UBOOT_SUPPORT=y
3534
CONFIG_PREEMPT=y
3635
CONFIG_NET=y
3736
CONFIG_UNIX=y

arch/arc/configs/vdk_hs38_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ CONFIG_PARTITION_ADVANCED=y
1313
CONFIG_ARC_PLAT_AXS10X=y
1414
CONFIG_AXS103=y
1515
CONFIG_ISA_ARCV2=y
16-
CONFIG_ARC_UBOOT_SUPPORT=y
1716
CONFIG_ARC_BUILTIN_DTB_NAME="vdk_hs38"
1817
CONFIG_PREEMPT=y
1918
CONFIG_NET=y

arch/arc/configs/vdk_hs38_smp_defconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ CONFIG_AXS103=y
1515
CONFIG_ISA_ARCV2=y
1616
CONFIG_SMP=y
1717
# CONFIG_ARC_TIMERS_64BIT is not set
18-
# CONFIG_ARC_SMP_HALT_ON_RESET is not set
19-
CONFIG_ARC_UBOOT_SUPPORT=y
2018
CONFIG_ARC_BUILTIN_DTB_NAME="vdk_hs38_smp"
2119
CONFIG_PREEMPT=y
2220
CONFIG_NET=y

arch/arc/kernel/head.S

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,13 @@ ENTRY(stext)
100100
st.ab 0, [r5, 4]
101101
1:
102102

103-
#ifdef CONFIG_ARC_UBOOT_SUPPORT
104103
; Uboot - kernel ABI
105104
; r0 = [0] No uboot interaction, [1] cmdline in r2, [2] DTB in r2
106105
; r1 = magic number (always zero as of now)
107106
; r2 = pointer to uboot provided cmdline or external DTB in mem
108107
; These are handled later in handle_uboot_args()
109108
st r0, [@uboot_tag]
110109
st r2, [@uboot_arg]
111-
#endif
112110

113111
; setup "current" tsk and optionally cache it in dedicated r25
114112
mov r9, @init_task

arch/arc/kernel/setup.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,6 @@ void __init handle_uboot_args(void)
487487
bool use_embedded_dtb = true;
488488
bool append_cmdline = false;
489489

490-
#ifdef CONFIG_ARC_UBOOT_SUPPORT
491490
/* check that we know this tag */
492491
if (uboot_tag != UBOOT_TAG_NONE &&
493492
uboot_tag != UBOOT_TAG_CMDLINE &&
@@ -514,7 +513,6 @@ void __init handle_uboot_args(void)
514513
append_cmdline = true;
515514

516515
ignore_uboot_args:
517-
#endif
518516

519517
if (use_embedded_dtb) {
520518
machine_desc = setup_machine_fdt(__dtb_start);

0 commit comments

Comments
 (0)