* [PATCH 1/6] ARM: introduce debug_ll_pl011.h
2014-12-26 23:56 [PATCH 0/6] ARM: introduce debug_ll_pl011.h Antony Pavlov
@ 2014-12-26 23:56 ` Antony Pavlov
2014-12-26 23:56 ` [PATCH 2/6] ARM: vexpress: debug_ll.h: switch to debug_ll_pl011.h Antony Pavlov
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Antony Pavlov @ 2014-12-26 23:56 UTC (permalink / raw)
To: barebox
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
arch/arm/include/asm/debug_ll_pl011.h | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/arch/arm/include/asm/debug_ll_pl011.h b/arch/arm/include/asm/debug_ll_pl011.h
new file mode 100644
index 0000000..db015a3
--- /dev/null
+++ b/arch/arm/include/asm/debug_ll_pl011.h
@@ -0,0 +1,25 @@
+#ifndef __INCLUDE_ARM_ASM_DEBUG_LL_PL011_H__
+#define __INCLUDE_ARM_ASM_DEBUG_LL_PL011_H__
+
+#ifndef DEBUG_LL_UART_ADDR
+#error DEBUG_LL_UART_ADDR is undefined!
+#endif
+
+#include <io.h>
+#include <linux/amba/serial.h>
+
+static inline void PUTC_LL(char c)
+{
+ /* Wait until there is space in the FIFO */
+ while (readl(DEBUG_LL_UART_ADDR + UART01x_FR) & UART01x_FR_TXFF)
+ ;
+
+ /* Send the character */
+ writel(c, DEBUG_LL_UART_ADDR + UART01x_DR);
+
+ /* Wait to make sure it hits the line, in case we die too soon. */
+ while (readl(DEBUG_LL_UART_ADDR + UART01x_FR) & UART01x_FR_TXFF)
+ ;
+}
+
+#endif /* __INCLUDE_ARM_ASM_DEBUG_LL_PL011_H__ */
--
2.1.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/6] ARM: vexpress: debug_ll.h: switch to debug_ll_pl011.h
2014-12-26 23:56 [PATCH 0/6] ARM: introduce debug_ll_pl011.h Antony Pavlov
2014-12-26 23:56 ` [PATCH 1/6] " Antony Pavlov
@ 2014-12-26 23:56 ` Antony Pavlov
2014-12-26 23:56 ` [PATCH 3/6] ARM: highbank: " Antony Pavlov
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Antony Pavlov @ 2014-12-26 23:56 UTC (permalink / raw)
To: barebox
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
arch/arm/mach-vexpress/include/mach/debug_ll.h | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/arch/arm/mach-vexpress/include/mach/debug_ll.h b/arch/arm/mach-vexpress/include/mach/debug_ll.h
index 15d6e85..89b0692 100644
--- a/arch/arm/mach-vexpress/include/mach/debug_ll.h
+++ b/arch/arm/mach-vexpress/include/mach/debug_ll.h
@@ -14,20 +14,11 @@
#define DEBUG_LL_PHYS_BASE_RS1 0x1c000000
#ifdef MP
-#define UART_BASE DEBUG_LL_PHYS_BASE
+#define DEBUG_LL_UART_ADDR DEBUG_LL_PHYS_BASE
#else
-#define UART_BASE DEBUG_LL_PHYS_BASE_RS1
+#define DEBUG_LL_UART_ADDR DEBUG_LL_PHYS_BASE_RS1
#endif
-static inline void PUTC_LL(char c)
-{
- /* Wait until there is space in the FIFO */
- while (readl(UART_BASE + UART01x_FR) & UART01x_FR_TXFF);
+#include <asm/debug_ll_pl011.h>
- /* Send the character */
- writel(c, UART_BASE + UART01x_DR);
-
- /* Wait to make sure it hits the line, in case we die too soon. */
- while (readl(UART_BASE + UART01x_FR) & UART01x_FR_TXFF);
-}
#endif
--
2.1.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 3/6] ARM: highbank: debug_ll.h: switch to debug_ll_pl011.h
2014-12-26 23:56 [PATCH 0/6] ARM: introduce debug_ll_pl011.h Antony Pavlov
2014-12-26 23:56 ` [PATCH 1/6] " Antony Pavlov
2014-12-26 23:56 ` [PATCH 2/6] ARM: vexpress: debug_ll.h: switch to debug_ll_pl011.h Antony Pavlov
@ 2014-12-26 23:56 ` Antony Pavlov
2014-12-26 23:56 ` [PATCH 4/6] ARM: versatile: enable missed HAS_DEBUG_LL Antony Pavlov
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Antony Pavlov @ 2014-12-26 23:56 UTC (permalink / raw)
To: barebox
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
arch/arm/mach-highbank/include/mach/debug_ll.h | 16 ++--------------
1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/arch/arm/mach-highbank/include/mach/debug_ll.h b/arch/arm/mach-highbank/include/mach/debug_ll.h
index 4cdbb3c..1820eb1 100644
--- a/arch/arm/mach-highbank/include/mach/debug_ll.h
+++ b/arch/arm/mach-highbank/include/mach/debug_ll.h
@@ -7,20 +7,8 @@
#ifndef __MACH_DEBUG_LL_H__
#define __MACH_DEBUG_LL_H__
-#include <linux/amba/serial.h>
-#include <io.h>
+#define DEBUG_LL_UART_ADDR 0xfff36000
-#define UART_BASE 0xfff36000
+#include <asm/debug_ll_pl011.h>
-static inline void PUTC_LL(char c)
-{
- /* Wait until there is space in the FIFO */
- while (readl(UART_BASE + UART01x_FR) & UART01x_FR_TXFF);
-
- /* Send the character */
- writel(c, UART_BASE + UART01x_DR);
-
- /* Wait to make sure it hits the line, in case we die too soon. */
- while (readl(UART_BASE + UART01x_FR) & UART01x_FR_TXFF);
-}
#endif
--
2.1.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 4/6] ARM: versatile: enable missed HAS_DEBUG_LL
2014-12-26 23:56 [PATCH 0/6] ARM: introduce debug_ll_pl011.h Antony Pavlov
` (2 preceding siblings ...)
2014-12-26 23:56 ` [PATCH 3/6] ARM: highbank: " Antony Pavlov
@ 2014-12-26 23:56 ` Antony Pavlov
2014-12-26 23:56 ` [PATCH 5/6] ARM: versatile: debug_ll.h: switch to debug_ll_pl011.h Antony Pavlov
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Antony Pavlov @ 2014-12-26 23:56 UTC (permalink / raw)
To: barebox
We already have arch/arm/mach-versatile/include/mach/debug_ll.h
but HAS_DEBUG_LL is missed.
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
arch/arm/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 4aa6afe..97e2526 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -191,6 +191,7 @@ config ARCH_VERSATILE
select CPU_ARM926T
select GPIOLIB
select HAVE_CLK
+ select HAS_DEBUG_LL
config ARCH_VEXPRESS
bool "ARM Vexpres boards"
--
2.1.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 5/6] ARM: versatile: debug_ll.h: switch to debug_ll_pl011.h
2014-12-26 23:56 [PATCH 0/6] ARM: introduce debug_ll_pl011.h Antony Pavlov
` (3 preceding siblings ...)
2014-12-26 23:56 ` [PATCH 4/6] ARM: versatile: enable missed HAS_DEBUG_LL Antony Pavlov
@ 2014-12-26 23:56 ` Antony Pavlov
2014-12-26 23:56 ` [PATCH 6/6] ARM: bcm2835: add DEBUG_LL support Antony Pavlov
2015-01-05 11:34 ` [PATCH 0/6] ARM: introduce debug_ll_pl011.h Sascha Hauer
6 siblings, 0 replies; 8+ messages in thread
From: Antony Pavlov @ 2014-12-26 23:56 UTC (permalink / raw)
To: barebox
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
arch/arm/mach-versatile/include/mach/debug_ll.h | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/arch/arm/mach-versatile/include/mach/debug_ll.h b/arch/arm/mach-versatile/include/mach/debug_ll.h
index f91812b..e6ee877 100644
--- a/arch/arm/mach-versatile/include/mach/debug_ll.h
+++ b/arch/arm/mach-versatile/include/mach/debug_ll.h
@@ -16,19 +16,8 @@
#ifndef __MACH_DEBUG_LL_H__
#define __MACH_DEBUG_LL_H__
-#include <linux/amba/serial.h>
-#include <io.h>
+#define DEBUG_LL_UART_ADDR 0x101F1000
-static inline void PUTC_LL(char c)
-{
- /* Wait until there is space in the FIFO */
- while (readl(0x101F1000 + UART01x_FR) & UART01x_FR_TXFF);
-
- /* Send the character */
- writel(c, 0x101F1000 + UART01x_DR);
-
- /* Wait to make sure it hits the line, in case we die too soon. */
- while (readl(0x101F1000 + UART01x_FR) & UART01x_FR_TXFF);
-}
+#include <asm/debug_ll_pl011.h>
#endif
--
2.1.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 6/6] ARM: bcm2835: add DEBUG_LL support
2014-12-26 23:56 [PATCH 0/6] ARM: introduce debug_ll_pl011.h Antony Pavlov
` (4 preceding siblings ...)
2014-12-26 23:56 ` [PATCH 5/6] ARM: versatile: debug_ll.h: switch to debug_ll_pl011.h Antony Pavlov
@ 2014-12-26 23:56 ` Antony Pavlov
2015-01-05 11:34 ` [PATCH 0/6] ARM: introduce debug_ll_pl011.h Sascha Hauer
6 siblings, 0 replies; 8+ messages in thread
From: Antony Pavlov @ 2014-12-26 23:56 UTC (permalink / raw)
To: barebox
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
arch/arm/Kconfig | 1 +
arch/arm/mach-bcm2835/include/mach/debug_ll.h | 27 +++++++++++++++++++++++++++
2 files changed, 28 insertions(+)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 97e2526..08d5b3d 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -53,6 +53,7 @@ config ARCH_BCM2835
select COMMON_CLK
select CLOCKSOURCE_BCM2835
select ARM_AMBA
+ select HAS_DEBUG_LL
config ARCH_CLPS711X
bool "Cirrus Logic EP711x/EP721x/EP731x"
diff --git a/arch/arm/mach-bcm2835/include/mach/debug_ll.h b/arch/arm/mach-bcm2835/include/mach/debug_ll.h
new file mode 100644
index 0000000..be93cd9
--- /dev/null
+++ b/arch/arm/mach-bcm2835/include/mach/debug_ll.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2014 Antony Pavlov <antonynpavlov@gmail.com>
+ *
+ * This file is part of barebox.
+ * See file CREDITS for list of people who contributed to this project.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef __MACH_BCM2835_DEBUG_LL_H__
+#define __MACH_BCM2835_DEBUG_LL_H__
+
+#include <mach/platform.h>
+
+#define DEBUG_LL_UART_ADDR BCM2835_UART0_BASE
+
+#include <asm/debug_ll_pl011.h>
+
+#endif /* __MACH_BCM2835_DEBUG_LL_H__ */
--
2.1.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/6] ARM: introduce debug_ll_pl011.h
2014-12-26 23:56 [PATCH 0/6] ARM: introduce debug_ll_pl011.h Antony Pavlov
` (5 preceding siblings ...)
2014-12-26 23:56 ` [PATCH 6/6] ARM: bcm2835: add DEBUG_LL support Antony Pavlov
@ 2015-01-05 11:34 ` Sascha Hauer
6 siblings, 0 replies; 8+ messages in thread
From: Sascha Hauer @ 2015-01-05 11:34 UTC (permalink / raw)
To: Antony Pavlov; +Cc: barebox
On Sat, Dec 27, 2014 at 02:56:23AM +0300, Antony Pavlov wrote:
> Antony Pavlov (6):
> ARM: introduce debug_ll_pl011.h
> ARM: vexpress: debug_ll.h: switch to debug_ll_pl011.h
> ARM: highbank: debug_ll.h: switch to debug_ll_pl011.h
> ARM: versatile: enable missed HAS_DEBUG_LL
> ARM: versatile: debug_ll.h: switch to debug_ll_pl011.h
> ARM: bcm2835: add DEBUG_LL support
Applied, thanks
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 8+ messages in thread