diff options
author | Paul Burton <paul.burton@imgtec.com> | 2016-08-26 16:17:35 +0200 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2016-10-05 01:31:20 +0200 |
commit | c11e3b48dbc367e38dfaea6e8a61d3b39f476685 (patch) | |
tree | 206ec739e07875e5cb77a71fe2fed8b9a7cbcba9 /arch/mips/mti-sead3/sead3-platform.c | |
parent | MIPS: SEAD3: Probe interrupt controllers using DT (diff) | |
download | linux-c11e3b48dbc367e38dfaea6e8a61d3b39f476685.tar.xz linux-c11e3b48dbc367e38dfaea6e8a61d3b39f476685.zip |
MIPS: SEAD3: Probe UARTs using DT
Probe the UARTs on SEAD3 boards using device tree rather than platform
code, in order to reduce the amount of the latter. This requires that
CONFIG_SERIAL_OF_PLATFORM be enabled, so enable it in sead3_defconfig.
The SEAD3 DT shim code is extended to read bootloader environment
variables to determine the appropriate UART & mode for kernel console
output & set the stdout-path property of the chosen node accordingly.
In contrast to the old platform code, which appears to have only ever
set "console=ttyS0,38400n8r" with the code in console_config never
having an effect, this will honor the "yamontty" environment variable to
select between the 2 UARTs on the board and then check the "modetty0" or
"modetty1" variable as appropriate to determine the UART configuration.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: linux-mips@linux-mips.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/14048/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/mti-sead3/sead3-platform.c')
-rw-r--r-- | arch/mips/mti-sead3/sead3-platform.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/arch/mips/mti-sead3/sead3-platform.c b/arch/mips/mti-sead3/sead3-platform.c index d6be0298056a..538a6f8f0917 100644 --- a/arch/mips/mti-sead3/sead3-platform.c +++ b/arch/mips/mti-sead3/sead3-platform.c @@ -14,35 +14,10 @@ #include <linux/mtd/physmap.h> #include <linux/of.h> #include <linux/platform_device.h> -#include <linux/serial_8250.h> #include <linux/smsc911x.h> #include <asm/mips-boards/sead3int.h> -#define UART(base) \ -{ \ - .mapbase = base, \ - .irq = -1, \ - .uartclk = 14745600, \ - .iotype = UPIO_MEM32, \ - .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, \ - .regshift = 2, \ -} - -static struct plat_serial8250_port uart8250_data[] = { - UART(0x1f000900), /* ttyS0 = USB */ - UART(0x1f000800), /* ttyS1 = RS232 */ - { }, -}; - -static struct platform_device uart8250_device = { - .name = "serial8250", - .id = PLAT8250_DEV_PLATFORM2, - .dev = { - .platform_data = uart8250_data, - }, -}; - static struct smsc911x_platform_config sead3_smsc911x_data = { .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, @@ -195,7 +170,6 @@ static struct platform_device ehci_device = { }; static struct platform_device *sead3_platform_devices[] __initdata = { - &uart8250_device, &sead3_flash, &pled_device, &fled_device, @@ -228,15 +202,11 @@ static int __init sead3_platforms_device_init(void) } if (gic_present) { - uart8250_data[0].irq = irq_create_mapping(irqd, GIC_INT_UART0); - uart8250_data[1].irq = irq_create_mapping(irqd, GIC_INT_UART1); ehci_resources[1].start = irq_create_mapping(irqd, GIC_INT_EHCI); sead3_net_resources[1].start = irq_create_mapping(irqd, GIC_INT_NET); } else { - uart8250_data[0].irq = irq_create_mapping(irqd, CPU_INT_UART0); - uart8250_data[1].irq = irq_create_mapping(irqd, CPU_INT_UART1); ehci_resources[1].start = irq_create_mapping(irqd, CPU_INT_EHCI); sead3_net_resources[1].start = |