diff --git a/arch/arc/defconfig b/arch/arc/defconfig index 77dd1800d25..5af6a6e247a 100644 --- a/arch/arc/defconfig +++ b/arch/arc/defconfig @@ -80,6 +80,7 @@ CONFIG_IRQ_VECTOR_TABLE_BSP=y # # CONFIG_UART_SIMPLE is not set # CONFIG_CONSOLE_HANDLER is not set +CONFIG_UART_CONSOLE_INDEX=0 # # Serial Drivers diff --git a/arch/arm/configs/micro_fsl_frdm_k64f_defconfig b/arch/arm/configs/micro_fsl_frdm_k64f_defconfig index f71c115a2b3..a25c82a25e8 100644 --- a/arch/arm/configs/micro_fsl_frdm_k64f_defconfig +++ b/arch/arm/configs/micro_fsl_frdm_k64f_defconfig @@ -121,6 +121,7 @@ CONFIG_WDOG_INIT=y # # CONFIG_UART_SIMPLE is not set # CONFIG_CONSOLE_HANDLER is not set +CONFIG_UART_CONSOLE_INDEX=0 # # Serial Drivers diff --git a/arch/arm/configs/micro_ti_lm3s6965_defconfig b/arch/arm/configs/micro_ti_lm3s6965_defconfig index 6d2c1eb187c..34bad8e5876 100644 --- a/arch/arm/configs/micro_ti_lm3s6965_defconfig +++ b/arch/arm/configs/micro_ti_lm3s6965_defconfig @@ -121,6 +121,7 @@ CONFIG_BSP_TI_LM3S6965_QEMU=y # # CONFIG_UART_SIMPLE is not set # CONFIG_CONSOLE_HANDLER is not set +CONFIG_UART_CONSOLE_INDEX=0 # # Serial Drivers diff --git a/arch/arm/configs/nano_fsl_frdm_k64f_defconfig b/arch/arm/configs/nano_fsl_frdm_k64f_defconfig index a35c73f83c4..81420da32d2 100644 --- a/arch/arm/configs/nano_fsl_frdm_k64f_defconfig +++ b/arch/arm/configs/nano_fsl_frdm_k64f_defconfig @@ -100,6 +100,7 @@ CONFIG_WDOG_INIT=y # # CONFIG_UART_SIMPLE is not set # CONFIG_CONSOLE_HANDLER is not set +CONFIG_UART_CONSOLE_INDEX=0 # # Serial Drivers diff --git a/arch/arm/configs/nano_ti_lm3s6965_defconfig b/arch/arm/configs/nano_ti_lm3s6965_defconfig index 73c68e8fd20..232b09a6d12 100644 --- a/arch/arm/configs/nano_ti_lm3s6965_defconfig +++ b/arch/arm/configs/nano_ti_lm3s6965_defconfig @@ -100,6 +100,7 @@ CONFIG_BSP_TI_LM3S6965_QEMU=y # # CONFIG_UART_SIMPLE is not set # CONFIG_CONSOLE_HANDLER is not set +CONFIG_UART_CONSOLE_INDEX=0 # # Serial Drivers diff --git a/arch/arm/defconfig b/arch/arm/defconfig index f71c115a2b3..a25c82a25e8 100644 --- a/arch/arm/defconfig +++ b/arch/arm/defconfig @@ -121,6 +121,7 @@ CONFIG_WDOG_INIT=y # # CONFIG_UART_SIMPLE is not set # CONFIG_CONSOLE_HANDLER is not set +CONFIG_UART_CONSOLE_INDEX=0 # # Serial Drivers diff --git a/arch/arm/fsl_frdm_k64f/board.h b/arch/arm/fsl_frdm_k64f/board.h index dacd73c32af..84579101b41 100644 --- a/arch/arm/fsl_frdm_k64f/board.h +++ b/arch/arm/fsl_frdm_k64f/board.h @@ -213,7 +213,6 @@ This header file is used to specify and describe board-level aspects for the /* Uart console settings */ -#define CONFIG_UART_CONSOLE_INDEX 0 #define CONFIG_UART_CONSOLE_PORT PCR_PORT_B #define CONFIG_UART_CONSOLE_PORT_RX_PIN 16 #define CONFIG_UART_CONSOLE_PORT_TX_PIN 17 diff --git a/arch/arm/ti_lm3s6965/board.h b/arch/arm/ti_lm3s6965/board.h index 708aa34bf55..b3f198f2471 100644 --- a/arch/arm/ti_lm3s6965/board.h +++ b/arch/arm/ti_lm3s6965/board.h @@ -136,7 +136,6 @@ the 'ti_lm3s6965' BSP. /* Uart console configuration */ -#define CONFIG_UART_CONSOLE_INDEX 0 #define CONFIG_UART_CONSOLE_BAUDRATE 115200 #define CONFIG_UART_CONSOLE_IRQ IRQ_UART0 #define CONFIG_UART_CONSOLE_INT_PRI 3 diff --git a/arch/x86/configs/micro_generic_pc_atom_n28xx_defconfig b/arch/x86/configs/micro_generic_pc_atom_n28xx_defconfig index 0eeebedce37..5f26f40741c 100644 --- a/arch/x86/configs/micro_generic_pc_atom_n28xx_defconfig +++ b/arch/x86/configs/micro_generic_pc_atom_n28xx_defconfig @@ -141,6 +141,7 @@ CONFIG_SHUTOFF_PIC=y # CONFIG_PCI is not set CONFIG_PLATFORM="generic_pc" CONFIG_LOAPIC_TIMER_FREQ=150000000 +CONFIG_UART_CONSOLE_INDEX=0 # # Device Drivers diff --git a/arch/x86/configs/micro_generic_pc_defconfig b/arch/x86/configs/micro_generic_pc_defconfig index cca428772d3..ca8ae1b1b9d 100644 --- a/arch/x86/configs/micro_generic_pc_defconfig +++ b/arch/x86/configs/micro_generic_pc_defconfig @@ -139,6 +139,7 @@ CONFIG_NUM_DYNAMIC_STUBS=0 # # CONFIG_PCI is not set CONFIG_PLATFORM="generic_pc" +CONFIG_UART_CONSOLE_INDEX=0 # # Device Drivers diff --git a/arch/x86/configs/micro_generic_pc_minuteia_defconfig b/arch/x86/configs/micro_generic_pc_minuteia_defconfig index 67f276c2467..5f783d3122d 100644 --- a/arch/x86/configs/micro_generic_pc_minuteia_defconfig +++ b/arch/x86/configs/micro_generic_pc_minuteia_defconfig @@ -136,6 +136,7 @@ CONFIG_NUM_DYNAMIC_STUBS=0 # # CONFIG_PCI is not set CONFIG_PLATFORM="generic_pc" +CONFIG_UART_CONSOLE_INDEX=0 # # Device Drivers diff --git a/arch/x86/configs/micro_generic_pc_pentium4_defconfig b/arch/x86/configs/micro_generic_pc_pentium4_defconfig index cca428772d3..ca8ae1b1b9d 100644 --- a/arch/x86/configs/micro_generic_pc_pentium4_defconfig +++ b/arch/x86/configs/micro_generic_pc_pentium4_defconfig @@ -139,6 +139,7 @@ CONFIG_NUM_DYNAMIC_STUBS=0 # # CONFIG_PCI is not set CONFIG_PLATFORM="generic_pc" +CONFIG_UART_CONSOLE_INDEX=0 # # Device Drivers diff --git a/arch/x86/configs/micro_quark_defconfig b/arch/x86/configs/micro_quark_defconfig index 3a35e73702f..9f3a29b1d48 100644 --- a/arch/x86/configs/micro_quark_defconfig +++ b/arch/x86/configs/micro_quark_defconfig @@ -138,6 +138,7 @@ CONFIG_NUM_DYNAMIC_STUBS=0 CONFIG_PCI=y # CONFIG_PCI_DEBUG is not set CONFIG_PLATFORM="quark" +CONFIG_UART_CONSOLE_INDEX=1 # # Device Drivers diff --git a/arch/x86/configs/nano_generic_pc_atom_n28xx_defconfig b/arch/x86/configs/nano_generic_pc_atom_n28xx_defconfig index 9b706d4e67a..f1e2f66c3ec 100644 --- a/arch/x86/configs/nano_generic_pc_atom_n28xx_defconfig +++ b/arch/x86/configs/nano_generic_pc_atom_n28xx_defconfig @@ -120,6 +120,7 @@ CONFIG_SHUTOFF_PIC=y # CONFIG_PCI is not set CONFIG_PLATFORM="generic_pc" CONFIG_LOAPIC_TIMER_FREQ=150000000 +CONFIG_UART_CONSOLE_INDEX=0 # # Device Drivers diff --git a/arch/x86/configs/nano_generic_pc_defconfig b/arch/x86/configs/nano_generic_pc_defconfig index 50f8b64e0fc..2a5eb1caeb5 100644 --- a/arch/x86/configs/nano_generic_pc_defconfig +++ b/arch/x86/configs/nano_generic_pc_defconfig @@ -118,6 +118,7 @@ CONFIG_NUM_DYNAMIC_STUBS=0 # # CONFIG_PCI is not set CONFIG_PLATFORM="generic_pc" +CONFIG_UART_CONSOLE_INDEX=0 # # Device Drivers diff --git a/arch/x86/configs/nano_generic_pc_minuteia_defconfig b/arch/x86/configs/nano_generic_pc_minuteia_defconfig index c854e6c3774..545eb114b2b 100644 --- a/arch/x86/configs/nano_generic_pc_minuteia_defconfig +++ b/arch/x86/configs/nano_generic_pc_minuteia_defconfig @@ -115,6 +115,7 @@ CONFIG_NUM_DYNAMIC_STUBS=0 # # CONFIG_PCI is not set CONFIG_PLATFORM="generic_pc" +CONFIG_UART_CONSOLE_INDEX=0 # # Device Drivers diff --git a/arch/x86/configs/nano_generic_pc_pentium4_defconfig b/arch/x86/configs/nano_generic_pc_pentium4_defconfig index 50f8b64e0fc..2a5eb1caeb5 100644 --- a/arch/x86/configs/nano_generic_pc_pentium4_defconfig +++ b/arch/x86/configs/nano_generic_pc_pentium4_defconfig @@ -118,6 +118,7 @@ CONFIG_NUM_DYNAMIC_STUBS=0 # # CONFIG_PCI is not set CONFIG_PLATFORM="generic_pc" +CONFIG_UART_CONSOLE_INDEX=0 # # Device Drivers diff --git a/arch/x86/configs/nano_quark_defconfig b/arch/x86/configs/nano_quark_defconfig index a613b3c3e1a..1f46baa2f2b 100644 --- a/arch/x86/configs/nano_quark_defconfig +++ b/arch/x86/configs/nano_quark_defconfig @@ -117,6 +117,7 @@ CONFIG_NUM_DYNAMIC_STUBS=0 CONFIG_PCI=y # CONFIG_PCI_DEBUG is not set CONFIG_PLATFORM="quark" +CONFIG_UART_CONSOLE_INDEX=1 # # Device Drivers diff --git a/arch/x86/defconfig b/arch/x86/defconfig index 3a35e73702f..9f3a29b1d48 100644 --- a/arch/x86/defconfig +++ b/arch/x86/defconfig @@ -138,6 +138,7 @@ CONFIG_NUM_DYNAMIC_STUBS=0 CONFIG_PCI=y # CONFIG_PCI_DEBUG is not set CONFIG_PLATFORM="quark" +CONFIG_UART_CONSOLE_INDEX=1 # # Device Drivers diff --git a/arch/x86/generic_pc/board.h b/arch/x86/generic_pc/board.h index c7a982270c1..c24648d435c 100644 --- a/arch/x86/generic_pc/board.h +++ b/arch/x86/generic_pc/board.h @@ -142,7 +142,6 @@ the 'generic_pc' BSP. } /* Console definitions */ -#define CONFIG_UART_CONSOLE_INDEX 0 #define CONFIG_UART_CONSOLE_IRQ COM1_INT_LVL #define CONFIG_UART_CONSOLE_INT_PRI COM1_INT_PRI diff --git a/arch/x86/quark/Kconfig b/arch/x86/quark/Kconfig index b7e5e38ffb1..4fb9173f20f 100644 --- a/arch/x86/quark/Kconfig +++ b/arch/x86/quark/Kconfig @@ -45,3 +45,5 @@ config PHYS_LOAD_ADDR config SYS_CLOCK_HW_CYCLES_PER_SEC default 25000000 +config UART_CONSOLE_INDEX + default 1 diff --git a/arch/x86/quark/board.h b/arch/x86/quark/board.h index 0034eeab136..9589461a6ca 100644 --- a/arch/x86/quark/board.h +++ b/arch/x86/quark/board.h @@ -105,7 +105,6 @@ the 'Quark' BSP. (CONFIG_UART_NUM_SYSTEM_PORTS + CONFIG_UART_NUM_EXTRA_PORTS) /* Console definitions */ -#define CONFIG_UART_CONSOLE_INDEX 1 #define CONFIG_UART_CONSOLE_PCI_IDX COM1_PCI_IDX /* diff --git a/drivers/console/Kconfig b/drivers/console/Kconfig index 03f072d0517..4e6ba9738c1 100644 --- a/drivers/console/Kconfig +++ b/drivers/console/Kconfig @@ -38,3 +38,9 @@ config CONSOLE_HANDLER help This option enables console input handler allowing to write simple interaction between serial console and the OS. + +config UART_CONSOLE_INDEX + int "UART Console Index" + default 0 + help + This option specifies index for the console uart port.