diff options
Diffstat (limited to 'arch/arm/mach-stmp37xx')
-rw-r--r-- | arch/arm/mach-stmp37xx/include/mach/entry-macro.S | 37 | ||||
-rw-r--r-- | arch/arm/mach-stmp37xx/include/mach/irqs.h | 99 | ||||
-rw-r--r-- | arch/arm/mach-stmp37xx/include/mach/pins.h | 147 |
3 files changed, 283 insertions, 0 deletions
diff --git a/arch/arm/mach-stmp37xx/include/mach/entry-macro.S b/arch/arm/mach-stmp37xx/include/mach/entry-macro.S new file mode 100644 index 000000000000..fed2787b6c34 --- /dev/null +++ b/arch/arm/mach-stmp37xx/include/mach/entry-macro.S | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | * Low-level IRQ helper macros for Freescale STMP37XX | ||
3 | * | ||
4 | * Embedded Alley Solutions, Inc <source@embeddedalley.com> | ||
5 | * | ||
6 | * Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved. | ||
7 | * Copyright 2008 Embedded Alley Solutions, Inc All Rights Reserved. | ||
8 | */ | ||
9 | |||
10 | /* | ||
11 | * The code contained herein is licensed under the GNU General Public | ||
12 | * License. You may obtain a copy of the GNU General Public License | ||
13 | * Version 2 or later at the following locations: | ||
14 | * | ||
15 | * http://www.opensource.org/licenses/gpl-license.html | ||
16 | * http://www.gnu.org/copyleft/gpl.html | ||
17 | */ | ||
18 | |||
19 | .macro disable_fiq | ||
20 | .endm | ||
21 | |||
22 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
23 | |||
24 | mov \base, #0xf0000000 @ vm address of IRQ controller | ||
25 | ldr \irqnr, [\base, #0x30] @ HW_ICOLL_STAT | ||
26 | cmp \irqnr, #0x3f | ||
27 | movne \irqstat, #0 @ Ack this IRQ | ||
28 | strne \irqstat, [\base, #0x00]@ HW_ICOLL_VECTOR | ||
29 | moveqs \irqnr, #0 @ Zero flag set for no IRQ | ||
30 | |||
31 | .endm | ||
32 | |||
33 | .macro get_irqnr_preamble, base, tmp | ||
34 | .endm | ||
35 | |||
36 | .macro arch_ret_to_user, tmp1, tmp2 | ||
37 | .endm | ||
diff --git a/arch/arm/mach-stmp37xx/include/mach/irqs.h b/arch/arm/mach-stmp37xx/include/mach/irqs.h new file mode 100644 index 000000000000..98f12938550d --- /dev/null +++ b/arch/arm/mach-stmp37xx/include/mach/irqs.h | |||
@@ -0,0 +1,99 @@ | |||
1 | /* | ||
2 | * Freescale STMP37XX interrupts | ||
3 | * | ||
4 | * Copyright (C) 2005 Sigmatel Inc | ||
5 | * | ||
6 | * Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved. | ||
7 | * Copyright 2008 Embedded Alley Solutions, Inc All Rights Reserved. | ||
8 | */ | ||
9 | |||
10 | /* | ||
11 | * The code contained herein is licensed under the GNU General Public | ||
12 | * License. You may obtain a copy of the GNU General Public License | ||
13 | * Version 2 or later at the following locations: | ||
14 | * | ||
15 | * http://www.opensource.org/licenses/gpl-license.html | ||
16 | * http://www.gnu.org/copyleft/gpl.html | ||
17 | */ | ||
18 | #ifndef _ASM_ARCH_IRQS_H | ||
19 | #define _ASM_ARCH_IRQS_H | ||
20 | |||
21 | #define IRQ_DEBUG_UART 0 | ||
22 | #define IRQ_COMMS_RX 1 | ||
23 | #define IRQ_COMMS_TX 1 | ||
24 | #define IRQ_SSP2_ERROR 2 | ||
25 | #define IRQ_VDD5V 3 | ||
26 | #define IRQ_HEADPHONE_SHORT 4 | ||
27 | #define IRQ_DAC_DMA 5 | ||
28 | #define IRQ_DAC_ERROR 6 | ||
29 | #define IRQ_ADC_DMA 7 | ||
30 | #define IRQ_ADC_ERROR 8 | ||
31 | #define IRQ_SPDIF_DMA 9 | ||
32 | #define IRQ_SAIF2_DMA 9 | ||
33 | #define IRQ_SPDIF_ERROR 10 | ||
34 | #define IRQ_SAIF1_IRQ 10 | ||
35 | #define IRQ_SAIF2_IRQ 10 | ||
36 | #define IRQ_USB_CTRL 11 | ||
37 | #define IRQ_USB_WAKEUP 12 | ||
38 | #define IRQ_GPMI_DMA 13 | ||
39 | #define IRQ_SSP1_DMA 14 | ||
40 | #define IRQ_SSP_ERROR 15 | ||
41 | #define IRQ_GPIO0 16 | ||
42 | #define IRQ_GPIO1 17 | ||
43 | #define IRQ_GPIO2 18 | ||
44 | #define IRQ_SAIF1_DMA 19 | ||
45 | #define IRQ_SSP2_DMA 20 | ||
46 | #define IRQ_ECC8_IRQ 21 | ||
47 | #define IRQ_RTC_ALARM 22 | ||
48 | #define IRQ_UARTAPP_TX_DMA 23 | ||
49 | #define IRQ_UARTAPP_INTERNAL 24 | ||
50 | #define IRQ_UARTAPP_RX_DMA 25 | ||
51 | #define IRQ_I2C_DMA 26 | ||
52 | #define IRQ_I2C_ERROR 27 | ||
53 | #define IRQ_TIMER0 28 | ||
54 | #define IRQ_TIMER1 29 | ||
55 | #define IRQ_TIMER2 30 | ||
56 | #define IRQ_TIMER3 31 | ||
57 | #define IRQ_BATT_BRNOUT 32 | ||
58 | #define IRQ_VDDD_BRNOUT 33 | ||
59 | #define IRQ_VDDIO_BRNOUT 34 | ||
60 | #define IRQ_VDD18_BRNOUT 35 | ||
61 | #define IRQ_TOUCH_DETECT 36 | ||
62 | #define IRQ_LRADC_CH0 37 | ||
63 | #define IRQ_LRADC_CH1 38 | ||
64 | #define IRQ_LRADC_CH2 39 | ||
65 | #define IRQ_LRADC_CH3 40 | ||
66 | #define IRQ_LRADC_CH4 41 | ||
67 | #define IRQ_LRADC_CH5 42 | ||
68 | #define IRQ_LRADC_CH6 43 | ||
69 | #define IRQ_LRADC_CH7 44 | ||
70 | #define IRQ_LCDIF_DMA 45 | ||
71 | #define IRQ_LCDIF_ERROR 46 | ||
72 | #define IRQ_DIGCTL_DEBUG_TRAP 47 | ||
73 | #define IRQ_RTC_1MSEC 48 | ||
74 | #define IRQ_DRI_DMA 49 | ||
75 | #define IRQ_DRI_ATTENTION 50 | ||
76 | #define IRQ_GPMI_ATTENTION 51 | ||
77 | #define IRQ_IR 52 | ||
78 | #define IRQ_DCP_VMI 53 | ||
79 | #define IRQ_DCP 54 | ||
80 | #define IRQ_RESERVED_55 55 | ||
81 | #define IRQ_RESERVED_56 56 | ||
82 | #define IRQ_RESERVED_57 57 | ||
83 | #define IRQ_RESERVED_58 58 | ||
84 | #define IRQ_RESERVED_59 59 | ||
85 | #define SW_IRQ_60 60 | ||
86 | #define SW_IRQ_61 61 | ||
87 | #define SW_IRQ_62 62 | ||
88 | #define SW_IRQ_63 63 | ||
89 | |||
90 | #define NR_REAL_IRQS 64 | ||
91 | #define NR_IRQS (NR_REAL_IRQS + 32 * 3) | ||
92 | |||
93 | /* TIMER and BRNOUT are FIQ capable */ | ||
94 | #define FIQ_START IRQ_TIMER0 | ||
95 | |||
96 | /* Hard disk IRQ is a GPMI attention IRQ */ | ||
97 | #define IRQ_HARDDISK IRQ_GPMI_ATTENTION | ||
98 | |||
99 | #endif /* _ASM_ARCH_IRQS_H */ | ||
diff --git a/arch/arm/mach-stmp37xx/include/mach/pins.h b/arch/arm/mach-stmp37xx/include/mach/pins.h new file mode 100644 index 000000000000..d56de0c471d8 --- /dev/null +++ b/arch/arm/mach-stmp37xx/include/mach/pins.h | |||
@@ -0,0 +1,147 @@ | |||
1 | /* | ||
2 | * Freescale STMP37XX SoC pin multiplexing | ||
3 | * | ||
4 | * Author: Vladislav Buzov <vbuzov@embeddedalley.com> | ||
5 | * | ||
6 | * Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved. | ||
7 | * Copyright 2008 Embedded Alley Solutions, Inc All Rights Reserved. | ||
8 | */ | ||
9 | |||
10 | /* | ||
11 | * The code contained herein is licensed under the GNU General Public | ||
12 | * License. You may obtain a copy of the GNU General Public License | ||
13 | * Version 2 or later at the following locations: | ||
14 | * | ||
15 | * http://www.opensource.org/licenses/gpl-license.html | ||
16 | * http://www.gnu.org/copyleft/gpl.html | ||
17 | */ | ||
18 | #ifndef __ASM_ARCH_PINS_H | ||
19 | #define __ASM_ARCH_PINS_H | ||
20 | |||
21 | /* | ||
22 | * Define all STMP37XX pins, a pin name corresponds to a STMP37xx hardware | ||
23 | * interface this pin belongs to. | ||
24 | */ | ||
25 | |||
26 | /* Bank 0 */ | ||
27 | #define PINID_GPMI_D00 STMP3XXX_PINID(0, 0) | ||
28 | #define PINID_GPMI_D01 STMP3XXX_PINID(0, 1) | ||
29 | #define PINID_GPMI_D02 STMP3XXX_PINID(0, 2) | ||
30 | #define PINID_GPMI_D03 STMP3XXX_PINID(0, 3) | ||
31 | #define PINID_GPMI_D04 STMP3XXX_PINID(0, 4) | ||
32 | #define PINID_GPMI_D05 STMP3XXX_PINID(0, 5) | ||
33 | #define PINID_GPMI_D06 STMP3XXX_PINID(0, 6) | ||
34 | #define PINID_GPMI_D07 STMP3XXX_PINID(0, 7) | ||
35 | #define PINID_GPMI_D08 STMP3XXX_PINID(0, 8) | ||
36 | #define PINID_GPMI_D09 STMP3XXX_PINID(0, 9) | ||
37 | #define PINID_GPMI_D10 STMP3XXX_PINID(0, 10) | ||
38 | #define PINID_GPMI_D11 STMP3XXX_PINID(0, 11) | ||
39 | #define PINID_GPMI_D12 STMP3XXX_PINID(0, 12) | ||
40 | #define PINID_GPMI_D13 STMP3XXX_PINID(0, 13) | ||
41 | #define PINID_GPMI_D14 STMP3XXX_PINID(0, 14) | ||
42 | #define PINID_GPMI_D15 STMP3XXX_PINID(0, 15) | ||
43 | #define PINID_GPMI_A0 STMP3XXX_PINID(0, 16) | ||
44 | #define PINID_GPMI_A1 STMP3XXX_PINID(0, 17) | ||
45 | #define PINID_GPMI_A2 STMP3XXX_PINID(0, 18) | ||
46 | #define PINID_GPMI_RDY0 STMP3XXX_PINID(0, 19) | ||
47 | #define PINID_GPMI_RDY2 STMP3XXX_PINID(0, 20) | ||
48 | #define PINID_GPMI_RDY3 STMP3XXX_PINID(0, 21) | ||
49 | #define PINID_GPMI_RESETN STMP3XXX_PINID(0, 22) | ||
50 | #define PINID_GPMI_IRQ STMP3XXX_PINID(0, 23) | ||
51 | #define PINID_GPMI_WRN STMP3XXX_PINID(0, 24) | ||
52 | #define PINID_GPMI_RDN STMP3XXX_PINID(0, 25) | ||
53 | #define PINID_UART2_CTS STMP3XXX_PINID(0, 26) | ||
54 | #define PINID_UART2_RTS STMP3XXX_PINID(0, 27) | ||
55 | #define PINID_UART2_RX STMP3XXX_PINID(0, 28) | ||
56 | #define PINID_UART2_TX STMP3XXX_PINID(0, 29) | ||
57 | |||
58 | /* Bank 1 */ | ||
59 | #define PINID_LCD_D00 STMP3XXX_PINID(1, 0) | ||
60 | #define PINID_LCD_D01 STMP3XXX_PINID(1, 1) | ||
61 | #define PINID_LCD_D02 STMP3XXX_PINID(1, 2) | ||
62 | #define PINID_LCD_D03 STMP3XXX_PINID(1, 3) | ||
63 | #define PINID_LCD_D04 STMP3XXX_PINID(1, 4) | ||
64 | #define PINID_LCD_D05 STMP3XXX_PINID(1, 5) | ||
65 | #define PINID_LCD_D06 STMP3XXX_PINID(1, 6) | ||
66 | #define PINID_LCD_D07 STMP3XXX_PINID(1, 7) | ||
67 | #define PINID_LCD_D08 STMP3XXX_PINID(1, 8) | ||
68 | #define PINID_LCD_D09 STMP3XXX_PINID(1, 9) | ||
69 | #define PINID_LCD_D10 STMP3XXX_PINID(1, 10) | ||
70 | #define PINID_LCD_D11 STMP3XXX_PINID(1, 11) | ||
71 | #define PINID_LCD_D12 STMP3XXX_PINID(1, 12) | ||
72 | #define PINID_LCD_D13 STMP3XXX_PINID(1, 13) | ||
73 | #define PINID_LCD_D14 STMP3XXX_PINID(1, 14) | ||
74 | #define PINID_LCD_D15 STMP3XXX_PINID(1, 15) | ||
75 | #define PINID_LCD_RESET STMP3XXX_PINID(1, 16) | ||
76 | #define PINID_LCD_RS STMP3XXX_PINID(1, 17) | ||
77 | #define PINID_LCD_WR_RWN STMP3XXX_PINID(1, 18) | ||
78 | #define PINID_LCD_RD_E STMP3XXX_PINID(1, 19) | ||
79 | #define PINID_LCD_CS STMP3XXX_PINID(1, 20) | ||
80 | #define PINID_LCD_BUSY STMP3XXX_PINID(1, 21) | ||
81 | #define PINID_SSP1_CMD STMP3XXX_PINID(1, 22) | ||
82 | #define PINID_SSP1_SCK STMP3XXX_PINID(1, 23) | ||
83 | #define PINID_SSP1_DATA0 STMP3XXX_PINID(1, 24) | ||
84 | #define PINID_SSP1_DATA1 STMP3XXX_PINID(1, 25) | ||
85 | #define PINID_SSP1_DATA2 STMP3XXX_PINID(1, 26) | ||
86 | #define PINID_SSP1_DATA3 STMP3XXX_PINID(1, 27) | ||
87 | #define PINID_SSP1_DETECT STMP3XXX_PINID(1, 28) | ||
88 | |||
89 | /* Bank 2 */ | ||
90 | #define PINID_PWM0 STMP3XXX_PINID(2, 0) | ||
91 | #define PINID_PWM1 STMP3XXX_PINID(2, 1) | ||
92 | #define PINID_PWM2 STMP3XXX_PINID(2, 2) | ||
93 | #define PINID_PWM3 STMP3XXX_PINID(2, 3) | ||
94 | #define PINID_PWM4 STMP3XXX_PINID(2, 4) | ||
95 | #define PINID_I2C_SCL STMP3XXX_PINID(2, 5) | ||
96 | #define PINID_I2C_SDA STMP3XXX_PINID(2, 6) | ||
97 | #define PINID_ROTTARYA STMP3XXX_PINID(2, 7) | ||
98 | #define PINID_ROTTARYB STMP3XXX_PINID(2, 8) | ||
99 | #define PINID_EMI_CKE STMP3XXX_PINID(2, 9) | ||
100 | #define PINID_EMI_RASN STMP3XXX_PINID(2, 10) | ||
101 | #define PINID_EMI_CASN STMP3XXX_PINID(2, 11) | ||
102 | #define PINID_EMI_CE0N STMP3XXX_PINID(2, 12) | ||
103 | #define PINID_EMI_CE1N STMP3XXX_PINID(2, 13) | ||
104 | #define PINID_EMI_CE2N STMP3XXX_PINID(2, 14) | ||
105 | #define PINID_EMI_CE3N STMP3XXX_PINID(2, 15) | ||
106 | #define PINID_EMI_A00 STMP3XXX_PINID(2, 16) | ||
107 | #define PINID_EMI_A01 STMP3XXX_PINID(2, 17) | ||
108 | #define PINID_EMI_A02 STMP3XXX_PINID(2, 18) | ||
109 | #define PINID_EMI_A03 STMP3XXX_PINID(2, 19) | ||
110 | #define PINID_EMI_A04 STMP3XXX_PINID(2, 20) | ||
111 | #define PINID_EMI_A05 STMP3XXX_PINID(2, 21) | ||
112 | #define PINID_EMI_A06 STMP3XXX_PINID(2, 22) | ||
113 | #define PINID_EMI_A07 STMP3XXX_PINID(2, 23) | ||
114 | #define PINID_EMI_A08 STMP3XXX_PINID(2, 24) | ||
115 | #define PINID_EMI_A09 STMP3XXX_PINID(2, 25) | ||
116 | #define PINID_EMI_A10 STMP3XXX_PINID(2, 26) | ||
117 | #define PINID_EMI_A11 STMP3XXX_PINID(2, 27) | ||
118 | #define PINID_EMI_A12 STMP3XXX_PINID(2, 28) | ||
119 | #define PINID_EMI_A13 STMP3XXX_PINID(2, 29) | ||
120 | #define PINID_EMI_A14 STMP3XXX_PINID(2, 30) | ||
121 | #define PINID_EMI_WEN STMP3XXX_PINID(2, 31) | ||
122 | |||
123 | /* Bank 3 */ | ||
124 | #define PINID_EMI_D00 STMP3XXX_PINID(3, 0) | ||
125 | #define PINID_EMI_D01 STMP3XXX_PINID(3, 1) | ||
126 | #define PINID_EMI_D02 STMP3XXX_PINID(3, 2) | ||
127 | #define PINID_EMI_D03 STMP3XXX_PINID(3, 3) | ||
128 | #define PINID_EMI_D04 STMP3XXX_PINID(3, 4) | ||
129 | #define PINID_EMI_D05 STMP3XXX_PINID(3, 5) | ||
130 | #define PINID_EMI_D06 STMP3XXX_PINID(3, 6) | ||
131 | #define PINID_EMI_D07 STMP3XXX_PINID(3, 7) | ||
132 | #define PINID_EMI_D08 STMP3XXX_PINID(3, 8) | ||
133 | #define PINID_EMI_D09 STMP3XXX_PINID(3, 9) | ||
134 | #define PINID_EMI_D10 STMP3XXX_PINID(3, 10) | ||
135 | #define PINID_EMI_D11 STMP3XXX_PINID(3, 11) | ||
136 | #define PINID_EMI_D12 STMP3XXX_PINID(3, 12) | ||
137 | #define PINID_EMI_D13 STMP3XXX_PINID(3, 13) | ||
138 | #define PINID_EMI_D14 STMP3XXX_PINID(3, 14) | ||
139 | #define PINID_EMI_D15 STMP3XXX_PINID(3, 15) | ||
140 | #define PINID_EMI_DQS0 STMP3XXX_PINID(3, 16) | ||
141 | #define PINID_EMI_DQS1 STMP3XXX_PINID(3, 17) | ||
142 | #define PINID_EMI_DQM0 STMP3XXX_PINID(3, 18) | ||
143 | #define PINID_EMI_DQM1 STMP3XXX_PINID(3, 19) | ||
144 | #define PINID_EMI_CLK STMP3XXX_PINID(3, 20) | ||
145 | #define PINID_EMI_CLKN STMP3XXX_PINID(3, 21) | ||
146 | |||
147 | #endif /* __ASM_ARCH_PINS_H */ | ||