diff options
Diffstat (limited to 'include/asm-arm')
52 files changed, 1331 insertions, 384 deletions
diff --git a/include/asm-arm/arch-at91/at91_lcdc.h b/include/asm-arm/arch-at91/at91_lcdc.h deleted file mode 100644 index ab040a40d37b..000000000000 --- a/include/asm-arm/arch-at91/at91_lcdc.h +++ /dev/null | |||
@@ -1,148 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91/at91_lcdc.h | ||
3 | * | ||
4 | * LCD Controller (LCDC). | ||
5 | * Based on AT91SAM9261 datasheet revision E. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | */ | ||
12 | |||
13 | #ifndef AT91_LCDC_H | ||
14 | #define AT91_LCDC_H | ||
15 | |||
16 | #define AT91_LCDC_DMABADDR1 0x00 /* DMA Base Address Register 1 */ | ||
17 | #define AT91_LCDC_DMABADDR2 0x04 /* DMA Base Address Register 2 */ | ||
18 | #define AT91_LCDC_DMAFRMPT1 0x08 /* DMA Frame Pointer Register 1 */ | ||
19 | #define AT91_LCDC_DMAFRMPT2 0x0c /* DMA Frame Pointer Register 2 */ | ||
20 | #define AT91_LCDC_DMAFRMADD1 0x10 /* DMA Frame Address Register 1 */ | ||
21 | #define AT91_LCDC_DMAFRMADD2 0x14 /* DMA Frame Address Register 2 */ | ||
22 | |||
23 | #define AT91_LCDC_DMAFRMCFG 0x18 /* DMA Frame Configuration Register */ | ||
24 | #define AT91_LCDC_FRSIZE (0x7fffff << 0) /* Frame Size */ | ||
25 | #define AT91_LCDC_BLENGTH (0x7f << 24) /* Burst Length */ | ||
26 | |||
27 | #define AT91_LCDC_DMACON 0x1c /* DMA Control Register */ | ||
28 | #define AT91_LCDC_DMAEN (0x1 << 0) /* DMA Enable */ | ||
29 | #define AT91_LCDC_DMARST (0x1 << 1) /* DMA Reset */ | ||
30 | #define AT91_LCDC_DMABUSY (0x1 << 2) /* DMA Busy */ | ||
31 | |||
32 | #define AT91_LCDC_LCDCON1 0x0800 /* LCD Control Register 1 */ | ||
33 | #define AT91_LCDC_BYPASS (1 << 0) /* Bypass lcd_dotck divider */ | ||
34 | #define AT91_LCDC_CLKVAL (0x1ff << 12) /* Clock Divider */ | ||
35 | #define AT91_LCDC_LINCNT (0x7ff << 21) /* Line Counter */ | ||
36 | |||
37 | #define AT91_LCDC_LCDCON2 0x0804 /* LCD Control Register 2 */ | ||
38 | #define AT91_LCDC_DISTYPE (3 << 0) /* Display Type */ | ||
39 | #define AT91_LCDC_DISTYPE_STNMONO (0 << 0) | ||
40 | #define AT91_LCDC_DISTYPE_STNCOLOR (1 << 0) | ||
41 | #define AT91_LCDC_DISTYPE_TFT (2 << 0) | ||
42 | #define AT91_LCDC_SCANMOD (1 << 2) /* Scan Mode */ | ||
43 | #define AT91_LCDC_SCANMOD_SINGLE (0 << 2) | ||
44 | #define AT91_LCDC_SCANMOD_DUAL (1 << 2) | ||
45 | #define AT91_LCDC_IFWIDTH (3 << 3) /*Interface Width */ | ||
46 | #define AT91_LCDC_IFWIDTH_4 (0 << 3) | ||
47 | #define AT91_LCDC_IFWIDTH_8 (1 << 3) | ||
48 | #define AT91_LCDC_IFWIDTH_16 (2 << 3) | ||
49 | #define AT91_LCDC_PIXELSIZE (7 << 5) /* Bits per pixel */ | ||
50 | #define AT91_LCDC_PIXELSIZE_1 (0 << 5) | ||
51 | #define AT91_LCDC_PIXELSIZE_2 (1 << 5) | ||
52 | #define AT91_LCDC_PIXELSIZE_4 (2 << 5) | ||
53 | #define AT91_LCDC_PIXELSIZE_8 (3 << 5) | ||
54 | #define AT91_LCDC_PIXELSIZE_16 (4 << 5) | ||
55 | #define AT91_LCDC_PIXELSIZE_24 (5 << 5) | ||
56 | #define AT91_LCDC_INVVD (1 << 8) /* LCD Data polarity */ | ||
57 | #define AT91_LCDC_INVVD_NORMAL (0 << 8) | ||
58 | #define AT91_LCDC_INVVD_INVERTED (1 << 8) | ||
59 | #define AT91_LCDC_INVFRAME (1 << 9 ) /* LCD VSync polarity */ | ||
60 | #define AT91_LCDC_INVFRAME_NORMAL (0 << 9) | ||
61 | #define AT91_LCDC_INVFRAME_INVERTED (1 << 9) | ||
62 | #define AT91_LCDC_INVLINE (1 << 10) /* LCD HSync polarity */ | ||
63 | #define AT91_LCDC_INVLINE_NORMAL (0 << 10) | ||
64 | #define AT91_LCDC_INVLINE_INVERTED (1 << 10) | ||
65 | #define AT91_LCDC_INVCLK (1 << 11) /* LCD dotclk polarity */ | ||
66 | #define AT91_LCDC_INVCLK_NORMAL (0 << 11) | ||
67 | #define AT91_LCDC_INVCLK_INVERTED (1 << 11) | ||
68 | #define AT91_LCDC_INVDVAL (1 << 12) /* LCD dval polarity */ | ||
69 | #define AT91_LCDC_INVDVAL_NORMAL (0 << 12) | ||
70 | #define AT91_LCDC_INVDVAL_INVERTED (1 << 12) | ||
71 | #define AT91_LCDC_CLKMOD (1 << 15) /* LCD dotclk mode */ | ||
72 | #define AT91_LCDC_CLKMOD_ACTIVEDISPLAY (0 << 15) | ||
73 | #define AT91_LCDC_CLKMOD_ALWAYSACTIVE (1 << 15) | ||
74 | #define AT91_LCDC_MEMOR (1 << 31) /* Memory Ordering Format */ | ||
75 | #define AT91_LCDC_MEMOR_BIG (0 << 31) | ||
76 | #define AT91_LCDC_MEMOR_LITTLE (1 << 31) | ||
77 | |||
78 | #define AT91_LCDC_TIM1 0x0808 /* LCD Timing Register 1 */ | ||
79 | #define AT91_LCDC_VFP (0xff << 0) /* Vertical Front Porch */ | ||
80 | #define AT91_LCDC_VBP (0xff << 8) /* Vertical Back Porch */ | ||
81 | #define AT91_LCDC_VPW (0x3f << 16) /* Vertical Synchronization Pulse Width */ | ||
82 | #define AT91_LCDC_VHDLY (0xf << 24) /* Vertical to Horizontal Delay */ | ||
83 | |||
84 | #define AT91_LCDC_TIM2 0x080c /* LCD Timing Register 2 */ | ||
85 | #define AT91_LCDC_HBP (0xff << 0) /* Horizontal Back Porch */ | ||
86 | #define AT91_LCDC_HPW (0x3f << 8) /* Horizontal Synchronization Pulse Width */ | ||
87 | #define AT91_LCDC_HFP (0x7ff << 21) /* Horizontal Front Porch */ | ||
88 | |||
89 | #define AT91_LCDC_LCDFRMCFG 0x0810 /* LCD Frame Configuration Register */ | ||
90 | #define AT91_LCDC_LINEVAL (0x7ff << 0) /* Vertical Size of LCD Module */ | ||
91 | #define AT91_LCDC_HOZVAL (0x7ff << 21) /* Horizontal Size of LCD Module */ | ||
92 | |||
93 | #define AT91_LCDC_FIFO 0x0814 /* LCD FIFO Register */ | ||
94 | #define AT91_LCDC_FIFOTH (0xffff) /* FIFO Threshold */ | ||
95 | |||
96 | #define AT91_LCDC_DP1_2 0x081c /* Dithering Pattern DP1_2 Register */ | ||
97 | #define AT91_LCDC_DP4_7 0x0820 /* Dithering Pattern DP4_7 Register */ | ||
98 | #define AT91_LCDC_DP3_5 0x0824 /* Dithering Pattern DP3_5 Register */ | ||
99 | #define AT91_LCDC_DP2_3 0x0828 /* Dithering Pattern DP2_3 Register */ | ||
100 | #define AT91_LCDC_DP5_7 0x082c /* Dithering Pattern DP5_7 Register */ | ||
101 | #define AT91_LCDC_DP3_4 0x0830 /* Dithering Pattern DP3_4 Register */ | ||
102 | #define AT91_LCDC_DP4_5 0x0834 /* Dithering Pattern DP4_5 Register */ | ||
103 | #define AT91_LCDC_DP6_7 0x0838 /* Dithering Pattern DP6_7 Register */ | ||
104 | #define AT91_LCDC_DP1_2_VAL (0xff) | ||
105 | #define AT91_LCDC_DP4_7_VAL (0xfffffff) | ||
106 | #define AT91_LCDC_DP3_5_VAL (0xfffff) | ||
107 | #define AT91_LCDC_DP2_3_VAL (0xfff) | ||
108 | #define AT91_LCDC_DP5_7_VAL (0xfffffff) | ||
109 | #define AT91_LCDC_DP3_4_VAL (0xffff) | ||
110 | #define AT91_LCDC_DP4_5_VAL (0xfffff) | ||
111 | #define AT91_LCDC_DP6_7_VAL (0xfffffff) | ||
112 | |||
113 | #define AT91_LCDC_PWRCON 0x083c /* Power Control Register */ | ||
114 | #define AT91_LCDC_PWR (1 << 0) /* LCD Module Power Control */ | ||
115 | #define AT91_LCDC_GUARDT (0x7f << 1) /* Delay in Frame Period */ | ||
116 | #define AT91_LCDC_BUSY (1 << 31) /* LCD Busy */ | ||
117 | |||
118 | #define AT91_LCDC_CONTRAST_CTR 0x0840 /* Contrast Control Register */ | ||
119 | #define AT91_LCDC_PS (3 << 0) /* Contrast Counter Prescaler */ | ||
120 | #define AT91_LCDC_PS_DIV1 (0 << 0) | ||
121 | #define AT91_LCDC_PS_DIV2 (1 << 0) | ||
122 | #define AT91_LCDC_PS_DIV4 (2 << 0) | ||
123 | #define AT91_LCDC_PS_DIV8 (3 << 0) | ||
124 | #define AT91_LCDC_POL (1 << 2) /* Polarity of output Pulse */ | ||
125 | #define AT91_LCDC_POL_NEGATIVE (0 << 2) | ||
126 | #define AT91_LCDC_POL_POSITIVE (1 << 2) | ||
127 | #define AT91_LCDC_ENA (1 << 3) /* PWM generator Control */ | ||
128 | #define AT91_LCDC_ENA_PWMDISABLE (0 << 3) | ||
129 | #define AT91_LCDC_ENA_PWMENABLE (1 << 3) | ||
130 | |||
131 | #define AT91_LCDC_CONTRAST_VAL 0x0844 /* Contrast Value Register */ | ||
132 | #define AT91_LCDC_CVAL (0xff) /* PWM compare value */ | ||
133 | |||
134 | #define AT91_LCDC_IER 0x0848 /* Interrupt Enable Register */ | ||
135 | #define AT91_LCDC_IDR 0x084c /* Interrupt Disable Register */ | ||
136 | #define AT91_LCDC_IMR 0x0850 /* Interrupt Mask Register */ | ||
137 | #define AT91_LCDC_ISR 0x0854 /* Interrupt Enable Register */ | ||
138 | #define AT91_LCDC_ICR 0x0858 /* Interrupt Clear Register */ | ||
139 | #define AT91_LCDC_LNI (1 << 0) /* Line Interrupt */ | ||
140 | #define AT91_LCDC_LSTLNI (1 << 1) /* Last Line Interrupt */ | ||
141 | #define AT91_LCDC_EOFI (1 << 2) /* DMA End Of Frame Interrupt */ | ||
142 | #define AT91_LCDC_UFLWI (1 << 4) /* FIFO Underflow Interrupt */ | ||
143 | #define AT91_LCDC_OWRI (1 << 5) /* FIFO Overwrite Interrupt */ | ||
144 | #define AT91_LCDC_MERI (1 << 6) /* DMA Memory Error Interrupt */ | ||
145 | |||
146 | #define AT91_LCDC_LUT_(n) (0x0c00 + ((n)*4)) /* Palette Entry 0..255 */ | ||
147 | |||
148 | #endif | ||
diff --git a/include/asm-arm/arch-at91/at91_pmc.h b/include/asm-arm/arch-at91/at91_pmc.h index 33ff5b6798ee..52cd8e5dabc9 100644 --- a/include/asm-arm/arch-at91/at91_pmc.h +++ b/include/asm-arm/arch-at91/at91_pmc.h | |||
@@ -25,6 +25,7 @@ | |||
25 | #define AT91RM9200_PMC_MCKUDP (1 << 2) /* USB Device Port Master Clock Automatic Disable on Suspend [AT91RM9200 only] */ | 25 | #define AT91RM9200_PMC_MCKUDP (1 << 2) /* USB Device Port Master Clock Automatic Disable on Suspend [AT91RM9200 only] */ |
26 | #define AT91RM9200_PMC_UHP (1 << 4) /* USB Host Port Clock [AT91RM9200 only] */ | 26 | #define AT91RM9200_PMC_UHP (1 << 4) /* USB Host Port Clock [AT91RM9200 only] */ |
27 | #define AT91SAM926x_PMC_UHP (1 << 6) /* USB Host Port Clock [AT91SAM926x only] */ | 27 | #define AT91SAM926x_PMC_UHP (1 << 6) /* USB Host Port Clock [AT91SAM926x only] */ |
28 | #define AT91CAP9_PMC_UHP (1 << 6) /* USB Host Port Clock [AT91CAP9 only] */ | ||
28 | #define AT91SAM926x_PMC_UDP (1 << 7) /* USB Devcice Port Clock [AT91SAM926x only] */ | 29 | #define AT91SAM926x_PMC_UDP (1 << 7) /* USB Devcice Port Clock [AT91SAM926x only] */ |
29 | #define AT91_PMC_PCK0 (1 << 8) /* Programmable Clock 0 */ | 30 | #define AT91_PMC_PCK0 (1 << 8) /* Programmable Clock 0 */ |
30 | #define AT91_PMC_PCK1 (1 << 9) /* Programmable Clock 1 */ | 31 | #define AT91_PMC_PCK1 (1 << 9) /* Programmable Clock 1 */ |
@@ -37,7 +38,9 @@ | |||
37 | #define AT91_PMC_PCDR (AT91_PMC + 0x14) /* Peripheral Clock Disable Register */ | 38 | #define AT91_PMC_PCDR (AT91_PMC + 0x14) /* Peripheral Clock Disable Register */ |
38 | #define AT91_PMC_PCSR (AT91_PMC + 0x18) /* Peripheral Clock Status Register */ | 39 | #define AT91_PMC_PCSR (AT91_PMC + 0x18) /* Peripheral Clock Status Register */ |
39 | 40 | ||
40 | #define AT91_CKGR_MOR (AT91_PMC + 0x20) /* Main Oscillator Register */ | 41 | #define AT91_CKGR_UCKR (AT91_PMC + 0x1C) /* UTMI Clock Register [SAM9RL, CAP9] */ |
42 | |||
43 | #define AT91_CKGR_MOR (AT91_PMC + 0x20) /* Main Oscillator Register [not on SAM9RL] */ | ||
41 | #define AT91_PMC_MOSCEN (1 << 0) /* Main Oscillator Enable */ | 44 | #define AT91_PMC_MOSCEN (1 << 0) /* Main Oscillator Enable */ |
42 | #define AT91_PMC_OSCBYPASS (1 << 1) /* Oscillator Bypass [AT91SAM926x only] */ | 45 | #define AT91_PMC_OSCBYPASS (1 << 1) /* Oscillator Bypass [AT91SAM926x only] */ |
43 | #define AT91_PMC_OSCOUNT (0xff << 8) /* Main Oscillator Start-up Time */ | 46 | #define AT91_PMC_OSCOUNT (0xff << 8) /* Main Oscillator Start-up Time */ |
@@ -52,6 +55,10 @@ | |||
52 | #define AT91_PMC_PLLCOUNT (0x3f << 8) /* PLL Counter */ | 55 | #define AT91_PMC_PLLCOUNT (0x3f << 8) /* PLL Counter */ |
53 | #define AT91_PMC_OUT (3 << 14) /* PLL Clock Frequency Range */ | 56 | #define AT91_PMC_OUT (3 << 14) /* PLL Clock Frequency Range */ |
54 | #define AT91_PMC_MUL (0x7ff << 16) /* PLL Multiplier */ | 57 | #define AT91_PMC_MUL (0x7ff << 16) /* PLL Multiplier */ |
58 | #define AT91_PMC_USBDIV (3 << 28) /* USB Divisor (PLLB only) */ | ||
59 | #define AT91_PMC_USBDIV_1 (0 << 28) | ||
60 | #define AT91_PMC_USBDIV_2 (1 << 28) | ||
61 | #define AT91_PMC_USBDIV_4 (2 << 28) | ||
55 | #define AT91_PMC_USB96M (1 << 28) /* Divider by 2 Enable (PLLB only) */ | 62 | #define AT91_PMC_USB96M (1 << 28) /* Divider by 2 Enable (PLLB only) */ |
56 | 63 | ||
57 | #define AT91_PMC_MCKR (AT91_PMC + 0x30) /* Master Clock Register */ | 64 | #define AT91_PMC_MCKR (AT91_PMC + 0x30) /* Master Clock Register */ |
diff --git a/include/asm-arm/arch-at91/at91_rtt.h b/include/asm-arm/arch-at91/at91_rtt.h index bae1103fbbb2..39a32633b275 100644 --- a/include/asm-arm/arch-at91/at91_rtt.h +++ b/include/asm-arm/arch-at91/at91_rtt.h | |||
@@ -13,19 +13,19 @@ | |||
13 | #ifndef AT91_RTT_H | 13 | #ifndef AT91_RTT_H |
14 | #define AT91_RTT_H | 14 | #define AT91_RTT_H |
15 | 15 | ||
16 | #define AT91_RTT_MR (AT91_RTT + 0x00) /* Real-time Mode Register */ | 16 | #define AT91_RTT_MR 0x00 /* Real-time Mode Register */ |
17 | #define AT91_RTT_RTPRES (0xffff << 0) /* Real-time Timer Prescaler Value */ | 17 | #define AT91_RTT_RTPRES (0xffff << 0) /* Real-time Timer Prescaler Value */ |
18 | #define AT91_RTT_ALMIEN (1 << 16) /* Alarm Interrupt Enable */ | 18 | #define AT91_RTT_ALMIEN (1 << 16) /* Alarm Interrupt Enable */ |
19 | #define AT91_RTT_RTTINCIEN (1 << 17) /* Real Time Timer Increment Interrupt Enable */ | 19 | #define AT91_RTT_RTTINCIEN (1 << 17) /* Real Time Timer Increment Interrupt Enable */ |
20 | #define AT91_RTT_RTTRST (1 << 18) /* Real Time Timer Restart */ | 20 | #define AT91_RTT_RTTRST (1 << 18) /* Real Time Timer Restart */ |
21 | 21 | ||
22 | #define AT91_RTT_AR (AT91_RTT + 0x04) /* Real-time Alarm Register */ | 22 | #define AT91_RTT_AR 0x04 /* Real-time Alarm Register */ |
23 | #define AT91_RTT_ALMV (0xffffffff) /* Alarm Value */ | 23 | #define AT91_RTT_ALMV (0xffffffff) /* Alarm Value */ |
24 | 24 | ||
25 | #define AT91_RTT_VR (AT91_RTT + 0x08) /* Real-time Value Register */ | 25 | #define AT91_RTT_VR 0x08 /* Real-time Value Register */ |
26 | #define AT91_RTT_CRTV (0xffffffff) /* Current Real-time Value */ | 26 | #define AT91_RTT_CRTV (0xffffffff) /* Current Real-time Value */ |
27 | 27 | ||
28 | #define AT91_RTT_SR (AT91_RTT + 0x0c) /* Real-time Status Register */ | 28 | #define AT91_RTT_SR 0x0c /* Real-time Status Register */ |
29 | #define AT91_RTT_ALMS (1 << 0) /* Real-time Alarm Status */ | 29 | #define AT91_RTT_ALMS (1 << 0) /* Real-time Alarm Status */ |
30 | #define AT91_RTT_RTTINC (1 << 1) /* Real-time Timer Increment */ | 30 | #define AT91_RTT_RTTINC (1 << 1) /* Real-time Timer Increment */ |
31 | 31 | ||
diff --git a/include/asm-arm/arch-at91/at91_twi.h b/include/asm-arm/arch-at91/at91_twi.h index ca9a90733456..f9f2e3cd95c5 100644 --- a/include/asm-arm/arch-at91/at91_twi.h +++ b/include/asm-arm/arch-at91/at91_twi.h | |||
@@ -21,6 +21,8 @@ | |||
21 | #define AT91_TWI_STOP (1 << 1) /* Send a Stop Condition */ | 21 | #define AT91_TWI_STOP (1 << 1) /* Send a Stop Condition */ |
22 | #define AT91_TWI_MSEN (1 << 2) /* Master Transfer Enable */ | 22 | #define AT91_TWI_MSEN (1 << 2) /* Master Transfer Enable */ |
23 | #define AT91_TWI_MSDIS (1 << 3) /* Master Transfer Disable */ | 23 | #define AT91_TWI_MSDIS (1 << 3) /* Master Transfer Disable */ |
24 | #define AT91_TWI_SVEN (1 << 4) /* Slave Transfer Enable [SAM9260 only] */ | ||
25 | #define AT91_TWI_SVDIS (1 << 5) /* Slave Transfer Disable [SAM9260 only] */ | ||
24 | #define AT91_TWI_SWRST (1 << 7) /* Software Reset */ | 26 | #define AT91_TWI_SWRST (1 << 7) /* Software Reset */ |
25 | 27 | ||
26 | #define AT91_TWI_MMR 0x04 /* Master Mode Register */ | 28 | #define AT91_TWI_MMR 0x04 /* Master Mode Register */ |
@@ -32,6 +34,9 @@ | |||
32 | #define AT91_TWI_MREAD (1 << 12) /* Master Read Direction */ | 34 | #define AT91_TWI_MREAD (1 << 12) /* Master Read Direction */ |
33 | #define AT91_TWI_DADR (0x7f << 16) /* Device Address */ | 35 | #define AT91_TWI_DADR (0x7f << 16) /* Device Address */ |
34 | 36 | ||
37 | #define AT91_TWI_SMR 0x08 /* Slave Mode Register [SAM9260 only] */ | ||
38 | #define AT91_TWI_SADR (0x7f << 16) /* Slave Address */ | ||
39 | |||
35 | #define AT91_TWI_IADR 0x0c /* Internal Address Register */ | 40 | #define AT91_TWI_IADR 0x0c /* Internal Address Register */ |
36 | 41 | ||
37 | #define AT91_TWI_CWGR 0x10 /* Clock Waveform Generator Register */ | 42 | #define AT91_TWI_CWGR 0x10 /* Clock Waveform Generator Register */ |
@@ -43,9 +48,15 @@ | |||
43 | #define AT91_TWI_TXCOMP (1 << 0) /* Transmission Complete */ | 48 | #define AT91_TWI_TXCOMP (1 << 0) /* Transmission Complete */ |
44 | #define AT91_TWI_RXRDY (1 << 1) /* Receive Holding Register Ready */ | 49 | #define AT91_TWI_RXRDY (1 << 1) /* Receive Holding Register Ready */ |
45 | #define AT91_TWI_TXRDY (1 << 2) /* Transmit Holding Register Ready */ | 50 | #define AT91_TWI_TXRDY (1 << 2) /* Transmit Holding Register Ready */ |
51 | #define AT91_TWI_SVREAD (1 << 3) /* Slave Read [SAM9260 only] */ | ||
52 | #define AT91_TWI_SVACC (1 << 4) /* Slave Access [SAM9260 only] */ | ||
53 | #define AT91_TWI_GACC (1 << 5) /* General Call Access [SAM9260 only] */ | ||
46 | #define AT91_TWI_OVRE (1 << 6) /* Overrun Error [AT91RM9200 only] */ | 54 | #define AT91_TWI_OVRE (1 << 6) /* Overrun Error [AT91RM9200 only] */ |
47 | #define AT91_TWI_UNRE (1 << 7) /* Underrun Error [AT91RM9200 only] */ | 55 | #define AT91_TWI_UNRE (1 << 7) /* Underrun Error [AT91RM9200 only] */ |
48 | #define AT91_TWI_NACK (1 << 8) /* Not Acknowledged */ | 56 | #define AT91_TWI_NACK (1 << 8) /* Not Acknowledged */ |
57 | #define AT91_TWI_ARBLST (1 << 9) /* Arbitration Lost [SAM9260 only] */ | ||
58 | #define AT91_TWI_SCLWS (1 << 10) /* Clock Wait State [SAM9260 only] */ | ||
59 | #define AT91_TWI_EOSACC (1 << 11) /* End of Slave Address [SAM9260 only] */ | ||
49 | 60 | ||
50 | #define AT91_TWI_IER 0x24 /* Interrupt Enable Register */ | 61 | #define AT91_TWI_IER 0x24 /* Interrupt Enable Register */ |
51 | #define AT91_TWI_IDR 0x28 /* Interrupt Disable Register */ | 62 | #define AT91_TWI_IDR 0x28 /* Interrupt Disable Register */ |
diff --git a/include/asm-arm/arch-at91/at91cap9.h b/include/asm-arm/arch-at91/at91cap9.h new file mode 100644 index 000000000000..73e1fcf4a0aa --- /dev/null +++ b/include/asm-arm/arch-at91/at91cap9.h | |||
@@ -0,0 +1,121 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91/at91cap9.h | ||
3 | * | ||
4 | * Copyright (C) 2007 Stelian Pop <stelian.pop@leadtechdesign.com> | ||
5 | * Copyright (C) 2007 Lead Tech Design <www.leadtechdesign.com> | ||
6 | * Copyright (C) 2007 Atmel Corporation. | ||
7 | * | ||
8 | * Common definitions. | ||
9 | * Based on AT91CAP9 datasheet revision B (Preliminary). | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License as published by | ||
13 | * the Free Software Foundation; either version 2 of the License, or | ||
14 | * (at your option) any later version. | ||
15 | */ | ||
16 | |||
17 | #ifndef AT91CAP9_H | ||
18 | #define AT91CAP9_H | ||
19 | |||
20 | /* | ||
21 | * Peripheral identifiers/interrupts. | ||
22 | */ | ||
23 | #define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */ | ||
24 | #define AT91_ID_SYS 1 /* System Peripherals */ | ||
25 | #define AT91CAP9_ID_PIOABCD 2 /* Parallel IO Controller A, B, C and D */ | ||
26 | #define AT91CAP9_ID_MPB0 3 /* MP Block Peripheral 0 */ | ||
27 | #define AT91CAP9_ID_MPB1 4 /* MP Block Peripheral 1 */ | ||
28 | #define AT91CAP9_ID_MPB2 5 /* MP Block Peripheral 2 */ | ||
29 | #define AT91CAP9_ID_MPB3 6 /* MP Block Peripheral 3 */ | ||
30 | #define AT91CAP9_ID_MPB4 7 /* MP Block Peripheral 4 */ | ||
31 | #define AT91CAP9_ID_US0 8 /* USART 0 */ | ||
32 | #define AT91CAP9_ID_US1 9 /* USART 1 */ | ||
33 | #define AT91CAP9_ID_US2 10 /* USART 2 */ | ||
34 | #define AT91CAP9_ID_MCI0 11 /* Multimedia Card Interface 0 */ | ||
35 | #define AT91CAP9_ID_MCI1 12 /* Multimedia Card Interface 1 */ | ||
36 | #define AT91CAP9_ID_CAN 13 /* CAN */ | ||
37 | #define AT91CAP9_ID_TWI 14 /* Two-Wire Interface */ | ||
38 | #define AT91CAP9_ID_SPI0 15 /* Serial Peripheral Interface 0 */ | ||
39 | #define AT91CAP9_ID_SPI1 16 /* Serial Peripheral Interface 0 */ | ||
40 | #define AT91CAP9_ID_SSC0 17 /* Serial Synchronous Controller 0 */ | ||
41 | #define AT91CAP9_ID_SSC1 18 /* Serial Synchronous Controller 1 */ | ||
42 | #define AT91CAP9_ID_AC97C 19 /* AC97 Controller */ | ||
43 | #define AT91CAP9_ID_TCB 20 /* Timer Counter 0, 1 and 2 */ | ||
44 | #define AT91CAP9_ID_PWMC 21 /* Pulse Width Modulation Controller */ | ||
45 | #define AT91CAP9_ID_EMAC 22 /* Ethernet */ | ||
46 | #define AT91CAP9_ID_AESTDES 23 /* Advanced Encryption Standard, Triple DES */ | ||
47 | #define AT91CAP9_ID_ADC 24 /* Analog-to-Digital Converter */ | ||
48 | #define AT91CAP9_ID_ISI 25 /* Image Sensor Interface */ | ||
49 | #define AT91CAP9_ID_LCDC 26 /* LCD Controller */ | ||
50 | #define AT91CAP9_ID_DMA 27 /* DMA Controller */ | ||
51 | #define AT91CAP9_ID_UDPHS 28 /* USB High Speed Device Port */ | ||
52 | #define AT91CAP9_ID_UHP 29 /* USB Host Port */ | ||
53 | #define AT91CAP9_ID_IRQ0 30 /* Advanced Interrupt Controller (IRQ0) */ | ||
54 | #define AT91CAP9_ID_IRQ1 31 /* Advanced Interrupt Controller (IRQ1) */ | ||
55 | |||
56 | /* | ||
57 | * User Peripheral physical base addresses. | ||
58 | */ | ||
59 | #define AT91CAP9_BASE_UDPHS 0xfff78000 | ||
60 | #define AT91CAP9_BASE_TCB0 0xfff7c000 | ||
61 | #define AT91CAP9_BASE_TC0 0xfff7c000 | ||
62 | #define AT91CAP9_BASE_TC1 0xfff7c040 | ||
63 | #define AT91CAP9_BASE_TC2 0xfff7c080 | ||
64 | #define AT91CAP9_BASE_MCI0 0xfff80000 | ||
65 | #define AT91CAP9_BASE_MCI1 0xfff84000 | ||
66 | #define AT91CAP9_BASE_TWI 0xfff88000 | ||
67 | #define AT91CAP9_BASE_US0 0xfff8c000 | ||
68 | #define AT91CAP9_BASE_US1 0xfff90000 | ||
69 | #define AT91CAP9_BASE_US2 0xfff94000 | ||
70 | #define AT91CAP9_BASE_SSC0 0xfff98000 | ||
71 | #define AT91CAP9_BASE_SSC1 0xfff9c000 | ||
72 | #define AT91CAP9_BASE_AC97C 0xfffa0000 | ||
73 | #define AT91CAP9_BASE_SPI0 0xfffa4000 | ||
74 | #define AT91CAP9_BASE_SPI1 0xfffa8000 | ||
75 | #define AT91CAP9_BASE_CAN 0xfffac000 | ||
76 | #define AT91CAP9_BASE_PWMC 0xfffb8000 | ||
77 | #define AT91CAP9_BASE_EMAC 0xfffbc000 | ||
78 | #define AT91CAP9_BASE_ADC 0xfffc0000 | ||
79 | #define AT91CAP9_BASE_ISI 0xfffc4000 | ||
80 | #define AT91_BASE_SYS 0xffffe200 | ||
81 | |||
82 | /* | ||
83 | * System Peripherals (offset from AT91_BASE_SYS) | ||
84 | */ | ||
85 | #define AT91_ECC (0xffffe200 - AT91_BASE_SYS) | ||
86 | #define AT91_BCRAMC (0xffffe400 - AT91_BASE_SYS) | ||
87 | #define AT91_DDRSDRC (0xffffe600 - AT91_BASE_SYS) | ||
88 | #define AT91_SMC (0xffffe800 - AT91_BASE_SYS) | ||
89 | #define AT91_MATRIX (0xffffea00 - AT91_BASE_SYS) | ||
90 | #define AT91_CCFG (0xffffeb10 - AT91_BASE_SYS) | ||
91 | #define AT91_DMA (0xffffec00 - AT91_BASE_SYS) | ||
92 | #define AT91_DBGU (0xffffee00 - AT91_BASE_SYS) | ||
93 | #define AT91_AIC (0xfffff000 - AT91_BASE_SYS) | ||
94 | #define AT91_PIOA (0xfffff200 - AT91_BASE_SYS) | ||
95 | #define AT91_PIOB (0xfffff400 - AT91_BASE_SYS) | ||
96 | #define AT91_PIOC (0xfffff600 - AT91_BASE_SYS) | ||
97 | #define AT91_PIOD (0xfffff800 - AT91_BASE_SYS) | ||
98 | #define AT91_PMC (0xfffffc00 - AT91_BASE_SYS) | ||
99 | #define AT91_RSTC (0xfffffd00 - AT91_BASE_SYS) | ||
100 | #define AT91_SHDC (0xfffffd10 - AT91_BASE_SYS) | ||
101 | #define AT91_RTT (0xfffffd20 - AT91_BASE_SYS) | ||
102 | #define AT91_PIT (0xfffffd30 - AT91_BASE_SYS) | ||
103 | #define AT91_WDT (0xfffffd40 - AT91_BASE_SYS) | ||
104 | #define AT91_GPBR (0xfffffd50 - AT91_BASE_SYS) | ||
105 | |||
106 | /* | ||
107 | * Internal Memory. | ||
108 | */ | ||
109 | #define AT91CAP9_SRAM_BASE 0x00100000 /* Internal SRAM base address */ | ||
110 | #define AT91CAP9_SRAM_SIZE (32 * SZ_1K) /* Internal SRAM size (32Kb) */ | ||
111 | |||
112 | #define AT91CAP9_ROM_BASE 0x00400000 /* Internal ROM base address */ | ||
113 | #define AT91CAP9_ROM_SIZE (32 * SZ_1K) /* Internal ROM size (32Kb) */ | ||
114 | |||
115 | #define AT91CAP9_LCDC_BASE 0x00500000 /* LCD Controller */ | ||
116 | #define AT91CAP9_UDPHS_BASE 0x00600000 /* USB High Speed Device Port */ | ||
117 | #define AT91CAP9_UHP_BASE 0x00700000 /* USB Host controller */ | ||
118 | |||
119 | #define CONFIG_DRAM_BASE AT91_CHIPSELECT_6 | ||
120 | |||
121 | #endif | ||
diff --git a/include/asm-arm/arch-at91/at91cap9_matrix.h b/include/asm-arm/arch-at91/at91cap9_matrix.h new file mode 100644 index 000000000000..a641686b6c3d --- /dev/null +++ b/include/asm-arm/arch-at91/at91cap9_matrix.h | |||
@@ -0,0 +1,132 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91/at91cap9_matrix.h | ||
3 | * | ||
4 | * Copyright (C) 2007 Stelian Pop <stelian.pop@leadtechdesign.com> | ||
5 | * Copyright (C) 2007 Lead Tech Design <www.leadtechdesign.com> | ||
6 | * Copyright (C) 2006 Atmel Corporation. | ||
7 | * | ||
8 | * Memory Controllers (MATRIX, EBI) - System peripherals registers. | ||
9 | * Based on AT91CAP9 datasheet revision B (Preliminary). | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License as published by | ||
13 | * the Free Software Foundation; either version 2 of the License, or | ||
14 | * (at your option) any later version. | ||
15 | */ | ||
16 | |||
17 | #ifndef AT91CAP9_MATRIX_H | ||
18 | #define AT91CAP9_MATRIX_H | ||
19 | |||
20 | #define AT91_MATRIX_MCFG0 (AT91_MATRIX + 0x00) /* Master Configuration Register 0 */ | ||
21 | #define AT91_MATRIX_MCFG1 (AT91_MATRIX + 0x04) /* Master Configuration Register 1 */ | ||
22 | #define AT91_MATRIX_MCFG2 (AT91_MATRIX + 0x08) /* Master Configuration Register 2 */ | ||
23 | #define AT91_MATRIX_MCFG3 (AT91_MATRIX + 0x0C) /* Master Configuration Register 3 */ | ||
24 | #define AT91_MATRIX_MCFG4 (AT91_MATRIX + 0x10) /* Master Configuration Register 4 */ | ||
25 | #define AT91_MATRIX_MCFG5 (AT91_MATRIX + 0x14) /* Master Configuration Register 5 */ | ||
26 | #define AT91_MATRIX_MCFG6 (AT91_MATRIX + 0x18) /* Master Configuration Register 6 */ | ||
27 | #define AT91_MATRIX_MCFG7 (AT91_MATRIX + 0x1C) /* Master Configuration Register 7 */ | ||
28 | #define AT91_MATRIX_MCFG8 (AT91_MATRIX + 0x20) /* Master Configuration Register 8 */ | ||
29 | #define AT91_MATRIX_MCFG9 (AT91_MATRIX + 0x24) /* Master Configuration Register 9 */ | ||
30 | #define AT91_MATRIX_MCFG10 (AT91_MATRIX + 0x28) /* Master Configuration Register 10 */ | ||
31 | #define AT91_MATRIX_MCFG11 (AT91_MATRIX + 0x2C) /* Master Configuration Register 11 */ | ||
32 | #define AT91_MATRIX_ULBT (7 << 0) /* Undefined Length Burst Type */ | ||
33 | #define AT91_MATRIX_ULBT_INFINITE (0 << 0) | ||
34 | #define AT91_MATRIX_ULBT_SINGLE (1 << 0) | ||
35 | #define AT91_MATRIX_ULBT_FOUR (2 << 0) | ||
36 | #define AT91_MATRIX_ULBT_EIGHT (3 << 0) | ||
37 | #define AT91_MATRIX_ULBT_SIXTEEN (4 << 0) | ||
38 | |||
39 | #define AT91_MATRIX_SCFG0 (AT91_MATRIX + 0x40) /* Slave Configuration Register 0 */ | ||
40 | #define AT91_MATRIX_SCFG1 (AT91_MATRIX + 0x44) /* Slave Configuration Register 1 */ | ||
41 | #define AT91_MATRIX_SCFG2 (AT91_MATRIX + 0x48) /* Slave Configuration Register 2 */ | ||
42 | #define AT91_MATRIX_SCFG3 (AT91_MATRIX + 0x4C) /* Slave Configuration Register 3 */ | ||
43 | #define AT91_MATRIX_SCFG4 (AT91_MATRIX + 0x50) /* Slave Configuration Register 4 */ | ||
44 | #define AT91_MATRIX_SCFG5 (AT91_MATRIX + 0x54) /* Slave Configuration Register 5 */ | ||
45 | #define AT91_MATRIX_SCFG6 (AT91_MATRIX + 0x58) /* Slave Configuration Register 6 */ | ||
46 | #define AT91_MATRIX_SCFG7 (AT91_MATRIX + 0x5C) /* Slave Configuration Register 7 */ | ||
47 | #define AT91_MATRIX_SCFG8 (AT91_MATRIX + 0x60) /* Slave Configuration Register 8 */ | ||
48 | #define AT91_MATRIX_SCFG9 (AT91_MATRIX + 0x64) /* Slave Configuration Register 9 */ | ||
49 | #define AT91_MATRIX_SLOT_CYCLE (0xff << 0) /* Maximum Number of Allowed Cycles for a Burst */ | ||
50 | #define AT91_MATRIX_DEFMSTR_TYPE (3 << 16) /* Default Master Type */ | ||
51 | #define AT91_MATRIX_DEFMSTR_TYPE_NONE (0 << 16) | ||
52 | #define AT91_MATRIX_DEFMSTR_TYPE_LAST (1 << 16) | ||
53 | #define AT91_MATRIX_DEFMSTR_TYPE_FIXED (2 << 16) | ||
54 | #define AT91_MATRIX_FIXED_DEFMSTR (0xf << 18) /* Fixed Index of Default Master */ | ||
55 | #define AT91_MATRIX_ARBT (3 << 24) /* Arbitration Type */ | ||
56 | #define AT91_MATRIX_ARBT_ROUND_ROBIN (0 << 24) | ||
57 | #define AT91_MATRIX_ARBT_FIXED_PRIORITY (1 << 24) | ||
58 | |||
59 | #define AT91_MATRIX_PRAS0 (AT91_MATRIX + 0x80) /* Priority Register A for Slave 0 */ | ||
60 | #define AT91_MATRIX_PRBS0 (AT91_MATRIX + 0x84) /* Priority Register B for Slave 0 */ | ||
61 | #define AT91_MATRIX_PRAS1 (AT91_MATRIX + 0x88) /* Priority Register A for Slave 1 */ | ||
62 | #define AT91_MATRIX_PRBS1 (AT91_MATRIX + 0x8C) /* Priority Register B for Slave 1 */ | ||
63 | #define AT91_MATRIX_PRAS2 (AT91_MATRIX + 0x90) /* Priority Register A for Slave 2 */ | ||
64 | #define AT91_MATRIX_PRBS2 (AT91_MATRIX + 0x94) /* Priority Register B for Slave 2 */ | ||
65 | #define AT91_MATRIX_PRAS3 (AT91_MATRIX + 0x98) /* Priority Register A for Slave 3 */ | ||
66 | #define AT91_MATRIX_PRBS3 (AT91_MATRIX + 0x9C) /* Priority Register B for Slave 3 */ | ||
67 | #define AT91_MATRIX_PRAS4 (AT91_MATRIX + 0xA0) /* Priority Register A for Slave 4 */ | ||
68 | #define AT91_MATRIX_PRBS4 (AT91_MATRIX + 0xA4) /* Priority Register B for Slave 4 */ | ||
69 | #define AT91_MATRIX_PRAS5 (AT91_MATRIX + 0xA8) /* Priority Register A for Slave 5 */ | ||
70 | #define AT91_MATRIX_PRBS5 (AT91_MATRIX + 0xAC) /* Priority Register B for Slave 5 */ | ||
71 | #define AT91_MATRIX_PRAS6 (AT91_MATRIX + 0xB0) /* Priority Register A for Slave 6 */ | ||
72 | #define AT91_MATRIX_PRBS6 (AT91_MATRIX + 0xB4) /* Priority Register B for Slave 6 */ | ||
73 | #define AT91_MATRIX_PRAS7 (AT91_MATRIX + 0xB8) /* Priority Register A for Slave 7 */ | ||
74 | #define AT91_MATRIX_PRBS7 (AT91_MATRIX + 0xBC) /* Priority Register B for Slave 7 */ | ||
75 | #define AT91_MATRIX_PRAS8 (AT91_MATRIX + 0xC0) /* Priority Register A for Slave 8 */ | ||
76 | #define AT91_MATRIX_PRBS8 (AT91_MATRIX + 0xC4) /* Priority Register B for Slave 8 */ | ||
77 | #define AT91_MATRIX_PRAS9 (AT91_MATRIX + 0xC8) /* Priority Register A for Slave 9 */ | ||
78 | #define AT91_MATRIX_PRBS9 (AT91_MATRIX + 0xCC) /* Priority Register B for Slave 9 */ | ||
79 | #define AT91_MATRIX_M0PR (3 << 0) /* Master 0 Priority */ | ||
80 | #define AT91_MATRIX_M1PR (3 << 4) /* Master 1 Priority */ | ||
81 | #define AT91_MATRIX_M2PR (3 << 8) /* Master 2 Priority */ | ||
82 | #define AT91_MATRIX_M3PR (3 << 12) /* Master 3 Priority */ | ||
83 | #define AT91_MATRIX_M4PR (3 << 16) /* Master 4 Priority */ | ||
84 | #define AT91_MATRIX_M5PR (3 << 20) /* Master 5 Priority */ | ||
85 | #define AT91_MATRIX_M6PR (3 << 24) /* Master 6 Priority */ | ||
86 | #define AT91_MATRIX_M7PR (3 << 28) /* Master 7 Priority */ | ||
87 | #define AT91_MATRIX_M8PR (3 << 0) /* Master 8 Priority (in Register B) */ | ||
88 | #define AT91_MATRIX_M9PR (3 << 4) /* Master 9 Priority (in Register B) */ | ||
89 | #define AT91_MATRIX_M10PR (3 << 8) /* Master 10 Priority (in Register B) */ | ||
90 | #define AT91_MATRIX_M11PR (3 << 12) /* Master 11 Priority (in Register B) */ | ||
91 | |||
92 | #define AT91_MATRIX_MRCR (AT91_MATRIX + 0x100) /* Master Remap Control Register */ | ||
93 | #define AT91_MATRIX_RCB0 (1 << 0) /* Remap Command for AHB Master 0 (ARM926EJ-S Instruction Master) */ | ||
94 | #define AT91_MATRIX_RCB1 (1 << 1) /* Remap Command for AHB Master 1 (ARM926EJ-S Data Master) */ | ||
95 | #define AT91_MATRIX_RCB2 (1 << 2) | ||
96 | #define AT91_MATRIX_RCB3 (1 << 3) | ||
97 | #define AT91_MATRIX_RCB4 (1 << 4) | ||
98 | #define AT91_MATRIX_RCB5 (1 << 5) | ||
99 | #define AT91_MATRIX_RCB6 (1 << 6) | ||
100 | #define AT91_MATRIX_RCB7 (1 << 7) | ||
101 | #define AT91_MATRIX_RCB8 (1 << 8) | ||
102 | #define AT91_MATRIX_RCB9 (1 << 9) | ||
103 | #define AT91_MATRIX_RCB10 (1 << 10) | ||
104 | #define AT91_MATRIX_RCB11 (1 << 11) | ||
105 | |||
106 | #define AT91_MPBS0_SFR (AT91_MATRIX + 0x114) /* MPBlock Slave 0 Special Function Register */ | ||
107 | #define AT91_MPBS1_SFR (AT91_MATRIX + 0x11C) /* MPBlock Slave 1 Special Function Register */ | ||
108 | |||
109 | #define AT91_MATRIX_EBICSA (AT91_MATRIX + 0x120) /* EBI Chip Select Assignment Register */ | ||
110 | #define AT91_MATRIX_EBI_CS1A (1 << 1) /* Chip Select 1 Assignment */ | ||
111 | #define AT91_MATRIX_EBI_CS1A_SMC (0 << 1) | ||
112 | #define AT91_MATRIX_EBI_CS1A_BCRAMC (1 << 1) | ||
113 | #define AT91_MATRIX_EBI_CS3A (1 << 3) /* Chip Select 3 Assignment */ | ||
114 | #define AT91_MATRIX_EBI_CS3A_SMC (0 << 3) | ||
115 | #define AT91_MATRIX_EBI_CS3A_SMC_SMARTMEDIA (1 << 3) | ||
116 | #define AT91_MATRIX_EBI_CS4A (1 << 4) /* Chip Select 4 Assignment */ | ||
117 | #define AT91_MATRIX_EBI_CS4A_SMC (0 << 4) | ||
118 | #define AT91_MATRIX_EBI_CS4A_SMC_CF1 (1 << 4) | ||
119 | #define AT91_MATRIX_EBI_CS5A (1 << 5) /* Chip Select 5 Assignment */ | ||
120 | #define AT91_MATRIX_EBI_CS5A_SMC (0 << 5) | ||
121 | #define AT91_MATRIX_EBI_CS5A_SMC_CF2 (1 << 5) | ||
122 | #define AT91_MATRIX_EBI_DBPUC (1 << 8) /* Data Bus Pull-up Configuration */ | ||
123 | #define AT91_MATRIX_EBI_DQSPDC (1 << 9) /* Data Qualifier Strobe Pull-Down Configuration */ | ||
124 | #define AT91_MATRIX_EBI_VDDIOMSEL (1 << 16) /* Memory voltage selection */ | ||
125 | #define AT91_MATRIX_EBI_VDDIOMSEL_1_8V (0 << 16) | ||
126 | #define AT91_MATRIX_EBI_VDDIOMSEL_3_3V (1 << 16) | ||
127 | |||
128 | #define AT91_MPBS2_SFR (AT91_MATRIX + 0x12C) /* MPBlock Slave 2 Special Function Register */ | ||
129 | #define AT91_MPBS3_SFR (AT91_MATRIX + 0x130) /* MPBlock Slave 3 Special Function Register */ | ||
130 | #define AT91_APB_SFR (AT91_MATRIX + 0x134) /* APB Bridge Special Function Register */ | ||
131 | |||
132 | #endif | ||
diff --git a/include/asm-arm/arch-at91/at91sam9260_matrix.h b/include/asm-arm/arch-at91/at91sam9260_matrix.h index aacb1e976422..a8e9fec6c735 100644 --- a/include/asm-arm/arch-at91/at91sam9260_matrix.h +++ b/include/asm-arm/arch-at91/at91sam9260_matrix.h | |||
@@ -67,7 +67,7 @@ | |||
67 | #define AT91_MATRIX_CS4A (1 << 4) /* Chip Select 4 Assignment */ | 67 | #define AT91_MATRIX_CS4A (1 << 4) /* Chip Select 4 Assignment */ |
68 | #define AT91_MATRIX_CS4A_SMC (0 << 4) | 68 | #define AT91_MATRIX_CS4A_SMC (0 << 4) |
69 | #define AT91_MATRIX_CS4A_SMC_CF1 (1 << 4) | 69 | #define AT91_MATRIX_CS4A_SMC_CF1 (1 << 4) |
70 | #define AT91_MATRIX_CS5A (1 << 5 ) /* Chip Select 5 Assignment */ | 70 | #define AT91_MATRIX_CS5A (1 << 5) /* Chip Select 5 Assignment */ |
71 | #define AT91_MATRIX_CS5A_SMC (0 << 5) | 71 | #define AT91_MATRIX_CS5A_SMC (0 << 5) |
72 | #define AT91_MATRIX_CS5A_SMC_CF2 (1 << 5) | 72 | #define AT91_MATRIX_CS5A_SMC_CF2 (1 << 5) |
73 | #define AT91_MATRIX_DBPUC (1 << 8) /* Data Bus Pull-up Configuration */ | 73 | #define AT91_MATRIX_DBPUC (1 << 8) /* Data Bus Pull-up Configuration */ |
diff --git a/include/asm-arm/arch-at91/at91sam9263_matrix.h b/include/asm-arm/arch-at91/at91sam9263_matrix.h index 6fc6e4be624e..72f6e668e414 100644 --- a/include/asm-arm/arch-at91/at91sam9263_matrix.h +++ b/include/asm-arm/arch-at91/at91sam9263_matrix.h | |||
@@ -44,7 +44,7 @@ | |||
44 | #define AT91_MATRIX_DEFMSTR_TYPE_NONE (0 << 16) | 44 | #define AT91_MATRIX_DEFMSTR_TYPE_NONE (0 << 16) |
45 | #define AT91_MATRIX_DEFMSTR_TYPE_LAST (1 << 16) | 45 | #define AT91_MATRIX_DEFMSTR_TYPE_LAST (1 << 16) |
46 | #define AT91_MATRIX_DEFMSTR_TYPE_FIXED (2 << 16) | 46 | #define AT91_MATRIX_DEFMSTR_TYPE_FIXED (2 << 16) |
47 | #define AT91_MATRIX_FIXED_DEFMSTR (7 << 18) /* Fixed Index of Default Master */ | 47 | #define AT91_MATRIX_FIXED_DEFMSTR (0xf << 18) /* Fixed Index of Default Master */ |
48 | #define AT91_MATRIX_ARBT (3 << 24) /* Arbitration Type */ | 48 | #define AT91_MATRIX_ARBT (3 << 24) /* Arbitration Type */ |
49 | #define AT91_MATRIX_ARBT_ROUND_ROBIN (0 << 24) | 49 | #define AT91_MATRIX_ARBT_ROUND_ROBIN (0 << 24) |
50 | #define AT91_MATRIX_ARBT_FIXED_PRIORITY (1 << 24) | 50 | #define AT91_MATRIX_ARBT_FIXED_PRIORITY (1 << 24) |
diff --git a/include/asm-arm/arch-at91/at91sam9rl_matrix.h b/include/asm-arm/arch-at91/at91sam9rl_matrix.h index b15f11b7c08d..84224174e6a1 100644 --- a/include/asm-arm/arch-at91/at91sam9rl_matrix.h +++ b/include/asm-arm/arch-at91/at91sam9rl_matrix.h | |||
@@ -38,7 +38,7 @@ | |||
38 | #define AT91_MATRIX_DEFMSTR_TYPE_NONE (0 << 16) | 38 | #define AT91_MATRIX_DEFMSTR_TYPE_NONE (0 << 16) |
39 | #define AT91_MATRIX_DEFMSTR_TYPE_LAST (1 << 16) | 39 | #define AT91_MATRIX_DEFMSTR_TYPE_LAST (1 << 16) |
40 | #define AT91_MATRIX_DEFMSTR_TYPE_FIXED (2 << 16) | 40 | #define AT91_MATRIX_DEFMSTR_TYPE_FIXED (2 << 16) |
41 | #define AT91_MATRIX_FIXED_DEFMSTR (7 << 18) /* Fixed Index of Default Master */ | 41 | #define AT91_MATRIX_FIXED_DEFMSTR (0xf << 18) /* Fixed Index of Default Master */ |
42 | #define AT91_MATRIX_ARBT (3 << 24) /* Arbitration Type */ | 42 | #define AT91_MATRIX_ARBT (3 << 24) /* Arbitration Type */ |
43 | #define AT91_MATRIX_ARBT_ROUND_ROBIN (0 << 24) | 43 | #define AT91_MATRIX_ARBT_ROUND_ROBIN (0 << 24) |
44 | #define AT91_MATRIX_ARBT_FIXED_PRIORITY (1 << 24) | 44 | #define AT91_MATRIX_ARBT_FIXED_PRIORITY (1 << 24) |
diff --git a/include/asm-arm/arch-at91/board.h b/include/asm-arm/arch-at91/board.h index 79054965baa6..55b07bd5316c 100644 --- a/include/asm-arm/arch-at91/board.h +++ b/include/asm-arm/arch-at91/board.h | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/mtd/partitions.h> | 34 | #include <linux/mtd/partitions.h> |
35 | #include <linux/device.h> | 35 | #include <linux/device.h> |
36 | #include <linux/i2c.h> | 36 | #include <linux/i2c.h> |
37 | #include <linux/leds.h> | ||
37 | #include <linux/spi/spi.h> | 38 | #include <linux/spi/spi.h> |
38 | 39 | ||
39 | /* USB Device */ | 40 | /* USB Device */ |
@@ -71,7 +72,7 @@ struct at91_eth_data { | |||
71 | }; | 72 | }; |
72 | extern void __init at91_add_device_eth(struct at91_eth_data *data); | 73 | extern void __init at91_add_device_eth(struct at91_eth_data *data); |
73 | 74 | ||
74 | #if defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9263) | 75 | #if defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9263) || defined(CONFIG_ARCH_AT91CAP9) |
75 | #define eth_platform_data at91_eth_data | 76 | #define eth_platform_data at91_eth_data |
76 | #endif | 77 | #endif |
77 | 78 | ||
@@ -101,13 +102,23 @@ extern void __init at91_add_device_i2c(struct i2c_board_info *devices, int nr_de | |||
101 | extern void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices); | 102 | extern void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices); |
102 | 103 | ||
103 | /* Serial */ | 104 | /* Serial */ |
105 | #define ATMEL_UART_CTS 0x01 | ||
106 | #define ATMEL_UART_RTS 0x02 | ||
107 | #define ATMEL_UART_DSR 0x04 | ||
108 | #define ATMEL_UART_DTR 0x08 | ||
109 | #define ATMEL_UART_DCD 0x10 | ||
110 | #define ATMEL_UART_RI 0x20 | ||
111 | |||
112 | extern void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins); | ||
113 | extern void __init at91_set_serial_console(unsigned portnr); | ||
114 | |||
104 | struct at91_uart_config { | 115 | struct at91_uart_config { |
105 | unsigned short console_tty; /* tty number of serial console */ | 116 | unsigned short console_tty; /* tty number of serial console */ |
106 | unsigned short nr_tty; /* number of serial tty's */ | 117 | unsigned short nr_tty; /* number of serial tty's */ |
107 | short tty_map[]; /* map UART to tty number */ | 118 | short tty_map[]; /* map UART to tty number */ |
108 | }; | 119 | }; |
109 | extern struct platform_device *atmel_default_console_device; | 120 | extern struct platform_device *atmel_default_console_device; |
110 | extern void __init at91_init_serial(struct at91_uart_config *config); | 121 | extern void __init __deprecated at91_init_serial(struct at91_uart_config *config); |
111 | 122 | ||
112 | struct atmel_uart_data { | 123 | struct atmel_uart_data { |
113 | short use_dma_tx; /* use transmit DMA? */ | 124 | short use_dma_tx; /* use transmit DMA? */ |
@@ -116,6 +127,23 @@ struct atmel_uart_data { | |||
116 | }; | 127 | }; |
117 | extern void __init at91_add_device_serial(void); | 128 | extern void __init at91_add_device_serial(void); |
118 | 129 | ||
130 | /* | ||
131 | * SSC -- accessed through ssc_request(id). Drivers don't bind to SSC | ||
132 | * platform devices. Their SSC ID is part of their configuration data, | ||
133 | * along with information about which SSC signals they should use. | ||
134 | */ | ||
135 | #define ATMEL_SSC_TK 0x01 | ||
136 | #define ATMEL_SSC_TF 0x02 | ||
137 | #define ATMEL_SSC_TD 0x04 | ||
138 | #define ATMEL_SSC_TX (ATMEL_SSC_TK | ATMEL_SSC_TF | ATMEL_SSC_TD) | ||
139 | |||
140 | #define ATMEL_SSC_RK 0x10 | ||
141 | #define ATMEL_SSC_RF 0x20 | ||
142 | #define ATMEL_SSC_RD 0x40 | ||
143 | #define ATMEL_SSC_RX (ATMEL_SSC_RK | ATMEL_SSC_RF | ATMEL_SSC_RD) | ||
144 | |||
145 | extern void __init at91_add_device_ssc(unsigned id, unsigned pins); | ||
146 | |||
119 | /* LCD Controller */ | 147 | /* LCD Controller */ |
120 | struct atmel_lcdfb_info; | 148 | struct atmel_lcdfb_info; |
121 | extern void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data); | 149 | extern void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data); |
@@ -126,10 +154,12 @@ struct atmel_ac97_data { | |||
126 | }; | 154 | }; |
127 | extern void __init at91_add_device_ac97(struct atmel_ac97_data *data); | 155 | extern void __init at91_add_device_ac97(struct atmel_ac97_data *data); |
128 | 156 | ||
157 | /* ISI */ | ||
158 | extern void __init at91_add_device_isi(void); | ||
159 | |||
129 | /* LEDs */ | 160 | /* LEDs */ |
130 | extern u8 at91_leds_cpu; | ||
131 | extern u8 at91_leds_timer; | ||
132 | extern void __init at91_init_leds(u8 cpu_led, u8 timer_led); | 161 | extern void __init at91_init_leds(u8 cpu_led, u8 timer_led); |
162 | extern void __init at91_gpio_leds(struct gpio_led *leds, int nr); | ||
133 | 163 | ||
134 | /* FIXME: this needs a better location, but gets stuff building again */ | 164 | /* FIXME: this needs a better location, but gets stuff building again */ |
135 | extern int at91_suspend_entering_slow_clock(void); | 165 | extern int at91_suspend_entering_slow_clock(void); |
diff --git a/include/asm-arm/arch-at91/cpu.h b/include/asm-arm/arch-at91/cpu.h index 080cbb401a87..7145166826a2 100644 --- a/include/asm-arm/arch-at91/cpu.h +++ b/include/asm-arm/arch-at91/cpu.h | |||
@@ -21,13 +21,13 @@ | |||
21 | #define ARCH_ID_AT91SAM9260 0x019803a0 | 21 | #define ARCH_ID_AT91SAM9260 0x019803a0 |
22 | #define ARCH_ID_AT91SAM9261 0x019703a0 | 22 | #define ARCH_ID_AT91SAM9261 0x019703a0 |
23 | #define ARCH_ID_AT91SAM9263 0x019607a0 | 23 | #define ARCH_ID_AT91SAM9263 0x019607a0 |
24 | #define ARCH_ID_AT91SAM9RL64 0x019b03a0 | ||
25 | #define ARCH_ID_AT91CAP9 0x039A03A0 | ||
24 | 26 | ||
25 | #define ARCH_ID_AT91SAM9XE128 0x329973a0 | 27 | #define ARCH_ID_AT91SAM9XE128 0x329973a0 |
26 | #define ARCH_ID_AT91SAM9XE256 0x329a93a0 | 28 | #define ARCH_ID_AT91SAM9XE256 0x329a93a0 |
27 | #define ARCH_ID_AT91SAM9XE512 0x329aa3a0 | 29 | #define ARCH_ID_AT91SAM9XE512 0x329aa3a0 |
28 | 30 | ||
29 | #define ARCH_ID_AT91SAM9RL64 0x019b03a0 | ||
30 | |||
31 | #define ARCH_ID_AT91M40800 0x14080044 | 31 | #define ARCH_ID_AT91M40800 0x14080044 |
32 | #define ARCH_ID_AT91R40807 0x44080746 | 32 | #define ARCH_ID_AT91R40807 0x44080746 |
33 | #define ARCH_ID_AT91M40807 0x14080745 | 33 | #define ARCH_ID_AT91M40807 0x14080745 |
@@ -81,6 +81,11 @@ static inline unsigned long at91_arch_identify(void) | |||
81 | #define cpu_is_at91sam9rl() (0) | 81 | #define cpu_is_at91sam9rl() (0) |
82 | #endif | 82 | #endif |
83 | 83 | ||
84 | #ifdef CONFIG_ARCH_AT91CAP9 | ||
85 | #define cpu_is_at91cap9() (at91_cpu_identify() == ARCH_ID_AT91CAP9) | ||
86 | #else | ||
87 | #define cpu_is_at91cap9() (0) | ||
88 | #endif | ||
84 | 89 | ||
85 | /* | 90 | /* |
86 | * Since this is ARM, we will never run on any AVR32 CPU. But these | 91 | * Since this is ARM, we will never run on any AVR32 CPU. But these |
diff --git a/include/asm-arm/arch-at91/entry-macro.S b/include/asm-arm/arch-at91/entry-macro.S index cc1d850a0788..1005eee6219b 100644 --- a/include/asm-arm/arch-at91/entry-macro.S +++ b/include/asm-arm/arch-at91/entry-macro.S | |||
@@ -17,13 +17,13 @@ | |||
17 | .endm | 17 | .endm |
18 | 18 | ||
19 | .macro get_irqnr_preamble, base, tmp | 19 | .macro get_irqnr_preamble, base, tmp |
20 | ldr \base, =(AT91_VA_BASE_SYS + AT91_AIC) @ base virtual address of AIC peripheral | ||
20 | .endm | 21 | .endm |
21 | 22 | ||
22 | .macro arch_ret_to_user, tmp1, tmp2 | 23 | .macro arch_ret_to_user, tmp1, tmp2 |
23 | .endm | 24 | .endm |
24 | 25 | ||
25 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 26 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
26 | ldr \base, =(AT91_VA_BASE_SYS + AT91_AIC) @ base virtual address of AIC peripheral | ||
27 | ldr \irqnr, [\base, #(AT91_AIC_IVR - AT91_AIC)] @ read IRQ vector register: de-asserts nIRQ to processor (and clears interrupt) | 27 | ldr \irqnr, [\base, #(AT91_AIC_IVR - AT91_AIC)] @ read IRQ vector register: de-asserts nIRQ to processor (and clears interrupt) |
28 | ldr \irqstat, [\base, #(AT91_AIC_ISR - AT91_AIC)] @ read interrupt source number | 28 | ldr \irqstat, [\base, #(AT91_AIC_ISR - AT91_AIC)] @ read interrupt source number |
29 | teq \irqstat, #0 @ ISR is 0 when no current interrupt, or spurious interrupt | 29 | teq \irqstat, #0 @ ISR is 0 when no current interrupt, or spurious interrupt |
diff --git a/include/asm-arm/arch-at91/hardware.h b/include/asm-arm/arch-at91/hardware.h index 8f1cdd38a969..2c826d8247a3 100644 --- a/include/asm-arm/arch-at91/hardware.h +++ b/include/asm-arm/arch-at91/hardware.h | |||
@@ -26,6 +26,8 @@ | |||
26 | #include <asm/arch/at91sam9263.h> | 26 | #include <asm/arch/at91sam9263.h> |
27 | #elif defined(CONFIG_ARCH_AT91SAM9RL) | 27 | #elif defined(CONFIG_ARCH_AT91SAM9RL) |
28 | #include <asm/arch/at91sam9rl.h> | 28 | #include <asm/arch/at91sam9rl.h> |
29 | #elif defined(CONFIG_ARCH_AT91CAP9) | ||
30 | #include <asm/arch/at91cap9.h> | ||
29 | #elif defined(CONFIG_ARCH_AT91X40) | 31 | #elif defined(CONFIG_ARCH_AT91X40) |
30 | #include <asm/arch/at91x40.h> | 32 | #include <asm/arch/at91x40.h> |
31 | #else | 33 | #else |
diff --git a/include/asm-arm/arch-at91/timex.h b/include/asm-arm/arch-at91/timex.h index a310698fb4da..f1933b0fa43f 100644 --- a/include/asm-arm/arch-at91/timex.h +++ b/include/asm-arm/arch-at91/timex.h | |||
@@ -42,6 +42,11 @@ | |||
42 | #define AT91SAM9_MASTER_CLOCK 100000000 | 42 | #define AT91SAM9_MASTER_CLOCK 100000000 |
43 | #define CLOCK_TICK_RATE (AT91SAM9_MASTER_CLOCK/16) | 43 | #define CLOCK_TICK_RATE (AT91SAM9_MASTER_CLOCK/16) |
44 | 44 | ||
45 | #elif defined(CONFIG_ARCH_AT91CAP9) | ||
46 | |||
47 | #define AT91CAP9_MASTER_CLOCK 100000000 | ||
48 | #define CLOCK_TICK_RATE (AT91CAP9_MASTER_CLOCK/16) | ||
49 | |||
45 | #elif defined(CONFIG_ARCH_AT91X40) | 50 | #elif defined(CONFIG_ARCH_AT91X40) |
46 | 51 | ||
47 | #define AT91X40_MASTER_CLOCK 40000000 | 52 | #define AT91X40_MASTER_CLOCK 40000000 |
diff --git a/include/asm-arm/arch-ep93xx/gpio.h b/include/asm-arm/arch-ep93xx/gpio.h index 1ee14a14cba0..9b1864bbd9a8 100644 --- a/include/asm-arm/arch-ep93xx/gpio.h +++ b/include/asm-arm/arch-ep93xx/gpio.h | |||
@@ -5,16 +5,6 @@ | |||
5 | #ifndef __ASM_ARCH_GPIO_H | 5 | #ifndef __ASM_ARCH_GPIO_H |
6 | #define __ASM_ARCH_GPIO_H | 6 | #define __ASM_ARCH_GPIO_H |
7 | 7 | ||
8 | #define GPIO_IN 0 | ||
9 | #define GPIO_OUT 1 | ||
10 | |||
11 | #define EP93XX_GPIO_LOW 0 | ||
12 | #define EP93XX_GPIO_HIGH 1 | ||
13 | |||
14 | extern void gpio_line_config(int line, int direction); | ||
15 | extern int gpio_line_get(int line); | ||
16 | extern void gpio_line_set(int line, int value); | ||
17 | |||
18 | /* GPIO port A. */ | 8 | /* GPIO port A. */ |
19 | #define EP93XX_GPIO_LINE_A(x) ((x) + 0) | 9 | #define EP93XX_GPIO_LINE_A(x) ((x) + 0) |
20 | #define EP93XX_GPIO_LINE_EGPIO0 EP93XX_GPIO_LINE_A(0) | 10 | #define EP93XX_GPIO_LINE_EGPIO0 EP93XX_GPIO_LINE_A(0) |
@@ -38,7 +28,7 @@ extern void gpio_line_set(int line, int value); | |||
38 | #define EP93XX_GPIO_LINE_EGPIO15 EP93XX_GPIO_LINE_B(7) | 28 | #define EP93XX_GPIO_LINE_EGPIO15 EP93XX_GPIO_LINE_B(7) |
39 | 29 | ||
40 | /* GPIO port C. */ | 30 | /* GPIO port C. */ |
41 | #define EP93XX_GPIO_LINE_C(x) ((x) + 16) | 31 | #define EP93XX_GPIO_LINE_C(x) ((x) + 40) |
42 | #define EP93XX_GPIO_LINE_ROW0 EP93XX_GPIO_LINE_C(0) | 32 | #define EP93XX_GPIO_LINE_ROW0 EP93XX_GPIO_LINE_C(0) |
43 | #define EP93XX_GPIO_LINE_ROW1 EP93XX_GPIO_LINE_C(1) | 33 | #define EP93XX_GPIO_LINE_ROW1 EP93XX_GPIO_LINE_C(1) |
44 | #define EP93XX_GPIO_LINE_ROW2 EP93XX_GPIO_LINE_C(2) | 34 | #define EP93XX_GPIO_LINE_ROW2 EP93XX_GPIO_LINE_C(2) |
@@ -71,7 +61,7 @@ extern void gpio_line_set(int line, int value); | |||
71 | #define EP93XX_GPIO_LINE_IDEDA2 EP93XX_GPIO_LINE_E(7) | 61 | #define EP93XX_GPIO_LINE_IDEDA2 EP93XX_GPIO_LINE_E(7) |
72 | 62 | ||
73 | /* GPIO port F. */ | 63 | /* GPIO port F. */ |
74 | #define EP93XX_GPIO_LINE_F(x) ((x) + 40) | 64 | #define EP93XX_GPIO_LINE_F(x) ((x) + 16) |
75 | #define EP93XX_GPIO_LINE_WP EP93XX_GPIO_LINE_F(0) | 65 | #define EP93XX_GPIO_LINE_WP EP93XX_GPIO_LINE_F(0) |
76 | #define EP93XX_GPIO_LINE_MCCD1 EP93XX_GPIO_LINE_F(1) | 66 | #define EP93XX_GPIO_LINE_MCCD1 EP93XX_GPIO_LINE_F(1) |
77 | #define EP93XX_GPIO_LINE_MCCD2 EP93XX_GPIO_LINE_F(2) | 67 | #define EP93XX_GPIO_LINE_MCCD2 EP93XX_GPIO_LINE_F(2) |
@@ -103,5 +93,49 @@ extern void gpio_line_set(int line, int value); | |||
103 | #define EP93XX_GPIO_LINE_DD6 EP93XX_GPIO_LINE_H(6) | 93 | #define EP93XX_GPIO_LINE_DD6 EP93XX_GPIO_LINE_H(6) |
104 | #define EP93XX_GPIO_LINE_DD7 EP93XX_GPIO_LINE_H(7) | 94 | #define EP93XX_GPIO_LINE_DD7 EP93XX_GPIO_LINE_H(7) |
105 | 95 | ||
96 | /* maximum value for gpio line identifiers */ | ||
97 | #define EP93XX_GPIO_LINE_MAX EP93XX_GPIO_LINE_H(7) | ||
98 | |||
99 | /* maximum value for irq capable line identifiers */ | ||
100 | #define EP93XX_GPIO_LINE_MAX_IRQ EP93XX_GPIO_LINE_F(7) | ||
101 | |||
102 | /* new generic GPIO API - see Documentation/gpio.txt */ | ||
103 | |||
104 | static inline int gpio_request(unsigned gpio, const char *label) | ||
105 | { | ||
106 | if (gpio > EP93XX_GPIO_LINE_MAX) | ||
107 | return -EINVAL; | ||
108 | return 0; | ||
109 | } | ||
110 | |||
111 | static inline void gpio_free(unsigned gpio) | ||
112 | { | ||
113 | } | ||
114 | |||
115 | int gpio_direction_input(unsigned gpio); | ||
116 | int gpio_direction_output(unsigned gpio, int value); | ||
117 | int gpio_get_value(unsigned gpio); | ||
118 | void gpio_set_value(unsigned gpio, int value); | ||
119 | |||
120 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | ||
121 | |||
122 | /* | ||
123 | * Map GPIO A0..A7 (0..7) to irq 64..71, | ||
124 | * B0..B7 (7..15) to irq 72..79, and | ||
125 | * F0..F7 (16..24) to irq 80..87. | ||
126 | */ | ||
127 | |||
128 | static inline int gpio_to_irq(unsigned gpio) | ||
129 | { | ||
130 | if (gpio <= EP93XX_GPIO_LINE_MAX_IRQ) | ||
131 | return 64 + gpio; | ||
132 | |||
133 | return -EINVAL; | ||
134 | } | ||
135 | |||
136 | static inline int irq_to_gpio(unsigned irq) | ||
137 | { | ||
138 | return irq - gpio_to_irq(0); | ||
139 | } | ||
106 | 140 | ||
107 | #endif | 141 | #endif |
diff --git a/include/asm-arm/arch-ep93xx/irqs.h b/include/asm-arm/arch-ep93xx/irqs.h index 2a8c63638c5e..53d4a68bfc88 100644 --- a/include/asm-arm/arch-ep93xx/irqs.h +++ b/include/asm-arm/arch-ep93xx/irqs.h | |||
@@ -67,12 +67,6 @@ | |||
67 | #define IRQ_EP93XX_SAI 60 | 67 | #define IRQ_EP93XX_SAI 60 |
68 | #define EP93XX_VIC2_VALID_IRQ_MASK 0x1fffffff | 68 | #define EP93XX_VIC2_VALID_IRQ_MASK 0x1fffffff |
69 | 69 | ||
70 | /* | ||
71 | * Map GPIO A0..A7 to irq 64..71, B0..B7 to 72..79, and | ||
72 | * F0..F7 to 80..87. | ||
73 | */ | ||
74 | #define IRQ_EP93XX_GPIO(x) (64 + (((x) + (((x) >> 2) & 8)) & 0x1f)) | ||
75 | |||
76 | #define NR_EP93XX_IRQS (64 + 24) | 70 | #define NR_EP93XX_IRQS (64 + 24) |
77 | 71 | ||
78 | #define EP93XX_BOARD_IRQ(x) (NR_EP93XX_IRQS + (x)) | 72 | #define EP93XX_BOARD_IRQ(x) (NR_EP93XX_IRQS + (x)) |
diff --git a/include/asm-arm/arch-ixp4xx/io.h b/include/asm-arm/arch-ixp4xx/io.h index eeeea90cd5a9..9c5d2357aff3 100644 --- a/include/asm-arm/arch-ixp4xx/io.h +++ b/include/asm-arm/arch-ixp4xx/io.h | |||
@@ -61,13 +61,13 @@ __ixp4xx_ioremap(unsigned long addr, size_t size, unsigned int mtype) | |||
61 | if((addr < PCIBIOS_MIN_MEM) || (addr > 0x4fffffff)) | 61 | if((addr < PCIBIOS_MIN_MEM) || (addr > 0x4fffffff)) |
62 | return __arm_ioremap(addr, size, mtype); | 62 | return __arm_ioremap(addr, size, mtype); |
63 | 63 | ||
64 | return (void *)addr; | 64 | return (void __iomem *)addr; |
65 | } | 65 | } |
66 | 66 | ||
67 | static inline void | 67 | static inline void |
68 | __ixp4xx_iounmap(void __iomem *addr) | 68 | __ixp4xx_iounmap(void __iomem *addr) |
69 | { | 69 | { |
70 | if ((u32)addr >= VMALLOC_START) | 70 | if ((__force u32)addr >= VMALLOC_START) |
71 | __iounmap(addr); | 71 | __iounmap(addr); |
72 | } | 72 | } |
73 | 73 | ||
@@ -141,9 +141,9 @@ __ixp4xx_writesw(volatile void __iomem *bus_addr, const u16 *vaddr, int count) | |||
141 | static inline void | 141 | static inline void |
142 | __ixp4xx_writel(u32 value, volatile void __iomem *p) | 142 | __ixp4xx_writel(u32 value, volatile void __iomem *p) |
143 | { | 143 | { |
144 | u32 addr = (u32)p; | 144 | u32 addr = (__force u32)p; |
145 | if (addr >= VMALLOC_START) { | 145 | if (addr >= VMALLOC_START) { |
146 | __raw_writel(value, addr); | 146 | __raw_writel(value, p); |
147 | return; | 147 | return; |
148 | } | 148 | } |
149 | 149 | ||
@@ -208,11 +208,11 @@ __ixp4xx_readsw(const volatile void __iomem *bus_addr, u16 *vaddr, u32 count) | |||
208 | static inline unsigned long | 208 | static inline unsigned long |
209 | __ixp4xx_readl(const volatile void __iomem *p) | 209 | __ixp4xx_readl(const volatile void __iomem *p) |
210 | { | 210 | { |
211 | u32 addr = (u32)p; | 211 | u32 addr = (__force u32)p; |
212 | u32 data; | 212 | u32 data; |
213 | 213 | ||
214 | if (addr >= VMALLOC_START) | 214 | if (addr >= VMALLOC_START) |
215 | return __raw_readl(addr); | 215 | return __raw_readl(p); |
216 | 216 | ||
217 | if (ixp4xx_pci_read(addr, NP_CMD_MEMREAD, &data)) | 217 | if (ixp4xx_pci_read(addr, NP_CMD_MEMREAD, &data)) |
218 | return 0xffffffff; | 218 | return 0xffffffff; |
@@ -438,7 +438,7 @@ __ixp4xx_ioread32(const void __iomem *addr) | |||
438 | return (unsigned int)__ixp4xx_inl(port & PIO_MASK); | 438 | return (unsigned int)__ixp4xx_inl(port & PIO_MASK); |
439 | else { | 439 | else { |
440 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 440 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
441 | return le32_to_cpu(__raw_readl((u32)port)); | 441 | return le32_to_cpu((__force __le32)__raw_readl(addr)); |
442 | #else | 442 | #else |
443 | return (unsigned int)__ixp4xx_readl(addr); | 443 | return (unsigned int)__ixp4xx_readl(addr); |
444 | #endif | 444 | #endif |
@@ -523,7 +523,7 @@ __ixp4xx_iowrite32(u32 value, void __iomem *addr) | |||
523 | __ixp4xx_outl(value, port & PIO_MASK); | 523 | __ixp4xx_outl(value, port & PIO_MASK); |
524 | else | 524 | else |
525 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 525 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
526 | __raw_writel(cpu_to_le32(value), port); | 526 | __raw_writel((u32 __force)cpu_to_le32(value), addr); |
527 | #else | 527 | #else |
528 | __ixp4xx_writel(value, addr); | 528 | __ixp4xx_writel(value, addr); |
529 | #endif | 529 | #endif |
diff --git a/include/asm-arm/arch-ixp4xx/platform.h b/include/asm-arm/arch-ixp4xx/platform.h index 2a44d3d67980..2ce28e3fd325 100644 --- a/include/asm-arm/arch-ixp4xx/platform.h +++ b/include/asm-arm/arch-ixp4xx/platform.h | |||
@@ -76,17 +76,6 @@ extern unsigned long ixp4xx_exp_bus_size; | |||
76 | #define IXP4XX_UART_XTAL 14745600 | 76 | #define IXP4XX_UART_XTAL 14745600 |
77 | 77 | ||
78 | /* | 78 | /* |
79 | * The IXP4xx chips do not have an I2C unit, so GPIO lines are just | ||
80 | * used to | ||
81 | * Used as platform_data to provide GPIO pin information to the ixp42x | ||
82 | * I2C driver. | ||
83 | */ | ||
84 | struct ixp4xx_i2c_pins { | ||
85 | unsigned long sda_pin; | ||
86 | unsigned long scl_pin; | ||
87 | }; | ||
88 | |||
89 | /* | ||
90 | * This structure provide a means for the board setup code | 79 | * This structure provide a means for the board setup code |
91 | * to give information to th pata_ixp4xx driver. It is | 80 | * to give information to th pata_ixp4xx driver. It is |
92 | * passed as platform_data. | 81 | * passed as platform_data. |
diff --git a/include/asm-arm/arch-msm/board.h b/include/asm-arm/arch-msm/board.h new file mode 100644 index 000000000000..763051f8ba14 --- /dev/null +++ b/include/asm-arm/arch-msm/board.h | |||
@@ -0,0 +1,37 @@ | |||
1 | /* linux/include/asm-arm/arch-msm/board.h | ||
2 | * | ||
3 | * Copyright (C) 2007 Google, Inc. | ||
4 | * Author: Brian Swetland <swetland@google.com> | ||
5 | * | ||
6 | * This software is licensed under the terms of the GNU General Public | ||
7 | * License version 2, as published by the Free Software Foundation, and | ||
8 | * may be copied, distributed, and modified under those terms. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | */ | ||
16 | |||
17 | #ifndef __ASM_ARCH_MSM_BOARD_H | ||
18 | #define __ASM_ARCH_MSM_BOARD_H | ||
19 | |||
20 | #include <linux/types.h> | ||
21 | |||
22 | /* platform device data structures */ | ||
23 | |||
24 | struct msm_mddi_platform_data | ||
25 | { | ||
26 | void (*panel_power)(int on); | ||
27 | unsigned has_vsync_irq:1; | ||
28 | }; | ||
29 | |||
30 | /* common init routines for use by arch/arm/mach-msm/board-*.c */ | ||
31 | |||
32 | void __init msm_add_devices(void); | ||
33 | void __init msm_map_common_io(void); | ||
34 | void __init msm_init_irq(void); | ||
35 | void __init msm_init_gpio(void); | ||
36 | |||
37 | #endif | ||
diff --git a/include/asm-arm/arch-msm/debug-macro.S b/include/asm-arm/arch-msm/debug-macro.S new file mode 100644 index 000000000000..393d5272e506 --- /dev/null +++ b/include/asm-arm/arch-msm/debug-macro.S | |||
@@ -0,0 +1,40 @@ | |||
1 | /* include/asm-arm/arch-msm7200/debug-macro.S | ||
2 | * | ||
3 | * Copyright (C) 2007 Google, Inc. | ||
4 | * Author: Brian Swetland <swetland@google.com> | ||
5 | * | ||
6 | * This software is licensed under the terms of the GNU General Public | ||
7 | * License version 2, as published by the Free Software Foundation, and | ||
8 | * may be copied, distributed, and modified under those terms. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | */ | ||
16 | |||
17 | #include <asm/hardware.h> | ||
18 | #include <asm/arch/msm_iomap.h> | ||
19 | |||
20 | .macro addruart,rx | ||
21 | @ see if the MMU is enabled and select appropriate base address | ||
22 | mrc p15, 0, \rx, c1, c0 | ||
23 | tst \rx, #1 | ||
24 | ldreq \rx, =MSM_UART1_PHYS | ||
25 | ldrne \rx, =MSM_UART1_BASE | ||
26 | .endm | ||
27 | |||
28 | .macro senduart,rd,rx | ||
29 | str \rd, [\rx, #0x0C] | ||
30 | .endm | ||
31 | |||
32 | .macro waituart,rd,rx | ||
33 | @ wait for TX_READY | ||
34 | 1: ldr \rd, [\rx, #0x08] | ||
35 | tst \rd, #0x04 | ||
36 | beq 1b | ||
37 | .endm | ||
38 | |||
39 | .macro busyuart,rd,rx | ||
40 | .endm | ||
diff --git a/include/asm-arm/arch-msm/dma.h b/include/asm-arm/arch-msm/dma.h new file mode 100644 index 000000000000..e4b565b27b35 --- /dev/null +++ b/include/asm-arm/arch-msm/dma.h | |||
@@ -0,0 +1,151 @@ | |||
1 | /* linux/include/asm-arm/arch-msm/dma.h | ||
2 | * | ||
3 | * Copyright (C) 2007 Google, Inc. | ||
4 | * | ||
5 | * This software is licensed under the terms of the GNU General Public | ||
6 | * License version 2, as published by the Free Software Foundation, and | ||
7 | * may be copied, distributed, and modified under those terms. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | #ifndef __ASM_ARCH_MSM_DMA_H | ||
17 | |||
18 | #include <linux/list.h> | ||
19 | #include <asm/arch/msm_iomap.h> | ||
20 | |||
21 | struct msm_dmov_cmd { | ||
22 | struct list_head list; | ||
23 | unsigned int cmdptr; | ||
24 | void (*complete_func)(struct msm_dmov_cmd *cmd, unsigned int result); | ||
25 | /* void (*user_result_func)(struct msm_dmov_cmd *cmd); */ | ||
26 | }; | ||
27 | |||
28 | void msm_dmov_enqueue_cmd(unsigned id, struct msm_dmov_cmd *cmd); | ||
29 | void msm_dmov_stop_cmd(unsigned id, struct msm_dmov_cmd *cmd); | ||
30 | int msm_dmov_exec_cmd(unsigned id, unsigned int cmdptr); | ||
31 | /* int msm_dmov_exec_cmd_etc(unsigned id, unsigned int cmdptr, int timeout, int interruptible); */ | ||
32 | |||
33 | |||
34 | |||
35 | #define DMOV_SD0(off, ch) (MSM_DMOV_BASE + 0x0000 + (off) + ((ch) << 2)) | ||
36 | #define DMOV_SD1(off, ch) (MSM_DMOV_BASE + 0x0400 + (off) + ((ch) << 2)) | ||
37 | #define DMOV_SD2(off, ch) (MSM_DMOV_BASE + 0x0800 + (off) + ((ch) << 2)) | ||
38 | #define DMOV_SD3(off, ch) (MSM_DMOV_BASE + 0x0C00 + (off) + ((ch) << 2)) | ||
39 | |||
40 | /* only security domain 3 is available to the ARM11 | ||
41 | * SD0 -> mARM trusted, SD1 -> mARM nontrusted, SD2 -> aDSP, SD3 -> aARM | ||
42 | */ | ||
43 | |||
44 | #define DMOV_CMD_PTR(ch) DMOV_SD3(0x000, ch) | ||
45 | #define DMOV_CMD_LIST (0 << 29) /* does not work */ | ||
46 | #define DMOV_CMD_PTR_LIST (1 << 29) /* works */ | ||
47 | #define DMOV_CMD_INPUT_CFG (2 << 29) /* untested */ | ||
48 | #define DMOV_CMD_OUTPUT_CFG (3 << 29) /* untested */ | ||
49 | #define DMOV_CMD_ADDR(addr) ((addr) >> 3) | ||
50 | |||
51 | #define DMOV_RSLT(ch) DMOV_SD3(0x040, ch) | ||
52 | #define DMOV_RSLT_VALID (1 << 31) /* 0 == host has empties result fifo */ | ||
53 | #define DMOV_RSLT_ERROR (1 << 3) | ||
54 | #define DMOV_RSLT_FLUSH (1 << 2) | ||
55 | #define DMOV_RSLT_DONE (1 << 1) /* top pointer done */ | ||
56 | #define DMOV_RSLT_USER (1 << 0) /* command with FR force result */ | ||
57 | |||
58 | #define DMOV_FLUSH0(ch) DMOV_SD3(0x080, ch) | ||
59 | #define DMOV_FLUSH1(ch) DMOV_SD3(0x0C0, ch) | ||
60 | #define DMOV_FLUSH2(ch) DMOV_SD3(0x100, ch) | ||
61 | #define DMOV_FLUSH3(ch) DMOV_SD3(0x140, ch) | ||
62 | #define DMOV_FLUSH4(ch) DMOV_SD3(0x180, ch) | ||
63 | #define DMOV_FLUSH5(ch) DMOV_SD3(0x1C0, ch) | ||
64 | |||
65 | #define DMOV_STATUS(ch) DMOV_SD3(0x200, ch) | ||
66 | #define DMOV_STATUS_RSLT_COUNT(n) (((n) >> 29)) | ||
67 | #define DMOV_STATUS_CMD_COUNT(n) (((n) >> 27) & 3) | ||
68 | #define DMOV_STATUS_RSLT_VALID (1 << 1) | ||
69 | #define DMOV_STATUS_CMD_PTR_RDY (1 << 0) | ||
70 | |||
71 | #define DMOV_ISR DMOV_SD3(0x380, 0) | ||
72 | |||
73 | #define DMOV_CONFIG(ch) DMOV_SD3(0x300, ch) | ||
74 | #define DMOV_CONFIG_FORCE_TOP_PTR_RSLT (1 << 2) | ||
75 | #define DMOV_CONFIG_FORCE_FLUSH_RSLT (1 << 1) | ||
76 | #define DMOV_CONFIG_IRQ_EN (1 << 0) | ||
77 | |||
78 | /* channel assignments */ | ||
79 | |||
80 | #define DMOV_NAND_CHAN 7 | ||
81 | #define DMOV_NAND_CRCI_CMD 5 | ||
82 | #define DMOV_NAND_CRCI_DATA 4 | ||
83 | |||
84 | #define DMOV_SDC1_CHAN 8 | ||
85 | #define DMOV_SDC1_CRCI 6 | ||
86 | |||
87 | #define DMOV_SDC2_CHAN 8 | ||
88 | #define DMOV_SDC2_CRCI 7 | ||
89 | |||
90 | #define DMOV_TSIF_CHAN 10 | ||
91 | #define DMOV_TSIF_CRCI 10 | ||
92 | |||
93 | #define DMOV_USB_CHAN 11 | ||
94 | |||
95 | /* no client rate control ifc (eg, ram) */ | ||
96 | #define DMOV_NONE_CRCI 0 | ||
97 | |||
98 | |||
99 | /* If the CMD_PTR register has CMD_PTR_LIST selected, the data mover | ||
100 | * is going to walk a list of 32bit pointers as described below. Each | ||
101 | * pointer points to a *array* of dmov_s, etc structs. The last pointer | ||
102 | * in the list is marked with CMD_PTR_LP. The last struct in each array | ||
103 | * is marked with CMD_LC (see below). | ||
104 | */ | ||
105 | #define CMD_PTR_ADDR(addr) ((addr) >> 3) | ||
106 | #define CMD_PTR_LP (1 << 31) /* last pointer */ | ||
107 | #define CMD_PTR_PT (3 << 29) /* ? */ | ||
108 | |||
109 | /* Single Item Mode */ | ||
110 | typedef struct { | ||
111 | unsigned cmd; | ||
112 | unsigned src; | ||
113 | unsigned dst; | ||
114 | unsigned len; | ||
115 | } dmov_s; | ||
116 | |||
117 | /* Scatter/Gather Mode */ | ||
118 | typedef struct { | ||
119 | unsigned cmd; | ||
120 | unsigned src_dscr; | ||
121 | unsigned dst_dscr; | ||
122 | unsigned _reserved; | ||
123 | } dmov_sg; | ||
124 | |||
125 | /* bits for the cmd field of the above structures */ | ||
126 | |||
127 | #define CMD_LC (1 << 31) /* last command */ | ||
128 | #define CMD_FR (1 << 22) /* force result -- does not work? */ | ||
129 | #define CMD_OCU (1 << 21) /* other channel unblock */ | ||
130 | #define CMD_OCB (1 << 20) /* other channel block */ | ||
131 | #define CMD_TCB (1 << 19) /* ? */ | ||
132 | #define CMD_DAH (1 << 18) /* destination address hold -- does not work?*/ | ||
133 | #define CMD_SAH (1 << 17) /* source address hold -- does not work? */ | ||
134 | |||
135 | #define CMD_MODE_SINGLE (0 << 0) /* dmov_s structure used */ | ||
136 | #define CMD_MODE_SG (1 << 0) /* untested */ | ||
137 | #define CMD_MODE_IND_SG (2 << 0) /* untested */ | ||
138 | #define CMD_MODE_BOX (3 << 0) /* untested */ | ||
139 | |||
140 | #define CMD_DST_SWAP_BYTES (1 << 14) /* exchange each byte n with byte n+1 */ | ||
141 | #define CMD_DST_SWAP_SHORTS (1 << 15) /* exchange each short n with short n+1 */ | ||
142 | #define CMD_DST_SWAP_WORDS (1 << 16) /* exchange each word n with word n+1 */ | ||
143 | |||
144 | #define CMD_SRC_SWAP_BYTES (1 << 11) /* exchange each byte n with byte n+1 */ | ||
145 | #define CMD_SRC_SWAP_SHORTS (1 << 12) /* exchange each short n with short n+1 */ | ||
146 | #define CMD_SRC_SWAP_WORDS (1 << 13) /* exchange each word n with word n+1 */ | ||
147 | |||
148 | #define CMD_DST_CRCI(n) (((n) & 15) << 7) | ||
149 | #define CMD_SRC_CRCI(n) (((n) & 15) << 3) | ||
150 | |||
151 | #endif | ||
diff --git a/include/asm-arm/arch-msm/entry-macro.S b/include/asm-arm/arch-msm/entry-macro.S new file mode 100644 index 000000000000..ee24aece4cb0 --- /dev/null +++ b/include/asm-arm/arch-msm/entry-macro.S | |||
@@ -0,0 +1,38 @@ | |||
1 | /* include/asm-arm/arch-msm7200/entry-macro.S | ||
2 | * | ||
3 | * Copyright (C) 2007 Google, Inc. | ||
4 | * Author: Brian Swetland <swetland@google.com> | ||
5 | * | ||
6 | * This software is licensed under the terms of the GNU General Public | ||
7 | * License version 2, as published by the Free Software Foundation, and | ||
8 | * may be copied, distributed, and modified under those terms. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | */ | ||
16 | |||
17 | #include <asm/arch/msm_iomap.h> | ||
18 | |||
19 | .macro disable_fiq | ||
20 | .endm | ||
21 | |||
22 | .macro get_irqnr_preamble, base, tmp | ||
23 | @ enable imprecise aborts | ||
24 | cpsie a | ||
25 | mov \base, #MSM_VIC_BASE | ||
26 | .endm | ||
27 | |||
28 | .macro arch_ret_to_user, tmp1, tmp2 | ||
29 | .endm | ||
30 | |||
31 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
32 | @ 0xD0 has irq# or old irq# if the irq has been handled | ||
33 | @ 0xD4 has irq# or -1 if none pending *but* if you just | ||
34 | @ read 0xD4 you never get the first irq for some reason | ||
35 | ldr \irqnr, [\base, #0xD0] | ||
36 | ldr \irqnr, [\base, #0xD4] | ||
37 | cmp \irqnr, #0xffffffff | ||
38 | .endm | ||
diff --git a/include/asm-arm/arch-msm/hardware.h b/include/asm-arm/arch-msm/hardware.h new file mode 100644 index 000000000000..89af2b70182f --- /dev/null +++ b/include/asm-arm/arch-msm/hardware.h | |||
@@ -0,0 +1,18 @@ | |||
1 | /* linux/include/asm-arm/arch-msm/hardware.h | ||
2 | * | ||
3 | * Copyright (C) 2007 Google, Inc. | ||
4 | * | ||
5 | * This software is licensed under the terms of the GNU General Public | ||
6 | * License version 2, as published by the Free Software Foundation, and | ||
7 | * may be copied, distributed, and modified under those terms. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | #ifndef __ASM_ARCH_MSM_HARDWARE_H | ||
17 | |||
18 | #endif | ||
diff --git a/include/asm-arm/arch-msm/io.h b/include/asm-arm/arch-msm/io.h new file mode 100644 index 000000000000..4645ae26b62a --- /dev/null +++ b/include/asm-arm/arch-msm/io.h | |||
@@ -0,0 +1,33 @@ | |||
1 | /* include/asm-arm/arch-msm/io.h | ||
2 | * | ||
3 | * Copyright (C) 2007 Google, Inc. | ||
4 | * | ||
5 | * This software is licensed under the terms of the GNU General Public | ||
6 | * License version 2, as published by the Free Software Foundation, and | ||
7 | * may be copied, distributed, and modified under those terms. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | #ifndef __ASM_ARM_ARCH_IO_H | ||
17 | #define __ASM_ARM_ARCH_IO_H | ||
18 | |||
19 | #define IO_SPACE_LIMIT 0xffffffff | ||
20 | |||
21 | #define __arch_ioremap __msm_ioremap | ||
22 | #define __arch_iounmap __iounmap | ||
23 | |||
24 | void __iomem *__msm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype); | ||
25 | |||
26 | static inline void __iomem *__io(unsigned long addr) | ||
27 | { | ||
28 | return (void __iomem *)addr; | ||
29 | } | ||
30 | #define __io(a) __io(a) | ||
31 | #define __mem_pci(a) (a) | ||
32 | |||
33 | #endif | ||
diff --git a/include/asm-arm/arch-msm/irqs.h b/include/asm-arm/arch-msm/irqs.h new file mode 100644 index 000000000000..565430cfaa7e --- /dev/null +++ b/include/asm-arm/arch-msm/irqs.h | |||
@@ -0,0 +1,89 @@ | |||
1 | /* linux/include/asm-arm/arch-msm/irqs.h | ||
2 | * | ||
3 | * Copyright (C) 2007 Google, Inc. | ||
4 | * Author: Brian Swetland <swetland@google.com> | ||
5 | * | ||
6 | * This software is licensed under the terms of the GNU General Public | ||
7 | * License version 2, as published by the Free Software Foundation, and | ||
8 | * may be copied, distributed, and modified under those terms. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | */ | ||
16 | |||
17 | #ifndef __ASM_ARCH_MSM_IRQS_H | ||
18 | |||
19 | /* MSM ARM11 Interrupt Numbers */ | ||
20 | /* See 80-VE113-1 A, pp219-221 */ | ||
21 | |||
22 | #define INT_A9_M2A_0 0 | ||
23 | #define INT_A9_M2A_1 1 | ||
24 | #define INT_A9_M2A_2 2 | ||
25 | #define INT_A9_M2A_3 3 | ||
26 | #define INT_A9_M2A_4 4 | ||
27 | #define INT_A9_M2A_5 5 | ||
28 | #define INT_A9_M2A_6 6 | ||
29 | #define INT_GP_TIMER_EXP 7 | ||
30 | #define INT_DEBUG_TIMER_EXP 8 | ||
31 | #define INT_UART1 9 | ||
32 | #define INT_UART2 10 | ||
33 | #define INT_UART3 11 | ||
34 | #define INT_UART1_RX 12 | ||
35 | #define INT_UART2_RX 13 | ||
36 | #define INT_UART3_RX 14 | ||
37 | #define INT_USB_OTG 15 | ||
38 | #define INT_MDDI_PRI 16 | ||
39 | #define INT_MDDI_EXT 17 | ||
40 | #define INT_MDDI_CLIENT 18 | ||
41 | #define INT_MDP 19 | ||
42 | #define INT_GRAPHICS 20 | ||
43 | #define INT_ADM_AARM 21 | ||
44 | #define INT_ADSP_A11 22 | ||
45 | #define INT_ADSP_A9_A11 23 | ||
46 | #define INT_SDC1_0 24 | ||
47 | #define INT_SDC1_1 25 | ||
48 | #define INT_SDC2_0 26 | ||
49 | #define INT_SDC2_1 27 | ||
50 | #define INT_KEYSENSE 28 | ||
51 | #define INT_TCHSCRN_SSBI 29 | ||
52 | #define INT_TCHSCRN1 30 | ||
53 | #define INT_TCHSCRN2 31 | ||
54 | |||
55 | #define INT_GPIO_GROUP1 (32 + 0) | ||
56 | #define INT_GPIO_GROUP2 (32 + 1) | ||
57 | #define INT_PWB_I2C (32 + 2) | ||
58 | #define INT_SOFTRESET (32 + 3) | ||
59 | #define INT_NAND_WR_ER_DONE (32 + 4) | ||
60 | #define INT_NAND_OP_DONE (32 + 5) | ||
61 | #define INT_PBUS_ARM11 (32 + 6) | ||
62 | #define INT_AXI_MPU_SMI (32 + 7) | ||
63 | #define INT_AXI_MPU_EBI1 (32 + 8) | ||
64 | #define INT_AD_HSSD (32 + 9) | ||
65 | #define INT_ARM11_PMU (32 + 10) | ||
66 | #define INT_ARM11_DMA (32 + 11) | ||
67 | #define INT_TSIF_IRQ (32 + 12) | ||
68 | #define INT_UART1DM_IRQ (32 + 13) | ||
69 | #define INT_UART1DM_RX (32 + 14) | ||
70 | #define INT_USB_HS (32 + 15) | ||
71 | #define INT_SDC3_0 (32 + 16) | ||
72 | #define INT_SDC3_1 (32 + 17) | ||
73 | #define INT_SDC4_0 (32 + 18) | ||
74 | #define INT_SDC4_1 (32 + 19) | ||
75 | #define INT_UART2DM_RX (32 + 20) | ||
76 | #define INT_UART2DM_IRQ (32 + 21) | ||
77 | |||
78 | /* 22-31 are reserved */ | ||
79 | |||
80 | #define MSM_IRQ_BIT(irq) (1 << ((irq) & 31)) | ||
81 | |||
82 | #define NR_MSM_IRQS 64 | ||
83 | #define NR_GPIO_IRQS 122 | ||
84 | #define NR_BOARD_IRQS 64 | ||
85 | #define NR_IRQS (NR_MSM_IRQS + NR_GPIO_IRQS + NR_BOARD_IRQS) | ||
86 | |||
87 | #define MSM_GPIO_TO_INT(n) (NR_MSM_IRQS + (n)) | ||
88 | |||
89 | #endif | ||
diff --git a/include/asm-arm/arch-msm/memory.h b/include/asm-arm/arch-msm/memory.h new file mode 100644 index 000000000000..b5ce0e9ac86d --- /dev/null +++ b/include/asm-arm/arch-msm/memory.h | |||
@@ -0,0 +1,27 @@ | |||
1 | /* linux/include/asm-arm/arch-msm/memory.h | ||
2 | * | ||
3 | * Copyright (C) 2007 Google, Inc. | ||
4 | * | ||
5 | * This software is licensed under the terms of the GNU General Public | ||
6 | * License version 2, as published by the Free Software Foundation, and | ||
7 | * may be copied, distributed, and modified under those terms. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | #ifndef __ASM_ARCH_MEMORY_H | ||
17 | #define __ASM_ARCH_MEMORY_H | ||
18 | |||
19 | /* physical offset of RAM */ | ||
20 | #define PHYS_OFFSET UL(0x10000000) | ||
21 | |||
22 | /* bus address and physical addresses are identical */ | ||
23 | #define __virt_to_bus(x) __virt_to_phys(x) | ||
24 | #define __bus_to_virt(x) __phys_to_virt(x) | ||
25 | |||
26 | #endif | ||
27 | |||
diff --git a/include/asm-arm/arch-msm/msm_iomap.h b/include/asm-arm/arch-msm/msm_iomap.h new file mode 100644 index 000000000000..b8955cc26fec --- /dev/null +++ b/include/asm-arm/arch-msm/msm_iomap.h | |||
@@ -0,0 +1,104 @@ | |||
1 | /* linux/include/asm-arm/arch-msm/msm_iomap.h | ||
2 | * | ||
3 | * Copyright (C) 2007 Google, Inc. | ||
4 | * Author: Brian Swetland <swetland@google.com> | ||
5 | * | ||
6 | * This software is licensed under the terms of the GNU General Public | ||
7 | * License version 2, as published by the Free Software Foundation, and | ||
8 | * may be copied, distributed, and modified under those terms. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * | ||
16 | * The MSM peripherals are spread all over across 768MB of physical | ||
17 | * space, which makes just having a simple IO_ADDRESS macro to slide | ||
18 | * them into the right virtual location rough. Instead, we will | ||
19 | * provide a master phys->virt mapping for peripherals here. | ||
20 | * | ||
21 | */ | ||
22 | |||
23 | #ifndef __ASM_ARCH_MSM_IOMAP_H | ||
24 | #define __ASM_ARCH_MSM_IOMAP_H | ||
25 | |||
26 | #include <asm/sizes.h> | ||
27 | |||
28 | /* Physical base address and size of peripherals. | ||
29 | * Ordered by the virtual base addresses they will be mapped at. | ||
30 | * | ||
31 | * MSM_VIC_BASE must be an value that can be loaded via a "mov" | ||
32 | * instruction, otherwise entry-macro.S will not compile. | ||
33 | * | ||
34 | * If you add or remove entries here, you'll want to edit the | ||
35 | * msm_io_desc array in arch/arm/mach-msm/io.c to reflect your | ||
36 | * changes. | ||
37 | * | ||
38 | */ | ||
39 | |||
40 | #define MSM_VIC_BASE 0xE0000000 | ||
41 | #define MSM_VIC_PHYS 0xC0000000 | ||
42 | #define MSM_VIC_SIZE SZ_4K | ||
43 | |||
44 | #define MSM_CSR_BASE 0xE0001000 | ||
45 | #define MSM_CSR_PHYS 0xC0100000 | ||
46 | #define MSM_CSR_SIZE SZ_4K | ||
47 | |||
48 | #define MSM_GPT_PHYS MSM_CSR_PHYS | ||
49 | #define MSM_GPT_BASE MSM_CSR_BASE | ||
50 | #define MSM_GPT_SIZE SZ_4K | ||
51 | |||
52 | #define MSM_DMOV_BASE 0xE0002000 | ||
53 | #define MSM_DMOV_PHYS 0xA9700000 | ||
54 | #define MSM_DMOV_SIZE SZ_4K | ||
55 | |||
56 | #define MSM_UART1_BASE 0xE0003000 | ||
57 | #define MSM_UART1_PHYS 0xA9A00000 | ||
58 | #define MSM_UART1_SIZE SZ_4K | ||
59 | |||
60 | #define MSM_UART2_BASE 0xE0004000 | ||
61 | #define MSM_UART2_PHYS 0xA9B00000 | ||
62 | #define MSM_UART2_SIZE SZ_4K | ||
63 | |||
64 | #define MSM_UART3_BASE 0xE0005000 | ||
65 | #define MSM_UART3_PHYS 0xA9C00000 | ||
66 | #define MSM_UART3_SIZE SZ_4K | ||
67 | |||
68 | #define MSM_I2C_BASE 0xE0006000 | ||
69 | #define MSM_I2C_PHYS 0xA9900000 | ||
70 | #define MSM_I2C_SIZE SZ_4K | ||
71 | |||
72 | #define MSM_GPIO1_BASE 0xE0007000 | ||
73 | #define MSM_GPIO1_PHYS 0xA9200000 | ||
74 | #define MSM_GPIO1_SIZE SZ_4K | ||
75 | |||
76 | #define MSM_GPIO2_BASE 0xE0008000 | ||
77 | #define MSM_GPIO2_PHYS 0xA9300000 | ||
78 | #define MSM_GPIO2_SIZE SZ_4K | ||
79 | |||
80 | #define MSM_HSUSB_BASE 0xE0009000 | ||
81 | #define MSM_HSUSB_PHYS 0xA0800000 | ||
82 | #define MSM_HSUSB_SIZE SZ_4K | ||
83 | |||
84 | #define MSM_CLK_CTL_BASE 0xE000A000 | ||
85 | #define MSM_CLK_CTL_PHYS 0xA8600000 | ||
86 | #define MSM_CLK_CTL_SIZE SZ_4K | ||
87 | |||
88 | #define MSM_PMDH_BASE 0xE000B000 | ||
89 | #define MSM_PMDH_PHYS 0xAA600000 | ||
90 | #define MSM_PMDH_SIZE SZ_4K | ||
91 | |||
92 | #define MSM_EMDH_BASE 0xE000C000 | ||
93 | #define MSM_EMDH_PHYS 0xAA700000 | ||
94 | #define MSM_EMDH_SIZE SZ_4K | ||
95 | |||
96 | #define MSM_MDP_BASE 0xE0010000 | ||
97 | #define MSM_MDP_PHYS 0xAA200000 | ||
98 | #define MSM_MDP_SIZE 0x000F0000 | ||
99 | |||
100 | #define MSM_SHARED_RAM_BASE 0xE0100000 | ||
101 | #define MSM_SHARED_RAM_PHYS 0x01F00000 | ||
102 | #define MSM_SHARED_RAM_SIZE SZ_1M | ||
103 | |||
104 | #endif | ||
diff --git a/include/asm-arm/arch-msm/system.h b/include/asm-arm/arch-msm/system.h new file mode 100644 index 000000000000..7c5544bdd0c7 --- /dev/null +++ b/include/asm-arm/arch-msm/system.h | |||
@@ -0,0 +1,23 @@ | |||
1 | /* linux/include/asm-arm/arch-msm/system.h | ||
2 | * | ||
3 | * Copyright (C) 2007 Google, Inc. | ||
4 | * | ||
5 | * This software is licensed under the terms of the GNU General Public | ||
6 | * License version 2, as published by the Free Software Foundation, and | ||
7 | * may be copied, distributed, and modified under those terms. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | #include <asm/hardware.h> | ||
17 | |||
18 | void arch_idle(void); | ||
19 | |||
20 | static inline void arch_reset(char mode) | ||
21 | { | ||
22 | for (;;) ; /* depends on IPC w/ other core */ | ||
23 | } | ||
diff --git a/include/asm-arm/arch-msm/timex.h b/include/asm-arm/arch-msm/timex.h new file mode 100644 index 000000000000..154b23fb3599 --- /dev/null +++ b/include/asm-arm/arch-msm/timex.h | |||
@@ -0,0 +1,20 @@ | |||
1 | /* linux/include/asm-arm/arch-msm/timex.h | ||
2 | * | ||
3 | * Copyright (C) 2007 Google, Inc. | ||
4 | * | ||
5 | * This software is licensed under the terms of the GNU General Public | ||
6 | * License version 2, as published by the Free Software Foundation, and | ||
7 | * may be copied, distributed, and modified under those terms. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | #ifndef __ASM_ARCH_MSM_TIMEX_H | ||
17 | |||
18 | #define CLOCK_TICK_RATE 1000000 | ||
19 | |||
20 | #endif | ||
diff --git a/include/asm-arm/arch-msm/uncompress.h b/include/asm-arm/arch-msm/uncompress.h new file mode 100644 index 000000000000..e91ed786ffec --- /dev/null +++ b/include/asm-arm/arch-msm/uncompress.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* linux/include/asm-arm/arch-msm/uncompress.h | ||
2 | * | ||
3 | * Copyright (C) 2007 Google, Inc. | ||
4 | * | ||
5 | * This software is licensed under the terms of the GNU General Public | ||
6 | * License version 2, as published by the Free Software Foundation, and | ||
7 | * may be copied, distributed, and modified under those terms. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | #ifndef __ASM_ARCH_MSM_UNCOMPRESS_H | ||
17 | |||
18 | #include "hardware.h" | ||
19 | |||
20 | static void putc(int c) | ||
21 | { | ||
22 | } | ||
23 | |||
24 | static inline void flush(void) | ||
25 | { | ||
26 | } | ||
27 | |||
28 | static inline void arch_decomp_setup(void) | ||
29 | { | ||
30 | } | ||
31 | |||
32 | static inline void arch_decomp_wdog(void) | ||
33 | { | ||
34 | } | ||
35 | |||
36 | #endif | ||
diff --git a/include/asm-arm/arch-msm/vmalloc.h b/include/asm-arm/arch-msm/vmalloc.h new file mode 100644 index 000000000000..60f8d910e825 --- /dev/null +++ b/include/asm-arm/arch-msm/vmalloc.h | |||
@@ -0,0 +1,22 @@ | |||
1 | /* linux/include/asm-arm/arch-msm/vmalloc.h | ||
2 | * | ||
3 | * Copyright (C) 2007 Google, Inc. | ||
4 | * | ||
5 | * This software is licensed under the terms of the GNU General Public | ||
6 | * License version 2, as published by the Free Software Foundation, and | ||
7 | * may be copied, distributed, and modified under those terms. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | #ifndef __ASM_ARCH_MSM_VMALLOC_H | ||
17 | #define __ASM_ARCH_MSM_VMALLOC_H | ||
18 | |||
19 | #define VMALLOC_END (PAGE_OFFSET + 0x10000000) | ||
20 | |||
21 | #endif | ||
22 | |||
diff --git a/include/asm-arm/arch-omap/tps65010.h b/include/asm-arm/arch-omap/tps65010.h deleted file mode 100644 index b9aa2b3a3909..000000000000 --- a/include/asm-arm/arch-omap/tps65010.h +++ /dev/null | |||
@@ -1,156 +0,0 @@ | |||
1 | /* linux/include/asm-arm/arch-omap/tps65010.h | ||
2 | * | ||
3 | * Functions to access TPS65010 power management device. | ||
4 | * | ||
5 | * Copyright (C) 2004 Dirk Behme <dirk.behme@de.bosch.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License as published by the | ||
9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
10 | * option) any later version. | ||
11 | * | ||
12 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | ||
13 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
14 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN | ||
15 | * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
16 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
17 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF | ||
18 | * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
19 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
20 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
21 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
22 | * | ||
23 | * You should have received a copy of the GNU General Public License along | ||
24 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
25 | * 675 Mass Ave, Cambridge, MA 02139, USA. | ||
26 | */ | ||
27 | |||
28 | #ifndef __ASM_ARCH_TPS65010_H | ||
29 | #define __ASM_ARCH_TPS65010_H | ||
30 | |||
31 | /* | ||
32 | * ---------------------------------------------------------------------------- | ||
33 | * Registers, all 8 bits | ||
34 | * ---------------------------------------------------------------------------- | ||
35 | */ | ||
36 | |||
37 | #define TPS_CHGSTATUS 0x01 | ||
38 | # define TPS_CHG_USB (1 << 7) | ||
39 | # define TPS_CHG_AC (1 << 6) | ||
40 | # define TPS_CHG_THERM (1 << 5) | ||
41 | # define TPS_CHG_TERM (1 << 4) | ||
42 | # define TPS_CHG_TAPER_TMO (1 << 3) | ||
43 | # define TPS_CHG_CHG_TMO (1 << 2) | ||
44 | # define TPS_CHG_PRECHG_TMO (1 << 1) | ||
45 | # define TPS_CHG_TEMP_ERR (1 << 0) | ||
46 | #define TPS_REGSTATUS 0x02 | ||
47 | # define TPS_REG_ONOFF (1 << 7) | ||
48 | # define TPS_REG_COVER (1 << 6) | ||
49 | # define TPS_REG_UVLO (1 << 5) | ||
50 | # define TPS_REG_NO_CHG (1 << 4) /* tps65013 */ | ||
51 | # define TPS_REG_PG_LD02 (1 << 3) | ||
52 | # define TPS_REG_PG_LD01 (1 << 2) | ||
53 | # define TPS_REG_PG_MAIN (1 << 1) | ||
54 | # define TPS_REG_PG_CORE (1 << 0) | ||
55 | #define TPS_MASK1 0x03 | ||
56 | #define TPS_MASK2 0x04 | ||
57 | #define TPS_ACKINT1 0x05 | ||
58 | #define TPS_ACKINT2 0x06 | ||
59 | #define TPS_CHGCONFIG 0x07 | ||
60 | # define TPS_CHARGE_POR (1 << 7) /* 65010/65012 */ | ||
61 | # define TPS65013_AUA (1 << 7) /* 65011/65013 */ | ||
62 | # define TPS_CHARGE_RESET (1 << 6) | ||
63 | # define TPS_CHARGE_FAST (1 << 5) | ||
64 | # define TPS_CHARGE_CURRENT (3 << 3) | ||
65 | # define TPS_VBUS_500MA (1 << 2) | ||
66 | # define TPS_VBUS_CHARGING (1 << 1) | ||
67 | # define TPS_CHARGE_ENABLE (1 << 0) | ||
68 | #define TPS_LED1_ON 0x08 | ||
69 | #define TPS_LED1_PER 0x09 | ||
70 | #define TPS_LED2_ON 0x0a | ||
71 | #define TPS_LED2_PER 0x0b | ||
72 | #define TPS_VDCDC1 0x0c | ||
73 | # define TPS_ENABLE_LP (1 << 3) | ||
74 | #define TPS_VDCDC2 0x0d | ||
75 | #define TPS_VREGS1 0x0e | ||
76 | # define TPS_LDO2_ENABLE (1 << 7) | ||
77 | # define TPS_LDO2_OFF (1 << 6) | ||
78 | # define TPS_VLDO2_3_0V (3 << 4) | ||
79 | # define TPS_VLDO2_2_75V (2 << 4) | ||
80 | # define TPS_VLDO2_2_5V (1 << 4) | ||
81 | # define TPS_VLDO2_1_8V (0 << 4) | ||
82 | # define TPS_LDO1_ENABLE (1 << 3) | ||
83 | # define TPS_LDO1_OFF (1 << 2) | ||
84 | # define TPS_VLDO1_3_0V (3 << 0) | ||
85 | # define TPS_VLDO1_2_75V (2 << 0) | ||
86 | # define TPS_VLDO1_2_5V (1 << 0) | ||
87 | # define TPS_VLDO1_ADJ (0 << 0) | ||
88 | #define TPS_MASK3 0x0f | ||
89 | #define TPS_DEFGPIO 0x10 | ||
90 | |||
91 | /* | ||
92 | * ---------------------------------------------------------------------------- | ||
93 | * Macros used by exported functions | ||
94 | * ---------------------------------------------------------------------------- | ||
95 | */ | ||
96 | |||
97 | #define LED1 1 | ||
98 | #define LED2 2 | ||
99 | #define OFF 0 | ||
100 | #define ON 1 | ||
101 | #define BLINK 2 | ||
102 | #define GPIO1 1 | ||
103 | #define GPIO2 2 | ||
104 | #define GPIO3 3 | ||
105 | #define GPIO4 4 | ||
106 | #define LOW 0 | ||
107 | #define HIGH 1 | ||
108 | |||
109 | /* | ||
110 | * ---------------------------------------------------------------------------- | ||
111 | * Exported functions | ||
112 | * ---------------------------------------------------------------------------- | ||
113 | */ | ||
114 | |||
115 | /* Draw from VBUS: | ||
116 | * 0 mA -- DON'T DRAW (might supply power instead) | ||
117 | * 100 mA -- usb unit load (slowest charge rate) | ||
118 | * 500 mA -- usb high power (fast battery charge) | ||
119 | */ | ||
120 | extern int tps65010_set_vbus_draw(unsigned mA); | ||
121 | |||
122 | /* tps65010_set_gpio_out_value parameter: | ||
123 | * gpio: GPIO1, GPIO2, GPIO3 or GPIO4 | ||
124 | * value: LOW or HIGH | ||
125 | */ | ||
126 | extern int tps65010_set_gpio_out_value(unsigned gpio, unsigned value); | ||
127 | |||
128 | /* tps65010_set_led parameter: | ||
129 | * led: LED1 or LED2 | ||
130 | * mode: ON, OFF or BLINK | ||
131 | */ | ||
132 | extern int tps65010_set_led(unsigned led, unsigned mode); | ||
133 | |||
134 | /* tps65010_set_vib parameter: | ||
135 | * value: ON or OFF | ||
136 | */ | ||
137 | extern int tps65010_set_vib(unsigned value); | ||
138 | |||
139 | /* tps65010_set_low_pwr parameter: | ||
140 | * mode: ON or OFF | ||
141 | */ | ||
142 | extern int tps65010_set_low_pwr(unsigned mode); | ||
143 | |||
144 | /* tps65010_config_vregs1 parameter: | ||
145 | * value to be written to VREGS1 register | ||
146 | * Note: The complete register is written, set all bits you need | ||
147 | */ | ||
148 | extern int tps65010_config_vregs1(unsigned value); | ||
149 | |||
150 | /* tps65013_set_low_pwr parameter: | ||
151 | * mode: ON or OFF | ||
152 | */ | ||
153 | extern int tps65013_set_low_pwr(unsigned mode); | ||
154 | |||
155 | #endif /* __ASM_ARCH_TPS65010_H */ | ||
156 | |||
diff --git a/include/asm-arm/arch-pxa/i2c.h b/include/asm-arm/arch-pxa/i2c.h index e404b233d8a8..80596b013443 100644 --- a/include/asm-arm/arch-pxa/i2c.h +++ b/include/asm-arm/arch-pxa/i2c.h | |||
@@ -65,7 +65,13 @@ struct i2c_pxa_platform_data { | |||
65 | unsigned int slave_addr; | 65 | unsigned int slave_addr; |
66 | struct i2c_slave_client *slave; | 66 | struct i2c_slave_client *slave; |
67 | unsigned int class; | 67 | unsigned int class; |
68 | int use_pio; | ||
68 | }; | 69 | }; |
69 | 70 | ||
70 | extern void pxa_set_i2c_info(struct i2c_pxa_platform_data *info); | 71 | extern void pxa_set_i2c_info(struct i2c_pxa_platform_data *info); |
72 | |||
73 | #ifdef CONFIG_PXA27x | ||
74 | extern void pxa_set_i2c_power_info(struct i2c_pxa_platform_data *info); | ||
75 | #endif | ||
76 | |||
71 | #endif | 77 | #endif |
diff --git a/include/asm-arm/arch-s3c2410/debug-macro.S b/include/asm-arm/arch-s3c2410/debug-macro.S index 9c8cd9abb82b..89076c322726 100644 --- a/include/asm-arm/arch-s3c2410/debug-macro.S +++ b/include/asm-arm/arch-s3c2410/debug-macro.S | |||
@@ -92,11 +92,9 @@ | |||
92 | #if defined(CONFIG_CPU_LLSERIAL_S3C2410_ONLY) | 92 | #if defined(CONFIG_CPU_LLSERIAL_S3C2410_ONLY) |
93 | #define fifo_full fifo_full_s3c2410 | 93 | #define fifo_full fifo_full_s3c2410 |
94 | #define fifo_level fifo_level_s3c2410 | 94 | #define fifo_level fifo_level_s3c2410 |
95 | #warning 2410only | ||
96 | #elif !defined(CONFIG_CPU_LLSERIAL_S3C2440_ONLY) | 95 | #elif !defined(CONFIG_CPU_LLSERIAL_S3C2440_ONLY) |
97 | #define fifo_full fifo_full_s3c24xx | 96 | #define fifo_full fifo_full_s3c24xx |
98 | #define fifo_level fifo_level_s3c24xx | 97 | #define fifo_level fifo_level_s3c24xx |
99 | #warning generic | ||
100 | #endif | 98 | #endif |
101 | 99 | ||
102 | /* include the reset of the code which will do the work */ | 100 | /* include the reset of the code which will do the work */ |
diff --git a/include/asm-arm/arch-s3c2410/dma.h b/include/asm-arm/arch-s3c2410/dma.h index c6e8d8f64938..4f291d9b7d93 100644 --- a/include/asm-arm/arch-s3c2410/dma.h +++ b/include/asm-arm/arch-s3c2410/dma.h | |||
@@ -214,6 +214,7 @@ struct s3c2410_dma_chan { | |||
214 | unsigned long dev_addr; | 214 | unsigned long dev_addr; |
215 | unsigned long load_timeout; | 215 | unsigned long load_timeout; |
216 | unsigned int flags; /* channel flags */ | 216 | unsigned int flags; /* channel flags */ |
217 | unsigned int hw_cfg; /* last hw config */ | ||
217 | 218 | ||
218 | struct s3c24xx_dma_map *map; /* channel hw maps */ | 219 | struct s3c24xx_dma_map *map; /* channel hw maps */ |
219 | 220 | ||
diff --git a/include/asm-arm/arch-s3c2410/hardware.h b/include/asm-arm/arch-s3c2410/hardware.h index 6dadf58ff984..29592c3ebf22 100644 --- a/include/asm-arm/arch-s3c2410/hardware.h +++ b/include/asm-arm/arch-s3c2410/hardware.h | |||
@@ -50,6 +50,17 @@ extern unsigned int s3c2410_gpio_getcfg(unsigned int pin); | |||
50 | 50 | ||
51 | extern int s3c2410_gpio_getirq(unsigned int pin); | 51 | extern int s3c2410_gpio_getirq(unsigned int pin); |
52 | 52 | ||
53 | /* s3c2410_gpio_irq2pin | ||
54 | * | ||
55 | * turn the given irq number into the corresponding GPIO number | ||
56 | * | ||
57 | * returns: | ||
58 | * < 0 = no pin | ||
59 | * >=0 = gpio pin number | ||
60 | */ | ||
61 | |||
62 | extern int s3c2410_gpio_irq2pin(unsigned int irq); | ||
63 | |||
53 | #ifdef CONFIG_CPU_S3C2400 | 64 | #ifdef CONFIG_CPU_S3C2400 |
54 | 65 | ||
55 | extern int s3c2400_gpio_getirq(unsigned int pin); | 66 | extern int s3c2400_gpio_getirq(unsigned int pin); |
@@ -87,6 +98,18 @@ extern int s3c2410_gpio_irqfilter(unsigned int pin, unsigned int on, | |||
87 | 98 | ||
88 | extern void s3c2410_gpio_pullup(unsigned int pin, unsigned int to); | 99 | extern void s3c2410_gpio_pullup(unsigned int pin, unsigned int to); |
89 | 100 | ||
101 | /* s3c2410_gpio_getpull | ||
102 | * | ||
103 | * Read the state of the pull-up on a given pin | ||
104 | * | ||
105 | * return: | ||
106 | * < 0 => error code | ||
107 | * 0 => enabled | ||
108 | * 1 => disabled | ||
109 | */ | ||
110 | |||
111 | extern int s3c2410_gpio_getpull(unsigned int pin); | ||
112 | |||
90 | extern void s3c2410_gpio_setpin(unsigned int pin, unsigned int to); | 113 | extern void s3c2410_gpio_setpin(unsigned int pin, unsigned int to); |
91 | 114 | ||
92 | extern unsigned int s3c2410_gpio_getpin(unsigned int pin); | 115 | extern unsigned int s3c2410_gpio_getpin(unsigned int pin); |
@@ -99,6 +122,11 @@ extern int s3c2440_set_dsc(unsigned int pin, unsigned int value); | |||
99 | 122 | ||
100 | #endif /* CONFIG_CPU_S3C2440 */ | 123 | #endif /* CONFIG_CPU_S3C2440 */ |
101 | 124 | ||
125 | #ifdef CONFIG_CPU_S3C2412 | ||
126 | |||
127 | extern int s3c2412_gpio_set_sleepcfg(unsigned int pin, unsigned int state); | ||
128 | |||
129 | #endif /* CONFIG_CPU_S3C2412 */ | ||
102 | 130 | ||
103 | #endif /* __ASSEMBLY__ */ | 131 | #endif /* __ASSEMBLY__ */ |
104 | 132 | ||
diff --git a/include/asm-arm/arch-s3c2410/irqs.h b/include/asm-arm/arch-s3c2410/irqs.h index 996f65488d2d..d858b3eb5547 100644 --- a/include/asm-arm/arch-s3c2410/irqs.h +++ b/include/asm-arm/arch-s3c2410/irqs.h | |||
@@ -160,4 +160,7 @@ | |||
160 | #define NR_IRQS (IRQ_S3C2440_AC97+1) | 160 | #define NR_IRQS (IRQ_S3C2440_AC97+1) |
161 | #endif | 161 | #endif |
162 | 162 | ||
163 | /* Our FIQs are routable from IRQ_EINT0 to IRQ_ADCPARENT */ | ||
164 | #define FIQ_START IRQ_EINT0 | ||
165 | |||
163 | #endif /* __ASM_ARCH_IRQ_H */ | 166 | #endif /* __ASM_ARCH_IRQ_H */ |
diff --git a/include/asm-arm/arch-s3c2410/regs-clock.h b/include/asm-arm/arch-s3c2410/regs-clock.h index e39656b7a086..dba9df9d8713 100644 --- a/include/asm-arm/arch-s3c2410/regs-clock.h +++ b/include/asm-arm/arch-s3c2410/regs-clock.h | |||
@@ -138,6 +138,8 @@ s3c2410_get_pll(unsigned int pllval, unsigned int baseclk) | |||
138 | #define S3C2412_CLKDIVN_PDIVN (1<<2) | 138 | #define S3C2412_CLKDIVN_PDIVN (1<<2) |
139 | #define S3C2412_CLKDIVN_HDIVN_MASK (3<<0) | 139 | #define S3C2412_CLKDIVN_HDIVN_MASK (3<<0) |
140 | #define S3C2421_CLKDIVN_ARMDIVN (1<<3) | 140 | #define S3C2421_CLKDIVN_ARMDIVN (1<<3) |
141 | #define S3C2412_CLKDIVN_DVSEN (1<<4) | ||
142 | #define S3C2412_CLKDIVN_HALFHCLK (1<<5) | ||
141 | #define S3C2412_CLKDIVN_USB48DIV (1<<6) | 143 | #define S3C2412_CLKDIVN_USB48DIV (1<<6) |
142 | #define S3C2412_CLKDIVN_UARTDIV_MASK (15<<8) | 144 | #define S3C2412_CLKDIVN_UARTDIV_MASK (15<<8) |
143 | #define S3C2412_CLKDIVN_UARTDIV_SHIFT (8) | 145 | #define S3C2412_CLKDIVN_UARTDIV_SHIFT (8) |
diff --git a/include/asm-arm/arch-s3c2410/regs-dsc.h b/include/asm-arm/arch-s3c2410/regs-dsc.h index c0748511edbc..1235df70f34e 100644 --- a/include/asm-arm/arch-s3c2410/regs-dsc.h +++ b/include/asm-arm/arch-s3c2410/regs-dsc.h | |||
@@ -19,7 +19,7 @@ | |||
19 | #define S3C2412_DSC1 S3C2410_GPIOREG(0xe0) | 19 | #define S3C2412_DSC1 S3C2410_GPIOREG(0xe0) |
20 | #endif | 20 | #endif |
21 | 21 | ||
22 | #if defined(CONFIG_CPU_S3C2440) | 22 | #if defined(CONFIG_CPU_S3C244X) |
23 | 23 | ||
24 | #define S3C2440_DSC0 S3C2410_GPIOREG(0xc4) | 24 | #define S3C2440_DSC0 S3C2410_GPIOREG(0xc4) |
25 | #define S3C2440_DSC1 S3C2410_GPIOREG(0xc8) | 25 | #define S3C2440_DSC1 S3C2410_GPIOREG(0xc8) |
diff --git a/include/asm-arm/arch-s3c2410/regs-gpio.h b/include/asm-arm/arch-s3c2410/regs-gpio.h index b693158b2d3c..0ad75d716ded 100644 --- a/include/asm-arm/arch-s3c2410/regs-gpio.h +++ b/include/asm-arm/arch-s3c2410/regs-gpio.h | |||
@@ -1133,12 +1133,16 @@ | |||
1133 | #define S3C2412_GPBSLPCON S3C2410_GPIOREG(0x1C) | 1133 | #define S3C2412_GPBSLPCON S3C2410_GPIOREG(0x1C) |
1134 | #define S3C2412_GPCSLPCON S3C2410_GPIOREG(0x2C) | 1134 | #define S3C2412_GPCSLPCON S3C2410_GPIOREG(0x2C) |
1135 | #define S3C2412_GPDSLPCON S3C2410_GPIOREG(0x3C) | 1135 | #define S3C2412_GPDSLPCON S3C2410_GPIOREG(0x3C) |
1136 | #define S3C2412_GPESLPCON S3C2410_GPIOREG(0x4C) | ||
1137 | #define S3C2412_GPFSLPCON S3C2410_GPIOREG(0x5C) | 1136 | #define S3C2412_GPFSLPCON S3C2410_GPIOREG(0x5C) |
1138 | #define S3C2412_GPGSLPCON S3C2410_GPIOREG(0x6C) | 1137 | #define S3C2412_GPGSLPCON S3C2410_GPIOREG(0x6C) |
1139 | #define S3C2412_GPHSLPCON S3C2410_GPIOREG(0x7C) | 1138 | #define S3C2412_GPHSLPCON S3C2410_GPIOREG(0x7C) |
1140 | 1139 | ||
1141 | /* definitions for each pin bit */ | 1140 | /* definitions for each pin bit */ |
1141 | #define S3C2412_GPIO_SLPCON_LOW ( 0x00 ) | ||
1142 | #define S3C2412_GPIO_SLPCON_HIGH ( 0x01 ) | ||
1143 | #define S3C2412_GPIO_SLPCON_IN ( 0x02 ) | ||
1144 | #define S3C2412_GPIO_SLPCON_PULL ( 0x03 ) | ||
1145 | |||
1142 | #define S3C2412_SLPCON_LOW(x) ( 0x00 << ((x) * 2)) | 1146 | #define S3C2412_SLPCON_LOW(x) ( 0x00 << ((x) * 2)) |
1143 | #define S3C2412_SLPCON_HIGH(x) ( 0x01 << ((x) * 2)) | 1147 | #define S3C2412_SLPCON_HIGH(x) ( 0x01 << ((x) * 2)) |
1144 | #define S3C2412_SLPCON_IN(x) ( 0x02 << ((x) * 2)) | 1148 | #define S3C2412_SLPCON_IN(x) ( 0x02 << ((x) * 2)) |
diff --git a/include/asm-arm/arch-s3c2410/regs-mem.h b/include/asm-arm/arch-s3c2410/regs-mem.h index e4d82341f7ba..312ff93b63c6 100644 --- a/include/asm-arm/arch-s3c2410/regs-mem.h +++ b/include/asm-arm/arch-s3c2410/regs-mem.h | |||
@@ -98,16 +98,19 @@ | |||
98 | #define S3C2410_BANKCON_Tacp3 (0x1 << 2) | 98 | #define S3C2410_BANKCON_Tacp3 (0x1 << 2) |
99 | #define S3C2410_BANKCON_Tacp4 (0x2 << 2) | 99 | #define S3C2410_BANKCON_Tacp4 (0x2 << 2) |
100 | #define S3C2410_BANKCON_Tacp6 (0x3 << 2) | 100 | #define S3C2410_BANKCON_Tacp6 (0x3 << 2) |
101 | #define S3C2410_BANKCON_Tacp_SHIFT (2) | ||
101 | 102 | ||
102 | #define S3C2410_BANKCON_Tcah0 (0x0 << 4) | 103 | #define S3C2410_BANKCON_Tcah0 (0x0 << 4) |
103 | #define S3C2410_BANKCON_Tcah1 (0x1 << 4) | 104 | #define S3C2410_BANKCON_Tcah1 (0x1 << 4) |
104 | #define S3C2410_BANKCON_Tcah2 (0x2 << 4) | 105 | #define S3C2410_BANKCON_Tcah2 (0x2 << 4) |
105 | #define S3C2410_BANKCON_Tcah4 (0x3 << 4) | 106 | #define S3C2410_BANKCON_Tcah4 (0x3 << 4) |
107 | #define S3C2410_BANKCON_Tcah_SHIFT (4) | ||
106 | 108 | ||
107 | #define S3C2410_BANKCON_Tcoh0 (0x0 << 6) | 109 | #define S3C2410_BANKCON_Tcoh0 (0x0 << 6) |
108 | #define S3C2410_BANKCON_Tcoh1 (0x1 << 6) | 110 | #define S3C2410_BANKCON_Tcoh1 (0x1 << 6) |
109 | #define S3C2410_BANKCON_Tcoh2 (0x2 << 6) | 111 | #define S3C2410_BANKCON_Tcoh2 (0x2 << 6) |
110 | #define S3C2410_BANKCON_Tcoh4 (0x3 << 6) | 112 | #define S3C2410_BANKCON_Tcoh4 (0x3 << 6) |
113 | #define S3C2410_BANKCON_Tcoh_SHIFT (6) | ||
111 | 114 | ||
112 | #define S3C2410_BANKCON_Tacc1 (0x0 << 8) | 115 | #define S3C2410_BANKCON_Tacc1 (0x0 << 8) |
113 | #define S3C2410_BANKCON_Tacc2 (0x1 << 8) | 116 | #define S3C2410_BANKCON_Tacc2 (0x1 << 8) |
@@ -117,16 +120,19 @@ | |||
117 | #define S3C2410_BANKCON_Tacc8 (0x5 << 8) | 120 | #define S3C2410_BANKCON_Tacc8 (0x5 << 8) |
118 | #define S3C2410_BANKCON_Tacc10 (0x6 << 8) | 121 | #define S3C2410_BANKCON_Tacc10 (0x6 << 8) |
119 | #define S3C2410_BANKCON_Tacc14 (0x7 << 8) | 122 | #define S3C2410_BANKCON_Tacc14 (0x7 << 8) |
123 | #define S3C2410_BANKCON_Tacc_SHIFT (8) | ||
120 | 124 | ||
121 | #define S3C2410_BANKCON_Tcos0 (0x0 << 11) | 125 | #define S3C2410_BANKCON_Tcos0 (0x0 << 11) |
122 | #define S3C2410_BANKCON_Tcos1 (0x1 << 11) | 126 | #define S3C2410_BANKCON_Tcos1 (0x1 << 11) |
123 | #define S3C2410_BANKCON_Tcos2 (0x2 << 11) | 127 | #define S3C2410_BANKCON_Tcos2 (0x2 << 11) |
124 | #define S3C2410_BANKCON_Tcos4 (0x3 << 11) | 128 | #define S3C2410_BANKCON_Tcos4 (0x3 << 11) |
129 | #define S3C2410_BANKCON_Tcos_SHIFT (11) | ||
125 | 130 | ||
126 | #define S3C2410_BANKCON_Tacs0 (0x0 << 13) | 131 | #define S3C2410_BANKCON_Tacs0 (0x0 << 13) |
127 | #define S3C2410_BANKCON_Tacs1 (0x1 << 13) | 132 | #define S3C2410_BANKCON_Tacs1 (0x1 << 13) |
128 | #define S3C2410_BANKCON_Tacs2 (0x2 << 13) | 133 | #define S3C2410_BANKCON_Tacs2 (0x2 << 13) |
129 | #define S3C2410_BANKCON_Tacs4 (0x3 << 13) | 134 | #define S3C2410_BANKCON_Tacs4 (0x3 << 13) |
135 | #define S3C2410_BANKCON_Tacs_SHIFT (13) | ||
130 | 136 | ||
131 | #define S3C2410_BANKCON_SRAM (0x0 << 15) | 137 | #define S3C2410_BANKCON_SRAM (0x0 << 15) |
132 | #define S3C2400_BANKCON_EDODRAM (0x2 << 15) | 138 | #define S3C2400_BANKCON_EDODRAM (0x2 << 15) |
diff --git a/include/asm-arm/arch-s3c2410/regs-power.h b/include/asm-arm/arch-s3c2410/regs-power.h index f79987be55e8..13d13b7cfe98 100644 --- a/include/asm-arm/arch-s3c2410/regs-power.h +++ b/include/asm-arm/arch-s3c2410/regs-power.h | |||
@@ -23,7 +23,8 @@ | |||
23 | #define S3C2412_INFORM2 S3C24XX_PWRREG(0x78) | 23 | #define S3C2412_INFORM2 S3C24XX_PWRREG(0x78) |
24 | #define S3C2412_INFORM3 S3C24XX_PWRREG(0x7C) | 24 | #define S3C2412_INFORM3 S3C24XX_PWRREG(0x7C) |
25 | 25 | ||
26 | #define S3C2412_PWRCFG_BATF_IGNORE (0<<0) | 26 | #define S3C2412_PWRCFG_BATF_IRQ (1<<0) |
27 | #define S3C2412_PWRCFG_BATF_IGNORE (2<<0) | ||
27 | #define S3C2412_PWRCFG_BATF_SLEEP (3<<0) | 28 | #define S3C2412_PWRCFG_BATF_SLEEP (3<<0) |
28 | #define S3C2412_PWRCFG_BATF_MASK (3<<0) | 29 | #define S3C2412_PWRCFG_BATF_MASK (3<<0) |
29 | 30 | ||
diff --git a/include/asm-arm/arch-s3c2410/system.h b/include/asm-arm/arch-s3c2410/system.h index 63891786dfa0..14de4e596f87 100644 --- a/include/asm-arm/arch-s3c2410/system.h +++ b/include/asm-arm/arch-s3c2410/system.h | |||
@@ -20,6 +20,9 @@ | |||
20 | #include <asm/plat-s3c/regs-watchdog.h> | 20 | #include <asm/plat-s3c/regs-watchdog.h> |
21 | #include <asm/arch/regs-clock.h> | 21 | #include <asm/arch/regs-clock.h> |
22 | 22 | ||
23 | #include <linux/clk.h> | ||
24 | #include <linux/err.h> | ||
25 | |||
23 | void (*s3c24xx_idle)(void); | 26 | void (*s3c24xx_idle)(void); |
24 | void (*s3c24xx_reset_hook)(void); | 27 | void (*s3c24xx_reset_hook)(void); |
25 | 28 | ||
@@ -59,6 +62,8 @@ static void arch_idle(void) | |||
59 | static void | 62 | static void |
60 | arch_reset(char mode) | 63 | arch_reset(char mode) |
61 | { | 64 | { |
65 | struct clk *wdtclk; | ||
66 | |||
62 | if (mode == 's') { | 67 | if (mode == 's') { |
63 | cpu_reset(0); | 68 | cpu_reset(0); |
64 | } | 69 | } |
@@ -70,19 +75,28 @@ arch_reset(char mode) | |||
70 | 75 | ||
71 | __raw_writel(0, S3C2410_WTCON); /* disable watchdog, to be safe */ | 76 | __raw_writel(0, S3C2410_WTCON); /* disable watchdog, to be safe */ |
72 | 77 | ||
78 | wdtclk = clk_get(NULL, "watchdog"); | ||
79 | if (!IS_ERR(wdtclk)) { | ||
80 | clk_enable(wdtclk); | ||
81 | } else | ||
82 | printk(KERN_WARNING "%s: warning: cannot get watchdog clock\n", __func__); | ||
83 | |||
73 | /* put initial values into count and data */ | 84 | /* put initial values into count and data */ |
74 | __raw_writel(0x100, S3C2410_WTCNT); | 85 | __raw_writel(0x80, S3C2410_WTCNT); |
75 | __raw_writel(0x100, S3C2410_WTDAT); | 86 | __raw_writel(0x80, S3C2410_WTDAT); |
76 | 87 | ||
77 | /* set the watchdog to go and reset... */ | 88 | /* set the watchdog to go and reset... */ |
78 | __raw_writel(S3C2410_WTCON_ENABLE|S3C2410_WTCON_DIV16|S3C2410_WTCON_RSTEN | | 89 | __raw_writel(S3C2410_WTCON_ENABLE|S3C2410_WTCON_DIV16|S3C2410_WTCON_RSTEN | |
79 | S3C2410_WTCON_PRESCALE(0x20), S3C2410_WTCON); | 90 | S3C2410_WTCON_PRESCALE(0x20), S3C2410_WTCON); |
80 | 91 | ||
81 | /* wait for reset to assert... */ | 92 | /* wait for reset to assert... */ |
82 | mdelay(5000); | 93 | mdelay(500); |
83 | 94 | ||
84 | printk(KERN_ERR "Watchdog reset failed to assert reset\n"); | 95 | printk(KERN_ERR "Watchdog reset failed to assert reset\n"); |
85 | 96 | ||
97 | /* delay to allow the serial port to show the message */ | ||
98 | mdelay(50); | ||
99 | |||
86 | /* we'll take a jump through zero as a poor second */ | 100 | /* we'll take a jump through zero as a poor second */ |
87 | cpu_reset(0); | 101 | cpu_reset(0); |
88 | } | 102 | } |
diff --git a/include/asm-arm/fpstate.h b/include/asm-arm/fpstate.h index f31cda5a55ee..392eb5332323 100644 --- a/include/asm-arm/fpstate.h +++ b/include/asm-arm/fpstate.h | |||
@@ -17,14 +17,18 @@ | |||
17 | /* | 17 | /* |
18 | * VFP storage area has: | 18 | * VFP storage area has: |
19 | * - FPEXC, FPSCR, FPINST and FPINST2. | 19 | * - FPEXC, FPSCR, FPINST and FPINST2. |
20 | * - 16 double precision data registers | 20 | * - 16 or 32 double precision data registers |
21 | * - an implementation-dependant word of state for FLDMX/FSTMX | 21 | * - an implementation-dependant word of state for FLDMX/FSTMX (pre-ARMv6) |
22 | * | 22 | * |
23 | * FPEXC will always be non-zero once the VFP has been used in this process. | 23 | * FPEXC will always be non-zero once the VFP has been used in this process. |
24 | */ | 24 | */ |
25 | 25 | ||
26 | struct vfp_hard_struct { | 26 | struct vfp_hard_struct { |
27 | #ifdef CONFIG_VFPv3 | ||
28 | __u64 fpregs[32]; | ||
29 | #else | ||
27 | __u64 fpregs[16]; | 30 | __u64 fpregs[16]; |
31 | #endif | ||
28 | #if __LINUX_ARM_ARCH__ < 6 | 32 | #if __LINUX_ARM_ARCH__ < 6 |
29 | __u32 fpmx_state; | 33 | __u32 fpmx_state; |
30 | #endif | 34 | #endif |
@@ -35,6 +39,7 @@ struct vfp_hard_struct { | |||
35 | */ | 39 | */ |
36 | __u32 fpinst; | 40 | __u32 fpinst; |
37 | __u32 fpinst2; | 41 | __u32 fpinst2; |
42 | |||
38 | #ifdef CONFIG_SMP | 43 | #ifdef CONFIG_SMP |
39 | __u32 cpu; | 44 | __u32 cpu; |
40 | #endif | 45 | #endif |
diff --git a/include/asm-arm/kprobes.h b/include/asm-arm/kprobes.h new file mode 100644 index 000000000000..4e7bd32288ae --- /dev/null +++ b/include/asm-arm/kprobes.h | |||
@@ -0,0 +1,79 @@ | |||
1 | /* | ||
2 | * include/asm-arm/kprobes.h | ||
3 | * | ||
4 | * Copyright (C) 2006, 2007 Motorola Inc. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | * General Public License for more details. | ||
14 | */ | ||
15 | |||
16 | #ifndef _ARM_KPROBES_H | ||
17 | #define _ARM_KPROBES_H | ||
18 | |||
19 | #include <linux/types.h> | ||
20 | #include <linux/ptrace.h> | ||
21 | #include <linux/percpu.h> | ||
22 | |||
23 | #define ARCH_SUPPORTS_KRETPROBES | ||
24 | #define __ARCH_WANT_KPROBES_INSN_SLOT | ||
25 | #define MAX_INSN_SIZE 2 | ||
26 | #define MAX_STACK_SIZE 64 /* 32 would probably be OK */ | ||
27 | |||
28 | /* | ||
29 | * This undefined instruction must be unique and | ||
30 | * reserved solely for kprobes' use. | ||
31 | */ | ||
32 | #define KPROBE_BREAKPOINT_INSTRUCTION 0xe7f001f8 | ||
33 | |||
34 | #define regs_return_value(regs) ((regs)->ARM_r0) | ||
35 | #define flush_insn_slot(p) do { } while (0) | ||
36 | #define kretprobe_blacklist_size 0 | ||
37 | |||
38 | typedef u32 kprobe_opcode_t; | ||
39 | |||
40 | struct kprobe; | ||
41 | typedef void (kprobe_insn_handler_t)(struct kprobe *, struct pt_regs *); | ||
42 | |||
43 | /* Architecture specific copy of original instruction. */ | ||
44 | struct arch_specific_insn { | ||
45 | kprobe_opcode_t *insn; | ||
46 | kprobe_insn_handler_t *insn_handler; | ||
47 | }; | ||
48 | |||
49 | struct prev_kprobe { | ||
50 | struct kprobe *kp; | ||
51 | unsigned int status; | ||
52 | }; | ||
53 | |||
54 | /* per-cpu kprobe control block */ | ||
55 | struct kprobe_ctlblk { | ||
56 | unsigned int kprobe_status; | ||
57 | struct prev_kprobe prev_kprobe; | ||
58 | struct pt_regs jprobe_saved_regs; | ||
59 | char jprobes_stack[MAX_STACK_SIZE]; | ||
60 | }; | ||
61 | |||
62 | void arch_remove_kprobe(struct kprobe *); | ||
63 | |||
64 | int kprobe_trap_handler(struct pt_regs *regs, unsigned int instr); | ||
65 | int kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr); | ||
66 | int kprobe_exceptions_notify(struct notifier_block *self, | ||
67 | unsigned long val, void *data); | ||
68 | |||
69 | enum kprobe_insn { | ||
70 | INSN_REJECTED, | ||
71 | INSN_GOOD, | ||
72 | INSN_GOOD_NO_SLOT | ||
73 | }; | ||
74 | |||
75 | enum kprobe_insn arm_kprobe_decode_insn(kprobe_opcode_t, | ||
76 | struct arch_specific_insn *); | ||
77 | void __init arm_kprobe_decode_init(void); | ||
78 | |||
79 | #endif /* _ARM_KPROBES_H */ | ||
diff --git a/include/asm-arm/plat-s3c24xx/dma.h b/include/asm-arm/plat-s3c24xx/dma.h index 2c59406435e5..c78efe316fc8 100644 --- a/include/asm-arm/plat-s3c24xx/dma.h +++ b/include/asm-arm/plat-s3c24xx/dma.h | |||
@@ -32,6 +32,7 @@ struct s3c24xx_dma_map { | |||
32 | struct s3c24xx_dma_addr hw_addr; | 32 | struct s3c24xx_dma_addr hw_addr; |
33 | 33 | ||
34 | unsigned long channels[S3C2410_DMA_CHANNELS]; | 34 | unsigned long channels[S3C2410_DMA_CHANNELS]; |
35 | unsigned long channels_rx[S3C2410_DMA_CHANNELS]; | ||
35 | }; | 36 | }; |
36 | 37 | ||
37 | struct s3c24xx_dma_selection { | 38 | struct s3c24xx_dma_selection { |
@@ -41,6 +42,10 @@ struct s3c24xx_dma_selection { | |||
41 | 42 | ||
42 | void (*select)(struct s3c2410_dma_chan *chan, | 43 | void (*select)(struct s3c2410_dma_chan *chan, |
43 | struct s3c24xx_dma_map *map); | 44 | struct s3c24xx_dma_map *map); |
45 | |||
46 | void (*direction)(struct s3c2410_dma_chan *chan, | ||
47 | struct s3c24xx_dma_map *map, | ||
48 | enum s3c2410_dmasrc dir); | ||
44 | }; | 49 | }; |
45 | 50 | ||
46 | extern int s3c24xx_dma_init_map(struct s3c24xx_dma_selection *sel); | 51 | extern int s3c24xx_dma_init_map(struct s3c24xx_dma_selection *sel); |
diff --git a/include/asm-arm/plat-s3c24xx/irq.h b/include/asm-arm/plat-s3c24xx/irq.h index 8af6d9579b31..45746a995343 100644 --- a/include/asm-arm/plat-s3c24xx/irq.h +++ b/include/asm-arm/plat-s3c24xx/irq.h | |||
@@ -15,7 +15,9 @@ | |||
15 | 15 | ||
16 | #define EXTINT_OFF (IRQ_EINT4 - 4) | 16 | #define EXTINT_OFF (IRQ_EINT4 - 4) |
17 | 17 | ||
18 | /* these are exported for arch/arm/mach-* usage */ | ||
18 | extern struct irq_chip s3c_irq_level_chip; | 19 | extern struct irq_chip s3c_irq_level_chip; |
20 | extern struct irq_chip s3c_irq_chip; | ||
19 | 21 | ||
20 | static inline void | 22 | static inline void |
21 | s3c_irqsub_mask(unsigned int irqno, unsigned int parentbit, | 23 | s3c_irqsub_mask(unsigned int irqno, unsigned int parentbit, |
diff --git a/include/asm-arm/plat-s3c24xx/regs-s3c2412-iis.h b/include/asm-arm/plat-s3c24xx/regs-s3c2412-iis.h new file mode 100644 index 000000000000..25d4058bcfed --- /dev/null +++ b/include/asm-arm/plat-s3c24xx/regs-s3c2412-iis.h | |||
@@ -0,0 +1,72 @@ | |||
1 | /* linux/include/asm-arm/plat-s3c24xx/regs-s3c2412-iis.h | ||
2 | * | ||
3 | * Copyright 2007 Simtec Electronics <linux@simtec.co.uk> | ||
4 | * http://armlinux.simtec.co.uk/ | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * S3C2412 IIS register definition | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_REGS_S3C2412_IIS_H | ||
14 | #define __ASM_ARCH_REGS_S3C2412_IIS_H | ||
15 | |||
16 | #define S3C2412_IISCON (0x00) | ||
17 | #define S3C2412_IISMOD (0x04) | ||
18 | #define S3C2412_IISFIC (0x08) | ||
19 | #define S3C2412_IISPSR (0x0C) | ||
20 | #define S3C2412_IISTXD (0x10) | ||
21 | #define S3C2412_IISRXD (0x14) | ||
22 | |||
23 | #define S3C2412_IISCON_LRINDEX (1 << 11) | ||
24 | #define S3C2412_IISCON_TXFIFO_EMPTY (1 << 10) | ||
25 | #define S3C2412_IISCON_RXFIFO_EMPTY (1 << 9) | ||
26 | #define S3C2412_IISCON_TXFIFO_FULL (1 << 8) | ||
27 | #define S3C2412_IISCON_RXFIFO_FULL (1 << 7) | ||
28 | #define S3C2412_IISCON_TXDMA_PAUSE (1 << 6) | ||
29 | #define S3C2412_IISCON_RXDMA_PAUSE (1 << 5) | ||
30 | #define S3C2412_IISCON_TXCH_PAUSE (1 << 4) | ||
31 | #define S3C2412_IISCON_RXCH_PAUSE (1 << 3) | ||
32 | #define S3C2412_IISCON_TXDMA_ACTIVE (1 << 2) | ||
33 | #define S3C2412_IISCON_RXDMA_ACTIVE (1 << 1) | ||
34 | #define S3C2412_IISCON_IIS_ACTIVE (1 << 0) | ||
35 | |||
36 | #define S3C2412_IISMOD_MASTER_INTERNAL (0 << 10) | ||
37 | #define S3C2412_IISMOD_MASTER_EXTERNAL (1 << 10) | ||
38 | #define S3C2412_IISMOD_SLAVE (2 << 10) | ||
39 | #define S3C2412_IISMOD_MASTER_MASK (3 << 10) | ||
40 | #define S3C2412_IISMOD_MODE_TXONLY (0 << 8) | ||
41 | #define S3C2412_IISMOD_MODE_RXONLY (1 << 8) | ||
42 | #define S3C2412_IISMOD_MODE_TXRX (2 << 8) | ||
43 | #define S3C2412_IISMOD_MODE_MASK (3 << 8) | ||
44 | #define S3C2412_IISMOD_LR_LLOW (0 << 7) | ||
45 | #define S3C2412_IISMOD_LR_RLOW (1 << 7) | ||
46 | #define S3C2412_IISMOD_SDF_IIS (0 << 5) | ||
47 | #define S3C2412_IISMOD_SDF_MSB (0 << 5) | ||
48 | #define S3C2412_IISMOD_SDF_LSB (0 << 5) | ||
49 | #define S3C2412_IISMOD_SDF_MASK (3 << 5) | ||
50 | #define S3C2412_IISMOD_RCLK_256FS (0 << 3) | ||
51 | #define S3C2412_IISMOD_RCLK_512FS (1 << 3) | ||
52 | #define S3C2412_IISMOD_RCLK_384FS (2 << 3) | ||
53 | #define S3C2412_IISMOD_RCLK_768FS (3 << 3) | ||
54 | #define S3C2412_IISMOD_RCLK_MASK (3 << 3) | ||
55 | #define S3C2412_IISMOD_BCLK_32FS (0 << 1) | ||
56 | #define S3C2412_IISMOD_BCLK_48FS (1 << 1) | ||
57 | #define S3C2412_IISMOD_BCLK_16FS (2 << 1) | ||
58 | #define S3C2412_IISMOD_BCLK_24FS (3 << 1) | ||
59 | #define S3C2412_IISMOD_BCLK_MASK (3 << 1) | ||
60 | #define S3C2412_IISMOD_8BIT (1 << 0) | ||
61 | |||
62 | #define S3C2412_IISPSR_PSREN (1 << 15) | ||
63 | |||
64 | #define S3C2412_IISFIC_TXFLUSH (1 << 15) | ||
65 | #define S3C2412_IISFIC_RXFLUSH (1 << 7) | ||
66 | #define S3C2412_IISFIC_TXCOUNT(x) (((x) >> 8) & 0xf) | ||
67 | #define S3C2412_IISFIC_RXCOUNT(x) (((x) >> 0) & 0xf) | ||
68 | |||
69 | |||
70 | |||
71 | #endif /* __ASM_ARCH_REGS_S3C2412_IIS_H */ | ||
72 | |||
diff --git a/include/asm-arm/plat-s3c24xx/regs-spi.h b/include/asm-arm/plat-s3c24xx/regs-spi.h index 4a499a138256..ea565b007d04 100644 --- a/include/asm-arm/plat-s3c24xx/regs-spi.h +++ b/include/asm-arm/plat-s3c24xx/regs-spi.h | |||
@@ -17,6 +17,21 @@ | |||
17 | 17 | ||
18 | #define S3C2410_SPCON (0x00) | 18 | #define S3C2410_SPCON (0x00) |
19 | 19 | ||
20 | #define S3C2412_SPCON_RXFIFO_RB2 (0<<14) | ||
21 | #define S3C2412_SPCON_RXFIFO_RB4 (1<<14) | ||
22 | #define S3C2412_SPCON_RXFIFO_RB12 (2<<14) | ||
23 | #define S3C2412_SPCON_RXFIFO_RB14 (3<<14) | ||
24 | #define S3C2412_SPCON_TXFIFO_RB2 (0<<12) | ||
25 | #define S3C2412_SPCON_TXFIFO_RB4 (1<<12) | ||
26 | #define S3C2412_SPCON_TXFIFO_RB12 (2<<12) | ||
27 | #define S3C2412_SPCON_TXFIFO_RB14 (3<<12) | ||
28 | #define S3C2412_SPCON_RXFIFO_RESET (1<<11) /* RxFIFO reset */ | ||
29 | #define S3C2412_SPCON_TXFIFO_RESET (1<<10) /* TxFIFO reset */ | ||
30 | #define S3C2412_SPCON_RXFIFO_EN (1<<9) /* RxFIFO Enable */ | ||
31 | #define S3C2412_SPCON_TXFIFO_EN (1<<8) /* TxFIFO Enable */ | ||
32 | |||
33 | #define S3C2412_SPCON_DIRC_RX (1<<7) | ||
34 | |||
20 | #define S3C2410_SPCON_SMOD_DMA (2<<5) /* DMA mode */ | 35 | #define S3C2410_SPCON_SMOD_DMA (2<<5) /* DMA mode */ |
21 | #define S3C2410_SPCON_SMOD_INT (1<<5) /* interrupt mode */ | 36 | #define S3C2410_SPCON_SMOD_INT (1<<5) /* interrupt mode */ |
22 | #define S3C2410_SPCON_SMOD_POLL (0<<5) /* polling mode */ | 37 | #define S3C2410_SPCON_SMOD_POLL (0<<5) /* polling mode */ |
@@ -34,10 +49,19 @@ | |||
34 | 49 | ||
35 | #define S3C2410_SPSTA (0x04) | 50 | #define S3C2410_SPSTA (0x04) |
36 | 51 | ||
52 | #define S3C2412_SPSTA_RXFIFO_AE (1<<11) | ||
53 | #define S3C2412_SPSTA_TXFIFO_AE (1<<10) | ||
54 | #define S3C2412_SPSTA_RXFIFO_ERROR (1<<9) | ||
55 | #define S3C2412_SPSTA_TXFIFO_ERROR (1<<8) | ||
56 | #define S3C2412_SPSTA_RXFIFO_FIFO (1<<7) | ||
57 | #define S3C2412_SPSTA_RXFIFO_EMPTY (1<<6) | ||
58 | #define S3C2412_SPSTA_TXFIFO_NFULL (1<<5) | ||
59 | #define S3C2412_SPSTA_TXFIFO_EMPTY (1<<4) | ||
60 | |||
37 | #define S3C2410_SPSTA_DCOL (1<<2) /* Data Collision Error */ | 61 | #define S3C2410_SPSTA_DCOL (1<<2) /* Data Collision Error */ |
38 | #define S3C2410_SPSTA_MULD (1<<1) /* Multi Master Error */ | 62 | #define S3C2410_SPSTA_MULD (1<<1) /* Multi Master Error */ |
39 | #define S3C2410_SPSTA_READY (1<<0) /* Data Tx/Rx ready */ | 63 | #define S3C2410_SPSTA_READY (1<<0) /* Data Tx/Rx ready */ |
40 | 64 | #define S3C2412_SPSTA_READY_ORG (1<<3) | |
41 | 65 | ||
42 | #define S3C2410_SPPIN (0x08) | 66 | #define S3C2410_SPPIN (0x08) |
43 | 67 | ||
@@ -46,9 +70,13 @@ | |||
46 | #define S3C2400_SPPIN_nCS (1<<1) /* SPI Card Select */ | 70 | #define S3C2400_SPPIN_nCS (1<<1) /* SPI Card Select */ |
47 | #define S3C2410_SPPIN_KEEP (1<<0) /* Master Out keep */ | 71 | #define S3C2410_SPPIN_KEEP (1<<0) /* Master Out keep */ |
48 | 72 | ||
49 | |||
50 | #define S3C2410_SPPRE (0x0C) | 73 | #define S3C2410_SPPRE (0x0C) |
51 | #define S3C2410_SPTDAT (0x10) | 74 | #define S3C2410_SPTDAT (0x10) |
52 | #define S3C2410_SPRDAT (0x14) | 75 | #define S3C2410_SPRDAT (0x14) |
53 | 76 | ||
77 | #define S3C2412_TXFIFO (0x18) | ||
78 | #define S3C2412_RXFIFO (0x18) | ||
79 | #define S3C2412_SPFIC (0x24) | ||
80 | |||
81 | |||
54 | #endif /* __ASM_ARCH_REGS_SPI_H */ | 82 | #endif /* __ASM_ARCH_REGS_SPI_H */ |
diff --git a/include/asm-arm/traps.h b/include/asm-arm/traps.h index d4f34dc83eb0..f1541afcf85c 100644 --- a/include/asm-arm/traps.h +++ b/include/asm-arm/traps.h | |||
@@ -15,4 +15,13 @@ struct undef_hook { | |||
15 | void register_undef_hook(struct undef_hook *hook); | 15 | void register_undef_hook(struct undef_hook *hook); |
16 | void unregister_undef_hook(struct undef_hook *hook); | 16 | void unregister_undef_hook(struct undef_hook *hook); |
17 | 17 | ||
18 | static inline int in_exception_text(unsigned long ptr) | ||
19 | { | ||
20 | extern char __exception_text_start[]; | ||
21 | extern char __exception_text_end[]; | ||
22 | |||
23 | return ptr >= (unsigned long)&__exception_text_start && | ||
24 | ptr < (unsigned long)&__exception_text_end; | ||
25 | } | ||
26 | |||
18 | #endif | 27 | #endif |
diff --git a/include/asm-arm/vfp.h b/include/asm-arm/vfp.h index bd6be9d7f772..5f9a2cb3d452 100644 --- a/include/asm-arm/vfp.h +++ b/include/asm-arm/vfp.h | |||
@@ -7,7 +7,11 @@ | |||
7 | 7 | ||
8 | #define FPSID cr0 | 8 | #define FPSID cr0 |
9 | #define FPSCR cr1 | 9 | #define FPSCR cr1 |
10 | #define MVFR1 cr6 | ||
11 | #define MVFR0 cr7 | ||
10 | #define FPEXC cr8 | 12 | #define FPEXC cr8 |
13 | #define FPINST cr9 | ||
14 | #define FPINST2 cr10 | ||
11 | 15 | ||
12 | /* FPSID bits */ | 16 | /* FPSID bits */ |
13 | #define FPSID_IMPLEMENTER_BIT (24) | 17 | #define FPSID_IMPLEMENTER_BIT (24) |
@@ -28,6 +32,19 @@ | |||
28 | /* FPEXC bits */ | 32 | /* FPEXC bits */ |
29 | #define FPEXC_EX (1 << 31) | 33 | #define FPEXC_EX (1 << 31) |
30 | #define FPEXC_EN (1 << 30) | 34 | #define FPEXC_EN (1 << 30) |
35 | #define FPEXC_DEX (1 << 29) | ||
36 | #define FPEXC_FP2V (1 << 28) | ||
37 | #define FPEXC_VV (1 << 27) | ||
38 | #define FPEXC_TFV (1 << 26) | ||
39 | #define FPEXC_LENGTH_BIT (8) | ||
40 | #define FPEXC_LENGTH_MASK (7 << FPEXC_LENGTH_BIT) | ||
41 | #define FPEXC_IDF (1 << 7) | ||
42 | #define FPEXC_IXF (1 << 4) | ||
43 | #define FPEXC_UFF (1 << 3) | ||
44 | #define FPEXC_OFF (1 << 2) | ||
45 | #define FPEXC_DZF (1 << 1) | ||
46 | #define FPEXC_IOF (1 << 0) | ||
47 | #define FPEXC_TRAP_MASK (FPEXC_IDF|FPEXC_IXF|FPEXC_UFF|FPEXC_OFF|FPEXC_DZF|FPEXC_IOF) | ||
31 | 48 | ||
32 | /* FPSCR bits */ | 49 | /* FPSCR bits */ |
33 | #define FPSCR_DEFAULT_NAN (1<<25) | 50 | #define FPSCR_DEFAULT_NAN (1<<25) |
@@ -55,20 +72,9 @@ | |||
55 | #define FPSCR_IXC (1<<4) | 72 | #define FPSCR_IXC (1<<4) |
56 | #define FPSCR_IDC (1<<7) | 73 | #define FPSCR_IDC (1<<7) |
57 | 74 | ||
58 | /* | 75 | /* MVFR0 bits */ |
59 | * VFP9-S specific. | 76 | #define MVFR0_A_SIMD_BIT (0) |
60 | */ | 77 | #define MVFR0_A_SIMD_MASK (0xf << MVFR0_A_SIMD_BIT) |
61 | #define FPINST cr9 | ||
62 | #define FPINST2 cr10 | ||
63 | |||
64 | /* FPEXC bits */ | ||
65 | #define FPEXC_FPV2 (1<<28) | ||
66 | #define FPEXC_LENGTH_BIT (8) | ||
67 | #define FPEXC_LENGTH_MASK (7 << FPEXC_LENGTH_BIT) | ||
68 | #define FPEXC_INV (1 << 7) | ||
69 | #define FPEXC_UFC (1 << 3) | ||
70 | #define FPEXC_OFC (1 << 2) | ||
71 | #define FPEXC_IOC (1 << 0) | ||
72 | 78 | ||
73 | /* Bit patterns for decoding the packaged operation descriptors */ | 79 | /* Bit patterns for decoding the packaged operation descriptors */ |
74 | #define VFPOPDESC_LENGTH_BIT (9) | 80 | #define VFPOPDESC_LENGTH_BIT (9) |
diff --git a/include/asm-arm/vfpmacros.h b/include/asm-arm/vfpmacros.h index 27fe028b4e72..cccb3892e73c 100644 --- a/include/asm-arm/vfpmacros.h +++ b/include/asm-arm/vfpmacros.h | |||
@@ -15,19 +15,33 @@ | |||
15 | .endm | 15 | .endm |
16 | 16 | ||
17 | @ read all the working registers back into the VFP | 17 | @ read all the working registers back into the VFP |
18 | .macro VFPFLDMIA, base | 18 | .macro VFPFLDMIA, base, tmp |
19 | #if __LINUX_ARM_ARCH__ < 6 | 19 | #if __LINUX_ARM_ARCH__ < 6 |
20 | LDC p11, cr0, [\base],#33*4 @ FLDMIAX \base!, {d0-d15} | 20 | LDC p11, cr0, [\base],#33*4 @ FLDMIAX \base!, {d0-d15} |
21 | #else | 21 | #else |
22 | LDC p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d0-d15} | 22 | LDC p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d0-d15} |
23 | #endif | 23 | #endif |
24 | #ifdef CONFIG_VFPv3 | ||
25 | VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 | ||
26 | and \tmp, \tmp, #MVFR0_A_SIMD_MASK @ A_SIMD field | ||
27 | cmp \tmp, #2 @ 32 x 64bit registers? | ||
28 | ldceql p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d16-d31} | ||
29 | addne \base, \base, #32*4 @ step over unused register space | ||
30 | #endif | ||
24 | .endm | 31 | .endm |
25 | 32 | ||
26 | @ write all the working registers out of the VFP | 33 | @ write all the working registers out of the VFP |
27 | .macro VFPFSTMIA, base | 34 | .macro VFPFSTMIA, base, tmp |
28 | #if __LINUX_ARM_ARCH__ < 6 | 35 | #if __LINUX_ARM_ARCH__ < 6 |
29 | STC p11, cr0, [\base],#33*4 @ FSTMIAX \base!, {d0-d15} | 36 | STC p11, cr0, [\base],#33*4 @ FSTMIAX \base!, {d0-d15} |
30 | #else | 37 | #else |
31 | STC p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d0-d15} | 38 | STC p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d0-d15} |
32 | #endif | 39 | #endif |
40 | #ifdef CONFIG_VFPv3 | ||
41 | VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 | ||
42 | and \tmp, \tmp, #MVFR0_A_SIMD_MASK @ A_SIMD field | ||
43 | cmp \tmp, #2 @ 32 x 64bit registers? | ||
44 | stceql p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d16-d31} | ||
45 | addne \base, \base, #32*4 @ step over unused register space | ||
46 | #endif | ||
33 | .endm | 47 | .endm |