From: pavel@denx.de (Pavel Machek)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] Fix socfpga compilation with early_printk() enabled
Date: Wed, 17 Oct 2012 20:16:48 +0200 [thread overview]
Message-ID: <20121017181648.GA12120@elf.ucw.cz> (raw)
In-Reply-To: <20120701184110.GA30680@elf.ucw.cz>
Hi!
This fixes early_printk() compilation for
socfpga. (senduart/busyuart/waituart were missing). It does that by
making Picochip code generic.
Signed-off-by: Pavel Machek <pavel@denx.de>
Acked-by: Dinh Nguyen <dinguyen@altera.com>
Acked-by: Jamie Iles <jamie@jamieiles.com
diff --git a/arch/arm/include/debug/8250_32.S b/arch/arm/include/debug/8250_32.S
new file mode 100644
index 0000000..8db01ee
--- /dev/null
+++ b/arch/arm/include/debug/8250_32.S
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2011 Picochip Ltd., Jamie Iles
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Derived from arch/arm/mach-davinci/include/mach/debug-macro.S to use 32-bit
+ * accesses to the 8250.
+ */
+
+#include <linux/serial_reg.h>
+
+ .macro senduart,rd,rx
+ str \rd, [\rx, #UART_TX << UART_SHIFT]
+ .endm
+
+ .macro busyuart,rd,rx
+1002: ldr \rd, [\rx, #UART_LSR << UART_SHIFT]
+ and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE
+ teq \rd, #UART_LSR_TEMT | UART_LSR_THRE
+ bne 1002b
+ .endm
+
+ /* The UART's don't have any flow control IO's wired up. */
+ .macro waituart,rd,rx
+ .endm
diff --git a/arch/arm/include/debug/picoxcell.S b/arch/arm/include/debug/picoxcell.S
index 7419deb..bc1f07c 100644
--- a/arch/arm/include/debug/picoxcell.S
+++ b/arch/arm/include/debug/picoxcell.S
@@ -5,10 +5,7 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
- * Derived from arch/arm/mach-davinci/include/mach/debug-macro.S to use 32-bit
- * accesses to the 8250.
*/
-#include <linux/serial_reg.h>
#define UART_SHIFT 2
#define PICOXCELL_UART1_BASE 0x80230000
@@ -19,17 +16,4 @@
ldr \rp, =PICOXCELL_UART1_BASE
.endm
- .macro senduart,rd,rx
- str \rd, [\rx, #UART_TX << UART_SHIFT]
- .endm
-
- .macro busyuart,rd,rx
-1002: ldr \rd, [\rx, #UART_LSR << UART_SHIFT]
- and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE
- teq \rd, #UART_LSR_TEMT | UART_LSR_THRE
- bne 1002b
- .endm
-
- /* The UART's don't have any flow control IO's wired up. */
- .macro waituart,rd,rx
- .endm
+#include "8250_32.S"
diff --git a/arch/arm/include/debug/socfpga.S b/arch/arm/include/debug/socfpga.S
index d6f26d2..966b2f9 100644
--- a/arch/arm/include/debug/socfpga.S
+++ b/arch/arm/include/debug/socfpga.S
@@ -7,6 +7,9 @@
* published by the Free Software Foundation.
*/
+#define UART_SHIFT 2
+#define DEBUG_LL_UART_OFFSET 0x00002000
+
.macro addruart, rp, rv, tmp
mov \rp, #DEBUG_LL_UART_OFFSET
orr \rp, \rp, #0x00c00000
@@ -14,3 +17,5 @@
orr \rp, \rp, #0xff000000 @ physical base
.endm
+#include "8250_32.S"
+
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2012-10-17 18:16 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-27 13:50 [RFC]Add initial support for Altera's SOCFPGA hardward dinguyen at altera.com
2012-06-27 13:50 ` [RFC PATCHv1 1/2] ARM: socfpga: initial support for Altera's SOCFPGA platform dinguyen at altera.com
2012-06-27 14:20 ` Thomas Petazzoni
2012-06-27 18:05 ` Pavel Machek
2012-06-27 18:40 ` Thomas Petazzoni
2012-06-29 19:54 ` Dinh Nguyen
2012-06-29 22:18 ` Thomas Petazzoni
2012-07-04 16:11 ` Thomas Petazzoni
2012-06-30 21:04 ` Arnd Bergmann
2012-07-01 18:41 ` Pavel Machek
2012-07-02 16:52 ` Arnd Bergmann
2012-07-02 21:53 ` Pavel Machek
2012-10-17 18:16 ` Pavel Machek [this message]
2012-10-25 14:58 ` [PATCH] Fix socfpga compilation with early_printk() enabled Arnd Bergmann
2012-10-27 11:56 ` Pavel Machek
2012-10-27 15:39 ` Arnd Bergmann
2012-10-28 23:01 ` arm-soc tree was " Pavel Machek
2012-10-28 23:13 ` Pavel Machek
2012-10-29 4:41 ` Arnd Bergmann
2012-10-30 16:03 ` Pawel Moll
2012-10-29 4:45 ` Arnd Bergmann
2012-10-29 0:27 ` [PATCH for soc] socfpga: map uart into virtual address space so that early_printk() works Pavel Machek
2012-11-03 11:26 ` Pavel Machek
2012-11-05 17:18 ` Olof Johansson
2012-06-27 20:27 ` [RFC PATCHv1 1/2] ARM: socfpga: initial support for Altera's SOCFPGA platform Pavel Machek
2012-06-30 18:57 ` Pavel Machek
2012-07-01 18:10 ` Pavel Machek
2012-07-04 10:56 ` Pavel Machek
2012-07-04 11:10 ` Thomas Petazzoni
2012-07-04 11:23 ` Pavel Machek
2012-07-04 14:30 ` Dinh Nguyen
2012-07-09 10:58 ` Pavel Machek
2012-07-04 11:15 ` Pavel Machek
2012-07-04 11:21 ` Thomas Petazzoni
2012-07-04 17:56 ` Rob Herring
2012-07-09 11:30 ` Pavel Machek
2012-07-09 13:25 ` Rob Herring
2012-07-10 9:48 ` Pavel Machek
2012-07-09 11:52 ` Pavel Machek
2012-07-09 12:06 ` Pavel Machek
2012-07-09 12:10 ` Pavel Machek
2012-06-27 13:50 ` [RFC PATCHv1 2/2] ARM: socfpga: Add board support for Altera's SOCFPGA Cyclone 5 HW dinguyen at altera.com
2012-06-27 14:25 ` Thomas Petazzoni
2012-06-27 21:06 ` Pavel Machek
2012-06-27 22:19 ` Thomas Petazzoni
2012-06-28 0:00 ` Pavel Machek
2012-07-10 11:15 ` Pavel Machek
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=20121017181648.GA12120@elf.ucw.cz \
--to=pavel@denx.de \
--cc=linux-arm-kernel@lists.infradead.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 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.