* [PATCH 1/3] ARM: vexpress: set stdout path
@ 2020-08-16 21:42 Lucas Stach
2020-08-16 21:42 ` [PATCH 2/3] ARM: vexpress: allow to select debug UART address Lucas Stach
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Lucas Stach @ 2020-08-16 21:42 UTC (permalink / raw)
To: barebox
This ensures that the correct console gets activated independent
of the device probe order.
Signed-off-by: Lucas Stach <dev@lynxeye.de>
---
arch/arm/dts/vexpress-v2p-ca15.dts | 4 ++++
arch/arm/dts/vexpress-v2p-ca9.dts | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/arch/arm/dts/vexpress-v2p-ca15.dts b/arch/arm/dts/vexpress-v2p-ca15.dts
index 69e93ee7b2b3..78d002590924 100644
--- a/arch/arm/dts/vexpress-v2p-ca15.dts
+++ b/arch/arm/dts/vexpress-v2p-ca15.dts
@@ -5,6 +5,10 @@
compatible = "barebox,environment";
device-path = &barebox_env;
};
+
+ chosen {
+ stdout-path = &v2m_serial0;
+ };
};
&nor_flash {
diff --git a/arch/arm/dts/vexpress-v2p-ca9.dts b/arch/arm/dts/vexpress-v2p-ca9.dts
index cb4afef185b6..8be04b174bed 100644
--- a/arch/arm/dts/vexpress-v2p-ca9.dts
+++ b/arch/arm/dts/vexpress-v2p-ca9.dts
@@ -10,6 +10,10 @@
state = &state;
};
+ chosen {
+ stdout-path = &v2m_serial0;
+ };
+
/* State: mutable part */
state: state {
magic = <0x4d433230>;
--
2.26.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/3] ARM: vexpress: allow to select debug UART address
2020-08-16 21:42 [PATCH 1/3] ARM: vexpress: set stdout path Lucas Stach
@ 2020-08-16 21:42 ` Lucas Stach
2020-08-17 10:31 ` Sascha Hauer
2020-08-16 21:42 ` [PATCH 3/3] ARM: vexpress: enable KALLSYMS in defconfig Lucas Stach
2020-08-17 4:54 ` [PATCH 1/3] ARM: vexpress: set stdout path Sascha Hauer
2 siblings, 1 reply; 5+ messages in thread
From: Lucas Stach @ 2020-08-16 21:42 UTC (permalink / raw)
To: barebox
DEBUG_LL currently doesn't work on the Vexpress platform for multiple
reasons: the addresses defined in the header aren't the real UART base
addresses but only the bus base address, also the referenced MP define
is never set.
Add two options to allow the user to select the correct debug UART
address for both supported Vexpress platforms.
Signed-off-by: Lucas Stach <dev@lynxeye.de>
---
arch/arm/mach-vexpress/include/mach/debug_ll.h | 11 +++++------
common/Kconfig | 15 +++++++++++++++
2 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-vexpress/include/mach/debug_ll.h b/arch/arm/mach-vexpress/include/mach/debug_ll.h
index d59f68ea1973..a9c0d9850db8 100644
--- a/arch/arm/mach-vexpress/include/mach/debug_ll.h
+++ b/arch/arm/mach-vexpress/include/mach/debug_ll.h
@@ -10,13 +10,12 @@
#include <linux/amba/serial.h>
#include <io.h>
-#define DEBUG_LL_PHYS_BASE 0x10000000
-#define DEBUG_LL_PHYS_BASE_RS1 0x1c000000
+#ifdef CONFIG_DEBUG_VEXPRESS_CA9_UART
+#define DEBUG_LL_UART_ADDR 0x10009000
+#endif
-#ifdef MP
-#define DEBUG_LL_UART_ADDR DEBUG_LL_PHYS_BASE
-#else
-#define DEBUG_LL_UART_ADDR DEBUG_LL_PHYS_BASE_RS1
+#ifdef CONFIG_DEBUG_VEXPRESS_CA15_UART
+#define DEBUG_LL_UART_ADDR 0x1c090000
#endif
#include <debug_ll/pl011.h>
diff --git a/common/Kconfig b/common/Kconfig
index 658437f01c5e..09b36f6f7880 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -1287,6 +1287,21 @@ config DEBUG_RPI3_MINI_UART
help
Say Y here if you want low-level debugging support on
RaspberryPi 3 board mini UART.
+
+config DEBUG_VEXPRESS_CA9_UART
+ bool "Vexpress CA9 debug UART"
+ depends on ARCH_VEXPRESS
+ help
+ Say Y here if you want low-level debugging support on the
+ Cortex-A9 based Vexpress boards.
+
+config DEBUG_VEXPRESS_CA15_UART
+ bool "Vexpress CA15 debug UART"
+ depends on ARCH_VEXPRESS
+ help
+ Say Y here if you want low-level debugging support on the
+ Cortex-A15 based Vexpress boards.
+
endchoice
config DEBUG_IMX_UART_PORT
--
2.26.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/3] ARM: vexpress: allow to select debug UART address
2020-08-16 21:42 ` [PATCH 2/3] ARM: vexpress: allow to select debug UART address Lucas Stach
@ 2020-08-17 10:31 ` Sascha Hauer
0 siblings, 0 replies; 5+ messages in thread
From: Sascha Hauer @ 2020-08-17 10:31 UTC (permalink / raw)
To: Lucas Stach; +Cc: barebox
On Sun, Aug 16, 2020 at 11:42:41PM +0200, Lucas Stach wrote:
> DEBUG_LL currently doesn't work on the Vexpress platform for multiple
> reasons: the addresses defined in the header aren't the real UART base
> addresses but only the bus base address, also the referenced MP define
> is never set.
>
> Add two options to allow the user to select the correct debug UART
> address for both supported Vexpress platforms.
>
> Signed-off-by: Lucas Stach <dev@lynxeye.de>
> ---
> arch/arm/mach-vexpress/include/mach/debug_ll.h | 11 +++++------
> common/Kconfig | 15 +++++++++++++++
> 2 files changed, 20 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/mach-vexpress/include/mach/debug_ll.h b/arch/arm/mach-vexpress/include/mach/debug_ll.h
> index d59f68ea1973..a9c0d9850db8 100644
> --- a/arch/arm/mach-vexpress/include/mach/debug_ll.h
> +++ b/arch/arm/mach-vexpress/include/mach/debug_ll.h
> @@ -10,13 +10,12 @@
> #include <linux/amba/serial.h>
> #include <io.h>
>
> -#define DEBUG_LL_PHYS_BASE 0x10000000
> -#define DEBUG_LL_PHYS_BASE_RS1 0x1c000000
> +#ifdef CONFIG_DEBUG_VEXPRESS_CA9_UART
> +#define DEBUG_LL_UART_ADDR 0x10009000
> +#endif
>
> -#ifdef MP
> -#define DEBUG_LL_UART_ADDR DEBUG_LL_PHYS_BASE
> -#else
> -#define DEBUG_LL_UART_ADDR DEBUG_LL_PHYS_BASE_RS1
> +#ifdef CONFIG_DEBUG_VEXPRESS_CA15_UART
> +#define DEBUG_LL_UART_ADDR 0x1c090000
> #endif
With this change DEBUG_LL_UART_ADDR is undefined when CONFIG_DEBUG_LL is
not set.
>
> #include <debug_ll/pl011.h>
in this file DEBUG_LL_UART_ADDR is used in a static inline function, so
we may only include it when DEBUG_LL_UART_ADDR is defined.
Not sure what we best do about it, but this breaks compilation of
vexpress_defconfig.
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
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] 5+ messages in thread
* [PATCH 3/3] ARM: vexpress: enable KALLSYMS in defconfig
2020-08-16 21:42 [PATCH 1/3] ARM: vexpress: set stdout path Lucas Stach
2020-08-16 21:42 ` [PATCH 2/3] ARM: vexpress: allow to select debug UART address Lucas Stach
@ 2020-08-16 21:42 ` Lucas Stach
2020-08-17 4:54 ` [PATCH 1/3] ARM: vexpress: set stdout path Sascha Hauer
2 siblings, 0 replies; 5+ messages in thread
From: Lucas Stach @ 2020-08-16 21:42 UTC (permalink / raw)
To: barebox
Vexpress is mostly a vehicle to test things in a virtual enviroment,
so it makes sense to enable this option which helps a lot when trying
to debug where things go wrong.
Signed-off-by: Lucas Stach <dev@lynxeye.de>
---
arch/arm/configs/vexpress_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/configs/vexpress_defconfig b/arch/arm/configs/vexpress_defconfig
index 149ba1732116..caa9f512d646 100644
--- a/arch/arm/configs/vexpress_defconfig
+++ b/arch/arm/configs/vexpress_defconfig
@@ -3,6 +3,7 @@ CONFIG_AEABI=y
CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
CONFIG_MALLOC_SIZE=0x0
CONFIG_MALLOC_TLSF=y
+CONFIG_KALLSYMS=y
CONFIG_PROMPT="vexpress: "
CONFIG_HUSH_FANCY_PROMPT=y
CONFIG_CMDLINE_EDITING=y
--
2.26.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/3] ARM: vexpress: set stdout path
2020-08-16 21:42 [PATCH 1/3] ARM: vexpress: set stdout path Lucas Stach
2020-08-16 21:42 ` [PATCH 2/3] ARM: vexpress: allow to select debug UART address Lucas Stach
2020-08-16 21:42 ` [PATCH 3/3] ARM: vexpress: enable KALLSYMS in defconfig Lucas Stach
@ 2020-08-17 4:54 ` Sascha Hauer
2 siblings, 0 replies; 5+ messages in thread
From: Sascha Hauer @ 2020-08-17 4:54 UTC (permalink / raw)
To: Lucas Stach; +Cc: barebox
On Sun, Aug 16, 2020 at 11:42:40PM +0200, Lucas Stach wrote:
> This ensures that the correct console gets activated independent
> of the device probe order.
>
> Signed-off-by: Lucas Stach <dev@lynxeye.de>
> ---
> arch/arm/dts/vexpress-v2p-ca15.dts | 4 ++++
> arch/arm/dts/vexpress-v2p-ca9.dts | 4 ++++
> 2 files changed, 8 insertions(+)
Applied, thanks
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
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] 5+ messages in thread
end of thread, other threads:[~2020-08-17 10:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-16 21:42 [PATCH 1/3] ARM: vexpress: set stdout path Lucas Stach
2020-08-16 21:42 ` [PATCH 2/3] ARM: vexpress: allow to select debug UART address Lucas Stach
2020-08-17 10:31 ` Sascha Hauer
2020-08-16 21:42 ` [PATCH 3/3] ARM: vexpress: enable KALLSYMS in defconfig Lucas Stach
2020-08-17 4:54 ` [PATCH 1/3] ARM: vexpress: set stdout path Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox