public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: ath25: Avoid undefined early_serial_setup() without SERIAL_8250_CONSOLE
@ 2017-11-14 13:29 Matt Redfearn
  2017-11-14 14:05 ` Ralf Baechle
  0 siblings, 1 reply; 3+ messages in thread
From: Matt Redfearn @ 2017-11-14 13:29 UTC (permalink / raw)
  To: Ralf Baechle, James Hogan
  Cc: linux-mips, Matt Redfearn, linux-kernel, Thomas Gleixner,
	Philippe Ombredanne, Kate Stewart, Greg Kroah-Hartman

Currently MIPS allnoconfig with CONFIG_ATH25=y fails to link due to
missing support for early_serial_setup():

  LD      vmlinux
arch/mips/ath25/devices.o: In function ath25_serial_setup':
devices.c:(.init.text+0x68): undefined reference to 'early_serial_setup'

Rather than adding dependencies to the platform to force inclusion of
SERIAL_8250_CONSOLE together with it's dependencies like TTY, HAS_IOMEM,
etc, just make ath25_serial_setup() a no-op when the dependency is not
selected in the kernel config.

Signed-off-by: Matt Redfearn <matt.redfearn@mips.com>
---

 arch/mips/ath25/devices.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/mips/ath25/devices.c b/arch/mips/ath25/devices.c
index e1156347da53..301a9028273c 100644
--- a/arch/mips/ath25/devices.c
+++ b/arch/mips/ath25/devices.c
@@ -73,6 +73,7 @@ const char *get_system_type(void)
 
 void __init ath25_serial_setup(u32 mapbase, int irq, unsigned int uartclk)
 {
+#ifdef CONFIG_SERIAL_8250_CONSOLE
 	struct uart_port s;
 
 	memset(&s, 0, sizeof(s));
@@ -85,6 +86,7 @@ void __init ath25_serial_setup(u32 mapbase, int irq, unsigned int uartclk)
 	s.uartclk = uartclk;
 
 	early_serial_setup(&s);
+#endif /* CONFIG_SERIAL_8250_CONSOLE */
 }
 
 int __init ath25_add_wmac(int nr, u32 base, int irq)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] MIPS: ath25: Avoid undefined early_serial_setup() without SERIAL_8250_CONSOLE
  2017-11-14 13:29 [PATCH] MIPS: ath25: Avoid undefined early_serial_setup() without SERIAL_8250_CONSOLE Matt Redfearn
@ 2017-11-14 14:05 ` Ralf Baechle
  2017-11-14 15:43   ` Matt Redfearn
  0 siblings, 1 reply; 3+ messages in thread
From: Ralf Baechle @ 2017-11-14 14:05 UTC (permalink / raw)
  To: Matt Redfearn
  Cc: James Hogan, linux-mips, linux-kernel, Thomas Gleixner,
	Philippe Ombredanne, Kate Stewart, Greg Kroah-Hartman

On Tue, Nov 14, 2017 at 01:29:17PM +0000, Matt Redfearn wrote:

> Currently MIPS allnoconfig with CONFIG_ATH25=y fails to link due to
> missing support for early_serial_setup():
> 
>   LD      vmlinux
> arch/mips/ath25/devices.o: In function ath25_serial_setup':
> devices.c:(.init.text+0x68): undefined reference to 'early_serial_setup'
> 
> Rather than adding dependencies to the platform to force inclusion of
> SERIAL_8250_CONSOLE together with it's dependencies like TTY, HAS_IOMEM,
> etc, just make ath25_serial_setup() a no-op when the dependency is not
> selected in the kernel config.

Looks like arch/mips/rb532/serial.c might be suffering from the same
issue?

  Ralf

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] MIPS: ath25: Avoid undefined early_serial_setup() without SERIAL_8250_CONSOLE
  2017-11-14 14:05 ` Ralf Baechle
@ 2017-11-14 15:43   ` Matt Redfearn
  0 siblings, 0 replies; 3+ messages in thread
From: Matt Redfearn @ 2017-11-14 15:43 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: James Hogan, linux-mips, linux-kernel, Thomas Gleixner,
	Philippe Ombredanne, Kate Stewart, Greg Kroah-Hartman



On 14/11/17 14:05, Ralf Baechle wrote:
> On Tue, Nov 14, 2017 at 01:29:17PM +0000, Matt Redfearn wrote:
> 
>> Currently MIPS allnoconfig with CONFIG_ATH25=y fails to link due to
>> missing support for early_serial_setup():
>>
>>    LD      vmlinux
>> arch/mips/ath25/devices.o: In function ath25_serial_setup':
>> devices.c:(.init.text+0x68): undefined reference to 'early_serial_setup'
>>
>> Rather than adding dependencies to the platform to force inclusion of
>> SERIAL_8250_CONSOLE together with it's dependencies like TTY, HAS_IOMEM,
>> etc, just make ath25_serial_setup() a no-op when the dependency is not
>> selected in the kernel config.
> 
> Looks like arch/mips/rb532/serial.c might be suffering from the same
> issue?

Hi Ralf!

Indeed it does, and another unmet dependency. Patches incoming.

Thanks,
Matt

> 
>    Ralf
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-11-14 15:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-14 13:29 [PATCH] MIPS: ath25: Avoid undefined early_serial_setup() without SERIAL_8250_CONSOLE Matt Redfearn
2017-11-14 14:05 ` Ralf Baechle
2017-11-14 15:43   ` Matt Redfearn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox