diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-04-12 05:45:08 -0400 |
---|---|---|
committer | Haojian Zhuang <haojian.zhuang@gmail.com> | 2012-04-27 01:05:36 -0400 |
commit | b298322b7576c9d5750fdc7d3e588ec9238af1d3 (patch) | |
tree | e17da26951f7da782cd13e72c5d013048b0abae9 /arch/arm/mach-pxa/include/mach/pcm990_baseboard.h | |
parent | 66f75a5d028beaf67c931435fdc3e7823125730c (diff) |
ARM: pxa: use ioremap to access CPLD
The pcm990 baseboard for the pcm027 module used to setup a static
mapping for accessing the CPLD. It became illegal to call iotable_init
that late. The pcm027 support is broken since then. This patch
switches the cpld support to ioremap and removes all references to
previous static mappings.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Eric Miao <eric.y.miao@gmail.com>
Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Diffstat (limited to 'arch/arm/mach-pxa/include/mach/pcm990_baseboard.h')
-rw-r--r-- | arch/arm/mach-pxa/include/mach/pcm990_baseboard.h | 68 |
1 files changed, 2 insertions, 66 deletions
diff --git a/arch/arm/mach-pxa/include/mach/pcm990_baseboard.h b/arch/arm/mach-pxa/include/mach/pcm990_baseboard.h index d72791695b2..0260aaa2fc1 100644 --- a/arch/arm/mach-pxa/include/mach/pcm990_baseboard.h +++ b/arch/arm/mach-pxa/include/mach/pcm990_baseboard.h | |||
@@ -31,7 +31,6 @@ | |||
31 | #define PCM990_CTRL_INT_IRQ PXA_GPIO_TO_IRQ(PCM990_CTRL_INT_IRQ_GPIO) | 31 | #define PCM990_CTRL_INT_IRQ PXA_GPIO_TO_IRQ(PCM990_CTRL_INT_IRQ_GPIO) |
32 | #define PCM990_CTRL_INT_IRQ_EDGE IRQ_TYPE_EDGE_RISING | 32 | #define PCM990_CTRL_INT_IRQ_EDGE IRQ_TYPE_EDGE_RISING |
33 | #define PCM990_CTRL_PHYS PXA_CS1_PHYS /* 16-Bit */ | 33 | #define PCM990_CTRL_PHYS PXA_CS1_PHYS /* 16-Bit */ |
34 | #define PCM990_CTRL_BASE 0xea000000 | ||
35 | #define PCM990_CTRL_SIZE (1*1024*1024) | 34 | #define PCM990_CTRL_SIZE (1*1024*1024) |
36 | 35 | ||
37 | #define PCM990_CTRL_PWR_IRQ_GPIO 14 | 36 | #define PCM990_CTRL_PWR_IRQ_GPIO 14 |
@@ -69,13 +68,13 @@ | |||
69 | #define PCM990_CTRL_MMC2DE 0x0004 /* R MMC2 Card detect */ | 68 | #define PCM990_CTRL_MMC2DE 0x0004 /* R MMC2 Card detect */ |
70 | #define PCM990_CTRL_MMC2WP 0x0008 /* R MMC2 Card write protect */ | 69 | #define PCM990_CTRL_MMC2WP 0x0008 /* R MMC2 Card write protect */ |
71 | 70 | ||
72 | #define PCM990_CTRL_REG6 0x000C /* Interrupt Clear REGISTER */ | 71 | #define PCM990_CTRL_INTSETCLR 0x000C /* Interrupt Clear REGISTER */ |
73 | #define PCM990_CTRL_INTC0 0x0001 /* Clear Reg BT Detect */ | 72 | #define PCM990_CTRL_INTC0 0x0001 /* Clear Reg BT Detect */ |
74 | #define PCM990_CTRL_INTC1 0x0002 /* Clear Reg FR RI */ | 73 | #define PCM990_CTRL_INTC1 0x0002 /* Clear Reg FR RI */ |
75 | #define PCM990_CTRL_INTC2 0x0004 /* Clear Reg MMC1 Detect */ | 74 | #define PCM990_CTRL_INTC2 0x0004 /* Clear Reg MMC1 Detect */ |
76 | #define PCM990_CTRL_INTC3 0x0008 /* Clear Reg PM_5V off */ | 75 | #define PCM990_CTRL_INTC3 0x0008 /* Clear Reg PM_5V off */ |
77 | 76 | ||
78 | #define PCM990_CTRL_REG7 0x000E /* Interrupt Enable REGISTER */ | 77 | #define PCM990_CTRL_INTMSKENA 0x000E /* Interrupt Enable REGISTER */ |
79 | #define PCM990_CTRL_ENAINT0 0x0001 /* Enable Int BT Detect */ | 78 | #define PCM990_CTRL_ENAINT0 0x0001 /* Enable Int BT Detect */ |
80 | #define PCM990_CTRL_ENAINT1 0x0002 /* Enable Int FR RI */ | 79 | #define PCM990_CTRL_ENAINT1 0x0002 /* Enable Int FR RI */ |
81 | #define PCM990_CTRL_ENAINT2 0x0004 /* Enable Int MMC1 Detect */ | 80 | #define PCM990_CTRL_ENAINT2 0x0004 /* Enable Int MMC1 Detect */ |
@@ -102,32 +101,6 @@ | |||
102 | #define PCM990_CTRL_ACPRES 0x0004 /* DC Present */ | 101 | #define PCM990_CTRL_ACPRES 0x0004 /* DC Present */ |
103 | #define PCM990_CTRL_ACALARM 0x0008 /* Error Akku */ | 102 | #define PCM990_CTRL_ACALARM 0x0008 /* Error Akku */ |
104 | 103 | ||
105 | #define PCM990_CTRL_P2V(x) ((x) - PCM990_CTRL_PHYS + PCM990_CTRL_BASE) | ||
106 | #define PCM990_CTRL_V2P(x) ((x) - PCM990_CTRL_BASE + PCM990_CTRL_PHYS) | ||
107 | |||
108 | #ifndef __ASSEMBLY__ | ||
109 | # define __PCM990_CTRL_REG(x) \ | ||
110 | (*((volatile unsigned char *)PCM990_CTRL_P2V(x))) | ||
111 | #else | ||
112 | # define __PCM990_CTRL_REG(x) PCM990_CTRL_P2V(x) | ||
113 | #endif | ||
114 | |||
115 | #define PCM990_INTMSKENA __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG7) | ||
116 | #define PCM990_INTSETCLR __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG6) | ||
117 | #define PCM990_CTRL0 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG0) | ||
118 | #define PCM990_CTRL1 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG1) | ||
119 | #define PCM990_CTRL2 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG2) | ||
120 | #define PCM990_CTRL3 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG3) | ||
121 | #define PCM990_CTRL4 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG4) | ||
122 | #define PCM990_CTRL5 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG5) | ||
123 | #define PCM990_CTRL6 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG6) | ||
124 | #define PCM990_CTRL7 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG7) | ||
125 | #define PCM990_CTRL8 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG8) | ||
126 | #define PCM990_CTRL9 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG9) | ||
127 | #define PCM990_CTRL10 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG10) | ||
128 | #define PCM990_CTRL11 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG11) | ||
129 | |||
130 | |||
131 | /* | 104 | /* |
132 | * IDE | 105 | * IDE |
133 | */ | 106 | */ |
@@ -166,24 +139,6 @@ | |||
166 | #define PCM990_IDE_PLD_P2V(x) ((x) - PCM990_IDE_PLD_PHYS + PCM990_IDE_PLD_BASE) | 139 | #define PCM990_IDE_PLD_P2V(x) ((x) - PCM990_IDE_PLD_PHYS + PCM990_IDE_PLD_BASE) |
167 | #define PCM990_IDE_PLD_V2P(x) ((x) - PCM990_IDE_PLD_BASE + PCM990_IDE_PLD_PHYS) | 140 | #define PCM990_IDE_PLD_V2P(x) ((x) - PCM990_IDE_PLD_BASE + PCM990_IDE_PLD_PHYS) |
168 | 141 | ||
169 | #ifndef __ASSEMBLY__ | ||
170 | # define __PCM990_IDE_PLD_REG(x) \ | ||
171 | (*((volatile unsigned char *)PCM990_IDE_PLD_P2V(x))) | ||
172 | #else | ||
173 | # define __PCM990_IDE_PLD_REG(x) PCM990_IDE_PLD_P2V(x) | ||
174 | #endif | ||
175 | |||
176 | #define PCM990_IDE0 \ | ||
177 | __PCM990_IDE_PLD_REG(PCM990_IDE_PLD_PHYS + PCM990_IDE_PLD_REG0) | ||
178 | #define PCM990_IDE1 \ | ||
179 | __PCM990_IDE_PLD_REG(PCM990_IDE_PLD_PHYS + PCM990_IDE_PLD_REG1) | ||
180 | #define PCM990_IDE2 \ | ||
181 | __PCM990_IDE_PLD_REG(PCM990_IDE_PLD_PHYS + PCM990_IDE_PLD_REG2) | ||
182 | #define PCM990_IDE3 \ | ||
183 | __PCM990_IDE_PLD_REG(PCM990_IDE_PLD_PHYS + PCM990_IDE_PLD_REG3) | ||
184 | #define PCM990_IDE4 \ | ||
185 | __PCM990_IDE_PLD_REG(PCM990_IDE_PLD_PHYS + PCM990_IDE_PLD_REG4) | ||
186 | |||
187 | /* | 142 | /* |
188 | * Compact Flash | 143 | * Compact Flash |
189 | */ | 144 | */ |
@@ -196,10 +151,6 @@ | |||
196 | #define PCM990_CF_CD_EDGE IRQ_TYPE_EDGE_RISING | 151 | #define PCM990_CF_CD_EDGE IRQ_TYPE_EDGE_RISING |
197 | 152 | ||
198 | #define PCM990_CF_PLD_PHYS 0x30000000 /* 16 bit wide */ | 153 | #define PCM990_CF_PLD_PHYS 0x30000000 /* 16 bit wide */ |
199 | #define PCM990_CF_PLD_BASE 0xef000000 | ||
200 | #define PCM990_CF_PLD_SIZE (1*1024*1024) | ||
201 | #define PCM990_CF_PLD_P2V(x) ((x) - PCM990_CF_PLD_PHYS + PCM990_CF_PLD_BASE) | ||
202 | #define PCM990_CF_PLD_V2P(x) ((x) - PCM990_CF_PLD_BASE + PCM990_CF_PLD_PHYS) | ||
203 | 154 | ||
204 | /* visible CPLD (U6) registers */ | 155 | /* visible CPLD (U6) registers */ |
205 | #define PCM990_CF_PLD_REG0 0x1000 /* OFFSET CF REGISTER 0 */ | 156 | #define PCM990_CF_PLD_REG0 0x1000 /* OFFSET CF REGISTER 0 */ |
@@ -239,21 +190,6 @@ | |||
239 | #define PCM990_CF_REG6_CD1 0x0001 /* R CF Card_Detect1 */ | 190 | #define PCM990_CF_REG6_CD1 0x0001 /* R CF Card_Detect1 */ |
240 | #define PCM990_CF_REG6_CD2 0x0002 /* R CF Card_Detect2 */ | 191 | #define PCM990_CF_REG6_CD2 0x0002 /* R CF Card_Detect2 */ |
241 | 192 | ||
242 | #ifndef __ASSEMBLY__ | ||
243 | # define __PCM990_CF_PLD_REG(x) \ | ||
244 | (*((volatile unsigned char *)PCM990_CF_PLD_P2V(x))) | ||
245 | #else | ||
246 | # define __PCM990_CF_PLD_REG(x) PCM990_CF_PLD_P2V(x) | ||
247 | #endif | ||
248 | |||
249 | #define PCM990_CF0 __PCM990_CF_PLD_REG(PCM990_CF_PLD_PHYS + PCM990_CF_PLD_REG0) | ||
250 | #define PCM990_CF1 __PCM990_CF_PLD_REG(PCM990_CF_PLD_PHYS + PCM990_CF_PLD_REG1) | ||
251 | #define PCM990_CF2 __PCM990_CF_PLD_REG(PCM990_CF_PLD_PHYS + PCM990_CF_PLD_REG2) | ||
252 | #define PCM990_CF3 __PCM990_CF_PLD_REG(PCM990_CF_PLD_PHYS + PCM990_CF_PLD_REG3) | ||
253 | #define PCM990_CF4 __PCM990_CF_PLD_REG(PCM990_CF_PLD_PHYS + PCM990_CF_PLD_REG4) | ||
254 | #define PCM990_CF5 __PCM990_CF_PLD_REG(PCM990_CF_PLD_PHYS + PCM990_CF_PLD_REG5) | ||
255 | #define PCM990_CF6 __PCM990_CF_PLD_REG(PCM990_CF_PLD_PHYS + PCM990_CF_PLD_REG6) | ||
256 | |||
257 | /* | 193 | /* |
258 | * Wolfson AC97 Touch | 194 | * Wolfson AC97 Touch |
259 | */ | 195 | */ |