From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
To: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: Russell King <linux@arm.linux.org.uk>,
Jason Cooper <jason@lakedaemon.net>, Andrew Lunn <andrew@lunn.ch>,
Gregory Clement <gregory.clement@free-electrons.com>,
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
Arnd Bergmann <arnd@arndb.de>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [RFC v1 3/5] ARM: mvebu: add Armada 150 uart to lowlevel debug
Date: Fri, 16 Aug 2013 21:41:36 +0200 [thread overview]
Message-ID: <1376682098-10580-4-git-send-email-sebastian.hesselbarth@gmail.com> (raw)
In-Reply-To: <1376682098-10580-1-git-send-email-sebastian.hesselbarth@gmail.com>
This adds UART0 as found on the Armada 1500 to the lowlevel debug of
mach-mvebu. Unfortunately, default register base addresses for Armada
370/XP switched from 0xd000000 to 0xf100000. So, we finally end up
in three different lowlevel setups:
(a) Armada 1500 (possibly also Armada 1000, or MV88DE3xxx in general)
(b) Armada 370/XP with new bootloader mapping at 0xf1000000 and
the other Orion SoCs (Dove, Kirkwood, Orion5x, MV78xx0)
(c) Armada 370/XP with old bootloader mapping at 0xd0000000
Now, mach-mvebu has been a Armada 370/XP-only playground for a while
but with great work of Thomas, Gregory, and the others we have moved
almost all drivers to DT. I suggest to clean-up a little and find
some meaningful names for the DEBUG_ Kconfigs.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
---
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
arch/arm/include/debug/mvebu.S | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/arch/arm/include/debug/mvebu.S b/arch/arm/include/debug/mvebu.S
index 6517311..ca41c02 100644
--- a/arch/arm/include/debug/mvebu.S
+++ b/arch/arm/include/debug/mvebu.S
@@ -11,19 +11,25 @@
* published by the Free Software Foundation.
*/
-#ifdef CONFIG_DEBUG_MVEBU_UART_ALTERNATE
-#define ARMADA_370_XP_REGS_PHYS_BASE 0xf1000000
-#else
-#define ARMADA_370_XP_REGS_PHYS_BASE 0xd0000000
+#if defined(CONFIG_MACH_ARMADA_1500)
+#define MVEBU_REGS_PHYS_BASE 0xf7f80000
+#define MVEBU_REGS_VIRT_BASE 0xf7f80000
+#define MVEBU_UART0_OFFSET 0x00049000
+#elif defined(CONFIG_DEBUG_MVEBU_UART)
+#define MVEBU_REGS_PHYS_BASE 0xd0000000
+#define MVEBU_REGS_VIRT_BASE 0xfec00000
+#define MVEBU_UART0_OFFSET 0x00012000
+#else /* CONFIG_DEBUG_MVEBU_UART_ALTERNATE */
+#define MVEBU_REGS_PHYS_BASE 0xf1000000
+#define MVEBU_REGS_VIRT_BASE 0xfec00000
+#define MVEBU_UART0_OFFSET 0x00012000
#endif
-#define ARMADA_370_XP_REGS_VIRT_BASE 0xfec00000
-
.macro addruart, rp, rv, tmp
- ldr \rp, =ARMADA_370_XP_REGS_PHYS_BASE
- ldr \rv, =ARMADA_370_XP_REGS_VIRT_BASE
- orr \rp, \rp, #0x00012000
- orr \rv, \rv, #0x00012000
+ ldr \rp, =MVEBU_REGS_PHYS_BASE
+ ldr \rv, =MVEBU_REGS_VIRT_BASE
+ orr \rp, \rp, #MVEBU_UART0_OFFSET
+ orr \rv, \rv, #MVEBU_UART0_OFFSET
.endm
#define UART_SHIFT 2
--
1.7.10.4
next prev parent reply other threads:[~2013-08-16 22:26 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-16 19:41 [RFC v1 0/5] ARM: Initial support for Marvell Armada 1500 Sebastian Hesselbarth
2013-08-16 19:41 ` [RFC v1 1/5] irqchip: add Armada 1500 APB interrupt controller Sebastian Hesselbarth
2013-08-17 13:24 ` Sebastian Hesselbarth
2013-08-16 19:41 ` [RFC v1 2/5] ARM: mvebu: add Armada 1500 to defconfig Sebastian Hesselbarth
2013-08-16 19:41 ` Sebastian Hesselbarth [this message]
2013-08-16 20:39 ` [RFC v1 3/5] ARM: mvebu: add Armada 150 uart to lowlevel debug Jason Cooper
2013-08-17 19:01 ` Arnd Bergmann
2013-08-16 19:41 ` [RFC v1 4/5] ARM: mvebu: add Armada 1500 and Sony NSZ-GS7 device tree files Sebastian Hesselbarth
2013-08-16 19:50 ` Jason Cooper
2013-08-16 19:54 ` Sebastian Hesselbarth
2013-08-16 20:22 ` Jason Cooper
2013-08-17 19:28 ` Arnd Bergmann
2013-08-18 23:11 ` Sebastian Hesselbarth
2013-08-19 8:46 ` Arnd Bergmann
2013-08-16 19:41 ` [RFC v1 5/5] ARM: mvebu: add board init for Armada 1500 Sebastian Hesselbarth
2013-08-16 20:48 ` Jason Cooper
2013-08-17 13:01 ` Sebastian Hesselbarth
2013-08-17 19:08 ` Arnd Bergmann
2013-08-17 19:13 ` Arnd Bergmann
2013-08-18 23:01 ` Sebastian Hesselbarth
2013-08-19 7:44 ` Arnd Bergmann
2013-08-19 14:52 ` Sebastian Hesselbarth
2013-08-19 17:47 ` Arnd Bergmann
2013-08-17 15:38 ` Thomas Petazzoni
2013-08-17 19:12 ` Arnd Bergmann
2013-08-18 23:02 ` Sebastian Hesselbarth
2013-08-19 7:58 ` Arnd Bergmann
2013-08-17 19:32 ` [RFC v1 0/5] ARM: Initial support for Marvell " Arnd Bergmann
2013-08-18 23:21 ` Sebastian Hesselbarth
2013-08-19 8:03 ` Arnd Bergmann
2013-08-18 16:34 ` Thomas Petazzoni
2013-08-27 14:19 ` Thomas Petazzoni
2013-08-27 16:45 ` Sebastian Hesselbarth
2013-08-27 16:51 ` Thomas Petazzoni
2013-08-27 19:38 ` Arnd Bergmann
2013-08-28 0:14 ` [PATCH RFC v2 0/6] " Sebastian Hesselbarth
2013-08-28 0:14 ` [PATCH RFC v2 1/6] irqchip: add DesignWare APB ICTL interrupt controller Sebastian Hesselbarth
2013-08-28 0:14 ` [PATCH RFC v2 2/6] ARM: add Marvell Berlin SoC familiy to Marvell doc Sebastian Hesselbarth
2013-08-28 0:14 ` [PATCH RFC v2 3/6] ARM: add Marvell Berlin and Armada 1500 to multi_v7_defconfig Sebastian Hesselbarth
2013-08-28 0:14 ` [PATCH RFC v2 4/6] ARM: add Marvell Berlin UART0 lowlevel debug Sebastian Hesselbarth
2013-08-28 0:14 ` [PATCH RFC v2 5/6] ARM: add Armada 1500 and Sony NSZ-GS7 device tree files Sebastian Hesselbarth
2013-08-28 12:14 ` Jason Cooper
2013-08-28 12:23 ` Sebastian Hesselbarth
2013-08-28 0:14 ` [PATCH RFC v2 6/6] ARM: add initial support for Marvell Berlin SoCs Sebastian Hesselbarth
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=1376682098-10580-4-git-send-email-sebastian.hesselbarth@gmail.com \
--to=sebastian.hesselbarth@gmail.com \
--cc=andrew@lunn.ch \
--cc=arnd@arndb.de \
--cc=gregory.clement@free-electrons.com \
--cc=jason@lakedaemon.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=thomas.petazzoni@free-electrons.com \
/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;
as well as URLs for NNTP newsgroup(s).