Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: Netlogic: Remove XLR early serial setup

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>
Signed-off-by: John Crispin <blogic@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/6083/

authored by

Jayachandran C and committed by
Ralf Baechle
194d315d a17fca64

+2 -27
-5
arch/mips/include/asm/netlogic/xlr/xlr.h
··· 35 35 #ifndef _ASM_NLM_XLR_H 36 36 #define _ASM_NLM_XLR_H 37 37 38 - /* Platform UART functions */ 39 - struct uart_port; 40 - unsigned int nlm_xlr_uart_in(struct uart_port *, int); 41 - void nlm_xlr_uart_out(struct uart_port *, int, int); 42 - 43 38 /* SMP helpers */ 44 39 void xlr_wakeup_secondary_cpus(void); 45 40
+2 -2
arch/mips/netlogic/xlr/platform.c
··· 23 23 #include <asm/netlogic/xlr/pic.h> 24 24 #include <asm/netlogic/xlr/xlr.h> 25 25 26 - unsigned int nlm_xlr_uart_in(struct uart_port *p, int offset) 26 + static unsigned int nlm_xlr_uart_in(struct uart_port *p, int offset) 27 27 { 28 28 uint64_t uartbase; 29 29 unsigned int value; ··· 41 41 return value; 42 42 } 43 43 44 - void nlm_xlr_uart_out(struct uart_port *p, int offset, int value) 44 + static void nlm_xlr_uart_out(struct uart_port *p, int offset, int value) 45 45 { 46 46 uint64_t uartbase; 47 47
-20
arch/mips/netlogic/xlr/setup.c
··· 60 60 struct nlm_soc_info nlm_nodes[NLM_NR_NODES]; 61 61 cpumask_t nlm_cpumask = CPU_MASK_CPU0; 62 62 63 - static void __init nlm_early_serial_setup(void) 64 - { 65 - struct uart_port s; 66 - unsigned long uart_base; 67 - 68 - uart_base = (unsigned long)nlm_mmio_base(NETLOGIC_IO_UART_0_OFFSET); 69 - memset(&s, 0, sizeof(s)); 70 - s.flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST; 71 - s.iotype = UPIO_MEM32; 72 - s.regshift = 2; 73 - s.irq = PIC_UART_0_IRQ; 74 - s.uartclk = PIC_CLK_HZ; 75 - s.serial_in = nlm_xlr_uart_in; 76 - s.serial_out = nlm_xlr_uart_out; 77 - s.mapbase = uart_base; 78 - s.membase = (unsigned char __iomem *)uart_base; 79 - early_serial_setup(&s); 80 - } 81 - 82 63 static void nlm_linux_exit(void) 83 64 { 84 65 uint64_t gpiobase; ··· 196 215 memcpy(reset_vec, (void *)nlm_reset_entry, 197 216 (nlm_reset_entry_end - nlm_reset_entry)); 198 217 199 - nlm_early_serial_setup(); 200 218 build_arcs_cmdline(argv); 201 219 prom_add_memory(); 202 220