diff for duplicates of <20100122030711.GP23467@atomide.com> diff --git a/a/2.hdr b/a/2.hdr deleted file mode 100644 index 29e25b0..0000000 --- a/a/2.hdr +++ /dev/null @@ -1,2 +0,0 @@ -Content-Type: text/x-diff; charset=us-ascii -Content-Disposition: inline; filename="multi-omap-common-debug-v2.patch" diff --git a/a/2.txt b/a/2.txt deleted file mode 100644 index cec7569..0000000 --- a/a/2.txt +++ /dev/null @@ -1,507 +0,0 @@ ->From 94e3a455b9fb6bdfa1c6b3594d85fee313546e85 Mon Sep 17 00:00:00 2001 -From: Tony Lindgren <tony@atomide.com> -Date: Thu, 21 Jan 2010 18:53:30 -0800 -Subject: [PATCH] omap: Make uncompress code and DEBUG_LL code generic - -Define arch_decomp_setup() the same way as some other -architectures do. Use arch_id to configure the debug uart -based on the machine_is by storing it into the uart -scratchpad register for DEBUG_LL code to use. - -Signed-off-by: Tony Lindgren <tony@atomide.com> - -diff --git a/arch/arm/mach-omap1/include/mach/debug-macro.S b/arch/arm/mach-omap1/include/mach/debug-macro.S -index 9ea12f2..b6d9584 100644 ---- a/arch/arm/mach-omap1/include/mach/debug-macro.S -+++ b/arch/arm/mach-omap1/include/mach/debug-macro.S -@@ -15,18 +15,76 @@ - - #include <plat/serial.h> - -+ .pushsection .data -+omap_uart_phys: .word 0x0 -+omap_uart_virt: .word 0x0 -+ .popsection -+ -+ /* -+ * Note that this code won't work if the bootloader passes -+ * a wrong machine ID number in r1. To debug, just hardcode -+ * the desired UART phys and virt addresses temporarily into -+ * the omap_uart_phys and omap_uart_virt above. -+ */ - .macro addruart, rx, tmp -+ -+ /* Use omap_uart_phys/virt if already configured */ -+9: mrc p15, 0, \rx, c1, c0 -+ tst \rx, #1 @ MMU enabled? -+ ldreq \rx, =omap_uart_phys @ physical base address -+ ldrne \rx, =omap_uart_virt @ virtual base -+ ldr \rx, [\rx, #0] -+ cmp \rx, #0 @ is port configured? -+ bne 99f @ already configured -+ -+ /* Check 7XX UART1 scratchpad register for uart to use */ -+ mrc p15, 0, \rx, c1, c0 -+ tst \rx, #1 @ MMU enabled? -+ moveq \rx, #0xff000000 @ physical base address -+ movne \rx, #0xfe000000 @ virtual base -+ orr \rx, \rx, #0x00fb0000 @ OMAP1UART1 -+ ldrb \rx, [\rx, #(UART_SCR << OMAP7XX_PORT_SHIFT)] -+ cmp \rx, #0 @ anything in 7XX scratchpad? -+ bne 10f @ found 7XX uart -+ -+ /* Check 15xx/16xx UART1 scratchpad register for uart to use */ - mrc p15, 0, \rx, c1, c0 - tst \rx, #1 @ MMU enabled? - 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 -+ orr \rx, \rx, #0x00fb0000 @ OMAP1UART1 -+ ldrb \rx, [\rx, #(UART_SCR << OMAP_PORT_SHIFT)] -+ -+ /* Select the UART to use based on the UART1 scratchpad value */ -+10: cmp \rx, #0 @ no port configured? -+ beq 11f @ if none, try to use UART1 -+ cmp \rx, #OMAP1UART1 -+ beq 11f @ configure OMAP1UART1 -+ cmp \rx, #OMAP1UART2 -+ beq 12f @ configure OMAP1UART2 -+ cmp \rx, #OMAP1UART3 -+ beq 13f @ configure OMAP2UART3 -+ -+ /* Configure the UART offset from the phys/virt base */ -+11: mov \rx, #0x00fb0000 @ OMAP1UART1 -+ b 98f -+12: mov \rx, #0x00fb0000 @ OMAP1UART1 -+ orr \rx, \rx, #0x00000800 @ OMAP1UART2 -+ b 98f -+13: mov \rx, #0x00fb0000 @ OMAP1UART1 -+ orr \rx, \rx, #0x00000800 @ OMAP1UART2 -+ orr \rx, \rx, #0x00009000 @ OMAP1UART3 -+ -+ /* Store both phys and virt address for the uart */ -+98: add \rx, \rx, #0xff000000 @ phys base -+ ldr \tmp, =omap_uart_phys -+ str \rx, [\tmp, #0] -+ sub \rx, \rx, #0xff000000 @ phys base -+ add \rx, \rx, #0xfe000000 @ virt base -+ ldr \tmp, =omap_uart_virt -+ str \rx, [\tmp, #0] -+ b 9b -+99: - .endm - - .macro senduart,rd,rx -diff --git a/arch/arm/mach-omap2/include/mach/debug-macro.S b/arch/arm/mach-omap2/include/mach/debug-macro.S -index 8d6da9a..4a63a2e 100644 ---- a/arch/arm/mach-omap2/include/mach/debug-macro.S -+++ b/arch/arm/mach-omap2/include/mach/debug-macro.S -@@ -15,32 +15,103 @@ - - #include <plat/serial.h> - -+#define UART_OFFSET(addr) ((addr) & 0x00ffffff) -+ -+ .pushsection .data -+omap_uart_phys: .word 0 -+omap_uart_virt: .word 0 -+omap_uart_lsr: .word 0 -+ .popsection -+ -+ /* -+ * Note that this code won't work if the bootloader passes -+ * a wrong machine ID number in r1. To debug, just hardcode -+ * the desired UART phys and virt addresses temporarily into -+ * the omap_uart_phys and omap_uart_virt above. -+ */ - .macro addruart, rx, tmp -+ -+ /* Use omap_uart_phys/virt if already configured */ -+10: mrc p15, 0, \rx, c1, c0 -+ tst \rx, #1 @ MMU enabled? -+ ldreq \rx, =omap_uart_phys @ physical base address -+ ldrne \rx, =omap_uart_virt @ virtual base address -+ ldr \rx, [\rx, #0] -+ cmp \rx, #0 @ is port configured? -+ bne 99f @ already configured -+ -+ /* Check UART1 scratchpad register for uart to use */ - mrc p15, 0, \rx, c1, c0 - tst \rx, #1 @ MMU enabled? --#ifdef CONFIG_ARCH_OMAP2 - moveq \rx, #0x48000000 @ physical base address - movne \rx, #0xfa000000 @ 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, #0xfa000000 @ 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 -+ orr \rx, \rx, #0x0006a000 @ uart1 on omap2/3/4 -+ ldrb \rx, [\rx, #(UART_SCR << OMAP_PORT_SHIFT)] @ scratchpad -+ -+ /* Select the UART to use based on the UART1 scratchpad value */ -+ cmp \rx, #0 @ no port configured? -+ beq 21f @ if none, try to use UART1 -+ cmp \rx, #OMAP2UART1 @ OMAP2/3/4UART1 -+ beq 21f @ configure OMAP2/3/4UART1 -+ cmp \rx, #OMAP2UART2 @ OMAP2/3/4UART2 -+ beq 22f @ configure OMAP2/3/4UART2 -+ cmp \rx, #OMAP2UART3 @ only on 24xx -+ beq 23f @ configure OMAP2UART3 -+ cmp \rx, #OMAP3UART3 @ only on 34xx -+ beq 33f @ configure OMAP3UART3 -+ cmp \rx, #OMAP4UART3 @ only on 44xx -+ beq 43f @ configure OMAP4UART3 -+ cmp \rx, #OMAP3UART4 @ only on 36xx -+ beq 34f @ configure OMAP3UART4 -+ cmp \rx, #OMAP4UART4 @ only on 44xx -+ beq 44f @ configure OMAP4UART4 -+ cmp \rx, #ZOOM_UART @ only on zoom2/3 -+ beq 95f @ configure ZOOM_UART -+ -+ /* Configure the UART offset from the phys/virt base */ -+21: mov \rx, #UART_OFFSET(OMAP2_UART1_BASE) @ omap2/3/4 -+ b 98f -+22: mov \rx, #UART_OFFSET(OMAP2_UART2_BASE) @ omap2/3/4 -+ b 98f -+23: mov \rx, #UART_OFFSET(OMAP2_UART3_BASE) -+ b 98f -+33: mov \rx, #UART_OFFSET(OMAP3_UART1_BASE) -+ add \rx, \rx, #0x00fb0000 -+ add \rx, \rx, #0x00006000 @ OMAP3_UART3_BASE -+ b 98f -+34: mov \rx, #UART_OFFSET(OMAP3_UART1_BASE) -+ add \rx, \rx, #0x00fb0000 -+ add \rx, \rx, #0x00028000 @ OMAP3_UART4_BASE -+ b 98f -+43: mov \rx, #UART_OFFSET(OMAP4_UART3_BASE) -+ b 98f -+44: mov \rx, #UART_OFFSET(OMAP4_UART4_BASE) -+ b 98f -+95: mov \rx, #ZOOM_UART_BASE -+ ldr \tmp, =omap_uart_phys -+ str \rx, [\tmp, #0] -+ mov \rx, #ZOOM_UART_VIRT -+ ldr \tmp, =omap_uart_virt -+ str \rx, [\tmp, #0] -+ mov \rx, #(UART_LSR << ZOOM_PORT_SHIFT) -+ ldr \tmp, =omap_uart_lsr -+ str \rx, [\tmp, #0] -+ b 10b -+ -+ /* Store both phys and virt address for the uart */ -+98: add \rx, \rx, #0x48000000 @ phys base -+ ldr \tmp, =omap_uart_phys -+ str \rx, [\tmp, #0] -+ sub \rx, \rx, #0x48000000 @ phys base -+ add \rx, \rx, #0xfa000000 @ virt base -+ ldr \tmp, =omap_uart_virt -+ str \rx, [\tmp, #0] -+ mov \rx, #(UART_LSR << OMAP_PORT_SHIFT) -+ ldr \tmp, =omap_uart_lsr -+ str \rx, [\tmp, #0] -+ -+ b 10b -+99: - .endm - - .macro senduart,rd,rx -@@ -48,7 +119,9 @@ - .endm - - .macro busyuart,rd,rx --1001: ldrb \rd, [\rx, #(UART_LSR << OMAP_PORT_SHIFT)] -+1001: ldr \rd, =omap_uart_lsr -+ ldr \rd, [\rd, #0] -+ ldrb \rd, [\rx, \rd] - and \rd, \rd, #(UART_LSR_TEMT | UART_LSR_THRE) - teq \rd, #(UART_LSR_TEMT | UART_LSR_THRE) - bne 1001b -diff --git a/arch/arm/plat-omap/include/plat/serial.h b/arch/arm/plat-omap/include/plat/serial.h -index 7f5a7a8..67ffa08 100644 ---- a/arch/arm/plat-omap/include/plat/serial.h -+++ b/arch/arm/plat-omap/include/plat/serial.h -@@ -26,24 +26,49 @@ - #define OMAP2_UART3_BASE 0x4806e000 - - /* OMAP3 serial ports */ --#define OMAP3_UART1_BASE 0x4806a000 --#define OMAP3_UART2_BASE 0x4806c000 -+#define OMAP3_UART1_BASE OMAP2_UART1_BASE -+#define OMAP3_UART2_BASE OMAP2_UART2_BASE - #define OMAP3_UART3_BASE 0x49020000 - #define OMAP3_UART4_BASE 0x49042000 /* Only on 36xx */ - - /* OMAP4 serial ports */ --#define OMAP4_UART1_BASE 0x4806a000 --#define OMAP4_UART2_BASE 0x4806c000 -+#define OMAP4_UART1_BASE OMAP2_UART1_BASE -+#define OMAP4_UART2_BASE OMAP2_UART1_BASE - #define OMAP4_UART3_BASE 0x48020000 - #define OMAP4_UART4_BASE 0x4806e000 - -+/* External port on Zoom2/3 */ -+#define ZOOM_UART_BASE 0x10000000 -+#define ZOOM_UART_VIRT 0xfb000000 -+ - #define OMAP_PORT_SHIFT 2 - #define OMAP7XX_PORT_SHIFT 0 -+#define ZOOM_PORT_SHIFT 1 - - #define OMAP1510_BASE_BAUD (12000000/16) - #define OMAP16XX_BASE_BAUD (48000000/16) - #define OMAP24XX_BASE_BAUD (48000000/16) - -+/* -+ * DEBUG_LL port encoding stored into the UART1 scratchpad register by -+ * decomp_setup in uncompress.h -+ */ -+#define OMAP1UART1 11 -+#define OMAP1UART2 12 -+#define OMAP1UART3 13 -+#define OMAP2UART1 21 -+#define OMAP2UART2 22 -+#define OMAP2UART3 23 -+#define OMAP3UART1 OMAP2UART1 -+#define OMAP3UART2 OMAP2UART2 -+#define OMAP3UART3 33 -+#define OMAP3UART4 34 /* Only on 36xx */ -+#define OMAP4UART1 OMAP2UART1 -+#define OMAP4UART2 OMAP2UART2 -+#define OMAP4UART3 43 -+#define OMAP4UART4 44 -+#define ZOOM_UART 95 /* Only on zoom2/3 */ -+ - /* This is only used by 8250.c for omap1510 */ - #define is_omap_port(pt) ({int __ret = 0; \ - if ((pt)->port.mapbase == OMAP1_UART1_BASE || \ -diff --git a/arch/arm/plat-omap/include/plat/uncompress.h b/arch/arm/plat-omap/include/plat/uncompress.h -index e5723c3..f426d68 100644 ---- a/arch/arm/plat-omap/include/plat/uncompress.h -+++ b/arch/arm/plat-omap/include/plat/uncompress.h -@@ -19,63 +19,38 @@ - - #include <linux/types.h> - #include <linux/serial_reg.h> -+ -+#include <asm/mach-types.h> -+ - #include <plat/serial.h> - --unsigned int system_rev; -+static volatile u8 *uart1_base; -+static volatile int uart1_shift; - --#define UART_OMAP_MDR1 0x08 /* mode definition register */ --#define OMAP_ID_730 0x355F --#define OMAP_ID_850 0x362C --#define ID_MASK 0x7fff --#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_base; -+static volatile int uart_shift; - --static void putc(int c) -+/* -+ * Store the DEBUG_LL uart number into UART1 scratchpad register. -+ * See also debug-macro.S, and serial.c for related code. -+ * -+ * Please note that we currently assume that: -+ * - UART1 clocks are enabled for register access -+ * - UART1 scratchpad register can be used -+ */ -+static void set_uart1_scratchpad(unsigned char port) - { -- volatile u8 * uart = 0; -- int shift = 2; -- --#ifdef CONFIG_MACH_OMAP_PALMTE -- return; --#endif -- --#ifdef CONFIG_ARCH_OMAP -- /* Will get removed in the next patch, set to OMAP3 to compile */ --#ifdef CONFIG_OMAP_LL_DEBUG_UART3 -- uart = (volatile u8 *)(OMAP3_UART3_BASE); --#elif defined(CONFIG_OMAP_LL_DEBUG_UART2) -- uart = (volatile u8 *)(OMAP3_UART2_BASE); --#elif defined(CONFIG_OMAP_LL_DEBUG_UART1) -- uart = (volatile u8 *)(OMAP3_UART1_BASE); --#elif defined(CONFIG_OMAP_LL_DEBUG_NONE) -- return; --#else -- return; --#endif -- --#ifdef CONFIG_ARCH_OMAP1 -- /* Determine which serial port to use */ -- do { -- /* MMU is not on, so cpu_is_omapXXXX() won't work here */ -- unsigned int omap_id = omap_get_id(); -- -- if (omap_id == OMAP_ID_730 || omap_id == OMAP_ID_850) -- shift = 0; -+ uart1_base[UART_SCR << uart1_shift] = port; -+} - -- if (check_port(uart, shift)) -- break; -- /* Silent boot if no serial ports are enabled. */ -+static void putc(int c) -+{ -+ if (!uart_base) - return; -- } while (0); --#endif /* CONFIG_ARCH_OMAP1 */ --#endif - -- /* -- * Now, xmit each character -- */ -- while (!(uart[UART_LSR << shift] & UART_LSR_THRE)) -+ while (!(uart_base[UART_LSR << uart_shift] & UART_LSR_THRE)) - barrier(); -- uart[UART_TX << shift] = c; -+ uart_base[UART_TX << uart_shift] = c; - } - - static inline void flush(void) -@@ -83,7 +58,116 @@ static inline void flush(void) - } - - /* -+ * Macros to configure UART1 and debug UART -+ */ -+#define _DEBUG_LL_ENTRY(mach, uart1_phys, uart1_shft, \ -+ dbg_uart, dbg_shft, dbg_id) \ -+ if (machine_is_##mach()) { \ -+ uart1_base = (volatile u8 *)(uart1_phys); \ -+ uart1_shift = (uart1_shft); \ -+ uart_base = (volatile u8 *)(dbg_uart); \ -+ uart_shift = (dbg_shft); \ -+ port = (dbg_id); \ -+ set_uart1_scratchpad(port); \ -+ break; \ -+ } -+ -+#define DEBUG_LL_OMAP7XX(p, mach) \ -+ _DEBUG_LL_ENTRY(mach, OMAP1_UART1_BASE, OMAP7XX_PORT_SHIFT, \ -+ OMAP1_UART##p##_BASE, OMAP7XX_PORT_SHIFT, OMAP1UART##p) -+ -+#define DEBUG_LL_OMAP1(p, mach) \ -+ _DEBUG_LL_ENTRY(mach, OMAP1_UART1_BASE, OMAP_PORT_SHIFT, \ -+ OMAP1_UART##p##_BASE, OMAP_PORT_SHIFT, OMAP1UART##p) -+ -+#define DEBUG_LL_OMAP2(p, mach) \ -+ _DEBUG_LL_ENTRY(mach, OMAP2_UART1_BASE, OMAP_PORT_SHIFT, \ -+ OMAP2_UART##p##_BASE, OMAP_PORT_SHIFT, OMAP2UART##p) -+ -+#define DEBUG_LL_OMAP3(p, mach) \ -+ _DEBUG_LL_ENTRY(mach, OMAP3_UART1_BASE, OMAP_PORT_SHIFT, \ -+ OMAP3_UART##p##_BASE, OMAP_PORT_SHIFT, OMAP3UART##p) -+ -+#define DEBUG_LL_OMAP4(p, mach) \ -+ _DEBUG_LL_ENTRY(mach, OMAP4_UART1_BASE, OMAP_PORT_SHIFT, \ -+ OMAP4_UART##p##_BASE, OMAP_PORT_SHIFT, OMAP4UART##p) -+ -+/* Zoom2/3 shift is different for UART1 and external port */ -+#define DEBUG_LL_ZOOM(mach) \ -+ _DEBUG_LL_ENTRY(mach, OMAP2_UART1_BASE, OMAP_PORT_SHIFT, \ -+ ZOOM_UART_BASE, ZOOM_PORT_SHIFT, ZOOM_UART) -+ -+static inline void __arch_decomp_setup(unsigned long arch_id) -+{ -+ int port = 0; -+ -+ /* -+ * Initialize the port based on the machine ID from the bootloader. -+ * Note that we're using macros here instead of switch statement -+ * as machine_is functions are optimized out for the boards that -+ * are not selected. -+ */ -+ do { -+ /* omap7xx/8xx based boards using UART1 with shift 0 */ -+ DEBUG_LL_OMAP7XX(1, herald); -+ DEBUG_LL_OMAP7XX(1, omap_perseus2); -+ -+ /* omap15xx/16xx based boards using UART1 */ -+ DEBUG_LL_OMAP1(1, ams_delta); -+ DEBUG_LL_OMAP1(1, nokia770); -+ DEBUG_LL_OMAP1(1, omap_h2); -+ DEBUG_LL_OMAP1(1, omap_h3); -+ DEBUG_LL_OMAP1(1, omap_innovator); -+ DEBUG_LL_OMAP1(1, omap_osk); -+ DEBUG_LL_OMAP1(1, omap_palmte); -+ DEBUG_LL_OMAP1(1, omap_palmz71); -+ -+ /* omap15xx/16xx based boards using UART2 */ -+ DEBUG_LL_OMAP1(2, omap_palmtt); -+ -+ /* omap15xx/16xx based boards using UART3 */ -+ DEBUG_LL_OMAP1(3, sx1); -+ -+ /* omap2 based boards using UART1 */ -+ DEBUG_LL_OMAP2(1, omap2evm); -+ DEBUG_LL_OMAP2(1, omap_2430sdp); -+ DEBUG_LL_OMAP2(1, omap_apollon); -+ DEBUG_LL_OMAP2(1, omap_h4); -+ -+ /* omap2 based boards using UART3 */ -+ DEBUG_LL_OMAP2(3, nokia_n800); -+ DEBUG_LL_OMAP2(3, nokia_n810); -+ DEBUG_LL_OMAP2(3, nokia_n810_wimax); -+ -+ /* omap3 based boards using UART1 */ -+ DEBUG_LL_OMAP2(1, omap3evm); -+ DEBUG_LL_OMAP3(1, omap_3430sdp); -+ DEBUG_LL_OMAP3(1, omap_3630sdp); -+ -+ /* omap3 based boards using UART3 */ -+ DEBUG_LL_OMAP3(3, cm_t35); -+ DEBUG_LL_OMAP3(3, igep0020); -+ DEBUG_LL_OMAP3(3, nokia_rx51); -+ DEBUG_LL_OMAP3(3, omap3517evm); -+ DEBUG_LL_OMAP3(3, omap3_beagle); -+ DEBUG_LL_OMAP3(3, omap3_pandora); -+ DEBUG_LL_OMAP3(3, omap_ldp); -+ DEBUG_LL_OMAP3(3, overo); -+ DEBUG_LL_OMAP3(3, touchbook); -+ -+ /* omap4 based boards using UART3 */ -+ DEBUG_LL_OMAP4(3, omap_4430sdp); -+ -+ /* zoom2/3 external uart */ -+ DEBUG_LL_ZOOM(omap_zoom2); -+ DEBUG_LL_ZOOM(omap_zoom3); -+ -+ } while (0); -+} -+ -+#define arch_decomp_setup() __arch_decomp_setup(arch_id) -+ -+/* - * nothing to do - */ --#define arch_decomp_setup() - #define arch_decomp_wdog() diff --git a/a/content_digest b/N1/content_digest index 6845e7e..7ea1014 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -5,15 +5,11 @@ "ref\020100116193313.GA23092@n2100.arm.linux.org.uk\0" "ref\020100116200003.GL10318@atomide.com\0" "ref\0FCCFB4CDC6E5564B9182F639FC356087030070F296@dbde02.ent.ti.com\0" - "From\0Tony Lindgren <tony@atomide.com>\0" - "Subject\0Re: [PATCH 2/4] omap: Make uncompress code and DEBUG_LL code generic, v2\0" + "From\0tony@atomide.com (Tony Lindgren)\0" + "Subject\0[PATCH 2/4] omap: Make uncompress code and DEBUG_LL code generic, v2\0" "Date\0Thu, 21 Jan 2010 19:07:12 -0800\0" - "To\0Pandita" - " Vikram <vikram.pandita@ti.com>\0" - "Cc\0Russell King - ARM Linux <linux@arm.linux.org.uk>" - linux-arm-kernel@lists.infradead.org <linux-arm-kernel@lists.infradead.org> - " linux-omap@vger.kernel.org <linux-omap@vger.kernel.org>\0" - "\01:1\0" + "To\0linux-arm-kernel@lists.infradead.org\0" + "\00:1\0" "b\0" "* Pandita, Vikram <vikram.pandita@ti.com> [100118 17:48]:\n" ">\n" @@ -64,515 +60,5 @@ "Regards,\n" "\n" Tony - "\01:2\0" - "fn\0multi-omap-common-debug-v2.patch\0" - "b\0" - ">From 94e3a455b9fb6bdfa1c6b3594d85fee313546e85 Mon Sep 17 00:00:00 2001\n" - "From: Tony Lindgren <tony@atomide.com>\n" - "Date: Thu, 21 Jan 2010 18:53:30 -0800\n" - "Subject: [PATCH] omap: Make uncompress code and DEBUG_LL code generic\n" - "\n" - "Define arch_decomp_setup() the same way as some other\n" - "architectures do. Use arch_id to configure the debug uart\n" - "based on the machine_is by storing it into the uart\n" - "scratchpad register for DEBUG_LL code to use.\n" - "\n" - "Signed-off-by: Tony Lindgren <tony@atomide.com>\n" - "\n" - "diff --git a/arch/arm/mach-omap1/include/mach/debug-macro.S b/arch/arm/mach-omap1/include/mach/debug-macro.S\n" - "index 9ea12f2..b6d9584 100644\n" - "--- a/arch/arm/mach-omap1/include/mach/debug-macro.S\n" - "+++ b/arch/arm/mach-omap1/include/mach/debug-macro.S\n" - "@@ -15,18 +15,76 @@\n" - " \n" - " #include <plat/serial.h>\n" - " \n" - "+\t\t.pushsection .data\n" - "+omap_uart_phys:\t.word\t0x0\n" - "+omap_uart_virt:\t.word\t0x0\n" - "+\t\t.popsection\n" - "+\n" - "+\t\t/*\n" - "+\t\t * Note that this code won't work if the bootloader passes\n" - "+\t\t * a wrong machine ID number in r1. To debug, just hardcode\n" - "+\t\t * the desired UART phys and virt addresses temporarily into\n" - "+\t\t * the omap_uart_phys and omap_uart_virt above.\n" - "+\t\t */\n" - " \t\t.macro\taddruart, rx, tmp\n" - "+\n" - "+\t\t/* Use omap_uart_phys/virt if already configured */\n" - "+9:\t\tmrc\tp15, 0, \\rx, c1, c0\n" - "+\t\ttst\t\\rx, #1\t\t\t@ MMU enabled?\n" - "+\t\tldreq\t\\rx, =omap_uart_phys\t@ physical base address\n" - "+\t\tldrne\t\\rx, =omap_uart_virt\t@ virtual base\n" - "+\t\tldr\t\\rx, [\\rx, #0]\n" - "+\t\tcmp\t\\rx, #0\t\t\t@ is port configured?\n" - "+\t\tbne\t99f\t\t\t@ already configured\n" - "+\n" - "+\t\t/* Check 7XX UART1 scratchpad register for uart to use */\n" - "+\t\tmrc\tp15, 0, \\rx, c1, c0\n" - "+\t\ttst\t\\rx, #1\t\t\t@ MMU enabled?\n" - "+\t\tmoveq\t\\rx, #0xff000000\t@ physical base address\n" - "+\t\tmovne\t\\rx, #0xfe000000\t@ virtual base\n" - "+\t\torr\t\\rx, \\rx, #0x00fb0000\t@ OMAP1UART1\n" - "+\t\tldrb\t\\rx, [\\rx, #(UART_SCR << OMAP7XX_PORT_SHIFT)]\n" - "+\t\tcmp\t\\rx, #0\t\t\t@ anything in 7XX scratchpad?\n" - "+\t\tbne\t10f\t\t\t@ found 7XX uart\n" - "+\n" - "+\t\t/* Check 15xx/16xx UART1 scratchpad register for uart to use */\n" - " \t\tmrc\tp15, 0, \\rx, c1, c0\n" - " \t\ttst\t\\rx, #1\t\t\t@ MMU enabled?\n" - " \t\tmoveq\t\\rx, #0xff000000\t@ physical base address\n" - " \t\tmovne\t\\rx, #0xfe000000\t@ virtual base\n" - "-\t\torr\t\\rx, \\rx, #0x00fb0000\n" - "-#ifdef CONFIG_OMAP_LL_DEBUG_UART3\n" - "-\t\torr\t\\rx, \\rx, #0x00009000\t@ UART 3\n" - "-#endif\n" - "-#if defined(CONFIG_OMAP_LL_DEBUG_UART2) || defined(CONFIG_OMAP_LL_DEBUG_UART3)\n" - "-\t\torr\t\\rx, \\rx, #0x00000800\t@ UART 2 & 3\n" - "-#endif\n" - "+\t\torr\t\\rx, \\rx, #0x00fb0000\t@ OMAP1UART1\n" - "+\t\tldrb\t\\rx, [\\rx, #(UART_SCR << OMAP_PORT_SHIFT)]\n" - "+\n" - "+\t\t/* Select the UART to use based on the UART1 scratchpad value */\n" - "+10:\t\tcmp\t\\rx, #0\t\t\t@ no port configured?\n" - "+\t\tbeq\t11f\t\t\t@ if none, try to use UART1\n" - "+\t\tcmp\t\\rx, #OMAP1UART1\n" - "+\t\tbeq\t11f\t\t\t@ configure OMAP1UART1\n" - "+\t\tcmp\t\\rx, #OMAP1UART2\n" - "+\t\tbeq\t12f\t\t\t@ configure OMAP1UART2\n" - "+\t\tcmp\t\\rx, #OMAP1UART3\n" - "+\t\tbeq\t13f\t\t\t@ configure OMAP2UART3\n" - "+\n" - "+\t\t/* Configure the UART offset from the phys/virt base */\n" - "+11:\t\tmov\t\\rx, #0x00fb0000\t@ OMAP1UART1\n" - "+\t\tb\t98f\n" - "+12:\t\tmov\t\\rx, #0x00fb0000\t@ OMAP1UART1\n" - "+\t\torr\t\\rx, \\rx, #0x00000800\t@ OMAP1UART2\n" - "+\t\tb\t98f\n" - "+13:\t\tmov\t\\rx, #0x00fb0000\t@ OMAP1UART1\n" - "+\t\torr\t\\rx, \\rx, #0x00000800\t@ OMAP1UART2\n" - "+\t\torr\t\\rx, \\rx, #0x00009000\t@ OMAP1UART3\n" - "+\n" - "+\t\t/* Store both phys and virt address for the uart */\n" - "+98:\t\tadd\t\\rx, \\rx, #0xff000000\t@ phys base\n" - "+\t\tldr\t\\tmp, =omap_uart_phys\n" - "+\t\tstr\t\\rx, [\\tmp, #0]\n" - "+\t\tsub\t\\rx, \\rx, #0xff000000\t@ phys base\n" - "+\t\tadd\t\\rx, \\rx, #0xfe000000\t@ virt base\n" - "+\t\tldr\t\\tmp, =omap_uart_virt\n" - "+\t\tstr\t\\rx, [\\tmp, #0]\n" - "+\t\tb\t9b\n" - "+99:\n" - " \t\t.endm\n" - " \n" - " \t\t.macro\tsenduart,rd,rx\n" - "diff --git a/arch/arm/mach-omap2/include/mach/debug-macro.S b/arch/arm/mach-omap2/include/mach/debug-macro.S\n" - "index 8d6da9a..4a63a2e 100644\n" - "--- a/arch/arm/mach-omap2/include/mach/debug-macro.S\n" - "+++ b/arch/arm/mach-omap2/include/mach/debug-macro.S\n" - "@@ -15,32 +15,103 @@\n" - " \n" - " #include <plat/serial.h>\n" - " \n" - "+#define UART_OFFSET(addr)\t((addr) & 0x00ffffff)\n" - "+\n" - "+\t\t.pushsection .data\n" - "+omap_uart_phys:\t.word\t0\n" - "+omap_uart_virt:\t.word\t0\n" - "+omap_uart_lsr:\t.word\t0\n" - "+\t\t.popsection\n" - "+\n" - "+\t\t/*\n" - "+\t\t * Note that this code won't work if the bootloader passes\n" - "+\t\t * a wrong machine ID number in r1. To debug, just hardcode\n" - "+\t\t * the desired UART phys and virt addresses temporarily into\n" - "+\t\t * the omap_uart_phys and omap_uart_virt above.\n" - "+\t\t */\n" - " \t\t.macro\taddruart, rx, tmp\n" - "+\n" - "+\t\t/* Use omap_uart_phys/virt if already configured */\n" - "+10:\t\tmrc\tp15, 0, \\rx, c1, c0\n" - "+\t\ttst\t\\rx, #1\t\t\t@ MMU enabled?\n" - "+\t\tldreq\t\\rx, =omap_uart_phys\t@ physical base address\n" - "+\t\tldrne\t\\rx, =omap_uart_virt\t@ virtual base address\n" - "+\t\tldr\t\\rx, [\\rx, #0]\n" - "+\t\tcmp\t\\rx, #0\t\t\t@ is port configured?\n" - "+\t\tbne\t99f\t\t\t@ already configured\n" - "+\n" - "+\t\t/* Check UART1 scratchpad register for uart to use */\n" - " \t\tmrc\tp15, 0, \\rx, c1, c0\n" - " \t\ttst\t\\rx, #1\t\t\t@ MMU enabled?\n" - "-#ifdef CONFIG_ARCH_OMAP2\n" - " \t\tmoveq\t\\rx, #0x48000000\t@ physical base address\n" - " \t\tmovne\t\\rx, #0xfa000000\t@ virtual base\n" - "-\t\torr\t\\rx, \\rx, #0x0006a000\n" - "-#ifdef CONFIG_OMAP_LL_DEBUG_UART2\n" - "-\t\tadd\t\\rx, \\rx, #0x00002000\t@ UART 2\n" - "-#endif\n" - "-#ifdef CONFIG_OMAP_LL_DEBUG_UART3\n" - "-\t\tadd\t\\rx, \\rx, #0x00004000\t@ UART 3\n" - "-#endif\n" - "-\n" - "-#elif defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)\n" - "-\t\tmoveq\t\\rx, #0x48000000\t@ physical base address\n" - "-\t\tmovne\t\\rx, #0xfa000000\t@ virtual base\n" - "-\t\torr\t\\rx, \\rx, #0x0006a000\n" - "-#ifdef CONFIG_OMAP_LL_DEBUG_UART2\n" - "-\t\tadd\t\\rx, \\rx, #0x00002000\t@ UART 2\n" - "-#endif\n" - "-#ifdef CONFIG_OMAP_LL_DEBUG_UART3\n" - "-\t\tadd\t\\rx, \\rx, #0x00fb0000\t@ UART 3\n" - "-\t\tadd\t\\rx, \\rx, #0x00006000\n" - "-#endif\n" - "-#endif\n" - "+\t\torr\t\\rx, \\rx, #0x0006a000\t@ uart1 on omap2/3/4\n" - "+\t\tldrb\t\\rx, [\\rx, #(UART_SCR << OMAP_PORT_SHIFT)] @ scratchpad\n" - "+\n" - "+\t\t/* Select the UART to use based on the UART1 scratchpad value */\n" - "+\t\tcmp\t\\rx, #0\t\t\t@ no port configured?\n" - "+\t\tbeq\t21f\t\t\t@ if none, try to use UART1\n" - "+\t\tcmp\t\\rx, #OMAP2UART1\t@ OMAP2/3/4UART1\n" - "+\t\tbeq\t21f\t\t\t@ configure OMAP2/3/4UART1\n" - "+\t\tcmp\t\\rx, #OMAP2UART2\t@ OMAP2/3/4UART2\n" - "+\t\tbeq\t22f\t\t\t@ configure OMAP2/3/4UART2\n" - "+\t\tcmp\t\\rx, #OMAP2UART3\t@ only on 24xx\n" - "+\t\tbeq\t23f\t\t\t@ configure OMAP2UART3\n" - "+\t\tcmp\t\\rx, #OMAP3UART3\t@ only on 34xx\n" - "+\t\tbeq\t33f\t\t\t@ configure OMAP3UART3\n" - "+\t\tcmp\t\\rx, #OMAP4UART3\t@ only on 44xx\n" - "+\t\tbeq\t43f\t\t\t@ configure OMAP4UART3\n" - "+\t\tcmp\t\\rx, #OMAP3UART4\t@ only on 36xx\n" - "+\t\tbeq\t34f\t\t\t@ configure OMAP3UART4\n" - "+\t\tcmp\t\\rx, #OMAP4UART4\t@ only on 44xx\n" - "+\t\tbeq\t44f\t\t\t@ configure OMAP4UART4\n" - "+\t\tcmp\t\\rx, #ZOOM_UART\t\t@ only on zoom2/3\n" - "+\t\tbeq\t95f\t\t\t@ configure ZOOM_UART\n" - "+\n" - "+\t\t/* Configure the UART offset from the phys/virt base */\n" - "+21:\t\tmov\t\\rx, #UART_OFFSET(OMAP2_UART1_BASE)\t@ omap2/3/4\n" - "+\t\tb\t98f\n" - "+22:\t\tmov\t\\rx, #UART_OFFSET(OMAP2_UART2_BASE)\t@ omap2/3/4\n" - "+\t\tb\t98f\n" - "+23:\t\tmov\t\\rx, #UART_OFFSET(OMAP2_UART3_BASE)\n" - "+\t\tb\t98f\n" - "+33:\t\tmov\t\\rx, #UART_OFFSET(OMAP3_UART1_BASE)\n" - "+\t\tadd\t\\rx, \\rx, #0x00fb0000\n" - "+\t\tadd\t\\rx, \\rx, #0x00006000\t\t@ OMAP3_UART3_BASE\n" - "+\t\tb\t98f\n" - "+34:\t\tmov\t\\rx, #UART_OFFSET(OMAP3_UART1_BASE)\n" - "+\t\tadd\t\\rx, \\rx, #0x00fb0000\n" - "+\t\tadd\t\\rx, \\rx, #0x00028000\t\t@ OMAP3_UART4_BASE\n" - "+\t\tb\t98f\n" - "+43:\t\tmov\t\\rx, #UART_OFFSET(OMAP4_UART3_BASE)\n" - "+\t\tb\t98f\n" - "+44:\t\tmov\t\\rx, #UART_OFFSET(OMAP4_UART4_BASE)\n" - "+\t\tb\t98f\n" - "+95:\t\tmov\t\\rx, #ZOOM_UART_BASE\n" - "+\t\tldr\t\\tmp, =omap_uart_phys\n" - "+\t\tstr\t\\rx, [\\tmp, #0]\n" - "+\t\tmov\t\\rx, #ZOOM_UART_VIRT\n" - "+\t\tldr\t\\tmp, =omap_uart_virt\n" - "+\t\tstr\t\\rx, [\\tmp, #0]\n" - "+\t\tmov\t\\rx, #(UART_LSR << ZOOM_PORT_SHIFT)\n" - "+\t\tldr\t\\tmp, =omap_uart_lsr\n" - "+\t\tstr\t\\rx, [\\tmp, #0]\n" - "+\t\tb\t10b\n" - "+\n" - "+\t\t/* Store both phys and virt address for the uart */\n" - "+98:\t\tadd\t\\rx, \\rx, #0x48000000\t@ phys base\n" - "+\t\tldr\t\\tmp, =omap_uart_phys\n" - "+\t\tstr\t\\rx, [\\tmp, #0]\n" - "+\t\tsub\t\\rx, \\rx, #0x48000000\t@ phys base\n" - "+\t\tadd\t\\rx, \\rx, #0xfa000000\t@ virt base\n" - "+\t\tldr\t\\tmp, =omap_uart_virt\n" - "+\t\tstr\t\\rx, [\\tmp, #0]\n" - "+\t\tmov\t\\rx, #(UART_LSR << OMAP_PORT_SHIFT)\n" - "+\t\tldr\t\\tmp, =omap_uart_lsr\n" - "+\t\tstr\t\\rx, [\\tmp, #0]\n" - "+\n" - "+\t\tb\t10b\n" - "+99:\n" - " \t\t.endm\n" - " \n" - " \t\t.macro\tsenduart,rd,rx\n" - "@@ -48,7 +119,9 @@\n" - " \t\t.endm\n" - " \n" - " \t\t.macro\tbusyuart,rd,rx\n" - "-1001:\t\tldrb\t\\rd, [\\rx, #(UART_LSR << OMAP_PORT_SHIFT)]\n" - "+1001:\t\tldr\t\\rd, =omap_uart_lsr\n" - "+\t\tldr\t\\rd, [\\rd, #0]\n" - "+\t\tldrb\t\\rd, [\\rx, \\rd]\n" - " \t\tand\t\\rd, \\rd, #(UART_LSR_TEMT | UART_LSR_THRE)\n" - " \t\tteq\t\\rd, #(UART_LSR_TEMT | UART_LSR_THRE)\n" - " \t\tbne\t1001b\n" - "diff --git a/arch/arm/plat-omap/include/plat/serial.h b/arch/arm/plat-omap/include/plat/serial.h\n" - "index 7f5a7a8..67ffa08 100644\n" - "--- a/arch/arm/plat-omap/include/plat/serial.h\n" - "+++ b/arch/arm/plat-omap/include/plat/serial.h\n" - "@@ -26,24 +26,49 @@\n" - " #define OMAP2_UART3_BASE\t0x4806e000\n" - " \n" - " /* OMAP3 serial ports */\n" - "-#define OMAP3_UART1_BASE\t0x4806a000\n" - "-#define OMAP3_UART2_BASE\t0x4806c000\n" - "+#define OMAP3_UART1_BASE\tOMAP2_UART1_BASE\n" - "+#define OMAP3_UART2_BASE\tOMAP2_UART2_BASE\n" - " #define OMAP3_UART3_BASE\t0x49020000\n" - " #define OMAP3_UART4_BASE\t0x49042000\t/* Only on 36xx */\n" - " \n" - " /* OMAP4 serial ports */\n" - "-#define OMAP4_UART1_BASE\t0x4806a000\n" - "-#define OMAP4_UART2_BASE\t0x4806c000\n" - "+#define OMAP4_UART1_BASE\tOMAP2_UART1_BASE\n" - "+#define OMAP4_UART2_BASE\tOMAP2_UART1_BASE\n" - " #define OMAP4_UART3_BASE\t0x48020000\n" - " #define OMAP4_UART4_BASE\t0x4806e000\n" - " \n" - "+/* External port on Zoom2/3 */\n" - "+#define ZOOM_UART_BASE\t\t0x10000000\n" - "+#define ZOOM_UART_VIRT\t\t0xfb000000\n" - "+\n" - " #define OMAP_PORT_SHIFT\t\t2\n" - " #define OMAP7XX_PORT_SHIFT\t0\n" - "+#define ZOOM_PORT_SHIFT\t\t1\n" - " \n" - " #define OMAP1510_BASE_BAUD\t(12000000/16)\n" - " #define OMAP16XX_BASE_BAUD\t(48000000/16)\n" - " #define OMAP24XX_BASE_BAUD\t(48000000/16)\n" - " \n" - "+/*\n" - "+ * DEBUG_LL port encoding stored into the UART1 scratchpad register by\n" - "+ * decomp_setup in uncompress.h\n" - "+ */\n" - "+#define OMAP1UART1\t\t11\n" - "+#define OMAP1UART2\t\t12\n" - "+#define OMAP1UART3\t\t13\n" - "+#define OMAP2UART1\t\t21\n" - "+#define OMAP2UART2\t\t22\n" - "+#define OMAP2UART3\t\t23\n" - "+#define OMAP3UART1\t\tOMAP2UART1\n" - "+#define OMAP3UART2\t\tOMAP2UART2\n" - "+#define OMAP3UART3\t\t33\n" - "+#define OMAP3UART4\t\t34\t\t/* Only on 36xx */\n" - "+#define OMAP4UART1\t\tOMAP2UART1\n" - "+#define OMAP4UART2\t\tOMAP2UART2\n" - "+#define OMAP4UART3\t\t43\n" - "+#define OMAP4UART4\t\t44\n" - "+#define ZOOM_UART\t\t95\t\t/* Only on zoom2/3 */\n" - "+\n" - " /* This is only used by 8250.c for omap1510 */\n" - " #define is_omap_port(pt)\t({int __ret = 0;\t\t\t\\\n" - " \t\t\tif ((pt)->port.mapbase == OMAP1_UART1_BASE ||\t\\\n" - "diff --git a/arch/arm/plat-omap/include/plat/uncompress.h b/arch/arm/plat-omap/include/plat/uncompress.h\n" - "index e5723c3..f426d68 100644\n" - "--- a/arch/arm/plat-omap/include/plat/uncompress.h\n" - "+++ b/arch/arm/plat-omap/include/plat/uncompress.h\n" - "@@ -19,63 +19,38 @@\n" - " \n" - " #include <linux/types.h>\n" - " #include <linux/serial_reg.h>\n" - "+\n" - "+#include <asm/mach-types.h>\n" - "+\n" - " #include <plat/serial.h>\n" - " \n" - "-unsigned int system_rev;\n" - "+static volatile u8 *uart1_base;\n" - "+static volatile int uart1_shift;\n" - " \n" - "-#define UART_OMAP_MDR1\t\t0x08\t/* mode definition register */\n" - "-#define OMAP_ID_730\t\t0x355F\n" - "-#define OMAP_ID_850\t\t0x362C\n" - "-#define ID_MASK\t\t\t0x7fff\n" - "-#define check_port(base, shift) ((base[UART_OMAP_MDR1 << shift] & 7) == 0)\n" - "-#define omap_get_id() ((*(volatile unsigned int *)(0xfffed404)) >> 12) & ID_MASK\n" - "+static volatile u8 *uart_base;\n" - "+static volatile int uart_shift;\n" - " \n" - "-static void putc(int c)\n" - "+/*\n" - "+ * Store the DEBUG_LL uart number into UART1 scratchpad register.\n" - "+ * See also debug-macro.S, and serial.c for related code.\n" - "+ *\n" - "+ * Please note that we currently assume that:\n" - "+ * - UART1 clocks are enabled for register access\n" - "+ * - UART1 scratchpad register can be used\n" - "+ */\n" - "+static void set_uart1_scratchpad(unsigned char port)\n" - " {\n" - "-\tvolatile u8 * uart = 0;\n" - "-\tint shift = 2;\n" - "-\n" - "-#ifdef CONFIG_MACH_OMAP_PALMTE\n" - "-\treturn;\n" - "-#endif\n" - "-\n" - "-#ifdef CONFIG_ARCH_OMAP\n" - "-\t/* Will get removed in the next patch, set to OMAP3 to compile */\n" - "-#ifdef\tCONFIG_OMAP_LL_DEBUG_UART3\n" - "-\tuart = (volatile u8 *)(OMAP3_UART3_BASE);\n" - "-#elif defined(CONFIG_OMAP_LL_DEBUG_UART2)\n" - "-\tuart = (volatile u8 *)(OMAP3_UART2_BASE);\n" - "-#elif defined(CONFIG_OMAP_LL_DEBUG_UART1)\n" - "-\tuart = (volatile u8 *)(OMAP3_UART1_BASE);\n" - "-#elif defined(CONFIG_OMAP_LL_DEBUG_NONE)\n" - "-\treturn;\n" - "-#else\n" - "-\treturn;\n" - "-#endif\n" - "-\n" - "-#ifdef CONFIG_ARCH_OMAP1\n" - "-\t/* Determine which serial port to use */\n" - "-\tdo {\n" - "-\t\t/* MMU is not on, so cpu_is_omapXXXX() won't work here */\n" - "-\t\tunsigned int omap_id = omap_get_id();\n" - "-\n" - "-\t\tif (omap_id == OMAP_ID_730 || omap_id == OMAP_ID_850)\n" - "-\t\t\tshift = 0;\n" - "+\tuart1_base[UART_SCR << uart1_shift] = port;\n" - "+}\n" - " \n" - "-\t\tif (check_port(uart, shift))\n" - "-\t\t\tbreak;\n" - "-\t\t/* Silent boot if no serial ports are enabled. */\n" - "+static void putc(int c)\n" - "+{\n" - "+\tif (!uart_base)\n" - " \t\treturn;\n" - "-\t} while (0);\n" - "-#endif /* CONFIG_ARCH_OMAP1 */\n" - "-#endif\n" - " \n" - "-\t/*\n" - "-\t * Now, xmit each character\n" - "-\t */\n" - "-\twhile (!(uart[UART_LSR << shift] & UART_LSR_THRE))\n" - "+\twhile (!(uart_base[UART_LSR << uart_shift] & UART_LSR_THRE))\n" - " \t\tbarrier();\n" - "-\tuart[UART_TX << shift] = c;\n" - "+\tuart_base[UART_TX << uart_shift] = c;\n" - " }\n" - " \n" - " static inline void flush(void)\n" - "@@ -83,7 +58,116 @@ static inline void flush(void)\n" - " }\n" - " \n" - " /*\n" - "+ * Macros to configure UART1 and debug UART\n" - "+ */\n" - "+#define _DEBUG_LL_ENTRY(mach, uart1_phys, uart1_shft,\t\t\t\\\n" - "+\t\t\tdbg_uart, dbg_shft, dbg_id)\t\t\t\\\n" - "+\tif (machine_is_##mach()) {\t\t\t\t\t\\\n" - "+\t\tuart1_base = (volatile u8 *)(uart1_phys);\t\t\\\n" - "+\t\tuart1_shift = (uart1_shft);\t\t\t\t\\\n" - "+\t\tuart_base = (volatile u8 *)(dbg_uart);\t\t\t\\\n" - "+\t\tuart_shift = (dbg_shft);\t\t\t\t\\\n" - "+\t\tport = (dbg_id);\t\t\t\t\t\\\n" - "+\t\tset_uart1_scratchpad(port);\t\t\t\t\\\n" - "+\t\tbreak;\t\t\t\t\t\t\t\\\n" - "+\t}\n" - "+\n" - "+#define DEBUG_LL_OMAP7XX(p, mach)\t\t\t\t\t\\\n" - "+\t_DEBUG_LL_ENTRY(mach, OMAP1_UART1_BASE, OMAP7XX_PORT_SHIFT,\t\\\n" - "+\t\tOMAP1_UART##p##_BASE, OMAP7XX_PORT_SHIFT, OMAP1UART##p)\n" - "+\n" - "+#define DEBUG_LL_OMAP1(p, mach)\t\t\t\t\t\t\\\n" - "+\t_DEBUG_LL_ENTRY(mach, OMAP1_UART1_BASE, OMAP_PORT_SHIFT,\t\\\n" - "+\t\tOMAP1_UART##p##_BASE, OMAP_PORT_SHIFT, OMAP1UART##p)\n" - "+\n" - "+#define DEBUG_LL_OMAP2(p, mach)\t\t\t\t\t\t\\\n" - "+\t_DEBUG_LL_ENTRY(mach, OMAP2_UART1_BASE, OMAP_PORT_SHIFT,\t\\\n" - "+\t\tOMAP2_UART##p##_BASE, OMAP_PORT_SHIFT, OMAP2UART##p)\n" - "+\n" - "+#define DEBUG_LL_OMAP3(p, mach)\t\t\t\t\t\t\\\n" - "+\t_DEBUG_LL_ENTRY(mach, OMAP3_UART1_BASE, OMAP_PORT_SHIFT,\t\\\n" - "+\t\tOMAP3_UART##p##_BASE, OMAP_PORT_SHIFT, OMAP3UART##p)\n" - "+\n" - "+#define DEBUG_LL_OMAP4(p, mach)\t\t\t\t\t\t\\\n" - "+\t_DEBUG_LL_ENTRY(mach, OMAP4_UART1_BASE, OMAP_PORT_SHIFT,\t\\\n" - "+\t\tOMAP4_UART##p##_BASE, OMAP_PORT_SHIFT, OMAP4UART##p)\n" - "+\n" - "+/* Zoom2/3 shift is different for UART1 and external port */\n" - "+#define DEBUG_LL_ZOOM(mach)\t\t\t\t\t\t\\\n" - "+\t_DEBUG_LL_ENTRY(mach, OMAP2_UART1_BASE, OMAP_PORT_SHIFT,\t\\\n" - "+\t\tZOOM_UART_BASE, ZOOM_PORT_SHIFT, ZOOM_UART)\n" - "+\n" - "+static inline void __arch_decomp_setup(unsigned long arch_id)\n" - "+{\n" - "+\tint port = 0;\n" - "+\n" - "+\t/*\n" - "+\t * Initialize the port based on the machine ID from the bootloader.\n" - "+\t * Note that we're using macros here instead of switch statement\n" - "+\t * as machine_is functions are optimized out for the boards that\n" - "+\t * are not selected.\n" - "+\t */\n" - "+\tdo {\n" - "+\t\t/* omap7xx/8xx based boards using UART1 with shift 0 */\n" - "+\t\tDEBUG_LL_OMAP7XX(1, herald);\n" - "+\t\tDEBUG_LL_OMAP7XX(1, omap_perseus2);\n" - "+\n" - "+\t\t/* omap15xx/16xx based boards using UART1 */\n" - "+\t\tDEBUG_LL_OMAP1(1, ams_delta);\n" - "+\t\tDEBUG_LL_OMAP1(1, nokia770);\n" - "+\t\tDEBUG_LL_OMAP1(1, omap_h2);\n" - "+\t\tDEBUG_LL_OMAP1(1, omap_h3);\n" - "+\t\tDEBUG_LL_OMAP1(1, omap_innovator);\n" - "+\t\tDEBUG_LL_OMAP1(1, omap_osk);\n" - "+\t\tDEBUG_LL_OMAP1(1, omap_palmte);\n" - "+\t\tDEBUG_LL_OMAP1(1, omap_palmz71);\n" - "+\n" - "+\t\t/* omap15xx/16xx based boards using UART2 */\n" - "+\t\tDEBUG_LL_OMAP1(2, omap_palmtt);\n" - "+\n" - "+\t\t/* omap15xx/16xx based boards using UART3 */\n" - "+\t\tDEBUG_LL_OMAP1(3, sx1);\n" - "+\n" - "+\t\t/* omap2 based boards using UART1 */\n" - "+\t\tDEBUG_LL_OMAP2(1, omap2evm);\n" - "+\t\tDEBUG_LL_OMAP2(1, omap_2430sdp);\n" - "+\t\tDEBUG_LL_OMAP2(1, omap_apollon);\n" - "+\t\tDEBUG_LL_OMAP2(1, omap_h4);\n" - "+\n" - "+\t\t/* omap2 based boards using UART3 */\n" - "+\t\tDEBUG_LL_OMAP2(3, nokia_n800);\n" - "+\t\tDEBUG_LL_OMAP2(3, nokia_n810);\n" - "+\t\tDEBUG_LL_OMAP2(3, nokia_n810_wimax);\n" - "+\n" - "+\t\t/* omap3 based boards using UART1 */\n" - "+\t\tDEBUG_LL_OMAP2(1, omap3evm);\n" - "+\t\tDEBUG_LL_OMAP3(1, omap_3430sdp);\n" - "+\t\tDEBUG_LL_OMAP3(1, omap_3630sdp);\n" - "+\n" - "+\t\t/* omap3 based boards using UART3 */\n" - "+\t\tDEBUG_LL_OMAP3(3, cm_t35);\n" - "+\t\tDEBUG_LL_OMAP3(3, igep0020);\n" - "+\t\tDEBUG_LL_OMAP3(3, nokia_rx51);\n" - "+\t\tDEBUG_LL_OMAP3(3, omap3517evm);\n" - "+\t\tDEBUG_LL_OMAP3(3, omap3_beagle);\n" - "+\t\tDEBUG_LL_OMAP3(3, omap3_pandora);\n" - "+\t\tDEBUG_LL_OMAP3(3, omap_ldp);\n" - "+\t\tDEBUG_LL_OMAP3(3, overo);\n" - "+\t\tDEBUG_LL_OMAP3(3, touchbook);\n" - "+\n" - "+\t\t/* omap4 based boards using UART3 */\n" - "+\t\tDEBUG_LL_OMAP4(3, omap_4430sdp);\n" - "+\n" - "+\t\t/* zoom2/3 external uart */\n" - "+\t\tDEBUG_LL_ZOOM(omap_zoom2);\n" - "+\t\tDEBUG_LL_ZOOM(omap_zoom3);\n" - "+\n" - "+\t} while (0);\n" - "+}\n" - "+\n" - "+#define arch_decomp_setup()\t__arch_decomp_setup(arch_id)\n" - "+\n" - "+/*\n" - " * nothing to do\n" - " */\n" - "-#define arch_decomp_setup()\n" - #define arch_decomp_wdog() -4aea8b10b64bb6e22dd7aea09eec6350f6a6bc9d02ba1fc7d2bc2cdff703f2b9 +1c547bc1b3a118b771211a884478afe6323a8e6b6445d524ac0e62728625fdb1
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.