From: Paul Burton <paul.burton@imgtec.com>
To: <linux-mips@linux-mips.org>
Cc: <devicetree@vger.kernel.org>, Rob Herring <robh+dt@kernel.org>,
Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
"Paul Burton" <paul.burton@imgtec.com>,
Paolo Bonzini <pbonzini@redhat.com>,
"Hannes Reinecke" <hare@suse.de>,
"Steven J. Hill" <Steven.Hill@imgtec.com>,
<linux-kernel@vger.kernel.org>, Christoph Hellwig <hch@lst.de>,
"David S. Miller" <davem@davemloft.net>,
Markos Chandras <markos.chandras@imgtec.com>,
Michal Marek <mmarek@suse.cz>,
Bart Van Assche <bvanassche@acm.org>,
"Ralf Baechle" <ralf@linux-mips.org>
Subject: [PATCH 09/15] MIPS: malta: probe UARTs using DT
Date: Fri, 22 May 2015 16:51:08 +0100 [thread overview]
Message-ID: <1432309875-9712-10-git-send-email-paul.burton@imgtec.com> (raw)
In-Reply-To: <1432309875-9712-1-git-send-email-paul.burton@imgtec.com>
Add the DT nodes required to probe the UARTs present in the Malta
development board, and remove the platform data that was previously
accomplishing the same thing. Enable CONFIG_SERIAL_OF_PLATFORM in the
various Malta defconfigs in order to continue supporting serial output
when using them.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
---
arch/mips/boot/dts/mti/malta.dts | 51 +++++++++++++++++++++++++++++
arch/mips/configs/malta_defconfig | 1 +
arch/mips/configs/malta_kvm_defconfig | 1 +
arch/mips/configs/malta_kvm_guest_defconfig | 1 +
arch/mips/configs/malta_qemu_32r6_defconfig | 1 +
arch/mips/configs/maltaaprp_defconfig | 1 +
arch/mips/configs/maltasmvp_defconfig | 1 +
arch/mips/configs/maltasmvp_eva_defconfig | 1 +
arch/mips/configs/maltaup_defconfig | 1 +
arch/mips/configs/maltaup_xpa_defconfig | 1 +
arch/mips/mti-malta/malta-platform.c | 37 ---------------------
11 files changed, 60 insertions(+), 37 deletions(-)
diff --git a/arch/mips/boot/dts/mti/malta.dts b/arch/mips/boot/dts/mti/malta.dts
index 4bcdeb4..905a347 100644
--- a/arch/mips/boot/dts/mti/malta.dts
+++ b/arch/mips/boot/dts/mti/malta.dts
@@ -43,6 +43,57 @@
};
};
+ isa {
+ compatible = "isa";
+ #address-cells = <2>;
+ #size-cells = <1>;
+ ranges = <1 0 0 0x1000>;
+
+ uart0: uart@3f8 {
+ compatible = "ns16550";
+ reg = <1 0x3f8 0x8>;
+
+ clock-frequency = <1843200>;
+
+ interrupt-parent = <&i8259>;
+ interrupts = <4>;
+
+ no-loopback-test;
+ };
+
+ uart1: uart@2f8 {
+ compatible = "ns16550";
+ reg = <1 0x2f8 0x8>;
+
+ clock-frequency = <1843200>;
+
+ interrupt-parent = <&i8259>;
+ interrupts = <3>;
+
+ no-loopback-test;
+ };
+ };
+
+ fpga {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0 0x1f000000 0x100000>;
+
+ uart2: uart@900 {
+ compatible = "ns16550";
+
+ reg = <0x900 0x40>;
+ reg-io-width = <4>;
+ reg-shift = <3>;
+
+ clock-frequency = <3686400>;
+
+ interrupt-parent = <&cpu_intc>;
+ interrupts = <4>;
+ };
+ };
+
board {
compatible = "simple-bus";
#address-cells = <1>;
diff --git a/arch/mips/configs/malta_defconfig b/arch/mips/configs/malta_defconfig
index 61a4460..4f0528c 100644
--- a/arch/mips/configs/malta_defconfig
+++ b/arch/mips/configs/malta_defconfig
@@ -320,6 +320,7 @@ CONFIG_LIBERTAS=m
# CONFIG_SERIO_I8042 is not set
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_OF_PLATFORM=y
# CONFIG_HWMON is not set
CONFIG_FB=y
CONFIG_FB_CIRRUS=y
diff --git a/arch/mips/configs/malta_kvm_defconfig b/arch/mips/configs/malta_kvm_defconfig
index d41742d..815595d 100644
--- a/arch/mips/configs/malta_kvm_defconfig
+++ b/arch/mips/configs/malta_kvm_defconfig
@@ -329,6 +329,7 @@ CONFIG_LIBERTAS=m
# CONFIG_SERIO_I8042 is not set
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_OF_PLATFORM=y
# CONFIG_HWMON is not set
CONFIG_FB=y
CONFIG_FB_CIRRUS=y
diff --git a/arch/mips/configs/malta_kvm_guest_defconfig b/arch/mips/configs/malta_kvm_guest_defconfig
index a7806e8..2a0d7b0 100644
--- a/arch/mips/configs/malta_kvm_guest_defconfig
+++ b/arch/mips/configs/malta_kvm_guest_defconfig
@@ -329,6 +329,7 @@ CONFIG_LIBERTAS=m
# CONFIG_SERIO_I8042 is not set
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_OF_PLATFORM=y
# CONFIG_HWMON is not set
CONFIG_FB=y
CONFIG_FB_CIRRUS=y
diff --git a/arch/mips/configs/malta_qemu_32r6_defconfig b/arch/mips/configs/malta_qemu_32r6_defconfig
index 4bce1f8..9415088 100644
--- a/arch/mips/configs/malta_qemu_32r6_defconfig
+++ b/arch/mips/configs/malta_qemu_32r6_defconfig
@@ -132,6 +132,7 @@ CONFIG_PCNET32=y
CONFIG_LEGACY_PTY_COUNT=4
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_OF_PLATFORM=y
CONFIG_HW_RANDOM=y
# CONFIG_HWMON is not set
CONFIG_FB=y
diff --git a/arch/mips/configs/maltaaprp_defconfig b/arch/mips/configs/maltaaprp_defconfig
index fb042ce..955897a 100644
--- a/arch/mips/configs/maltaaprp_defconfig
+++ b/arch/mips/configs/maltaaprp_defconfig
@@ -132,6 +132,7 @@ CONFIG_PCNET32=y
CONFIG_LEGACY_PTY_COUNT=16
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_OF_PLATFORM=y
CONFIG_HW_RANDOM=y
# CONFIG_HWMON is not set
CONFIG_VIDEO_OUTPUT_CONTROL=m
diff --git a/arch/mips/configs/maltasmvp_defconfig b/arch/mips/configs/maltasmvp_defconfig
index f8a3231..b3ae18e 100644
--- a/arch/mips/configs/maltasmvp_defconfig
+++ b/arch/mips/configs/maltasmvp_defconfig
@@ -136,6 +136,7 @@ CONFIG_PCNET32=y
CONFIG_LEGACY_PTY_COUNT=4
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_OF_PLATFORM=y
CONFIG_HW_RANDOM=y
# CONFIG_HWMON is not set
CONFIG_VIDEO_OUTPUT_CONTROL=m
diff --git a/arch/mips/configs/maltasmvp_eva_defconfig b/arch/mips/configs/maltasmvp_eva_defconfig
index c83338a..9ae3235 100644
--- a/arch/mips/configs/maltasmvp_eva_defconfig
+++ b/arch/mips/configs/maltasmvp_eva_defconfig
@@ -137,6 +137,7 @@ CONFIG_PCNET32=y
CONFIG_LEGACY_PTY_COUNT=4
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_OF_PLATFORM=y
CONFIG_HW_RANDOM=y
# CONFIG_HWMON is not set
CONFIG_VIDEO_OUTPUT_CONTROL=m
diff --git a/arch/mips/configs/maltaup_defconfig b/arch/mips/configs/maltaup_defconfig
index 6234464..73a54ca 100644
--- a/arch/mips/configs/maltaup_defconfig
+++ b/arch/mips/configs/maltaup_defconfig
@@ -131,6 +131,7 @@ CONFIG_PCNET32=y
CONFIG_LEGACY_PTY_COUNT=16
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_OF_PLATFORM=y
CONFIG_HW_RANDOM=y
# CONFIG_HWMON is not set
CONFIG_VIDEO_OUTPUT_CONTROL=m
diff --git a/arch/mips/configs/maltaup_xpa_defconfig b/arch/mips/configs/maltaup_xpa_defconfig
index c388bff..7d7714c 100644
--- a/arch/mips/configs/maltaup_xpa_defconfig
+++ b/arch/mips/configs/maltaup_xpa_defconfig
@@ -324,6 +324,7 @@ CONFIG_LIBERTAS=m
# CONFIG_SERIO_I8042 is not set
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_OF_PLATFORM=y
# CONFIG_HWMON is not set
CONFIG_FB=y
CONFIG_FB_CIRRUS=y
diff --git a/arch/mips/mti-malta/malta-platform.c b/arch/mips/mti-malta/malta-platform.c
index e1dd1c1..184c00d5 100644
--- a/arch/mips/mti-malta/malta-platform.c
+++ b/arch/mips/mti-malta/malta-platform.c
@@ -32,42 +32,6 @@
#include <asm/mips-boards/maltaint.h>
#include <mtd/mtd-abi.h>
-#define SMC_PORT(base, int) \
-{ \
- .iobase = base, \
- .irq = int, \
- .uartclk = 1843200, \
- .iotype = UPIO_PORT, \
- .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, \
- .regshift = 0, \
-}
-
-#define CBUS_UART_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP)
-
-static struct plat_serial8250_port uart8250_data[] = {
- SMC_PORT(0x3F8, 4),
- SMC_PORT(0x2F8, 3),
-#ifndef CONFIG_MIPS_CMP
- {
- .mapbase = 0x1f000900, /* The CBUS UART */
- .irq = MIPS_CPU_IRQ_BASE + MIPSCPU_INT_MB2,
- .uartclk = 3686400, /* Twice the usual clk! */
- .iotype = UPIO_MEM32,
- .flags = CBUS_UART_FLAGS,
- .regshift = 3,
- },
-#endif
- { },
-};
-
-static struct platform_device malta_uart8250_device = {
- .name = "serial8250",
- .id = PLAT8250_DEV_PLATFORM,
- .dev = {
- .platform_data = uart8250_data,
- },
-};
-
struct resource malta_rtc_resources[] = {
{
.start = RTC_PORT(0),
@@ -128,7 +92,6 @@ static struct platform_device malta_flash_device = {
};
static struct platform_device *malta_devices[] __initdata = {
- &malta_uart8250_device,
&malta_rtc_device,
&malta_flash_device,
};
--
2.4.1
next prev parent reply other threads:[~2015-05-22 15:54 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-22 15:50 [PATCH 00/15] MIPS Malta DT Conversion Paul Burton
2015-05-22 15:51 ` [PATCH 01/15] MIPS: define GCR_GIC_STATUS register fields Paul Burton
2015-05-22 15:51 ` [PATCH 02/15] MIPS: include errno.h for ENODEV in mips-cm.h Paul Burton
2015-05-22 15:51 ` [PATCH 03/15] MIPS: malta: basic DT plumbing Paul Burton
2015-05-22 15:51 ` [PATCH 04/15] MIPS: i8259: DT support Paul Burton
2015-05-22 15:51 ` [PATCH 05/15] irqchip: mips-gic: register IRQ domain with MIPS_GIC_IRQ_BASE Paul Burton
2015-05-22 17:27 ` Jason Cooper
2015-05-22 15:51 ` [PATCH 06/15] MIPS: malta: probe interrupt controllers via DT Paul Burton
2015-05-22 15:51 ` [PATCH 07/15] MIPS: remove [SR]ocIt(2) IRQ handling code Paul Burton
2015-05-22 15:51 ` [PATCH 08/15] of_serial: support for UARTs on I/O ports Paul Burton
2015-05-26 13:53 ` Peter Hurley
2015-05-22 15:51 ` Paul Burton [this message]
2015-05-22 15:51 ` [PATCH 10/15] MIPS: malta: probe RTC via DT Paul Burton
2015-05-22 15:51 ` [PATCH 11/15] MIPS: malta: probe pflash " Paul Burton
2015-05-22 15:51 ` [PATCH 12/15] MIPS: malta: remove fw_memblock_t abstraction Paul Burton
2015-05-22 15:51 ` [PATCH 13/15] MIPS: malta: remove nonsense memory limit Paul Burton
2015-05-22 15:51 ` [PATCH 14/15] MIPS: malta: setup RAM regions via DT Paul Burton
2015-10-29 4:39 ` Rob Herring
2015-05-22 15:51 ` [PATCH 15/15] MIPS: malta: setup post-I/O hole RAM on non-EVA Paul Burton
2015-05-25 7:59 ` [PATCH 00/15] MIPS Malta DT Conversion Rob Landley
2015-05-25 13:29 ` Paul Burton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1432309875-9712-10-git-send-email-paul.burton@imgtec.com \
--to=paul.burton@imgtec.com \
--cc=Steven.Hill@imgtec.com \
--cc=bvanassche@acm.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=mark.rutland@arm.com \
--cc=markos.chandras@imgtec.com \
--cc=mmarek@suse.cz \
--cc=pawel.moll@arm.com \
--cc=pbonzini@redhat.com \
--cc=ralf@linux-mips.org \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®