Skip to content

Commit 7e5e371

Browse files
amalonralfbaechle
authored andcommitted
MIPS: Fix CPS SMP NS16550 UART defaults
The MIPS_CPS_NS16550_BASE and MIPS_CPS_NS16550_SHIFT options have no defaults for non-Malta platforms which select SYS_SUPPORTS_MIPS_CPS (i.e. the pistachio and generic platforms). This is problematic for automated allyesconfig and allmodconfig builds based on these platforms, since make silentoldconfig tries to ask the user for values, and especially since v4.15 where the default platform was switched to generic. Default these options to 0 and arrange for MIPS_CPS_NS16550 to be no when using that default base address, so that the option only has an effect when the default is provided (i.e. Malta) or when a value is provided by the user. Fixes: 609cf6f ("MIPS: CPS: Early debug using an ns16550-compatible UART") Signed-off-by: James Hogan <jhogan@kernel.org> Reviewed-by: Paul Burton <paul.burton@mips.com> Tested-by: Guenter Roeck <linux@roeck-us.net> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17749/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent dfe0049 commit 7e5e371

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

‎arch/mips/Kconfig.debug‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,30 +124,36 @@ config SCACHE_DEBUGFS
124124

125125
If unsure, say N.
126126

127-
menuconfig MIPS_CPS_NS16550
127+
menuconfig MIPS_CPS_NS16550_BOOL
128128
bool "CPS SMP NS16550 UART output"
129129
depends on MIPS_CPS
130130
help
131131
Output debug information via an ns16550 compatible UART if exceptions
132132
occur early in the boot process of a secondary core.
133133

134-
if MIPS_CPS_NS16550
134+
if MIPS_CPS_NS16550_BOOL
135+
136+
config MIPS_CPS_NS16550
137+
def_bool MIPS_CPS_NS16550_BASE != 0
135138

136139
config MIPS_CPS_NS16550_BASE
137140
hex "UART Base Address"
138141
default 0x1b0003f8 if MIPS_MALTA
142+
default 0
139143
help
140144
The base address of the ns16550 compatible UART on which to output
141145
debug information from the early stages of core startup.
142146

147+
This is only used if non-zero.
148+
143149
config MIPS_CPS_NS16550_SHIFT
144150
int "UART Register Shift"
145-
default 0 if MIPS_MALTA
151+
default 0
146152
help
147153
The number of bits to shift ns16550 register indices by in order to
148154
form their addresses. That is, log base 2 of the span between
149155
adjacent ns16550 registers in the system.
150156

151-
endif # MIPS_CPS_NS16550
157+
endif # MIPS_CPS_NS16550_BOOL
152158

153159
endmenu

0 commit comments

Comments
 (0)