diff options
author | Kevin Wells <wellsk40@gmail.com> | 2010-02-26 18:53:39 -0500 |
---|---|---|
committer | Kevin Wells <wellsk40@gmail.com> | 2010-07-27 06:08:09 -0400 |
commit | 343d3537917bd74648fa2a360b42f64ad5ec551d (patch) | |
tree | 4847f42f8d6fe92ce72fe7be8f449b7bb5c9645a /arch | |
parent | 437db5903653f6a8a736e77ad5c21a296d74299b (diff) |
ARM: LPC32XX: Debug and IRQ macros
Debug (printascii) and IRQ handler macros for the LPC32XX
arch
Signed-off-by: Kevin Wells <wellsk40@gmail.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-lpc32xx/include/mach/debug-macro.S | 31 | ||||
-rw-r--r-- | arch/arm/mach-lpc32xx/include/mach/entry-macro.S | 47 |
2 files changed, 78 insertions, 0 deletions
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 000000000000..621744d6b152 --- /dev/null +++ b/arch/arm/mach-lpc32xx/include/mach/debug-macro.S | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-lpc32xx/include/mach/debug-macro.S | ||
3 | * | ||
4 | * Author: Kevin Wells <kevin.wells@nxp.com> | ||
5 | * | ||
6 | * Copyright (C) 2010 NXP Semiconductors | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | */ | ||
18 | |||
19 | /* | ||
20 | * Debug output is hardcoded to standard UART 5 | ||
21 | */ | ||
22 | |||
23 | .macro addruart,rx, tmp | ||
24 | mrc p15, 0, \rx, c1, c0 | ||
25 | tst \rx, #1 @ MMU enabled? | ||
26 | ldreq \rx, =0x40090000 | ||
27 | ldrne \rx, =0xF4090000 | ||
28 | .endm | ||
29 | |||
30 | #define UART_SHIFT 2 | ||
31 | #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 000000000000..870227c96602 --- /dev/null +++ b/arch/arm/mach-lpc32xx/include/mach/entry-macro.S | |||
@@ -0,0 +1,47 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-lpc32xx/include/mach/entry-macro.S | ||
3 | * | ||
4 | * Author: Kevin Wells <kevin.wells@nxp.com> | ||
5 | * | ||
6 | * Copyright (C) 2010 NXP Semiconductors | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | */ | ||
18 | |||
19 | #include <mach/hardware.h> | ||
20 | #include <mach/platform.h> | ||
21 | |||
22 | #define LPC32XX_INTC_MASKED_STATUS_OFS 0x8 | ||
23 | |||
24 | .macro disable_fiq | ||
25 | .endm | ||
26 | |||
27 | .macro get_irqnr_preamble, base, tmp | ||
28 | ldr \base, =IO_ADDRESS(LPC32XX_MIC_BASE) | ||
29 | .endm | ||
30 | |||
31 | .macro arch_ret_to_user, tmp1, tmp2 | ||
32 | .endm | ||
33 | |||
34 | /* | ||
35 | * Return IRQ number in irqnr. Also return processor Z flag status in CPSR | ||
36 | * as set if an interrupt is pending. | ||
37 | */ | ||
38 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
39 | ldr \irqstat, [\base, #LPC32XX_INTC_MASKED_STATUS_OFS] | ||
40 | clz \irqnr, \irqstat | ||
41 | rsb \irqnr, \irqnr, #31 | ||
42 | teq \irqstat, #0 | ||
43 | .endm | ||
44 | |||
45 | .macro irq_prio_table | ||
46 | .endm | ||
47 | |||