diff options
Diffstat (limited to 'arch/arm/plat-mxc/include')
-rw-r--r-- | arch/arm/plat-mxc/include/mach/common.h | 15 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/entry-macro.S | 58 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/iomux-mx3.h | 1 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/mx25.h | 5 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/mx3x.h | 18 |
5 files changed, 24 insertions, 73 deletions
diff --git a/arch/arm/plat-mxc/include/mach/common.h b/arch/arm/plat-mxc/include/mach/common.h index d7149d1bd32c..ace4bb550edc 100644 --- a/arch/arm/plat-mxc/include/mach/common.h +++ b/arch/arm/plat-mxc/include/mach/common.h @@ -82,4 +82,19 @@ enum mxc_cpu_pwr_mode { extern void mx5_cpu_lp_set(enum mxc_cpu_pwr_mode mode); extern void (*imx_idle)(void); +extern void imx_print_silicon_rev(const char *cpu, int srev); + +void avic_handle_irq(struct pt_regs *); +void tzic_handle_irq(struct pt_regs *); + +#define imx1_handle_irq avic_handle_irq +#define imx21_handle_irq avic_handle_irq +#define imx25_handle_irq avic_handle_irq +#define imx27_handle_irq avic_handle_irq +#define imx31_handle_irq avic_handle_irq +#define imx35_handle_irq avic_handle_irq +#define imx50_handle_irq tzic_handle_irq +#define imx51_handle_irq tzic_handle_irq +#define imx53_handle_irq tzic_handle_irq + #endif diff --git a/arch/arm/plat-mxc/include/mach/entry-macro.S b/arch/arm/plat-mxc/include/mach/entry-macro.S index 066d464d322d..842fbcb0d6cc 100644 --- a/arch/arm/plat-mxc/include/mach/entry-macro.S +++ b/arch/arm/plat-mxc/include/mach/entry-macro.S @@ -9,72 +9,16 @@ * published by the Free Software Foundation. */ -#include <mach/hardware.h> +/* Unused, we use CONFIG_MULTI_IRQ_HANDLER */ -#define AVIC_NIMASK 0x04 - - @ this macro disables fast irq (not implemented) .macro disable_fiq .endm .macro get_irqnr_preamble, base, tmp -#ifndef CONFIG_MXC_TZIC - ldr \base, =avic_base - ldr \base, [\base] -#ifdef CONFIG_MXC_IRQ_PRIOR - ldr r4, [\base, #AVIC_NIMASK] -#endif -#elif defined CONFIG_MXC_TZIC - ldr \base, =tzic_base - ldr \base, [\base] -#endif /* CONFIG_MXC_TZIC */ .endm .macro arch_ret_to_user, tmp1, tmp2 .endm - @ this macro checks which interrupt occurred - @ and returns its number in irqnr - @ and returns if an interrupt occurred in irqstat .macro get_irqnr_and_base, irqnr, irqstat, base, tmp -#ifndef CONFIG_MXC_TZIC - @ Load offset & priority of the highest priority - @ interrupt pending from AVIC_NIVECSR - ldr \irqstat, [\base, #0x40] - @ Shift to get the decoded IRQ number, using ASR so - @ 'no interrupt pending' becomes 0xffffffff - mov \irqnr, \irqstat, asr #16 - @ set zero flag if IRQ + 1 == 0 - adds \tmp, \irqnr, #1 -#ifdef CONFIG_MXC_IRQ_PRIOR - bicne \tmp, \irqstat, #0xFFFFFFE0 - strne \tmp, [\base, #AVIC_NIMASK] - streq r4, [\base, #AVIC_NIMASK] -#endif -#elif defined CONFIG_MXC_TZIC - @ Load offset & priority of the highest priority - @ interrupt pending. - @ 0x080 is INTSEC0 register - @ 0xD80 is HIPND0 register - mov \irqnr, #0 -1000: add \irqstat, \base, \irqnr, lsr #3 - ldr \tmp, [\irqstat, #0xd80] - ldr \irqstat, [\irqstat, #0x080] - ands \tmp, \tmp, \irqstat - bne 1001f - add \irqnr, \irqnr, #32 - cmp \irqnr, #128 - blo 1000b - b 2001f -1001: mov \irqstat, #1 -1002: tst \tmp, \irqstat - bne 2002f - movs \tmp, \tmp, lsr #1 - addne \irqnr, \irqnr, #1 - bne 1002b -2001: - mov \irqnr, #0 -2002: - movs \irqnr, \irqnr -#endif .endm diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx3.h b/arch/arm/plat-mxc/include/mach/iomux-mx3.h index c92f0b1f216f..63f22a009a65 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-mx3.h +++ b/arch/arm/plat-mxc/include/mach/iomux-mx3.h @@ -735,6 +735,7 @@ enum iomux_pins { #define MX31_PIN_KEY_COL5_KEY_COL5 IOMUX_MODE(MX31_PIN_KEY_COL5, IOMUX_CONFIG_FUNC) #define MX31_PIN_KEY_COL6_KEY_COL6 IOMUX_MODE(MX31_PIN_KEY_COL6, IOMUX_CONFIG_FUNC) #define MX31_PIN_KEY_COL7_KEY_COL7 IOMUX_MODE(MX31_PIN_KEY_COL7, IOMUX_CONFIG_FUNC) +#define MX31_PIN_WATCHDOG_RST__WATCHDOG_RST IOMUX_MODE(MX31_PIN_WATCHDOG_RST, IOMUX_CONFIG_FUNC) /* diff --git a/arch/arm/plat-mxc/include/mach/mx25.h b/arch/arm/plat-mxc/include/mach/mx25.h index 087cd7ac8d52..ccebf5ba12f0 100644 --- a/arch/arm/plat-mxc/include/mach/mx25.h +++ b/arch/arm/plat-mxc/include/mach/mx25.h @@ -41,6 +41,7 @@ #define MX25_SSI2_BASE_ADDR 0x50014000 #define MX25_SSI1_BASE_ADDR 0x50034000 #define MX25_NFC_BASE_ADDR 0xbb000000 +#define MX25_IIM_BASE_ADDR 0x53ff0000 #define MX25_DRYICE_BASE_ADDR 0x53ffc000 #define MX25_ESDHC1_BASE_ADDR 0x53fb4000 #define MX25_ESDHC2_BASE_ADDR 0x53fb8000 @@ -104,4 +105,8 @@ #define MX25_DMA_REQ_SSI1_RX0 28 #define MX25_DMA_REQ_SSI1_TX0 29 +#ifndef __ASSEMBLY__ +extern int mx25_revision(void); +#endif + #endif /* ifndef __MACH_MX25_H__ */ diff --git a/arch/arm/plat-mxc/include/mach/mx3x.h b/arch/arm/plat-mxc/include/mach/mx3x.h index 388a407d72d6..30dbf424583e 100644 --- a/arch/arm/plat-mxc/include/mach/mx3x.h +++ b/arch/arm/plat-mxc/include/mach/mx3x.h @@ -187,22 +187,8 @@ /* Mandatory defines used globally */ #if !defined(__ASSEMBLY__) && !defined(__MXC_BOOT_UNCOMPRESS) - -extern unsigned int mx31_cpu_rev; -extern void mx31_read_cpu_rev(void); - -static inline int mx31_revision(void) -{ - return mx31_cpu_rev; -} - -extern unsigned int mx35_cpu_rev; -extern void mx35_read_cpu_rev(void); - -static inline int mx35_revision(void) -{ - return mx35_cpu_rev; -} +extern int mx35_revision(void); +extern int mx31_revision(void); #endif #endif /* ifndef __MACH_MX3x_H__ */ |