ARC: [plat-arcfpga] Fix build breakage when !CONFIG_ARC_SERIAL
This fixes the following: - CONFIG_ARC_SERIAL_BAUD is only defined when CONFIG_SERIAL_ARC is defined. Make sure that it isn't referenced otherwise. - There is no use for initializing arc_uart_info[] when CONFIG_SERIAL_ARC is not defined. [vgupta: tweaked changelog title, used IS_ENABLED() kconfig helper] Signed-off-by: Mischa Jonker <mjonker@synopsys.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
This commit is contained in:
Родитель
7d13205581
Коммит
ba5afadb11
|
@ -77,6 +77,7 @@ static void __init setup_bvci_lat_unit(void)
|
||||||
|
|
||||||
/*----------------------- Platform Devices -----------------------------*/
|
/*----------------------- Platform Devices -----------------------------*/
|
||||||
|
|
||||||
|
#if IS_ENABLED(CONFIG_SERIAL_ARC)
|
||||||
static unsigned long arc_uart_info[] = {
|
static unsigned long arc_uart_info[] = {
|
||||||
0, /* uart->is_emulated (runtime @running_on_hw) */
|
0, /* uart->is_emulated (runtime @running_on_hw) */
|
||||||
0, /* uart->port.uartclk */
|
0, /* uart->port.uartclk */
|
||||||
|
@ -115,7 +116,7 @@ static struct platform_device arc_uart0_dev = {
|
||||||
static struct platform_device *fpga_early_devs[] __initdata = {
|
static struct platform_device *fpga_early_devs[] __initdata = {
|
||||||
&arc_uart0_dev,
|
&arc_uart0_dev,
|
||||||
};
|
};
|
||||||
#endif
|
#endif /* CONFIG_SERIAL_ARC_CONSOLE */
|
||||||
|
|
||||||
static void arc_fpga_serial_init(void)
|
static void arc_fpga_serial_init(void)
|
||||||
{
|
{
|
||||||
|
@ -152,8 +153,13 @@ static void arc_fpga_serial_init(void)
|
||||||
* otherwise the early console never gets a chance to run.
|
* otherwise the early console never gets a chance to run.
|
||||||
*/
|
*/
|
||||||
add_preferred_console("ttyARC", 0, "115200");
|
add_preferred_console("ttyARC", 0, "115200");
|
||||||
#endif
|
#endif /* CONFIG_SERIAL_ARC_CONSOLE */
|
||||||
}
|
}
|
||||||
|
#else /* !IS_ENABLED(CONFIG_SERIAL_ARC) */
|
||||||
|
static void arc_fpga_serial_init(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void __init plat_fpga_early_init(void)
|
static void __init plat_fpga_early_init(void)
|
||||||
{
|
{
|
||||||
|
@ -169,7 +175,7 @@ static void __init plat_fpga_early_init(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct of_dev_auxdata plat_auxdata_lookup[] __initdata = {
|
static struct of_dev_auxdata plat_auxdata_lookup[] __initdata = {
|
||||||
#if defined(CONFIG_SERIAL_ARC) || defined(CONFIG_SERIAL_ARC_MODULE)
|
#if IS_ENABLED(CONFIG_SERIAL_ARC)
|
||||||
OF_DEV_AUXDATA("snps,arc-uart", UART0_BASE, "arc-uart", arc_uart_info),
|
OF_DEV_AUXDATA("snps,arc-uart", UART0_BASE, "arc-uart", arc_uart_info),
|
||||||
#endif
|
#endif
|
||||||
{}
|
{}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче