sunxi: Convert CONS_INDEX to Kconfig
Convert the CONS_INDEX configuration to Kconfig.
Update sunxi's defconfigs to remove SYS_EXTRA_OPTIONS variable not
needed anymore.
Default value is 1 except for sun5i (equals 2) and sun8i (equals 5).
Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
[Maxime: Added a depends on ARCH_SUNXI to avoid build breakages]
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index c0ec2ec..a753367 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -44,6 +44,17 @@
This option enables the full UART in SPL, so if is it disabled,
the full UART driver will be omitted, thus saving space.
+config CONS_INDEX
+ int "UART used for console"
+ depends on ARCH_SUNXI
+ default 2 if MACH_SUN5I
+ default 5 if MACH_SUN8I
+ default 1
+ help
+ Configures the console index.
+ For Allwinner SoC., default values are 2 for SUN5I and 5 for SUN8I.
+ Otherwise, the index equals 1.
+
config DM_SERIAL
bool "Enable Driver Model for serial drivers"
depends on DM