* [PATCH] MIPS: rb532: Fix undefined reference to setup_serial_port
@ 2016-09-05 16:18 Matt Redfearn
2016-09-13 16:02 ` Ralf Baechle
0 siblings, 1 reply; 2+ messages in thread
From: Matt Redfearn @ 2016-09-05 16:18 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips, Matt Redfearn, linux-kernel
If the rb532 machine is compiled without CONFIG_SERIAL_8250, the
following linker error occurs
arch/mips/built-in.o: In function `setup_serial_port':
(.init.text+0x20c): undefined reference to `early_serial_setup'
Fix this by wrapping registration of the rb532 uart in an ifdef
CONFIG_SERIAL_8250.
Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com>
---
arch/mips/rb532/serial.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/mips/rb532/serial.c b/arch/mips/rb532/serial.c
index 70482540b3db..f0ea2de38840 100644
--- a/arch/mips/rb532/serial.c
+++ b/arch/mips/rb532/serial.c
@@ -36,6 +36,8 @@
extern unsigned int idt_cpu_freq;
+#ifdef CONFIG_SERIAL_8250
+
static struct uart_port rb532_uart = {
.flags = UPF_BOOT_AUTOCONF,
.line = 0,
@@ -52,3 +54,6 @@ int __init setup_serial_port(void)
return early_serial_setup(&rb532_uart);
}
arch_initcall(setup_serial_port);
+
+#endif /* CONFIG_SERIAL_8250 */
+
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] MIPS: rb532: Fix undefined reference to setup_serial_port
2016-09-05 16:18 [PATCH] MIPS: rb532: Fix undefined reference to setup_serial_port Matt Redfearn
@ 2016-09-13 16:02 ` Ralf Baechle
0 siblings, 0 replies; 2+ messages in thread
From: Ralf Baechle @ 2016-09-13 16:02 UTC (permalink / raw)
To: Matt Redfearn; +Cc: linux-mips, linux-kernel
On Mon, Sep 05, 2016 at 05:18:40PM +0100, Matt Redfearn wrote:
> If the rb532 machine is compiled without CONFIG_SERIAL_8250, the
> following linker error occurs
>
> arch/mips/built-in.o: In function `setup_serial_port':
> (.init.text+0x20c): undefined reference to `early_serial_setup'
>
> Fix this by wrapping registration of the rb532 uart in an ifdef
> CONFIG_SERIAL_8250.
This will still fail if CONFIG_SERIAL_8250 = m.
RB532 should be rewritten to use earl console rather than early_serial_setup
similar to https://git.linux-mips.org/cgit/ralf/linux.git/commit/?id=194d315da86af504559a8a21026360097575bd55
for example.
Ralf
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-13 16:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-05 16:18 [PATCH] MIPS: rb532: Fix undefined reference to setup_serial_port Matt Redfearn
2016-09-13 16:02 ` Ralf Baechle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).