linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: wellsk40@gmail.com (wellsk40 at gmail.com)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 02/13] ARM: LPC32XX: Debug and IRQ macros
Date: Fri, 26 Feb 2010 15:53:39 -0800	[thread overview]
Message-ID: <1267228430-27193-3-git-send-email-wellsk40@gmail.com> (raw)
In-Reply-To: <1267228430-27193-1-git-send-email-wellsk40@gmail.com>

From: Kevin Wells <wellsk40@gmail.com>

Debug (printascii) and IRQ handler macros for the LPC32XX
arch

Signed-off-by: Kevin Wells <wellsk40@gmail.com>
---
 arch/arm/mach-lpc32xx/include/mach/debug-macro.S |   31 ++++++++++++++
 arch/arm/mach-lpc32xx/include/mach/entry-macro.S |   47 ++++++++++++++++++++++
 2 files changed, 78 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-lpc32xx/include/mach/debug-macro.S
 create mode 100644 arch/arm/mach-lpc32xx/include/mach/entry-macro.S

diff --git a/arch/arm/mach-lpc32xx/include/mach/debug-macro.S b/arch/arm/mach-lpc32xx/include/mach/debug-macro.S
new file mode 100644
index 0000000..621744d
--- /dev/null
+++ b/arch/arm/mach-lpc32xx/include/mach/debug-macro.S
@@ -0,0 +1,31 @@
+/*
+ * arch/arm/mach-lpc32xx/include/mach/debug-macro.S
+ *
+ * Author: Kevin Wells <kevin.wells@nxp.com>
+ *
+ * Copyright (C) 2010 NXP Semiconductors
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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.
+ */
+
+/*
+ * Debug output is hardcoded to standard UART 5
+*/
+
+	.macro	addruart,rx, tmp
+	mrc	p15, 0, \rx, c1, c0
+	tst	\rx, #1				@ MMU enabled?
+	ldreq	\rx, =0x40090000
+	ldrne	\rx, =0xF4090000
+	.endm
+
+#define UART_SHIFT	2
+#include <asm/hardware/debug-8250.S>
diff --git a/arch/arm/mach-lpc32xx/include/mach/entry-macro.S b/arch/arm/mach-lpc32xx/include/mach/entry-macro.S
new file mode 100644
index 0000000..870227c
--- /dev/null
+++ b/arch/arm/mach-lpc32xx/include/mach/entry-macro.S
@@ -0,0 +1,47 @@
+/*
+ * arch/arm/mach-lpc32xx/include/mach/entry-macro.S
+ *
+ * Author: Kevin Wells <kevin.wells@nxp.com>
+ *
+ * Copyright (C) 2010 NXP Semiconductors
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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.
+ */
+
+#include <mach/hardware.h>
+#include <mach/platform.h>
+
+#define LPC32XX_INTC_MASKED_STATUS_OFS	0x8
+
+	.macro	disable_fiq
+	.endm
+
+	.macro  get_irqnr_preamble, base, tmp
+	ldr	\base, =IO_ADDRESS(LPC32XX_MIC_BASE)
+	.endm
+
+	.macro  arch_ret_to_user, tmp1, tmp2
+	.endm
+
+/*
+ * Return IRQ number in irqnr. Also return processor Z flag status in CPSR
+ * as set if an interrupt is pending.
+ */
+	.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
+	ldr	\irqstat, [\base, #LPC32XX_INTC_MASKED_STATUS_OFS]
+	clz	\irqnr, \irqstat
+	rsb	\irqnr, \irqnr, #31
+	teq	\irqstat, #0
+	.endm
+
+	.macro	irq_prio_table
+	.endm
+
-- 
1.6.6

  parent reply	other threads:[~2010-02-26 23:53 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-26 23:53 LPC32XX architecture files (updated v5) wellsk40 at gmail.com
2010-02-26 23:53 ` [PATCH 01/13] ARM: LPC32XX: Initial arch header files wellsk40 at gmail.com
2010-02-26 23:53 ` wellsk40 at gmail.com [this message]
2010-02-26 23:53 ` [PATCH 03/13] ARM: LPC32XX: Clock driver wellsk40 at gmail.com
2010-02-26 23:53 ` [PATCH 04/13] ARM: LPC32XX: GPIO, timer, and IRQ drivers wellsk40 at gmail.com
2010-02-27 20:42   ` Uwe Kleine-König
2010-03-01 17:57     ` Kevin Wells
2010-02-26 23:53 ` [PATCH 05/13] ARM: LPC32XX: System suspend support wellsk40 at gmail.com
2010-02-26 23:53 ` [PATCH 06/13] RM: LPC32XX: Serial support code wellsk40 at gmail.com
2010-02-26 23:53 ` [PATCH 07/13] ARM: LPC32XX: Misc support functions wellsk40 at gmail.com
2010-02-26 23:53 ` [PATCH 08/13] ARM: LPC32XX: Phytec 3250 platform support wellsk40 at gmail.com
2010-02-26 23:53 ` [PATCH 09/13] ARM: LPC32XX: Arch config menu supoport and makefiles wellsk40 at gmail.com
2010-02-26 23:53 ` [PATCH 10/13] ARM: LPC32XX: Default PHY3250 kernel config (ramdisk) wellsk40 at gmail.com
2010-02-26 23:53 ` [PATCH 11/13] ARM: Add support for the LPC32XX arch wellsk40 at gmail.com
2010-02-26 23:53 ` [PATCH 12/13] i2c: " wellsk40 at gmail.com
2010-02-26 23:53 ` [PATCH 13/13] WATCHDOG: " wellsk40 at gmail.com
2010-03-02 17:19 ` LPC32XX architecture files (updated v5) Kevin Wells
2010-03-02 20:18   ` Uwe Kleine-König
2010-03-02 20:34     ` Russell King - ARM Linux
2010-03-02 20:45       ` Uwe Kleine-König
2010-03-03 21:05     ` Kevin Wells
2010-03-04 17:00       ` Kevin Wells
  -- strict thread matches above, loose matches on Subject: below --
2010-02-19 23:25 LPC32XX architecture files (updated v4) wellsk40 at gmail.com
2010-02-19 23:25 ` [PATCH 02/13] ARM: LPC32XX: Debug and IRQ macros wellsk40 at gmail.com

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=1267228430-27193-3-git-send-email-wellsk40@gmail.com \
    --to=wellsk40@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).