From: Tony Lindgren <tony@atomide.com> To: linux-arm-kernel@lists.infradead.org Cc: linux-omap@vger.kernel.org Subject: [PATCH 1/5] arm: Fix DCC console for v7 Date: Fri, 18 Dec 2009 19:45:54 -0800 [thread overview] Message-ID: <20091219034554.26198.60138.stgit@localhost> (raw) In-Reply-To: <20091219034151.26198.26570.stgit@localhost> Without this patch arch/arm/compressed/head.S defaults to generic DCC code that does not work for v7. For more information on the v7 DCC, see Cortex-A8 TRM "12.11.1 Debug communications channel". To use it with post 2.6.33-rc1 or later, you need to have: CONFIG_DEBUG_LL=y ONFIG_DEBUG_ICEDCC=y CONFIG_EARLY_PRINTK=y Earlier kernels need commit 93fd03a8c6728b58879f8af20ffd55d9c32a778b backported. Tested on omap3430. Signed-off-by: Tony Lindgren <tony@atomide.com> --- arch/arm/boot/compressed/head.S | 8 ++++++++ arch/arm/boot/compressed/misc.c | 12 ++++++++++++ arch/arm/kernel/debug.S | 20 ++++++++++++++++++++ 3 files changed, 40 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index d356af7..4fddc50 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S @@ -27,6 +27,14 @@ .macro writeb, ch, rb mcr p14, 0, \ch, c0, c5, 0 .endm +#elif defined(CONFIG_CPU_V7) + .macro loadsp, rb + .endm + .macro writeb, ch, rb +wait: mrc p14, 0, pc, c0, c1, 0 + bcs wait + mcr p14, 0, \ch, c0, c5, 0 + .endm #elif defined(CONFIG_CPU_XSCALE) .macro loadsp, rb .endm diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c index 17153b5..2d1e819 100644 --- a/arch/arm/boot/compressed/misc.c +++ b/arch/arm/boot/compressed/misc.c @@ -48,6 +48,18 @@ static void icedcc_putc(int ch) asm("mcr p14, 0, %0, c0, c5, 0" : : "r" (ch)); } + +#elif defined(CONFIG_CPU_V7) + +static void icedcc_putc(int ch) +{ + asm( + "wait: mrc p14, 0, pc, c0, c1, 0 \n\ + bcs wait \n\ + mcr p14, 0, %0, c0, c5, 0 " + : : "r" (ch)); +} + #elif defined(CONFIG_CPU_XSCALE) static void icedcc_putc(int ch) diff --git a/arch/arm/kernel/debug.S b/arch/arm/kernel/debug.S index b121b60..5c91add 100644 --- a/arch/arm/kernel/debug.S +++ b/arch/arm/kernel/debug.S @@ -49,6 +49,26 @@ 1002: .endm +#elif defined(CONFIG_CPU_V7) + + .macro addruart, rx + .endm + + .macro senduart, rd, rx + mcr p14, 0, \rd, c0, c5, 0 + .endm + + .macro busyuart, rd, rx +busy: mrc p14, 0, pc, c0, c1, 0 + bcs busy + .endm + + .macro waituart, rd, rx +wait: mrc p14, 0, pc, c0, c1, 0 + bcs wait + + .endm + #elif defined(CONFIG_CPU_XSCALE) .macro addruart, rx
WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/5] arm: Fix DCC console for v7 Date: Fri, 18 Dec 2009 19:45:54 -0800 [thread overview] Message-ID: <20091219034554.26198.60138.stgit@localhost> (raw) In-Reply-To: <20091219034151.26198.26570.stgit@localhost> Without this patch arch/arm/compressed/head.S defaults to generic DCC code that does not work for v7. For more information on the v7 DCC, see Cortex-A8 TRM "12.11.1 Debug communications channel". To use it with post 2.6.33-rc1 or later, you need to have: CONFIG_DEBUG_LL=y ONFIG_DEBUG_ICEDCC=y CONFIG_EARLY_PRINTK=y Earlier kernels need commit 93fd03a8c6728b58879f8af20ffd55d9c32a778b backported. Tested on omap3430. Signed-off-by: Tony Lindgren <tony@atomide.com> --- arch/arm/boot/compressed/head.S | 8 ++++++++ arch/arm/boot/compressed/misc.c | 12 ++++++++++++ arch/arm/kernel/debug.S | 20 ++++++++++++++++++++ 3 files changed, 40 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index d356af7..4fddc50 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S @@ -27,6 +27,14 @@ .macro writeb, ch, rb mcr p14, 0, \ch, c0, c5, 0 .endm +#elif defined(CONFIG_CPU_V7) + .macro loadsp, rb + .endm + .macro writeb, ch, rb +wait: mrc p14, 0, pc, c0, c1, 0 + bcs wait + mcr p14, 0, \ch, c0, c5, 0 + .endm #elif defined(CONFIG_CPU_XSCALE) .macro loadsp, rb .endm diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c index 17153b5..2d1e819 100644 --- a/arch/arm/boot/compressed/misc.c +++ b/arch/arm/boot/compressed/misc.c @@ -48,6 +48,18 @@ static void icedcc_putc(int ch) asm("mcr p14, 0, %0, c0, c5, 0" : : "r" (ch)); } + +#elif defined(CONFIG_CPU_V7) + +static void icedcc_putc(int ch) +{ + asm( + "wait: mrc p14, 0, pc, c0, c1, 0 \n\ + bcs wait \n\ + mcr p14, 0, %0, c0, c5, 0 " + : : "r" (ch)); +} + #elif defined(CONFIG_CPU_XSCALE) static void icedcc_putc(int ch) diff --git a/arch/arm/kernel/debug.S b/arch/arm/kernel/debug.S index b121b60..5c91add 100644 --- a/arch/arm/kernel/debug.S +++ b/arch/arm/kernel/debug.S @@ -49,6 +49,26 @@ 1002: .endm +#elif defined(CONFIG_CPU_V7) + + .macro addruart, rx + .endm + + .macro senduart, rd, rx + mcr p14, 0, \rd, c0, c5, 0 + .endm + + .macro busyuart, rd, rx +busy: mrc p14, 0, pc, c0, c1, 0 + bcs busy + .endm + + .macro waituart, rd, rx +wait: mrc p14, 0, pc, c0, c1, 0 + bcs wait + + .endm + #elif defined(CONFIG_CPU_XSCALE) .macro addruart, rx
next prev parent reply other threads:[~2009-12-19 3:45 UTC|newest] Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-12-19 3:45 [PATCH 0/5] V7/Cortex/omap34xx fixes for 2.6.33-rc1: DCC, kexec, atags Tony Lindgren 2009-12-19 3:45 ` Tony Lindgren 2009-12-19 3:45 ` Tony Lindgren [this message] 2009-12-19 3:45 ` [PATCH 1/5] arm: Fix DCC console for v7 Tony Lindgren 2009-12-19 3:46 ` [PATCH 2/5] arm: Fix cpu_proc_fin() for proc-v7.S and make kexec work Tony Lindgren 2009-12-19 3:46 ` Tony Lindgren 2009-12-19 3:46 ` [PATCH 3/5] arm: Flush TLB entries in setup_mm_for_reboot() Tony Lindgren 2009-12-19 3:46 ` Tony Lindgren 2009-12-19 9:06 ` Russell King - ARM Linux 2009-12-19 9:06 ` Russell King - ARM Linux 2009-12-19 17:54 ` Tony Lindgren 2009-12-19 17:54 ` Tony Lindgren 2009-12-19 18:10 ` Tony Lindgren 2009-12-19 18:10 ` Tony Lindgren 2009-12-19 3:46 ` [PATCH 4/5] arm: Fix init_atags_procfs() to check tag->hdr.size Tony Lindgren 2009-12-19 3:46 ` Tony Lindgren 2009-12-19 9:03 ` Russell King - ARM Linux 2009-12-19 9:03 ` Russell King - ARM Linux 2009-12-19 17:44 ` Tony Lindgren 2009-12-19 17:44 ` Tony Lindgren 2009-12-19 18:44 ` Tony Lindgren 2009-12-19 18:44 ` Tony Lindgren 2009-12-19 3:46 ` [PATCH 5/5] arm: Fix typo in cacheflush.h and remove unnecessary comments Tony Lindgren 2009-12-19 3:46 ` Tony Lindgren 2009-12-19 5:07 ` [PATCH 0/5] V7/Cortex/omap34xx fixes for 2.6.33-rc1: DCC, kexec, atags Tony Lindgren 2009-12-19 5:07 ` Tony Lindgren 2009-12-28 5:55 ` Magnus Damm 2009-12-28 5:55 ` Magnus Damm 2009-12-29 22:07 ` Tony Lindgren 2009-12-29 22:07 ` Tony Lindgren 2010-01-05 9:24 ` Magnus Damm 2010-01-05 9:24 ` Magnus Damm 2010-01-05 11:36 ` Mika Westerberg 2010-01-05 11:36 ` Mika Westerberg 2010-01-05 17:14 ` Tony Lindgren 2010-01-05 17:14 ` Tony Lindgren 2010-01-05 17:54 ` Paul Walmsley 2010-01-05 17:54 ` Paul Walmsley 2010-01-05 20:43 ` Tony Lindgren 2010-01-05 20:43 ` Tony Lindgren 2010-01-08 22:32 ` Woodruff, Richard 2010-01-08 22:32 ` Woodruff, Richard
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=20091219034554.26198.60138.stgit@localhost \ --to=tony@atomide.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-omap@vger.kernel.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: linkBe 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.