* [PATCH v3 0/2] Cleanup DEBUG_LL infrastructure
@ 2009-09-19 0:39 Vikram Pandita
2009-09-19 0:39 ` [PATCH 1/2] OMAP1/2/3/4: DEBUG_LL run time detection Vikram Pandita
0 siblings, 1 reply; 5+ messages in thread
From: Vikram Pandita @ 2009-09-19 0:39 UTC (permalink / raw)
To: linux-arm-kernel
Patch1: clean up the DEBUG_LL infrastructure for run time detection
Patch2: add DEBUG_LL support for Zoom2 board that has external UART
Patchs are also hosted at:
git://dev.omapzoom.org/pub/scm/vikram/omap3.git debug-ll-ver3
Tested on OMAP3: SDP3430/Zoom2/Zoom1/Beagleboard
Will appreciate if some can verify for OMAP2 and OMAP1 boards
Vikram Pandita (2):
OMAP1/2/3/4: DEBUG_LL run time detection
OMAP: Zoom2: Add DEBUG_LL interface using Quart
arch/arm/mach-omap2/board-zoom-debugboard.c | 5 +-
arch/arm/mach-omap2/board-zoom2.c | 18 +++-
arch/arm/plat-omap/Kconfig | 16 ---
arch/arm/plat-omap/Makefile | 2 +-
arch/arm/plat-omap/debug-low-level.c | 125 +++++++++++++++++++++++++
arch/arm/plat-omap/include/mach/debug-macro.S | 60 +++++-------
arch/arm/plat-omap/include/mach/io.h | 6 +
arch/arm/plat-omap/include/mach/uncompress.h | 27 +++---
8 files changed, 188 insertions(+), 71 deletions(-)
create mode 100644 arch/arm/plat-omap/debug-low-level.c
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] OMAP1/2/3/4: DEBUG_LL run time detection
2009-09-19 0:39 [PATCH v3 0/2] Cleanup DEBUG_LL infrastructure Vikram Pandita
@ 2009-09-19 0:39 ` Vikram Pandita
2009-09-19 0:39 ` [PATCH 2/2] OMAP: Zoom2: Add DEBUG_LL interface using Quart Vikram Pandita
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Vikram Pandita @ 2009-09-19 0:39 UTC (permalink / raw)
To: linux-arm-kernel
This patch cleans up the DEBUG_LL infrastructure for omap boards.
The decision of finding the physical address of debug uart is done
at runtime now, making possible to use a single defconfig for multiple boards.
This patch gets rid of menuconfig options of choosing low level debug uarts.
Changes are:
Implement dynamic uart detection functions in a new file:
arch/arm/plat-omap/debug-low-level.c
Functions:
get_uart_base() Returns debug uart physical address
get_uart_virt_base() Returns debug uart virtual address
get_uart_shift() Returns debug uart register shift
The same functions get used in the uncompressing stage of kernel
as well as for debug low level functions of kernel
Following comments from Russell King have been incorporated:
http://marc.info/?l=linux-arm-kernel&m=125321699528719&w=2
Changes have been tested on:
SDP3430: UART1
Zoom1: UART3
Beagle: UART3
Zoom2: External Uart
Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
---
arch/arm/mach-omap2/board-zoom-debugboard.c | 5 +-
arch/arm/plat-omap/Kconfig | 16 ---
arch/arm/plat-omap/Makefile | 2 +-
arch/arm/plat-omap/debug-low-level.c | 123 +++++++++++++++++++++++++
arch/arm/plat-omap/include/mach/debug-macro.S | 60 +++++--------
arch/arm/plat-omap/include/mach/uncompress.h | 27 +++---
6 files changed, 164 insertions(+), 69 deletions(-)
create mode 100644 arch/arm/plat-omap/debug-low-level.c
diff --git a/arch/arm/mach-omap2/board-zoom-debugboard.c b/arch/arm/mach-omap2/board-zoom-debugboard.c
index 1f13e2a..70a4bba 100644
--- a/arch/arm/mach-omap2/board-zoom-debugboard.c
+++ b/arch/arm/mach-omap2/board-zoom-debugboard.c
@@ -82,9 +82,10 @@ static inline void __init zoom2_init_smsc911x(void)
static struct plat_serial8250_port serial_platform_data[] = {
{
- .mapbase = 0x10000000,
+ .membase = IOMEM(ZOOM2_EXT_QUART_VIRT),
+ .mapbase = ZOOM2_EXT_QUART_PHYS,
.irq = OMAP_GPIO_IRQ(102),
- .flags = UPF_BOOT_AUTOCONF|UPF_IOREMAP|UPF_SHARE_IRQ,
+ .flags = UPF_BOOT_AUTOCONF|UPF_SHARE_IRQ,
.irqflags = IRQF_SHARED | IRQF_TRIGGER_RISING,
.iotype = UPIO_MEM,
.regshift = 1,
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index 64b3f52..dc00780 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -162,22 +162,6 @@ config OMAP_DM_TIMER
help
Select this option if you want to use OMAP Dual-Mode timers.
-choice
- prompt "Low-level debug console UART"
- depends on ARCH_OMAP
- default OMAP_LL_DEBUG_UART1
-
-config OMAP_LL_DEBUG_UART1
- bool "UART1"
-
-config OMAP_LL_DEBUG_UART2
- bool "UART2"
-
-config OMAP_LL_DEBUG_UART3
- bool "UART3"
-
-endchoice
-
config OMAP_SERIAL_WAKE
bool "Enable wake-up events for serial ports"
depends on ARCH_OMAP1 && OMAP_MUX
diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
index 98f0191..e205a06 100644
--- a/arch/arm/plat-omap/Makefile
+++ b/arch/arm/plat-omap/Makefile
@@ -4,7 +4,7 @@
# Common support
obj-y := common.o sram.o clock.o devices.o dma.o mux.o gpio.o \
- usb.o fb.o io.o
+ usb.o fb.o io.o debug-low-level.o
obj-m :=
obj-n :=
obj- :=
diff --git a/arch/arm/plat-omap/debug-low-level.c b/arch/arm/plat-omap/debug-low-level.c
new file mode 100644
index 0000000..c134694
--- /dev/null
+++ b/arch/arm/plat-omap/debug-low-level.c
@@ -0,0 +1,123 @@
+/*
+ * Common debug-low-level.c file
+ * This file is created by Vikram Pandita <vikram.pandita@ti.com>
+ *
+ * Copyright (C) 2009 Texas Instruments
+ *
+ * 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.
+ */
+#include <linux/types.h>
+#include <asm/mach-types.h>
+
+u32 get_uart_base(void)
+{
+ static u32 omap_uart_debug_ll_phy_addr;
+
+ if (omap_uart_debug_ll_phy_addr)
+ return omap_uart_debug_ll_phy_addr;
+
+ /* Add logic here for new platforms, using __machine_arch_type */
+
+ /* TODO: REVISIT -- Check Completeness
+ * DEFINE PHY ADDRESS for EACH BOARD HERE: omap1/2/3/4 */
+#if defined(CONFIG_ARCH_OMAP1)
+ switch (__machine_arch_type) {
+ case MACH_TYPE_OMAP_PALMTT:
+ case MACH_TYPE_SX1:
+ /* UART2 */
+ omap_uart_debug_ll_phy_addr = (u32 *)0xfffb0800;
+ break;
+ default:
+ /* UART1 */
+ omap_uart_debug_ll_phy_addr = (u32 *)0xfffb0000;
+ break;
+ }
+#endif
+
+#if defined(CONFIG_ARCH_OMAP2)
+ switch (__machine_arch_type) {
+ case MACH_TYPE_NOKIA_N800:
+ case MACH_TYPE_NOKIA_N810:
+ case MACH_TYPE_NOKIA_N810_WIMAX:
+ /* UART3 */
+ omap_uart_debug_ll_phy_addr = (u32 *)0x4806e000;
+ break;
+ default:
+ /* UART1 */
+ omap_uart_debug_ll_phy_addr = (u32 *)0x4806a000;
+ break;
+ }
+#endif
+
+#if defined(CONFIG_ARCH_OMAP3)
+ switch (__machine_arch_type) {
+ case MACH_TYPE_OMAP_LDP:
+ case MACH_TYPE_OVERO:
+ case MACH_TYPE_OMAP3_PANDORA:
+ case MACH_TYPE_NOKIA_RX51:
+ case MACH_TYPE_OMAP3_BEAGLE:
+ /* UART3 */
+ omap_uart_debug_ll_phy_addr = 0x49020000;
+ break;
+ case MACH_TYPE_OMAP_ZOOM2:
+ /* EXTERNEL UART */
+ omap_uart_debug_ll_phy_addr = 0x10000000;
+ break;
+ default:
+ /* UART1 */
+ omap_uart_debug_ll_phy_addr = 0x4806a000;
+ break;
+ }
+#endif
+
+#ifdef CONFIG_ARCH_OMAP4
+ switch (__machine_arch_type) {
+ /* OMAP3: UART1 */
+ case MACH_TYPE_OMAP_4430SDP:
+ default:
+ omap_uart_debug_ll_phy_addr = (u32 *)0x4806a000;
+ break;
+ }
+#endif
+
+ return omap_uart_debug_ll_phy_addr;
+}
+
+u32 get_uart_virt_base(void)
+{
+ u32 val = 0;
+
+#ifdef CONFIG_ARCH_OMAP1
+ /* omap1 */
+ val = 0xfef00000;
+#else
+ /* omap2/3/4... */
+ if (MACH_TYPE_OMAP_ZOOM2 == __machine_arch_type)
+ val = 0xFB000000 | get_uart_base(); /* ZOOM2_EXT_QUART_VIRT */
+ else
+ val = 0xd8000000 | get_uart_base();
+#endif
+
+ return val;
+}
+
+u8 get_uart_shift(void)
+{
+ u8 shift = 0;
+#ifdef CONFIG_ARCH_OMAP1
+ /* omap1 */
+ shift = 0;
+#else
+ shift = 2;
+ if (MACH_TYPE_OMAP_ZOOM2 == __machine_arch_type) {
+ /* External UART has a shift=1 requirement
+ * Internal OMAP UARTs have shift=2 requirement
+ */
+ shift = 1;
+ }
+#endif
+
+ return shift;
+}
diff --git a/arch/arm/plat-omap/include/mach/debug-macro.S b/arch/arm/plat-omap/include/mach/debug-macro.S
index ac24050..548fcd4 100644
--- a/arch/arm/plat-omap/include/mach/debug-macro.S
+++ b/arch/arm/plat-omap/include/mach/debug-macro.S
@@ -12,42 +12,20 @@
*/
.macro addruart,rx
- mrc p15, 0, \rx, c1, c0
- tst \rx, #1 @ MMU enabled?
-#ifdef CONFIG_ARCH_OMAP1
- moveq \rx, #0xff000000 @ physical base address
- movne \rx, #0xfe000000 @ virtual base
- orr \rx, \rx, #0x00fb0000
-#ifdef CONFIG_OMAP_LL_DEBUG_UART3
- orr \rx, \rx, #0x00009000 @ UART 3
-#endif
-#if defined(CONFIG_OMAP_LL_DEBUG_UART2) || defined(CONFIG_OMAP_LL_DEBUG_UART3)
- orr \rx, \rx, #0x00000800 @ UART 2 & 3
-#endif
-
-#elif CONFIG_ARCH_OMAP2
- moveq \rx, #0x48000000 @ physical base address
- movne \rx, #0xd8000000 @ virtual base
- orr \rx, \rx, #0x0006a000
-#ifdef CONFIG_OMAP_LL_DEBUG_UART2
- add \rx, \rx, #0x00002000 @ UART 2
-#endif
-#ifdef CONFIG_OMAP_LL_DEBUG_UART3
- add \rx, \rx, #0x00004000 @ UART 3
-#endif
-
-#elif defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
- moveq \rx, #0x48000000 @ physical base address
- movne \rx, #0xd8000000 @ virtual base
- orr \rx, \rx, #0x0006a000
-#ifdef CONFIG_OMAP_LL_DEBUG_UART2
- add \rx, \rx, #0x00002000 @ UART 2
-#endif
-#ifdef CONFIG_OMAP_LL_DEBUG_UART3
- add \rx, \rx, #0x00fb0000 @ UART 3
- add \rx, \rx, #0x00006000
-#endif
-#endif
+ mrc p15, 0, r2, c1, c0
+ tst r2, #1 @ MMU enabled?
+ bne 1110f
+ push {r0, r1, r2, lr}
+ bl get_uart_base
+ mov \rx, r0
+ pop {r0, r1, r2, lr}
+ b 1111f
+1110:
+ push {r0, r1, r2, lr}
+ bl get_uart_virt_base
+ mov \rx, r0
+ pop {r0, r1, r2, lr}
+1111:
.endm
.macro senduart,rd,rx
@@ -55,13 +33,21 @@
.endm
.macro busyuart,rd,rx
-1001: ldrb \rd, [\rx, #(0x5 << 2)] @ OMAP-1510 and friends
+1001:
+ mov \rd, #5
+ push {r0, \rx, lr}
+ bl get_uart_shift
+ mov \rd, \rd, lsl r0
+ pop {r0, \rx, lr}
+ ldrb \rd, [\rx, \rd]
and \rd, \rd, #0x60
teq \rd, #0x60
+#ifdef CONFIG_ARCH_OMAP1
beq 1002f
ldrb \rd, [\rx, #(0x5 << 0)] @ OMAP-730 only
and \rd, \rd, #0x60
teq \rd, #0x60
+#endif
bne 1001b
1002:
.endm
diff --git a/arch/arm/plat-omap/include/mach/uncompress.h b/arch/arm/plat-omap/include/mach/uncompress.h
index 0814c5f..bbb8dbe 100644
--- a/arch/arm/plat-omap/include/mach/uncompress.h
+++ b/arch/arm/plat-omap/include/mach/uncompress.h
@@ -20,8 +20,8 @@
#include <linux/types.h>
#include <linux/serial_reg.h>
#include <mach/serial.h>
-
-unsigned int system_rev;
+#include <asm/mach-types.h>
+#include "../../debug-low-level.c"
#define UART_OMAP_MDR1 0x08 /* mode definition register */
#define OMAP_ID_730 0x355F
@@ -29,23 +29,20 @@ unsigned int system_rev;
#define check_port(base, shift) ((base[UART_OMAP_MDR1 << shift] & 7) == 0)
#define omap_get_id() ((*(volatile unsigned int *)(0xfffed404)) >> 12) & ID_MASK
+static volatile u8 *uart;
+
static void putc(int c)
{
- volatile u8 * uart = 0;
int shift = 2;
#ifdef CONFIG_MACH_OMAP_PALMTE
return;
#endif
-#ifdef CONFIG_ARCH_OMAP
-#ifdef CONFIG_OMAP_LL_DEBUG_UART3
- uart = (volatile u8 *)(OMAP_UART3_BASE);
-#elif defined(CONFIG_OMAP_LL_DEBUG_UART2)
- uart = (volatile u8 *)(OMAP_UART2_BASE);
-#else
- uart = (volatile u8 *)(OMAP_UART1_BASE);
-#endif
+ if (!uart)
+ return;
+
+ shift = get_uart_shift();
#ifdef CONFIG_ARCH_OMAP1
/* Determine which serial port to use */
@@ -62,7 +59,6 @@ static void putc(int c)
return;
} while (0);
#endif /* CONFIG_ARCH_OMAP1 */
-#endif
/*
* Now, xmit each character
@@ -76,8 +72,13 @@ static inline void flush(void)
{
}
+static inline void __arch_decomp_setup(void)
+{
+ uart = (u8 *)get_uart_base();
+}
+
/*
* nothing to do
*/
-#define arch_decomp_setup()
+#define arch_decomp_setup() __arch_decomp_setup()
#define arch_decomp_wdog()
--
1.6.5.rc0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] OMAP: Zoom2: Add DEBUG_LL interface using Quart
2009-09-19 0:39 ` [PATCH 1/2] OMAP1/2/3/4: DEBUG_LL run time detection Vikram Pandita
@ 2009-09-19 0:39 ` Vikram Pandita
2009-09-19 5:35 ` [PATCH 1/2] OMAP1/2/3/4: DEBUG_LL run time detection Shilimkar, Santosh
2009-09-19 8:40 ` Russell King - ARM Linux
2 siblings, 0 replies; 5+ messages in thread
From: Vikram Pandita @ 2009-09-19 0:39 UTC (permalink / raw)
To: linux-arm-kernel
This patch adds DEBUG_LL interface for Zoom2 board.
The low level debug uart now points corrctly to External Quad uart
controller on detachable debug board.
The Quad uart is available over GPMC chip select with physical address
0x10000000.
This physical address has been mapped to virtual address 0xFB000000
as per static mapping.
This patch is adapted from a version by Erik Gilling:
http://android.git.kernel.org/?p=kernel/omap.git;
a=commit;h=e9d72efdd88877d2d6ea74a08983ace0dcc771d3
Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Cc: Erik Gilling <konkers@android.com>
---
arch/arm/mach-omap2/board-zoom2.c | 18 ++++++++++++++++--
arch/arm/plat-omap/debug-low-level.c | 2 ++
arch/arm/plat-omap/include/mach/io.h | 6 ++++++
3 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/board-zoom2.c b/arch/arm/mach-omap2/board-zoom2.c
index 324009e..abaee66 100644
--- a/arch/arm/mach-omap2/board-zoom2.c
+++ b/arch/arm/mach-omap2/board-zoom2.c
@@ -19,6 +19,7 @@
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
#include <mach/common.h>
#include <mach/usb.h>
@@ -269,15 +270,28 @@ static void __init omap_zoom2_init(void)
usb_musb_init();
}
+static struct map_desc zoom2_io_desc[] __initdata = {
+ {
+ .virtual = ZOOM2_EXT_QUART_VIRT,
+ .pfn = __phys_to_pfn(ZOOM2_EXT_QUART_PHYS),
+ .length = ZOOM2_EXT_QUART_SIZE,
+ .type = MT_DEVICE
+ }
+};
+
static void __init omap_zoom2_map_io(void)
{
omap2_set_globals_343x();
+
+ /* Map external quad UART virt to phy mapping */
+ iotable_init(zoom2_io_desc, ARRAY_SIZE(zoom2_io_desc));
+
omap2_map_common_io();
}
MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board")
- .phys_io = 0x48000000,
- .io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
+ .phys_io = ZOOM2_EXT_QUART_PHYS,
+ .io_pg_offst = ((ZOOM2_EXT_QUART_VIRT) >> 18) & 0xfffc,
.boot_params = 0x80000100,
.map_io = omap_zoom2_map_io,
.init_irq = omap_zoom2_init_irq,
diff --git a/arch/arm/plat-omap/debug-low-level.c b/arch/arm/plat-omap/debug-low-level.c
index c134694..ea68440 100644
--- a/arch/arm/plat-omap/debug-low-level.c
+++ b/arch/arm/plat-omap/debug-low-level.c
@@ -15,6 +15,8 @@ u32 get_uart_base(void)
{
static u32 omap_uart_debug_ll_phy_addr;
+ omap_uart_debug_ll_phy_addr = 0;
+
if (omap_uart_debug_ll_phy_addr)
return omap_uart_debug_ll_phy_addr;
diff --git a/arch/arm/plat-omap/include/mach/io.h b/arch/arm/plat-omap/include/mach/io.h
index 8d32df3..d67f06c 100644
--- a/arch/arm/plat-omap/include/mach/io.h
+++ b/arch/arm/plat-omap/include/mach/io.h
@@ -169,6 +169,12 @@
#define DSP_MMU_34XX_VIRT 0xe2000000
#define DSP_MMU_34XX_SIZE SZ_4K
+/* Map External Quad UART for Zoom2 board */
+#define ZOOM2_EXT_QUART_PHYS 0x10000000 /* PHY address if fixed */
+#define ZOOM2_EXT_QUART_PHY_TO_VIRT_OFF 0xEB000000
+#define ZOOM2_EXT_QUART_VIRT 0xFB000000
+#define ZOOM2_EXT_QUART_SIZE SZ_16
+
/*
* ----------------------------------------------------------------------------
* Omap4 specific IO mapping
--
1.6.5.rc0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 1/2] OMAP1/2/3/4: DEBUG_LL run time detection
2009-09-19 0:39 ` [PATCH 1/2] OMAP1/2/3/4: DEBUG_LL run time detection Vikram Pandita
2009-09-19 0:39 ` [PATCH 2/2] OMAP: Zoom2: Add DEBUG_LL interface using Quart Vikram Pandita
@ 2009-09-19 5:35 ` Shilimkar, Santosh
2009-09-19 8:40 ` Russell King - ARM Linux
2 siblings, 0 replies; 5+ messages in thread
From: Shilimkar, Santosh @ 2009-09-19 5:35 UTC (permalink / raw)
To: linux-arm-kernel
Vikram,
> -----Original Message-----
> From: linux-omap-owner at vger.kernel.org [mailto:linux-omap-
> owner at vger.kernel.org] On Behalf Of Pandita, Vikram
> Sent: Saturday, September 19, 2009 6:10 AM
> To: linux-arm-kernel at lists.infradead.org; linux-omap at vger.kernel.org
> Cc: Pandita, Vikram; Russell King; Kevin Hilman
> Subject: [PATCH 1/2] OMAP1/2/3/4: DEBUG_LL run time detection
> +u32 get_uart_base(void)
> +{
> + static u32 omap_uart_debug_ll_phy_addr;
> +
> + if (omap_uart_debug_ll_phy_addr)
> + return omap_uart_debug_ll_phy_addr;
> +
> + /* Add logic here for new platforms, using __machine_arch_type */
> +
> + /* TODO: REVISIT -- Check Completeness
> + * DEFINE PHY ADDRESS for EACH BOARD HERE: omap1/2/3/4 */
> +#if defined(CONFIG_ARCH_OMAP1)
> + switch (__machine_arch_type) {
> + case MACH_TYPE_OMAP_PALMTT:
> + case MACH_TYPE_SX1:
> + /* UART2 */
> + omap_uart_debug_ll_phy_addr = (u32 *)0xfffb0800;
> + break;
> + default:
> + /* UART1 */
> + omap_uart_debug_ll_phy_addr = (u32 *)0xfffb0000;
> + break;
> + }
> +#endif
> +
> +#if defined(CONFIG_ARCH_OMAP2)
> + switch (__machine_arch_type) {
> + case MACH_TYPE_NOKIA_N800:
> + case MACH_TYPE_NOKIA_N810:
> + case MACH_TYPE_NOKIA_N810_WIMAX:
> + /* UART3 */
> + omap_uart_debug_ll_phy_addr = (u32 *)0x4806e000;
> + break;
> + default:
> + /* UART1 */
> + omap_uart_debug_ll_phy_addr = (u32 *)0x4806a000;
> + break;
> + }
> +#endif
> +
> +#if defined(CONFIG_ARCH_OMAP3)
> + switch (__machine_arch_type) {
> + case MACH_TYPE_OMAP_LDP:
> + case MACH_TYPE_OVERO:
> + case MACH_TYPE_OMAP3_PANDORA:
> + case MACH_TYPE_NOKIA_RX51:
> + case MACH_TYPE_OMAP3_BEAGLE:
> + /* UART3 */
> + omap_uart_debug_ll_phy_addr = 0x49020000;
> + break;
> + case MACH_TYPE_OMAP_ZOOM2:
> + /* EXTERNEL UART */
> + omap_uart_debug_ll_phy_addr = 0x10000000;
> + break;
> + default:
> + /* UART1 */
> + omap_uart_debug_ll_phy_addr = 0x4806a000;
> + break;
> + }
> +#endif
> +
> +#ifdef CONFIG_ARCH_OMAP4
> + switch (__machine_arch_type) {
> + /* OMAP3: UART1 */
> + case MACH_TYPE_OMAP_4430SDP:
> + default:
> + omap_uart_debug_ll_phy_addr = (u32 *)0x4806a000;
> + break;
> + }
> +#endif
> +
> + return omap_uart_debug_ll_phy_addr;
> +}
This makes only UART1 as a DEBUG_LL option for OMAP4. Will we not have options any more to select rest of the UARTs for DEBUG_LL as it was supported with previous Russell's implementation?
Regards,
Santosh
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] OMAP1/2/3/4: DEBUG_LL run time detection
2009-09-19 0:39 ` [PATCH 1/2] OMAP1/2/3/4: DEBUG_LL run time detection Vikram Pandita
2009-09-19 0:39 ` [PATCH 2/2] OMAP: Zoom2: Add DEBUG_LL interface using Quart Vikram Pandita
2009-09-19 5:35 ` [PATCH 1/2] OMAP1/2/3/4: DEBUG_LL run time detection Shilimkar, Santosh
@ 2009-09-19 8:40 ` Russell King - ARM Linux
2 siblings, 0 replies; 5+ messages in thread
From: Russell King - ARM Linux @ 2009-09-19 8:40 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Sep 18, 2009 at 07:39:39PM -0500, Vikram Pandita wrote:
> The decision of finding the physical address of debug uart is done
> at runtime now, making possible to use a single defconfig for multiple boards.
>
> This patch gets rid of menuconfig options of choosing low level debug uarts.
This approach won't work in all cases where the debug functions are called
(which can be before the MMU is enabled.)
The problem is that you can't run C code before the MMU is setup because
C code always encodes absolute address locations, which won't be valid
at that time.
Also, since there is no stack during the initial kernel boot, you can't
stack registers in the LL debug functions.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-09-19 8:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-19 0:39 [PATCH v3 0/2] Cleanup DEBUG_LL infrastructure Vikram Pandita
2009-09-19 0:39 ` [PATCH 1/2] OMAP1/2/3/4: DEBUG_LL run time detection Vikram Pandita
2009-09-19 0:39 ` [PATCH 2/2] OMAP: Zoom2: Add DEBUG_LL interface using Quart Vikram Pandita
2009-09-19 5:35 ` [PATCH 1/2] OMAP1/2/3/4: DEBUG_LL run time detection Shilimkar, Santosh
2009-09-19 8:40 ` Russell King - ARM Linux
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).