All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] MIPS: netlogic: xlr: Serial support depends on CONFIG_SERIAL_8250
@ 2013-08-15 12:59 ` Markos Chandras
  0 siblings, 0 replies; 4+ messages in thread
From: Markos Chandras @ 2013-08-15 12:59 UTC (permalink / raw)
  To: linux-mips; +Cc: Markos Chandras

The nlm_early_serial_setup code needs the early_serial_setup symbol
which is only available if CONFIG_SERIAL_8250 is selected.
Fixes the following build problem:

arch/mips/built-in.o: In function `nlm_early_serial_setup':
setup.c:(.init.text+0x274): undefined reference to `early_serial_setup'
make: *** [vmlinux] Error 1

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
---
 arch/mips/netlogic/xlr/setup.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/mips/netlogic/xlr/setup.c b/arch/mips/netlogic/xlr/setup.c
index 214d123..6d7d75e 100644
--- a/arch/mips/netlogic/xlr/setup.c
+++ b/arch/mips/netlogic/xlr/setup.c
@@ -60,6 +60,7 @@ unsigned int  nlm_threads_per_core = 1;
 struct nlm_soc_info nlm_nodes[NLM_NR_NODES];
 cpumask_t nlm_cpumask = CPU_MASK_CPU0;
 
+#ifdef CONFIG_SERIAL_8250
 static void __init nlm_early_serial_setup(void)
 {
 	struct uart_port s;
@@ -78,6 +79,9 @@ static void __init nlm_early_serial_setup(void)
 	s.membase	= (unsigned char __iomem *)uart_base;
 	early_serial_setup(&s);
 }
+#else
+static inline void nlm_early_serial_setup(void) {}
+#endif
 
 static void nlm_linux_exit(void)
 {
-- 
1.8.3.2

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

* [PATCH v2] MIPS: netlogic: xlr: Serial support depends on CONFIG_SERIAL_8250
@ 2013-08-15 12:59 ` Markos Chandras
  0 siblings, 0 replies; 4+ messages in thread
From: Markos Chandras @ 2013-08-15 12:59 UTC (permalink / raw)
  To: linux-mips; +Cc: Markos Chandras

The nlm_early_serial_setup code needs the early_serial_setup symbol
which is only available if CONFIG_SERIAL_8250 is selected.
Fixes the following build problem:

arch/mips/built-in.o: In function `nlm_early_serial_setup':
setup.c:(.init.text+0x274): undefined reference to `early_serial_setup'
make: *** [vmlinux] Error 1

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
---
 arch/mips/netlogic/xlr/setup.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/mips/netlogic/xlr/setup.c b/arch/mips/netlogic/xlr/setup.c
index 214d123..6d7d75e 100644
--- a/arch/mips/netlogic/xlr/setup.c
+++ b/arch/mips/netlogic/xlr/setup.c
@@ -60,6 +60,7 @@ unsigned int  nlm_threads_per_core = 1;
 struct nlm_soc_info nlm_nodes[NLM_NR_NODES];
 cpumask_t nlm_cpumask = CPU_MASK_CPU0;
 
+#ifdef CONFIG_SERIAL_8250
 static void __init nlm_early_serial_setup(void)
 {
 	struct uart_port s;
@@ -78,6 +79,9 @@ static void __init nlm_early_serial_setup(void)
 	s.membase	= (unsigned char __iomem *)uart_base;
 	early_serial_setup(&s);
 }
+#else
+static inline void nlm_early_serial_setup(void) {}
+#endif
 
 static void nlm_linux_exit(void)
 {
-- 
1.8.3.2

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

* Re: [PATCH v2] MIPS: netlogic: xlr: Serial support depends on CONFIG_SERIAL_8250
  2013-08-15 12:59 ` Markos Chandras
  (?)
@ 2013-08-18 10:08 ` Jayachandran C.
  -1 siblings, 0 replies; 4+ messages in thread
From: Jayachandran C. @ 2013-08-18 10:08 UTC (permalink / raw)
  To: linux-mips; +Cc: Markos Chandras

> The nlm_early_serial_setup code needs the early_serial_setup symbol
> which is only available if CONFIG_SERIAL_8250 is selected.
> Fixes the following build problem:
> 
> arch/mips/built-in.o: In function `nlm_early_serial_setup':
> setup.c:(.init.text+0x274): undefined reference to `early_serial_setup'
> make: *** [vmlinux] Error 1
> 
> Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
> ---
>  arch/mips/netlogic/xlr/setup.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/mips/netlogic/xlr/setup.c b/arch/mips/netlogic/xlr/setup.c
> index 214d123..6d7d75e 100644
> --- a/arch/mips/netlogic/xlr/setup.c
> +++ b/arch/mips/netlogic/xlr/setup.c
> @@ -60,6 +60,7 @@ unsigned int  nlm_threads_per_core = 1;
>  struct nlm_soc_info nlm_nodes[NLM_NR_NODES];
>  cpumask_t nlm_cpumask = CPU_MASK_CPU0;
> 
> +#ifdef CONFIG_SERIAL_8250
>  static void __init nlm_early_serial_setup(void)
>  {
>         struct uart_port s;
> @@ -78,6 +79,9 @@ static void __init nlm_early_serial_setup(void)
>         s.membase       = (unsigned char __iomem *)uart_base;
>         early_serial_setup(&s);
>  }
> +#else
> +static inline void nlm_early_serial_setup(void) {}
> +#endif
> 

The UART device is on the SoC, so adding 'select SERIAL_8250' to the Kconfig
for NLM_XLP_BOARD may be a better option.

JC.

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

* [PATCH] MIPS: Netlogic: Remove XLR early serial setup
  2013-08-15 12:59 ` Markos Chandras
  (?)
  (?)
@ 2013-10-25 11:24 ` Jayachandran C
  -1 siblings, 0 replies; 4+ messages in thread
From: Jayachandran C @ 2013-10-25 11:24 UTC (permalink / raw)
  To: linux-mips; +Cc: Markos Chandras, Jayachandran C

The early serial code is not needed because we already have early
printk support provided by common/earlycons.c

This change also fixes the following build error that occurs when
CONFIG_SERIAL_8250 is not configured for Netlogic XLR boards:

arch/mips/built-in.o: In function `nlm_early_serial_setup':
setup.c:(.init.text+0x274): undefined reference to `early_serial_setup'
make: *** [vmlinux] Error 1

Reported-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Jayachandran C <jchandra@broadcom.com>
---
 arch/mips/include/asm/netlogic/xlr/xlr.h |    5 -----
 arch/mips/netlogic/xlr/platform.c        |    4 ++--
 arch/mips/netlogic/xlr/setup.c           |   20 --------------------
 3 files changed, 2 insertions(+), 27 deletions(-)

diff --git a/arch/mips/include/asm/netlogic/xlr/xlr.h b/arch/mips/include/asm/netlogic/xlr/xlr.h
index c1667e0..ceb991c 100644
--- a/arch/mips/include/asm/netlogic/xlr/xlr.h
+++ b/arch/mips/include/asm/netlogic/xlr/xlr.h
@@ -35,11 +35,6 @@
 #ifndef _ASM_NLM_XLR_H
 #define _ASM_NLM_XLR_H
 
-/* Platform UART functions */
-struct uart_port;
-unsigned int nlm_xlr_uart_in(struct uart_port *, int);
-void nlm_xlr_uart_out(struct uart_port *, int, int);
-
 /* SMP helpers */
 void xlr_wakeup_secondary_cpus(void);
 
diff --git a/arch/mips/netlogic/xlr/platform.c b/arch/mips/netlogic/xlr/platform.c
index 7b96a91..4785932 100644
--- a/arch/mips/netlogic/xlr/platform.c
+++ b/arch/mips/netlogic/xlr/platform.c
@@ -23,7 +23,7 @@
 #include <asm/netlogic/xlr/pic.h>
 #include <asm/netlogic/xlr/xlr.h>
 
-unsigned int nlm_xlr_uart_in(struct uart_port *p, int offset)
+static unsigned int nlm_xlr_uart_in(struct uart_port *p, int offset)
 {
 	uint64_t uartbase;
 	unsigned int value;
@@ -41,7 +41,7 @@ unsigned int nlm_xlr_uart_in(struct uart_port *p, int offset)
 	return value;
 }
 
-void nlm_xlr_uart_out(struct uart_port *p, int offset, int value)
+static void nlm_xlr_uart_out(struct uart_port *p, int offset, int value)
 {
 	uint64_t uartbase;
 
diff --git a/arch/mips/netlogic/xlr/setup.c b/arch/mips/netlogic/xlr/setup.c
index 214d123..de1f287 100644
--- a/arch/mips/netlogic/xlr/setup.c
+++ b/arch/mips/netlogic/xlr/setup.c
@@ -60,25 +60,6 @@ unsigned int  nlm_threads_per_core = 1;
 struct nlm_soc_info nlm_nodes[NLM_NR_NODES];
 cpumask_t nlm_cpumask = CPU_MASK_CPU0;
 
-static void __init nlm_early_serial_setup(void)
-{
-	struct uart_port s;
-	unsigned long uart_base;
-
-	uart_base = (unsigned long)nlm_mmio_base(NETLOGIC_IO_UART_0_OFFSET);
-	memset(&s, 0, sizeof(s));
-	s.flags		= ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST;
-	s.iotype	= UPIO_MEM32;
-	s.regshift	= 2;
-	s.irq		= PIC_UART_0_IRQ;
-	s.uartclk	= PIC_CLK_HZ;
-	s.serial_in	= nlm_xlr_uart_in;
-	s.serial_out	= nlm_xlr_uart_out;
-	s.mapbase	= uart_base;
-	s.membase	= (unsigned char __iomem *)uart_base;
-	early_serial_setup(&s);
-}
-
 static void nlm_linux_exit(void)
 {
 	uint64_t gpiobase;
@@ -215,7 +196,6 @@ void __init prom_init(void)
 	memcpy(reset_vec, (void *)nlm_reset_entry,
 			(nlm_reset_entry_end - nlm_reset_entry));
 
-	nlm_early_serial_setup();
 	build_arcs_cmdline(argv);
 	prom_add_memory();
 
-- 
1.7.9.5

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

end of thread, other threads:[~2013-10-25 11:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-15 12:59 [PATCH v2] MIPS: netlogic: xlr: Serial support depends on CONFIG_SERIAL_8250 Markos Chandras
2013-08-15 12:59 ` Markos Chandras
2013-08-18 10:08 ` Jayachandran C.
2013-10-25 11:24 ` [PATCH] MIPS: Netlogic: Remove XLR early serial setup Jayachandran C

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.