diff options
author | Arnd Bergmann <arnd@arndb.de> | 2011-07-28 11:25:46 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2011-07-28 11:25:46 -0400 |
commit | 6124a4e430b64d1577438c8648c59e996d02e73e (patch) | |
tree | 49cfafad785d1c9e403a5b0d755298b9af2c260f /arch/arm/mach-s5p64x0 | |
parent | 8e267f3da5f117d2f1316cf6ddf740f93f1c73aa (diff) | |
parent | 580975d7f48d7d047e22bb0f42adf7557801d8d4 (diff) |
Merge branch 'imx/dt' into next/dt
Diffstat (limited to 'arch/arm/mach-s5p64x0')
-rw-r--r-- | arch/arm/mach-s5p64x0/Kconfig | 2 | ||||
-rw-r--r-- | arch/arm/mach-s5p64x0/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-s5p64x0/clock-s5p6440.c | 74 | ||||
-rw-r--r-- | arch/arm/mach-s5p64x0/clock-s5p6450.c | 68 | ||||
-rw-r--r-- | arch/arm/mach-s5p64x0/include/mach/clkdev.h | 7 | ||||
-rw-r--r-- | arch/arm/mach-s5p64x0/include/mach/irqs.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-s5p64x0/include/mach/regs-gpio.h | 10 | ||||
-rw-r--r-- | arch/arm/mach-s5p64x0/irq-eint.c | 152 | ||||
-rw-r--r-- | arch/arm/mach-s5p64x0/mach-smdk6440.c | 54 | ||||
-rw-r--r-- | arch/arm/mach-s5p64x0/mach-smdk6450.c | 54 |
10 files changed, 239 insertions, 186 deletions
diff --git a/arch/arm/mach-s5p64x0/Kconfig b/arch/arm/mach-s5p64x0/Kconfig index 017af4c4293c..65c7518dad7f 100644 --- a/arch/arm/mach-s5p64x0/Kconfig +++ b/arch/arm/mach-s5p64x0/Kconfig | |||
@@ -36,6 +36,7 @@ config MACH_SMDK6440 | |||
36 | select S3C_DEV_WDT | 36 | select S3C_DEV_WDT |
37 | select S3C64XX_DEV_SPI | 37 | select S3C64XX_DEV_SPI |
38 | select SAMSUNG_DEV_ADC | 38 | select SAMSUNG_DEV_ADC |
39 | select SAMSUNG_DEV_BACKLIGHT | ||
39 | select SAMSUNG_DEV_PWM | 40 | select SAMSUNG_DEV_PWM |
40 | select SAMSUNG_DEV_TS | 41 | select SAMSUNG_DEV_TS |
41 | select S5P64X0_SETUP_I2C1 | 42 | select S5P64X0_SETUP_I2C1 |
@@ -50,6 +51,7 @@ config MACH_SMDK6450 | |||
50 | select S3C_DEV_WDT | 51 | select S3C_DEV_WDT |
51 | select S3C64XX_DEV_SPI | 52 | select S3C64XX_DEV_SPI |
52 | select SAMSUNG_DEV_ADC | 53 | select SAMSUNG_DEV_ADC |
54 | select SAMSUNG_DEV_BACKLIGHT | ||
53 | select SAMSUNG_DEV_PWM | 55 | select SAMSUNG_DEV_PWM |
54 | select SAMSUNG_DEV_TS | 56 | select SAMSUNG_DEV_TS |
55 | select S5P64X0_SETUP_I2C1 | 57 | select S5P64X0_SETUP_I2C1 |
diff --git a/arch/arm/mach-s5p64x0/Makefile b/arch/arm/mach-s5p64x0/Makefile index ae6bf6feba89..5f6afdf067ed 100644 --- a/arch/arm/mach-s5p64x0/Makefile +++ b/arch/arm/mach-s5p64x0/Makefile | |||
@@ -13,7 +13,7 @@ obj- := | |||
13 | # Core support for S5P64X0 system | 13 | # Core support for S5P64X0 system |
14 | 14 | ||
15 | obj-$(CONFIG_ARCH_S5P64X0) += cpu.o init.o clock.o dma.o gpiolib.o | 15 | obj-$(CONFIG_ARCH_S5P64X0) += cpu.o init.o clock.o dma.o gpiolib.o |
16 | obj-$(CONFIG_ARCH_S5P64X0) += setup-i2c0.o | 16 | obj-$(CONFIG_ARCH_S5P64X0) += setup-i2c0.o irq-eint.o |
17 | obj-$(CONFIG_CPU_S5P6440) += clock-s5p6440.o | 17 | obj-$(CONFIG_CPU_S5P6440) += clock-s5p6440.o |
18 | obj-$(CONFIG_CPU_S5P6450) += clock-s5p6450.o | 18 | obj-$(CONFIG_CPU_S5P6450) += clock-s5p6450.o |
19 | 19 | ||
diff --git a/arch/arm/mach-s5p64x0/clock-s5p6440.c b/arch/arm/mach-s5p64x0/clock-s5p6440.c index 9f12c2ebf416..0e9cd3092dd2 100644 --- a/arch/arm/mach-s5p64x0/clock-s5p6440.c +++ b/arch/arm/mach-s5p64x0/clock-s5p6440.c | |||
@@ -95,7 +95,6 @@ static struct clk_ops s5p6440_epll_ops = { | |||
95 | static struct clksrc_clk clk_hclk = { | 95 | static struct clksrc_clk clk_hclk = { |
96 | .clk = { | 96 | .clk = { |
97 | .name = "clk_hclk", | 97 | .name = "clk_hclk", |
98 | .id = -1, | ||
99 | .parent = &clk_armclk.clk, | 98 | .parent = &clk_armclk.clk, |
100 | }, | 99 | }, |
101 | .reg_div = { .reg = S5P64X0_CLK_DIV0, .shift = 8, .size = 4 }, | 100 | .reg_div = { .reg = S5P64X0_CLK_DIV0, .shift = 8, .size = 4 }, |
@@ -104,7 +103,6 @@ static struct clksrc_clk clk_hclk = { | |||
104 | static struct clksrc_clk clk_pclk = { | 103 | static struct clksrc_clk clk_pclk = { |
105 | .clk = { | 104 | .clk = { |
106 | .name = "clk_pclk", | 105 | .name = "clk_pclk", |
107 | .id = -1, | ||
108 | .parent = &clk_hclk.clk, | 106 | .parent = &clk_hclk.clk, |
109 | }, | 107 | }, |
110 | .reg_div = { .reg = S5P64X0_CLK_DIV0, .shift = 12, .size = 4 }, | 108 | .reg_div = { .reg = S5P64X0_CLK_DIV0, .shift = 12, .size = 4 }, |
@@ -112,7 +110,6 @@ static struct clksrc_clk clk_pclk = { | |||
112 | static struct clksrc_clk clk_hclk_low = { | 110 | static struct clksrc_clk clk_hclk_low = { |
113 | .clk = { | 111 | .clk = { |
114 | .name = "clk_hclk_low", | 112 | .name = "clk_hclk_low", |
115 | .id = -1, | ||
116 | }, | 113 | }, |
117 | .sources = &clkset_hclk_low, | 114 | .sources = &clkset_hclk_low, |
118 | .reg_src = { .reg = S5P64X0_SYS_OTHERS, .shift = 6, .size = 1 }, | 115 | .reg_src = { .reg = S5P64X0_SYS_OTHERS, .shift = 6, .size = 1 }, |
@@ -122,7 +119,6 @@ static struct clksrc_clk clk_hclk_low = { | |||
122 | static struct clksrc_clk clk_pclk_low = { | 119 | static struct clksrc_clk clk_pclk_low = { |
123 | .clk = { | 120 | .clk = { |
124 | .name = "clk_pclk_low", | 121 | .name = "clk_pclk_low", |
125 | .id = -1, | ||
126 | .parent = &clk_hclk_low.clk, | 122 | .parent = &clk_hclk_low.clk, |
127 | }, | 123 | }, |
128 | .reg_div = { .reg = S5P64X0_CLK_DIV3, .shift = 12, .size = 4 }, | 124 | .reg_div = { .reg = S5P64X0_CLK_DIV3, .shift = 12, .size = 4 }, |
@@ -136,187 +132,167 @@ static struct clksrc_clk clk_pclk_low = { | |||
136 | static struct clk init_clocks_off[] = { | 132 | static struct clk init_clocks_off[] = { |
137 | { | 133 | { |
138 | .name = "nand", | 134 | .name = "nand", |
139 | .id = -1, | ||
140 | .parent = &clk_hclk.clk, | 135 | .parent = &clk_hclk.clk, |
141 | .enable = s5p64x0_mem_ctrl, | 136 | .enable = s5p64x0_mem_ctrl, |
142 | .ctrlbit = (1 << 2), | 137 | .ctrlbit = (1 << 2), |
143 | }, { | 138 | }, { |
144 | .name = "post", | 139 | .name = "post", |
145 | .id = -1, | ||
146 | .parent = &clk_hclk_low.clk, | 140 | .parent = &clk_hclk_low.clk, |
147 | .enable = s5p64x0_hclk0_ctrl, | 141 | .enable = s5p64x0_hclk0_ctrl, |
148 | .ctrlbit = (1 << 5) | 142 | .ctrlbit = (1 << 5) |
149 | }, { | 143 | }, { |
150 | .name = "2d", | 144 | .name = "2d", |
151 | .id = -1, | ||
152 | .parent = &clk_hclk.clk, | 145 | .parent = &clk_hclk.clk, |
153 | .enable = s5p64x0_hclk0_ctrl, | 146 | .enable = s5p64x0_hclk0_ctrl, |
154 | .ctrlbit = (1 << 8), | 147 | .ctrlbit = (1 << 8), |
155 | }, { | 148 | }, { |
156 | .name = "pdma", | 149 | .name = "pdma", |
157 | .id = -1, | ||
158 | .parent = &clk_hclk_low.clk, | 150 | .parent = &clk_hclk_low.clk, |
159 | .enable = s5p64x0_hclk0_ctrl, | 151 | .enable = s5p64x0_hclk0_ctrl, |
160 | .ctrlbit = (1 << 12), | 152 | .ctrlbit = (1 << 12), |
161 | }, { | 153 | }, { |
162 | .name = "hsmmc", | 154 | .name = "hsmmc", |
163 | .id = 0, | 155 | .devname = "s3c-sdhci.0", |
164 | .parent = &clk_hclk_low.clk, | 156 | .parent = &clk_hclk_low.clk, |
165 | .enable = s5p64x0_hclk0_ctrl, | 157 | .enable = s5p64x0_hclk0_ctrl, |
166 | .ctrlbit = (1 << 17), | 158 | .ctrlbit = (1 << 17), |
167 | }, { | 159 | }, { |
168 | .name = "hsmmc", | 160 | .name = "hsmmc", |
169 | .id = 1, | 161 | .devname = "s3c-sdhci.1", |
170 | .parent = &clk_hclk_low.clk, | 162 | .parent = &clk_hclk_low.clk, |
171 | .enable = s5p64x0_hclk0_ctrl, | 163 | .enable = s5p64x0_hclk0_ctrl, |
172 | .ctrlbit = (1 << 18), | 164 | .ctrlbit = (1 << 18), |
173 | }, { | 165 | }, { |
174 | .name = "hsmmc", | 166 | .name = "hsmmc", |
175 | .id = 2, | 167 | .devname = "s3c-sdhci.2", |
176 | .parent = &clk_hclk_low.clk, | 168 | .parent = &clk_hclk_low.clk, |
177 | .enable = s5p64x0_hclk0_ctrl, | 169 | .enable = s5p64x0_hclk0_ctrl, |
178 | .ctrlbit = (1 << 19), | 170 | .ctrlbit = (1 << 19), |
179 | }, { | 171 | }, { |
180 | .name = "otg", | 172 | .name = "otg", |
181 | .id = -1, | ||
182 | .parent = &clk_hclk_low.clk, | 173 | .parent = &clk_hclk_low.clk, |
183 | .enable = s5p64x0_hclk0_ctrl, | 174 | .enable = s5p64x0_hclk0_ctrl, |
184 | .ctrlbit = (1 << 20) | 175 | .ctrlbit = (1 << 20) |
185 | }, { | 176 | }, { |
186 | .name = "irom", | 177 | .name = "irom", |
187 | .id = -1, | ||
188 | .parent = &clk_hclk.clk, | 178 | .parent = &clk_hclk.clk, |
189 | .enable = s5p64x0_hclk0_ctrl, | 179 | .enable = s5p64x0_hclk0_ctrl, |
190 | .ctrlbit = (1 << 25), | 180 | .ctrlbit = (1 << 25), |
191 | }, { | 181 | }, { |
192 | .name = "lcd", | 182 | .name = "lcd", |
193 | .id = -1, | ||
194 | .parent = &clk_hclk_low.clk, | 183 | .parent = &clk_hclk_low.clk, |
195 | .enable = s5p64x0_hclk1_ctrl, | 184 | .enable = s5p64x0_hclk1_ctrl, |
196 | .ctrlbit = (1 << 1), | 185 | .ctrlbit = (1 << 1), |
197 | }, { | 186 | }, { |
198 | .name = "hclk_fimgvg", | 187 | .name = "hclk_fimgvg", |
199 | .id = -1, | ||
200 | .parent = &clk_hclk.clk, | 188 | .parent = &clk_hclk.clk, |
201 | .enable = s5p64x0_hclk1_ctrl, | 189 | .enable = s5p64x0_hclk1_ctrl, |
202 | .ctrlbit = (1 << 2), | 190 | .ctrlbit = (1 << 2), |
203 | }, { | 191 | }, { |
204 | .name = "tsi", | 192 | .name = "tsi", |
205 | .id = -1, | ||
206 | .parent = &clk_hclk_low.clk, | 193 | .parent = &clk_hclk_low.clk, |
207 | .enable = s5p64x0_hclk1_ctrl, | 194 | .enable = s5p64x0_hclk1_ctrl, |
208 | .ctrlbit = (1 << 0), | 195 | .ctrlbit = (1 << 0), |
209 | }, { | 196 | }, { |
210 | .name = "watchdog", | 197 | .name = "watchdog", |
211 | .id = -1, | ||
212 | .parent = &clk_pclk_low.clk, | 198 | .parent = &clk_pclk_low.clk, |
213 | .enable = s5p64x0_pclk_ctrl, | 199 | .enable = s5p64x0_pclk_ctrl, |
214 | .ctrlbit = (1 << 5), | 200 | .ctrlbit = (1 << 5), |
215 | }, { | 201 | }, { |
216 | .name = "rtc", | 202 | .name = "rtc", |
217 | .id = -1, | ||
218 | .parent = &clk_pclk_low.clk, | 203 | .parent = &clk_pclk_low.clk, |
219 | .enable = s5p64x0_pclk_ctrl, | 204 | .enable = s5p64x0_pclk_ctrl, |
220 | .ctrlbit = (1 << 6), | 205 | .ctrlbit = (1 << 6), |
221 | }, { | 206 | }, { |
222 | .name = "timers", | 207 | .name = "timers", |
223 | .id = -1, | ||
224 | .parent = &clk_pclk_low.clk, | 208 | .parent = &clk_pclk_low.clk, |
225 | .enable = s5p64x0_pclk_ctrl, | 209 | .enable = s5p64x0_pclk_ctrl, |
226 | .ctrlbit = (1 << 7), | 210 | .ctrlbit = (1 << 7), |
227 | }, { | 211 | }, { |
228 | .name = "pcm", | 212 | .name = "pcm", |
229 | .id = -1, | ||
230 | .parent = &clk_pclk_low.clk, | 213 | .parent = &clk_pclk_low.clk, |
231 | .enable = s5p64x0_pclk_ctrl, | 214 | .enable = s5p64x0_pclk_ctrl, |
232 | .ctrlbit = (1 << 8), | 215 | .ctrlbit = (1 << 8), |
233 | }, { | 216 | }, { |
234 | .name = "adc", | 217 | .name = "adc", |
235 | .id = -1, | ||
236 | .parent = &clk_pclk_low.clk, | 218 | .parent = &clk_pclk_low.clk, |
237 | .enable = s5p64x0_pclk_ctrl, | 219 | .enable = s5p64x0_pclk_ctrl, |
238 | .ctrlbit = (1 << 12), | 220 | .ctrlbit = (1 << 12), |
239 | }, { | 221 | }, { |
240 | .name = "i2c", | 222 | .name = "i2c", |
241 | .id = -1, | ||
242 | .parent = &clk_pclk_low.clk, | 223 | .parent = &clk_pclk_low.clk, |
243 | .enable = s5p64x0_pclk_ctrl, | 224 | .enable = s5p64x0_pclk_ctrl, |
244 | .ctrlbit = (1 << 17), | 225 | .ctrlbit = (1 << 17), |
245 | }, { | 226 | }, { |
246 | .name = "spi", | 227 | .name = "spi", |
247 | .id = 0, | 228 | .devname = "s3c64xx-spi.0", |
248 | .parent = &clk_pclk_low.clk, | 229 | .parent = &clk_pclk_low.clk, |
249 | .enable = s5p64x0_pclk_ctrl, | 230 | .enable = s5p64x0_pclk_ctrl, |
250 | .ctrlbit = (1 << 21), | 231 | .ctrlbit = (1 << 21), |
251 | }, { | 232 | }, { |
252 | .name = "spi", | 233 | .name = "spi", |
253 | .id = 1, | 234 | .devname = "s3c64xx-spi.1", |
254 | .parent = &clk_pclk_low.clk, | 235 | .parent = &clk_pclk_low.clk, |
255 | .enable = s5p64x0_pclk_ctrl, | 236 | .enable = s5p64x0_pclk_ctrl, |
256 | .ctrlbit = (1 << 22), | 237 | .ctrlbit = (1 << 22), |
257 | }, { | 238 | }, { |
258 | .name = "gps", | 239 | .name = "gps", |
259 | .id = -1, | ||
260 | .parent = &clk_pclk_low.clk, | 240 | .parent = &clk_pclk_low.clk, |
261 | .enable = s5p64x0_pclk_ctrl, | 241 | .enable = s5p64x0_pclk_ctrl, |
262 | .ctrlbit = (1 << 25), | 242 | .ctrlbit = (1 << 25), |
263 | }, { | 243 | }, { |
264 | .name = "iis", | 244 | .name = "iis", |
265 | .id = 0, | 245 | .devname = "samsung-i2s.0", |
266 | .parent = &clk_pclk_low.clk, | 246 | .parent = &clk_pclk_low.clk, |
267 | .enable = s5p64x0_pclk_ctrl, | 247 | .enable = s5p64x0_pclk_ctrl, |
268 | .ctrlbit = (1 << 26), | 248 | .ctrlbit = (1 << 26), |
269 | }, { | 249 | }, { |
270 | .name = "dsim", | 250 | .name = "dsim", |
271 | .id = -1, | ||
272 | .parent = &clk_pclk_low.clk, | 251 | .parent = &clk_pclk_low.clk, |
273 | .enable = s5p64x0_pclk_ctrl, | 252 | .enable = s5p64x0_pclk_ctrl, |
274 | .ctrlbit = (1 << 28), | 253 | .ctrlbit = (1 << 28), |
275 | }, { | 254 | }, { |
276 | .name = "etm", | 255 | .name = "etm", |
277 | .id = -1, | ||
278 | .parent = &clk_pclk.clk, | 256 | .parent = &clk_pclk.clk, |
279 | .enable = s5p64x0_pclk_ctrl, | 257 | .enable = s5p64x0_pclk_ctrl, |
280 | .ctrlbit = (1 << 29), | 258 | .ctrlbit = (1 << 29), |
281 | }, { | 259 | }, { |
282 | .name = "dmc0", | 260 | .name = "dmc0", |
283 | .id = -1, | ||
284 | .parent = &clk_pclk.clk, | 261 | .parent = &clk_pclk.clk, |
285 | .enable = s5p64x0_pclk_ctrl, | 262 | .enable = s5p64x0_pclk_ctrl, |
286 | .ctrlbit = (1 << 30), | 263 | .ctrlbit = (1 << 30), |
287 | }, { | 264 | }, { |
288 | .name = "pclk_fimgvg", | 265 | .name = "pclk_fimgvg", |
289 | .id = -1, | ||
290 | .parent = &clk_pclk.clk, | 266 | .parent = &clk_pclk.clk, |
291 | .enable = s5p64x0_pclk_ctrl, | 267 | .enable = s5p64x0_pclk_ctrl, |
292 | .ctrlbit = (1 << 31), | 268 | .ctrlbit = (1 << 31), |
293 | }, { | 269 | }, { |
294 | .name = "sclk_spi_48", | 270 | .name = "sclk_spi_48", |
295 | .id = 0, | 271 | .devname = "s3c64xx-spi.0", |
296 | .parent = &clk_48m, | 272 | .parent = &clk_48m, |
297 | .enable = s5p64x0_sclk_ctrl, | 273 | .enable = s5p64x0_sclk_ctrl, |
298 | .ctrlbit = (1 << 22), | 274 | .ctrlbit = (1 << 22), |
299 | }, { | 275 | }, { |
300 | .name = "sclk_spi_48", | 276 | .name = "sclk_spi_48", |
301 | .id = 1, | 277 | .devname = "s3c64xx-spi.1", |
302 | .parent = &clk_48m, | 278 | .parent = &clk_48m, |
303 | .enable = s5p64x0_sclk_ctrl, | 279 | .enable = s5p64x0_sclk_ctrl, |
304 | .ctrlbit = (1 << 23), | 280 | .ctrlbit = (1 << 23), |
305 | }, { | 281 | }, { |
306 | .name = "mmc_48m", | 282 | .name = "mmc_48m", |
307 | .id = 0, | 283 | .devname = "s3c-sdhci.0", |
308 | .parent = &clk_48m, | 284 | .parent = &clk_48m, |
309 | .enable = s5p64x0_sclk_ctrl, | 285 | .enable = s5p64x0_sclk_ctrl, |
310 | .ctrlbit = (1 << 27), | 286 | .ctrlbit = (1 << 27), |
311 | }, { | 287 | }, { |
312 | .name = "mmc_48m", | 288 | .name = "mmc_48m", |
313 | .id = 1, | 289 | .devname = "s3c-sdhci.1", |
314 | .parent = &clk_48m, | 290 | .parent = &clk_48m, |
315 | .enable = s5p64x0_sclk_ctrl, | 291 | .enable = s5p64x0_sclk_ctrl, |
316 | .ctrlbit = (1 << 28), | 292 | .ctrlbit = (1 << 28), |
317 | }, { | 293 | }, { |
318 | .name = "mmc_48m", | 294 | .name = "mmc_48m", |
319 | .id = 2, | 295 | .devname = "s3c-sdhci.2", |
320 | .parent = &clk_48m, | 296 | .parent = &clk_48m, |
321 | .enable = s5p64x0_sclk_ctrl, | 297 | .enable = s5p64x0_sclk_ctrl, |
322 | .ctrlbit = (1 << 29), | 298 | .ctrlbit = (1 << 29), |
@@ -329,43 +305,40 @@ static struct clk init_clocks_off[] = { | |||
329 | static struct clk init_clocks[] = { | 305 | static struct clk init_clocks[] = { |
330 | { | 306 | { |
331 | .name = "intc", | 307 | .name = "intc", |
332 | .id = -1, | ||
333 | .parent = &clk_hclk.clk, | 308 | .parent = &clk_hclk.clk, |
334 | .enable = s5p64x0_hclk0_ctrl, | 309 | .enable = s5p64x0_hclk0_ctrl, |
335 | .ctrlbit = (1 << 1), | 310 | .ctrlbit = (1 << 1), |
336 | }, { | 311 | }, { |
337 | .name = "mem", | 312 | .name = "mem", |
338 | .id = -1, | ||
339 | .parent = &clk_hclk.clk, | 313 | .parent = &clk_hclk.clk, |
340 | .enable = s5p64x0_hclk0_ctrl, | 314 | .enable = s5p64x0_hclk0_ctrl, |
341 | .ctrlbit = (1 << 21), | 315 | .ctrlbit = (1 << 21), |
342 | }, { | 316 | }, { |
343 | .name = "uart", | 317 | .name = "uart", |
344 | .id = 0, | 318 | .devname = "s3c6400-uart.0", |
345 | .parent = &clk_pclk_low.clk, | 319 | .parent = &clk_pclk_low.clk, |
346 | .enable = s5p64x0_pclk_ctrl, | 320 | .enable = s5p64x0_pclk_ctrl, |
347 | .ctrlbit = (1 << 1), | 321 | .ctrlbit = (1 << 1), |
348 | }, { | 322 | }, { |
349 | .name = "uart", | 323 | .name = "uart", |
350 | .id = 1, | 324 | .devname = "s3c6400-uart.1", |
351 | .parent = &clk_pclk_low.clk, | 325 | .parent = &clk_pclk_low.clk, |
352 | .enable = s5p64x0_pclk_ctrl, | 326 | .enable = s5p64x0_pclk_ctrl, |
353 | .ctrlbit = (1 << 2), | 327 | .ctrlbit = (1 << 2), |
354 | }, { | 328 | }, { |
355 | .name = "uart", | 329 | .name = "uart", |
356 | .id = 2, | 330 | .devname = "s3c6400-uart.2", |
357 | .parent = &clk_pclk_low.clk, | 331 | .parent = &clk_pclk_low.clk, |
358 | .enable = s5p64x0_pclk_ctrl, | 332 | .enable = s5p64x0_pclk_ctrl, |
359 | .ctrlbit = (1 << 3), | 333 | .ctrlbit = (1 << 3), |
360 | }, { | 334 | }, { |
361 | .name = "uart", | 335 | .name = "uart", |
362 | .id = 3, | 336 | .devname = "s3c6400-uart.3", |
363 | .parent = &clk_pclk_low.clk, | 337 | .parent = &clk_pclk_low.clk, |
364 | .enable = s5p64x0_pclk_ctrl, | 338 | .enable = s5p64x0_pclk_ctrl, |
365 | .ctrlbit = (1 << 4), | 339 | .ctrlbit = (1 << 4), |
366 | }, { | 340 | }, { |
367 | .name = "gpio", | 341 | .name = "gpio", |
368 | .id = -1, | ||
369 | .parent = &clk_pclk_low.clk, | 342 | .parent = &clk_pclk_low.clk, |
370 | .enable = s5p64x0_pclk_ctrl, | 343 | .enable = s5p64x0_pclk_ctrl, |
371 | .ctrlbit = (1 << 18), | 344 | .ctrlbit = (1 << 18), |
@@ -374,12 +347,10 @@ static struct clk init_clocks[] = { | |||
374 | 347 | ||
375 | static struct clk clk_iis_cd_v40 = { | 348 | static struct clk clk_iis_cd_v40 = { |
376 | .name = "iis_cdclk_v40", | 349 | .name = "iis_cdclk_v40", |
377 | .id = -1, | ||
378 | }; | 350 | }; |
379 | 351 | ||
380 | static struct clk clk_pcm_cd = { | 352 | static struct clk clk_pcm_cd = { |
381 | .name = "pcm_cdclk", | 353 | .name = "pcm_cdclk", |
382 | .id = -1, | ||
383 | }; | 354 | }; |
384 | 355 | ||
385 | static struct clk *clkset_group1_list[] = { | 356 | static struct clk *clkset_group1_list[] = { |
@@ -420,7 +391,7 @@ static struct clksrc_clk clksrcs[] = { | |||
420 | { | 391 | { |
421 | .clk = { | 392 | .clk = { |
422 | .name = "sclk_mmc", | 393 | .name = "sclk_mmc", |
423 | .id = 0, | 394 | .devname = "s3c-sdhci.0", |
424 | .ctrlbit = (1 << 24), | 395 | .ctrlbit = (1 << 24), |
425 | .enable = s5p64x0_sclk_ctrl, | 396 | .enable = s5p64x0_sclk_ctrl, |
426 | }, | 397 | }, |
@@ -430,7 +401,7 @@ static struct clksrc_clk clksrcs[] = { | |||
430 | }, { | 401 | }, { |
431 | .clk = { | 402 | .clk = { |
432 | .name = "sclk_mmc", | 403 | .name = "sclk_mmc", |
433 | .id = 1, | 404 | .devname = "s3c-sdhci.1", |
434 | .ctrlbit = (1 << 25), | 405 | .ctrlbit = (1 << 25), |
435 | .enable = s5p64x0_sclk_ctrl, | 406 | .enable = s5p64x0_sclk_ctrl, |
436 | }, | 407 | }, |
@@ -440,7 +411,7 @@ static struct clksrc_clk clksrcs[] = { | |||
440 | }, { | 411 | }, { |
441 | .clk = { | 412 | .clk = { |
442 | .name = "sclk_mmc", | 413 | .name = "sclk_mmc", |
443 | .id = 2, | 414 | .devname = "s3c-sdhci.2", |
444 | .ctrlbit = (1 << 26), | 415 | .ctrlbit = (1 << 26), |
445 | .enable = s5p64x0_sclk_ctrl, | 416 | .enable = s5p64x0_sclk_ctrl, |
446 | }, | 417 | }, |
@@ -450,7 +421,6 @@ static struct clksrc_clk clksrcs[] = { | |||
450 | }, { | 421 | }, { |
451 | .clk = { | 422 | .clk = { |
452 | .name = "uclk1", | 423 | .name = "uclk1", |
453 | .id = -1, | ||
454 | .ctrlbit = (1 << 5), | 424 | .ctrlbit = (1 << 5), |
455 | .enable = s5p64x0_sclk_ctrl, | 425 | .enable = s5p64x0_sclk_ctrl, |
456 | }, | 426 | }, |
@@ -460,7 +430,7 @@ static struct clksrc_clk clksrcs[] = { | |||
460 | }, { | 430 | }, { |
461 | .clk = { | 431 | .clk = { |
462 | .name = "sclk_spi", | 432 | .name = "sclk_spi", |
463 | .id = 0, | 433 | .devname = "s3c64xx-spi.0", |
464 | .ctrlbit = (1 << 20), | 434 | .ctrlbit = (1 << 20), |
465 | .enable = s5p64x0_sclk_ctrl, | 435 | .enable = s5p64x0_sclk_ctrl, |
466 | }, | 436 | }, |
@@ -470,7 +440,7 @@ static struct clksrc_clk clksrcs[] = { | |||
470 | }, { | 440 | }, { |
471 | .clk = { | 441 | .clk = { |
472 | .name = "sclk_spi", | 442 | .name = "sclk_spi", |
473 | .id = 1, | 443 | .devname = "s3c64xx-spi.1", |
474 | .ctrlbit = (1 << 21), | 444 | .ctrlbit = (1 << 21), |
475 | .enable = s5p64x0_sclk_ctrl, | 445 | .enable = s5p64x0_sclk_ctrl, |
476 | }, | 446 | }, |
@@ -480,7 +450,6 @@ static struct clksrc_clk clksrcs[] = { | |||
480 | }, { | 450 | }, { |
481 | .clk = { | 451 | .clk = { |
482 | .name = "sclk_post", | 452 | .name = "sclk_post", |
483 | .id = -1, | ||
484 | .ctrlbit = (1 << 10), | 453 | .ctrlbit = (1 << 10), |
485 | .enable = s5p64x0_sclk_ctrl, | 454 | .enable = s5p64x0_sclk_ctrl, |
486 | }, | 455 | }, |
@@ -490,7 +459,6 @@ static struct clksrc_clk clksrcs[] = { | |||
490 | }, { | 459 | }, { |
491 | .clk = { | 460 | .clk = { |
492 | .name = "sclk_dispcon", | 461 | .name = "sclk_dispcon", |
493 | .id = -1, | ||
494 | .ctrlbit = (1 << 1), | 462 | .ctrlbit = (1 << 1), |
495 | .enable = s5p64x0_sclk1_ctrl, | 463 | .enable = s5p64x0_sclk1_ctrl, |
496 | }, | 464 | }, |
@@ -500,7 +468,6 @@ static struct clksrc_clk clksrcs[] = { | |||
500 | }, { | 468 | }, { |
501 | .clk = { | 469 | .clk = { |
502 | .name = "sclk_fimgvg", | 470 | .name = "sclk_fimgvg", |
503 | .id = -1, | ||
504 | .ctrlbit = (1 << 2), | 471 | .ctrlbit = (1 << 2), |
505 | .enable = s5p64x0_sclk1_ctrl, | 472 | .enable = s5p64x0_sclk1_ctrl, |
506 | }, | 473 | }, |
@@ -510,7 +477,6 @@ static struct clksrc_clk clksrcs[] = { | |||
510 | }, { | 477 | }, { |
511 | .clk = { | 478 | .clk = { |
512 | .name = "sclk_audio2", | 479 | .name = "sclk_audio2", |
513 | .id = -1, | ||
514 | .ctrlbit = (1 << 11), | 480 | .ctrlbit = (1 << 11), |
515 | .enable = s5p64x0_sclk_ctrl, | 481 | .enable = s5p64x0_sclk_ctrl, |
516 | }, | 482 | }, |
diff --git a/arch/arm/mach-s5p64x0/clock-s5p6450.c b/arch/arm/mach-s5p64x0/clock-s5p6450.c index 4eec457ddccc..d9dc16cde109 100644 --- a/arch/arm/mach-s5p64x0/clock-s5p6450.c +++ b/arch/arm/mach-s5p64x0/clock-s5p6450.c | |||
@@ -36,7 +36,6 @@ | |||
36 | static struct clksrc_clk clk_mout_dpll = { | 36 | static struct clksrc_clk clk_mout_dpll = { |
37 | .clk = { | 37 | .clk = { |
38 | .name = "mout_dpll", | 38 | .name = "mout_dpll", |
39 | .id = -1, | ||
40 | }, | 39 | }, |
41 | .sources = &clk_src_dpll, | 40 | .sources = &clk_src_dpll, |
42 | .reg_src = { .reg = S5P64X0_CLK_SRC0, .shift = 5, .size = 1 }, | 41 | .reg_src = { .reg = S5P64X0_CLK_SRC0, .shift = 5, .size = 1 }, |
@@ -96,7 +95,6 @@ static struct clk_ops s5p6450_epll_ops = { | |||
96 | static struct clksrc_clk clk_dout_epll = { | 95 | static struct clksrc_clk clk_dout_epll = { |
97 | .clk = { | 96 | .clk = { |
98 | .name = "dout_epll", | 97 | .name = "dout_epll", |
99 | .id = -1, | ||
100 | .parent = &clk_mout_epll.clk, | 98 | .parent = &clk_mout_epll.clk, |
101 | }, | 99 | }, |
102 | .reg_div = { .reg = S5P64X0_CLK_DIV1, .shift = 24, .size = 4 }, | 100 | .reg_div = { .reg = S5P64X0_CLK_DIV1, .shift = 24, .size = 4 }, |
@@ -105,7 +103,6 @@ static struct clksrc_clk clk_dout_epll = { | |||
105 | static struct clksrc_clk clk_mout_hclk_sel = { | 103 | static struct clksrc_clk clk_mout_hclk_sel = { |
106 | .clk = { | 104 | .clk = { |
107 | .name = "mout_hclk_sel", | 105 | .name = "mout_hclk_sel", |
108 | .id = -1, | ||
109 | }, | 106 | }, |
110 | .sources = &clkset_hclk_low, | 107 | .sources = &clkset_hclk_low, |
111 | .reg_src = { .reg = S5P64X0_OTHERS, .shift = 15, .size = 1 }, | 108 | .reg_src = { .reg = S5P64X0_OTHERS, .shift = 15, .size = 1 }, |
@@ -124,7 +121,6 @@ static struct clksrc_sources clkset_hclk = { | |||
124 | static struct clksrc_clk clk_hclk = { | 121 | static struct clksrc_clk clk_hclk = { |
125 | .clk = { | 122 | .clk = { |
126 | .name = "clk_hclk", | 123 | .name = "clk_hclk", |
127 | .id = -1, | ||
128 | }, | 124 | }, |
129 | .sources = &clkset_hclk, | 125 | .sources = &clkset_hclk, |
130 | .reg_src = { .reg = S5P64X0_OTHERS, .shift = 14, .size = 1 }, | 126 | .reg_src = { .reg = S5P64X0_OTHERS, .shift = 14, .size = 1 }, |
@@ -134,7 +130,6 @@ static struct clksrc_clk clk_hclk = { | |||
134 | static struct clksrc_clk clk_pclk = { | 130 | static struct clksrc_clk clk_pclk = { |
135 | .clk = { | 131 | .clk = { |
136 | .name = "clk_pclk", | 132 | .name = "clk_pclk", |
137 | .id = -1, | ||
138 | .parent = &clk_hclk.clk, | 133 | .parent = &clk_hclk.clk, |
139 | }, | 134 | }, |
140 | .reg_div = { .reg = S5P64X0_CLK_DIV0, .shift = 12, .size = 4 }, | 135 | .reg_div = { .reg = S5P64X0_CLK_DIV0, .shift = 12, .size = 4 }, |
@@ -142,7 +137,6 @@ static struct clksrc_clk clk_pclk = { | |||
142 | static struct clksrc_clk clk_dout_pwm_ratio0 = { | 137 | static struct clksrc_clk clk_dout_pwm_ratio0 = { |
143 | .clk = { | 138 | .clk = { |
144 | .name = "clk_dout_pwm_ratio0", | 139 | .name = "clk_dout_pwm_ratio0", |
145 | .id = -1, | ||
146 | .parent = &clk_mout_hclk_sel.clk, | 140 | .parent = &clk_mout_hclk_sel.clk, |
147 | }, | 141 | }, |
148 | .reg_div = { .reg = S5P64X0_CLK_DIV3, .shift = 16, .size = 4 }, | 142 | .reg_div = { .reg = S5P64X0_CLK_DIV3, .shift = 16, .size = 4 }, |
@@ -151,7 +145,6 @@ static struct clksrc_clk clk_dout_pwm_ratio0 = { | |||
151 | static struct clksrc_clk clk_pclk_to_wdt_pwm = { | 145 | static struct clksrc_clk clk_pclk_to_wdt_pwm = { |
152 | .clk = { | 146 | .clk = { |
153 | .name = "clk_pclk_to_wdt_pwm", | 147 | .name = "clk_pclk_to_wdt_pwm", |
154 | .id = -1, | ||
155 | .parent = &clk_dout_pwm_ratio0.clk, | 148 | .parent = &clk_dout_pwm_ratio0.clk, |
156 | }, | 149 | }, |
157 | .reg_div = { .reg = S5P64X0_CLK_DIV3, .shift = 20, .size = 4 }, | 150 | .reg_div = { .reg = S5P64X0_CLK_DIV3, .shift = 20, .size = 4 }, |
@@ -160,7 +153,6 @@ static struct clksrc_clk clk_pclk_to_wdt_pwm = { | |||
160 | static struct clksrc_clk clk_hclk_low = { | 153 | static struct clksrc_clk clk_hclk_low = { |
161 | .clk = { | 154 | .clk = { |
162 | .name = "clk_hclk_low", | 155 | .name = "clk_hclk_low", |
163 | .id = -1, | ||
164 | }, | 156 | }, |
165 | .sources = &clkset_hclk_low, | 157 | .sources = &clkset_hclk_low, |
166 | .reg_src = { .reg = S5P64X0_OTHERS, .shift = 6, .size = 1 }, | 158 | .reg_src = { .reg = S5P64X0_OTHERS, .shift = 6, .size = 1 }, |
@@ -170,7 +162,6 @@ static struct clksrc_clk clk_hclk_low = { | |||
170 | static struct clksrc_clk clk_pclk_low = { | 162 | static struct clksrc_clk clk_pclk_low = { |
171 | .clk = { | 163 | .clk = { |
172 | .name = "clk_pclk_low", | 164 | .name = "clk_pclk_low", |
173 | .id = -1, | ||
174 | .parent = &clk_hclk_low.clk, | 165 | .parent = &clk_hclk_low.clk, |
175 | }, | 166 | }, |
176 | .reg_div = { .reg = S5P64X0_CLK_DIV3, .shift = 12, .size = 4 }, | 167 | .reg_div = { .reg = S5P64X0_CLK_DIV3, .shift = 12, .size = 4 }, |
@@ -184,109 +175,101 @@ static struct clksrc_clk clk_pclk_low = { | |||
184 | static struct clk init_clocks_off[] = { | 175 | static struct clk init_clocks_off[] = { |
185 | { | 176 | { |
186 | .name = "usbhost", | 177 | .name = "usbhost", |
187 | .id = -1, | ||
188 | .parent = &clk_hclk_low.clk, | 178 | .parent = &clk_hclk_low.clk, |
189 | .enable = s5p64x0_hclk0_ctrl, | 179 | .enable = s5p64x0_hclk0_ctrl, |
190 | .ctrlbit = (1 << 3), | 180 | .ctrlbit = (1 << 3), |
191 | }, { | 181 | }, { |
192 | .name = "pdma", | 182 | .name = "pdma", |
193 | .id = -1, | ||
194 | .parent = &clk_hclk_low.clk, | 183 | .parent = &clk_hclk_low.clk, |
195 | .enable = s5p64x0_hclk0_ctrl, | 184 | .enable = s5p64x0_hclk0_ctrl, |
196 | .ctrlbit = (1 << 12), | 185 | .ctrlbit = (1 << 12), |
197 | }, { | 186 | }, { |
198 | .name = "hsmmc", | 187 | .name = "hsmmc", |
199 | .id = 0, | 188 | .devname = "s3c-sdhci.0", |
200 | .parent = &clk_hclk_low.clk, | 189 | .parent = &clk_hclk_low.clk, |
201 | .enable = s5p64x0_hclk0_ctrl, | 190 | .enable = s5p64x0_hclk0_ctrl, |
202 | .ctrlbit = (1 << 17), | 191 | .ctrlbit = (1 << 17), |
203 | }, { | 192 | }, { |
204 | .name = "hsmmc", | 193 | .name = "hsmmc", |
205 | .id = 1, | 194 | .devname = "s3c-sdhci.1", |
206 | .parent = &clk_hclk_low.clk, | 195 | .parent = &clk_hclk_low.clk, |
207 | .enable = s5p64x0_hclk0_ctrl, | 196 | .enable = s5p64x0_hclk0_ctrl, |
208 | .ctrlbit = (1 << 18), | 197 | .ctrlbit = (1 << 18), |
209 | }, { | 198 | }, { |
210 | .name = "hsmmc", | 199 | .name = "hsmmc", |
211 | .id = 2, | 200 | .devname = "s3c-sdhci.2", |
212 | .parent = &clk_hclk_low.clk, | 201 | .parent = &clk_hclk_low.clk, |
213 | .enable = s5p64x0_hclk0_ctrl, | 202 | .enable = s5p64x0_hclk0_ctrl, |
214 | .ctrlbit = (1 << 19), | 203 | .ctrlbit = (1 << 19), |
215 | }, { | 204 | }, { |
216 | .name = "usbotg", | 205 | .name = "usbotg", |
217 | .id = -1, | ||
218 | .parent = &clk_hclk_low.clk, | 206 | .parent = &clk_hclk_low.clk, |
219 | .enable = s5p64x0_hclk0_ctrl, | 207 | .enable = s5p64x0_hclk0_ctrl, |
220 | .ctrlbit = (1 << 20), | 208 | .ctrlbit = (1 << 20), |
221 | }, { | 209 | }, { |
222 | .name = "lcd", | 210 | .name = "lcd", |
223 | .id = -1, | ||
224 | .parent = &clk_h, | 211 | .parent = &clk_h, |
225 | .enable = s5p64x0_hclk1_ctrl, | 212 | .enable = s5p64x0_hclk1_ctrl, |
226 | .ctrlbit = (1 << 1), | 213 | .ctrlbit = (1 << 1), |
227 | }, { | 214 | }, { |
228 | .name = "watchdog", | 215 | .name = "watchdog", |
229 | .id = -1, | ||
230 | .parent = &clk_pclk_low.clk, | 216 | .parent = &clk_pclk_low.clk, |
231 | .enable = s5p64x0_pclk_ctrl, | 217 | .enable = s5p64x0_pclk_ctrl, |
232 | .ctrlbit = (1 << 5), | 218 | .ctrlbit = (1 << 5), |
233 | }, { | 219 | }, { |
234 | .name = "rtc", | 220 | .name = "rtc", |
235 | .id = -1, | ||
236 | .parent = &clk_pclk_low.clk, | 221 | .parent = &clk_pclk_low.clk, |
237 | .enable = s5p64x0_pclk_ctrl, | 222 | .enable = s5p64x0_pclk_ctrl, |
238 | .ctrlbit = (1 << 6), | 223 | .ctrlbit = (1 << 6), |
239 | }, { | 224 | }, { |
240 | .name = "adc", | 225 | .name = "adc", |
241 | .id = -1, | ||
242 | .parent = &clk_pclk_low.clk, | 226 | .parent = &clk_pclk_low.clk, |
243 | .enable = s5p64x0_pclk_ctrl, | 227 | .enable = s5p64x0_pclk_ctrl, |
244 | .ctrlbit = (1 << 12), | 228 | .ctrlbit = (1 << 12), |
245 | }, { | 229 | }, { |
246 | .name = "i2c", | 230 | .name = "i2c", |
247 | .id = 0, | 231 | .devname = "s3c2440-i2c.0", |
248 | .parent = &clk_pclk_low.clk, | 232 | .parent = &clk_pclk_low.clk, |
249 | .enable = s5p64x0_pclk_ctrl, | 233 | .enable = s5p64x0_pclk_ctrl, |
250 | .ctrlbit = (1 << 17), | 234 | .ctrlbit = (1 << 17), |
251 | }, { | 235 | }, { |
252 | .name = "spi", | 236 | .name = "spi", |
253 | .id = 0, | 237 | .devname = "s3c64xx-spi.0", |
254 | .parent = &clk_pclk_low.clk, | 238 | .parent = &clk_pclk_low.clk, |
255 | .enable = s5p64x0_pclk_ctrl, | 239 | .enable = s5p64x0_pclk_ctrl, |
256 | .ctrlbit = (1 << 21), | 240 | .ctrlbit = (1 << 21), |
257 | }, { | 241 | }, { |
258 | .name = "spi", | 242 | .name = "spi", |
259 | .id = 1, | 243 | .devname = "s3c64xx-spi.1", |
260 | .parent = &clk_pclk_low.clk, | 244 | .parent = &clk_pclk_low.clk, |
261 | .enable = s5p64x0_pclk_ctrl, | 245 | .enable = s5p64x0_pclk_ctrl, |
262 | .ctrlbit = (1 << 22), | 246 | .ctrlbit = (1 << 22), |
263 | }, { | 247 | }, { |
264 | .name = "iis", | 248 | .name = "iis", |
265 | .id = 0, | 249 | .devname = "samsung-i2s.0", |
266 | .parent = &clk_pclk_low.clk, | 250 | .parent = &clk_pclk_low.clk, |
267 | .enable = s5p64x0_pclk_ctrl, | 251 | .enable = s5p64x0_pclk_ctrl, |
268 | .ctrlbit = (1 << 26), | 252 | .ctrlbit = (1 << 26), |
269 | }, { | 253 | }, { |
270 | .name = "iis", | 254 | .name = "iis", |
271 | .id = 1, | 255 | .devname = "samsung-i2s.1", |
272 | .parent = &clk_pclk_low.clk, | 256 | .parent = &clk_pclk_low.clk, |
273 | .enable = s5p64x0_pclk_ctrl, | 257 | .enable = s5p64x0_pclk_ctrl, |
274 | .ctrlbit = (1 << 15), | 258 | .ctrlbit = (1 << 15), |
275 | }, { | 259 | }, { |
276 | .name = "iis", | 260 | .name = "iis", |
277 | .id = 2, | 261 | .devname = "samsung-i2s.2", |
278 | .parent = &clk_pclk_low.clk, | 262 | .parent = &clk_pclk_low.clk, |
279 | .enable = s5p64x0_pclk_ctrl, | 263 | .enable = s5p64x0_pclk_ctrl, |
280 | .ctrlbit = (1 << 16), | 264 | .ctrlbit = (1 << 16), |
281 | }, { | 265 | }, { |
282 | .name = "i2c", | 266 | .name = "i2c", |
283 | .id = 1, | 267 | .devname = "s3c2440-i2c.1", |
284 | .parent = &clk_pclk_low.clk, | 268 | .parent = &clk_pclk_low.clk, |
285 | .enable = s5p64x0_pclk_ctrl, | 269 | .enable = s5p64x0_pclk_ctrl, |
286 | .ctrlbit = (1 << 27), | 270 | .ctrlbit = (1 << 27), |
287 | }, { | 271 | }, { |
288 | .name = "dmc0", | 272 | .name = "dmc0", |
289 | .id = -1, | ||
290 | .parent = &clk_pclk.clk, | 273 | .parent = &clk_pclk.clk, |
291 | .enable = s5p64x0_pclk_ctrl, | 274 | .enable = s5p64x0_pclk_ctrl, |
292 | .ctrlbit = (1 << 30), | 275 | .ctrlbit = (1 << 30), |
@@ -299,49 +282,45 @@ static struct clk init_clocks_off[] = { | |||
299 | static struct clk init_clocks[] = { | 282 | static struct clk init_clocks[] = { |
300 | { | 283 | { |
301 | .name = "intc", | 284 | .name = "intc", |
302 | .id = -1, | ||
303 | .parent = &clk_hclk.clk, | 285 | .parent = &clk_hclk.clk, |
304 | .enable = s5p64x0_hclk0_ctrl, | 286 | .enable = s5p64x0_hclk0_ctrl, |
305 | .ctrlbit = (1 << 1), | 287 | .ctrlbit = (1 << 1), |
306 | }, { | 288 | }, { |
307 | .name = "mem", | 289 | .name = "mem", |
308 | .id = -1, | ||
309 | .parent = &clk_hclk.clk, | 290 | .parent = &clk_hclk.clk, |
310 | .enable = s5p64x0_hclk0_ctrl, | 291 | .enable = s5p64x0_hclk0_ctrl, |
311 | .ctrlbit = (1 << 21), | 292 | .ctrlbit = (1 << 21), |
312 | }, { | 293 | }, { |
313 | .name = "uart", | 294 | .name = "uart", |
314 | .id = 0, | 295 | .devname = "s3c6400-uart.0", |
315 | .parent = &clk_pclk_low.clk, | 296 | .parent = &clk_pclk_low.clk, |
316 | .enable = s5p64x0_pclk_ctrl, | 297 | .enable = s5p64x0_pclk_ctrl, |
317 | .ctrlbit = (1 << 1), | 298 | .ctrlbit = (1 << 1), |
318 | }, { | 299 | }, { |
319 | .name = "uart", | 300 | .name = "uart", |
320 | .id = 1, | 301 | .devname = "s3c6400-uart.1", |
321 | .parent = &clk_pclk_low.clk, | 302 | .parent = &clk_pclk_low.clk, |
322 | .enable = s5p64x0_pclk_ctrl, | 303 | .enable = s5p64x0_pclk_ctrl, |
323 | .ctrlbit = (1 << 2), | 304 | .ctrlbit = (1 << 2), |
324 | }, { | 305 | }, { |
325 | .name = "uart", | 306 | .name = "uart", |
326 | .id = 2, | 307 | .devname = "s3c6400-uart.2", |
327 | .parent = &clk_pclk_low.clk, | 308 | .parent = &clk_pclk_low.clk, |
328 | .enable = s5p64x0_pclk_ctrl, | 309 | .enable = s5p64x0_pclk_ctrl, |
329 | .ctrlbit = (1 << 3), | 310 | .ctrlbit = (1 << 3), |
330 | }, { | 311 | }, { |
331 | .name = "uart", | 312 | .name = "uart", |
332 | .id = 3, | 313 | .devname = "s3c6400-uart.3", |
333 | .parent = &clk_pclk_low.clk, | 314 | .parent = &clk_pclk_low.clk, |
334 | .enable = s5p64x0_pclk_ctrl, | 315 | .enable = s5p64x0_pclk_ctrl, |
335 | .ctrlbit = (1 << 4), | 316 | .ctrlbit = (1 << 4), |
336 | }, { | 317 | }, { |
337 | .name = "timers", | 318 | .name = "timers", |
338 | .id = -1, | ||
339 | .parent = &clk_pclk_to_wdt_pwm.clk, | 319 | .parent = &clk_pclk_to_wdt_pwm.clk, |
340 | .enable = s5p64x0_pclk_ctrl, | 320 | .enable = s5p64x0_pclk_ctrl, |
341 | .ctrlbit = (1 << 7), | 321 | .ctrlbit = (1 << 7), |
342 | }, { | 322 | }, { |
343 | .name = "gpio", | 323 | .name = "gpio", |
344 | .id = -1, | ||
345 | .parent = &clk_pclk_low.clk, | 324 | .parent = &clk_pclk_low.clk, |
346 | .enable = s5p64x0_pclk_ctrl, | 325 | .enable = s5p64x0_pclk_ctrl, |
347 | .ctrlbit = (1 << 18), | 326 | .ctrlbit = (1 << 18), |
@@ -421,7 +400,6 @@ static struct clksrc_sources clkset_sclk_audio0 = { | |||
421 | static struct clksrc_clk clk_sclk_audio0 = { | 400 | static struct clksrc_clk clk_sclk_audio0 = { |
422 | .clk = { | 401 | .clk = { |
423 | .name = "audio-bus", | 402 | .name = "audio-bus", |
424 | .id = -1, | ||
425 | .enable = s5p64x0_sclk_ctrl, | 403 | .enable = s5p64x0_sclk_ctrl, |
426 | .ctrlbit = (1 << 8), | 404 | .ctrlbit = (1 << 8), |
427 | .parent = &clk_dout_epll.clk, | 405 | .parent = &clk_dout_epll.clk, |
@@ -435,7 +413,7 @@ static struct clksrc_clk clksrcs[] = { | |||
435 | { | 413 | { |
436 | .clk = { | 414 | .clk = { |
437 | .name = "sclk_mmc", | 415 | .name = "sclk_mmc", |
438 | .id = 0, | 416 | .devname = "s3c-sdhci.0", |
439 | .ctrlbit = (1 << 24), | 417 | .ctrlbit = (1 << 24), |
440 | .enable = s5p64x0_sclk_ctrl, | 418 | .enable = s5p64x0_sclk_ctrl, |
441 | }, | 419 | }, |
@@ -445,7 +423,7 @@ static struct clksrc_clk clksrcs[] = { | |||
445 | }, { | 423 | }, { |
446 | .clk = { | 424 | .clk = { |
447 | .name = "sclk_mmc", | 425 | .name = "sclk_mmc", |
448 | .id = 1, | 426 | .devname = "s3c-sdhci.1", |
449 | .ctrlbit = (1 << 25), | 427 | .ctrlbit = (1 << 25), |
450 | .enable = s5p64x0_sclk_ctrl, | 428 | .enable = s5p64x0_sclk_ctrl, |
451 | }, | 429 | }, |
@@ -455,7 +433,7 @@ static struct clksrc_clk clksrcs[] = { | |||
455 | }, { | 433 | }, { |
456 | .clk = { | 434 | .clk = { |
457 | .name = "sclk_mmc", | 435 | .name = "sclk_mmc", |
458 | .id = 2, | 436 | .devname = "s3c-sdhci.2", |
459 | .ctrlbit = (1 << 26), | 437 | .ctrlbit = (1 << 26), |
460 | .enable = s5p64x0_sclk_ctrl, | 438 | .enable = s5p64x0_sclk_ctrl, |
461 | }, | 439 | }, |
@@ -465,7 +443,6 @@ static struct clksrc_clk clksrcs[] = { | |||
465 | }, { | 443 | }, { |
466 | .clk = { | 444 | .clk = { |
467 | .name = "uclk1", | 445 | .name = "uclk1", |
468 | .id = -1, | ||
469 | .ctrlbit = (1 << 5), | 446 | .ctrlbit = (1 << 5), |
470 | .enable = s5p64x0_sclk_ctrl, | 447 | .enable = s5p64x0_sclk_ctrl, |
471 | }, | 448 | }, |
@@ -475,7 +452,7 @@ static struct clksrc_clk clksrcs[] = { | |||
475 | }, { | 452 | }, { |
476 | .clk = { | 453 | .clk = { |
477 | .name = "sclk_spi", | 454 | .name = "sclk_spi", |
478 | .id = 0, | 455 | .devname = "s3c64xx-spi.0", |
479 | .ctrlbit = (1 << 20), | 456 | .ctrlbit = (1 << 20), |
480 | .enable = s5p64x0_sclk_ctrl, | 457 | .enable = s5p64x0_sclk_ctrl, |
481 | }, | 458 | }, |
@@ -485,7 +462,7 @@ static struct clksrc_clk clksrcs[] = { | |||
485 | }, { | 462 | }, { |
486 | .clk = { | 463 | .clk = { |
487 | .name = "sclk_spi", | 464 | .name = "sclk_spi", |
488 | .id = 1, | 465 | .devname = "s3c64xx-spi.1", |
489 | .ctrlbit = (1 << 21), | 466 | .ctrlbit = (1 << 21), |
490 | .enable = s5p64x0_sclk_ctrl, | 467 | .enable = s5p64x0_sclk_ctrl, |
491 | }, | 468 | }, |
@@ -495,7 +472,6 @@ static struct clksrc_clk clksrcs[] = { | |||
495 | }, { | 472 | }, { |
496 | .clk = { | 473 | .clk = { |
497 | .name = "sclk_fimc", | 474 | .name = "sclk_fimc", |
498 | .id = -1, | ||
499 | .ctrlbit = (1 << 10), | 475 | .ctrlbit = (1 << 10), |
500 | .enable = s5p64x0_sclk_ctrl, | 476 | .enable = s5p64x0_sclk_ctrl, |
501 | }, | 477 | }, |
@@ -505,7 +481,6 @@ static struct clksrc_clk clksrcs[] = { | |||
505 | }, { | 481 | }, { |
506 | .clk = { | 482 | .clk = { |
507 | .name = "aclk_mali", | 483 | .name = "aclk_mali", |
508 | .id = -1, | ||
509 | .ctrlbit = (1 << 2), | 484 | .ctrlbit = (1 << 2), |
510 | .enable = s5p64x0_sclk1_ctrl, | 485 | .enable = s5p64x0_sclk1_ctrl, |
511 | }, | 486 | }, |
@@ -515,7 +490,6 @@ static struct clksrc_clk clksrcs[] = { | |||
515 | }, { | 490 | }, { |
516 | .clk = { | 491 | .clk = { |
517 | .name = "sclk_2d", | 492 | .name = "sclk_2d", |
518 | .id = -1, | ||
519 | .ctrlbit = (1 << 12), | 493 | .ctrlbit = (1 << 12), |
520 | .enable = s5p64x0_sclk_ctrl, | 494 | .enable = s5p64x0_sclk_ctrl, |
521 | }, | 495 | }, |
@@ -525,7 +499,6 @@ static struct clksrc_clk clksrcs[] = { | |||
525 | }, { | 499 | }, { |
526 | .clk = { | 500 | .clk = { |
527 | .name = "sclk_usi", | 501 | .name = "sclk_usi", |
528 | .id = -1, | ||
529 | .ctrlbit = (1 << 7), | 502 | .ctrlbit = (1 << 7), |
530 | .enable = s5p64x0_sclk_ctrl, | 503 | .enable = s5p64x0_sclk_ctrl, |
531 | }, | 504 | }, |
@@ -535,7 +508,6 @@ static struct clksrc_clk clksrcs[] = { | |||
535 | }, { | 508 | }, { |
536 | .clk = { | 509 | .clk = { |
537 | .name = "sclk_camif", | 510 | .name = "sclk_camif", |
538 | .id = -1, | ||
539 | .ctrlbit = (1 << 6), | 511 | .ctrlbit = (1 << 6), |
540 | .enable = s5p64x0_sclk_ctrl, | 512 | .enable = s5p64x0_sclk_ctrl, |
541 | }, | 513 | }, |
@@ -545,7 +517,6 @@ static struct clksrc_clk clksrcs[] = { | |||
545 | }, { | 517 | }, { |
546 | .clk = { | 518 | .clk = { |
547 | .name = "sclk_dispcon", | 519 | .name = "sclk_dispcon", |
548 | .id = -1, | ||
549 | .ctrlbit = (1 << 1), | 520 | .ctrlbit = (1 << 1), |
550 | .enable = s5p64x0_sclk1_ctrl, | 521 | .enable = s5p64x0_sclk1_ctrl, |
551 | }, | 522 | }, |
@@ -555,7 +526,6 @@ static struct clksrc_clk clksrcs[] = { | |||
555 | }, { | 526 | }, { |
556 | .clk = { | 527 | .clk = { |
557 | .name = "sclk_hsmmc44", | 528 | .name = "sclk_hsmmc44", |
558 | .id = -1, | ||
559 | .ctrlbit = (1 << 30), | 529 | .ctrlbit = (1 << 30), |
560 | .enable = s5p64x0_sclk_ctrl, | 530 | .enable = s5p64x0_sclk_ctrl, |
561 | }, | 531 | }, |
diff --git a/arch/arm/mach-s5p64x0/include/mach/clkdev.h b/arch/arm/mach-s5p64x0/include/mach/clkdev.h new file mode 100644 index 000000000000..7dffa83d23ff --- /dev/null +++ b/arch/arm/mach-s5p64x0/include/mach/clkdev.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef __MACH_CLKDEV_H__ | ||
2 | #define __MACH_CLKDEV_H__ | ||
3 | |||
4 | #define __clk_get(clk) ({ 1; }) | ||
5 | #define __clk_put(clk) do {} while (0) | ||
6 | |||
7 | #endif | ||
diff --git a/arch/arm/mach-s5p64x0/include/mach/irqs.h b/arch/arm/mach-s5p64x0/include/mach/irqs.h index 513abffc7604..5837a36ece8d 100644 --- a/arch/arm/mach-s5p64x0/include/mach/irqs.h +++ b/arch/arm/mach-s5p64x0/include/mach/irqs.h | |||
@@ -85,6 +85,8 @@ | |||
85 | #define IRQ_S3CUART_RX4 IRQ_S5P_UART_RX4 | 85 | #define IRQ_S3CUART_RX4 IRQ_S5P_UART_RX4 |
86 | #define IRQ_S3CUART_RX5 IRQ_S5P_UART_RX5 | 86 | #define IRQ_S3CUART_RX5 IRQ_S5P_UART_RX5 |
87 | 87 | ||
88 | #define IRQ_I2S0 IRQ_I2SV40 | ||
89 | |||
88 | /* S5P6450 EINT feature will be added */ | 90 | /* S5P6450 EINT feature will be added */ |
89 | 91 | ||
90 | /* | 92 | /* |
diff --git a/arch/arm/mach-s5p64x0/include/mach/regs-gpio.h b/arch/arm/mach-s5p64x0/include/mach/regs-gpio.h index 0953ef6b1c77..6ce254729f3b 100644 --- a/arch/arm/mach-s5p64x0/include/mach/regs-gpio.h +++ b/arch/arm/mach-s5p64x0/include/mach/regs-gpio.h | |||
@@ -34,4 +34,14 @@ | |||
34 | #define S5P6450_GPQ_BASE (S5P_VA_GPIO + 0x0180) | 34 | #define S5P6450_GPQ_BASE (S5P_VA_GPIO + 0x0180) |
35 | #define S5P6450_GPS_BASE (S5P_VA_GPIO + 0x0300) | 35 | #define S5P6450_GPS_BASE (S5P_VA_GPIO + 0x0300) |
36 | 36 | ||
37 | /* External interrupt control registers for group0 */ | ||
38 | |||
39 | #define EINT0CON0_OFFSET (0x900) | ||
40 | #define EINT0MASK_OFFSET (0x920) | ||
41 | #define EINT0PEND_OFFSET (0x924) | ||
42 | |||
43 | #define S5P64X0_EINT0CON0 (S5P_VA_GPIO + EINT0CON0_OFFSET) | ||
44 | #define S5P64X0_EINT0MASK (S5P_VA_GPIO + EINT0MASK_OFFSET) | ||
45 | #define S5P64X0_EINT0PEND (S5P_VA_GPIO + EINT0PEND_OFFSET) | ||
46 | |||
37 | #endif /* __ASM_ARCH_REGS_GPIO_H */ | 47 | #endif /* __ASM_ARCH_REGS_GPIO_H */ |
diff --git a/arch/arm/mach-s5p64x0/irq-eint.c b/arch/arm/mach-s5p64x0/irq-eint.c new file mode 100644 index 000000000000..69ed4545112b --- /dev/null +++ b/arch/arm/mach-s5p64x0/irq-eint.c | |||
@@ -0,0 +1,152 @@ | |||
1 | /* arch/arm/mach-s5p64x0/irq-eint.c | ||
2 | * | ||
3 | * Copyright (c) 2011 Samsung Electronics Co., Ltd | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * Based on linux/arch/arm/mach-s3c64xx/irq-eint.c | ||
7 | * | ||
8 | * S5P64X0 - Interrupt handling for External Interrupts. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/gpio.h> | ||
17 | #include <linux/irq.h> | ||
18 | #include <linux/io.h> | ||
19 | |||
20 | #include <plat/regs-irqtype.h> | ||
21 | #include <plat/gpio-cfg.h> | ||
22 | |||
23 | #include <mach/regs-gpio.h> | ||
24 | #include <mach/regs-clock.h> | ||
25 | |||
26 | #define eint_offset(irq) ((irq) - IRQ_EINT(0)) | ||
27 | |||
28 | static int s5p64x0_irq_eint_set_type(struct irq_data *data, unsigned int type) | ||
29 | { | ||
30 | int offs = eint_offset(data->irq); | ||
31 | int shift; | ||
32 | u32 ctrl, mask; | ||
33 | u32 newvalue = 0; | ||
34 | |||
35 | if (offs > 15) | ||
36 | return -EINVAL; | ||
37 | |||
38 | switch (type) { | ||
39 | case IRQ_TYPE_NONE: | ||
40 | printk(KERN_WARNING "No edge setting!\n"); | ||
41 | break; | ||
42 | case IRQ_TYPE_EDGE_RISING: | ||
43 | newvalue = S3C2410_EXTINT_RISEEDGE; | ||
44 | break; | ||
45 | case IRQ_TYPE_EDGE_FALLING: | ||
46 | newvalue = S3C2410_EXTINT_FALLEDGE; | ||
47 | break; | ||
48 | case IRQ_TYPE_EDGE_BOTH: | ||
49 | newvalue = S3C2410_EXTINT_BOTHEDGE; | ||
50 | break; | ||
51 | case IRQ_TYPE_LEVEL_LOW: | ||
52 | newvalue = S3C2410_EXTINT_LOWLEV; | ||
53 | break; | ||
54 | case IRQ_TYPE_LEVEL_HIGH: | ||
55 | newvalue = S3C2410_EXTINT_HILEV; | ||
56 | break; | ||
57 | default: | ||
58 | printk(KERN_ERR "No such irq type %d", type); | ||
59 | return -EINVAL; | ||
60 | } | ||
61 | |||
62 | shift = (offs / 2) * 4; | ||
63 | mask = 0x7 << shift; | ||
64 | |||
65 | ctrl = __raw_readl(S5P64X0_EINT0CON0) & ~mask; | ||
66 | ctrl |= newvalue << shift; | ||
67 | __raw_writel(ctrl, S5P64X0_EINT0CON0); | ||
68 | |||
69 | /* Configure the GPIO pin for 6450 or 6440 based on CPU ID */ | ||
70 | if (0x50000 == (__raw_readl(S5P64X0_SYS_ID) & 0xFF000)) | ||
71 | s3c_gpio_cfgpin(S5P6450_GPN(offs), S3C_GPIO_SFN(2)); | ||
72 | else | ||
73 | s3c_gpio_cfgpin(S5P6440_GPN(offs), S3C_GPIO_SFN(2)); | ||
74 | |||
75 | return 0; | ||
76 | } | ||
77 | |||
78 | /* | ||
79 | * s5p64x0_irq_demux_eint | ||
80 | * | ||
81 | * This function demuxes the IRQ from the group0 external interrupts, | ||
82 | * from IRQ_EINT(0) to IRQ_EINT(15). It is designed to be inlined into | ||
83 | * the specific handlers s5p64x0_irq_demux_eintX_Y. | ||
84 | */ | ||
85 | static inline void s5p64x0_irq_demux_eint(unsigned int start, unsigned int end) | ||
86 | { | ||
87 | u32 status = __raw_readl(S5P64X0_EINT0PEND); | ||
88 | u32 mask = __raw_readl(S5P64X0_EINT0MASK); | ||
89 | unsigned int irq; | ||
90 | |||
91 | status &= ~mask; | ||
92 | status >>= start; | ||
93 | status &= (1 << (end - start + 1)) - 1; | ||
94 | |||
95 | for (irq = IRQ_EINT(start); irq <= IRQ_EINT(end); irq++) { | ||
96 | if (status & 1) | ||
97 | generic_handle_irq(irq); | ||
98 | status >>= 1; | ||
99 | } | ||
100 | } | ||
101 | |||
102 | static void s5p64x0_irq_demux_eint0_3(unsigned int irq, struct irq_desc *desc) | ||
103 | { | ||
104 | s5p64x0_irq_demux_eint(0, 3); | ||
105 | } | ||
106 | |||
107 | static void s5p64x0_irq_demux_eint4_11(unsigned int irq, struct irq_desc *desc) | ||
108 | { | ||
109 | s5p64x0_irq_demux_eint(4, 11); | ||
110 | } | ||
111 | |||
112 | static void s5p64x0_irq_demux_eint12_15(unsigned int irq, | ||
113 | struct irq_desc *desc) | ||
114 | { | ||
115 | s5p64x0_irq_demux_eint(12, 15); | ||
116 | } | ||
117 | |||
118 | static int s5p64x0_alloc_gc(void) | ||
119 | { | ||
120 | struct irq_chip_generic *gc; | ||
121 | struct irq_chip_type *ct; | ||
122 | |||
123 | gc = irq_alloc_generic_chip("s5p64x0-eint", 1, S5P_IRQ_EINT_BASE, | ||
124 | S5P_VA_GPIO, handle_level_irq); | ||
125 | if (!gc) { | ||
126 | printk(KERN_ERR "%s: irq_alloc_generic_chip for group 0" | ||
127 | "external interrupts failed\n", __func__); | ||
128 | return -EINVAL; | ||
129 | } | ||
130 | |||
131 | ct = gc->chip_types; | ||
132 | ct->chip.irq_ack = irq_gc_ack; | ||
133 | ct->chip.irq_mask = irq_gc_mask_set_bit; | ||
134 | ct->chip.irq_unmask = irq_gc_mask_clr_bit; | ||
135 | ct->chip.irq_set_type = s5p64x0_irq_eint_set_type; | ||
136 | ct->regs.ack = EINT0PEND_OFFSET; | ||
137 | ct->regs.mask = EINT0MASK_OFFSET; | ||
138 | irq_setup_generic_chip(gc, IRQ_MSK(16), IRQ_GC_INIT_MASK_CACHE, | ||
139 | IRQ_NOREQUEST | IRQ_NOPROBE, 0); | ||
140 | return 0; | ||
141 | } | ||
142 | |||
143 | static int __init s5p64x0_init_irq_eint(void) | ||
144 | { | ||
145 | int ret = s5p64x0_alloc_gc(); | ||
146 | irq_set_chained_handler(IRQ_EINT0_3, s5p64x0_irq_demux_eint0_3); | ||
147 | irq_set_chained_handler(IRQ_EINT4_11, s5p64x0_irq_demux_eint4_11); | ||
148 | irq_set_chained_handler(IRQ_EINT12_15, s5p64x0_irq_demux_eint12_15); | ||
149 | |||
150 | return ret; | ||
151 | } | ||
152 | arch_initcall(s5p64x0_init_irq_eint); | ||
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6440.c b/arch/arm/mach-s5p64x0/mach-smdk6440.c index 2d559f10fd47..346f8dfa6f35 100644 --- a/arch/arm/mach-s5p64x0/mach-smdk6440.c +++ b/arch/arm/mach-s5p64x0/mach-smdk6440.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <plat/adc.h> | 46 | #include <plat/adc.h> |
47 | #include <plat/ts.h> | 47 | #include <plat/ts.h> |
48 | #include <plat/s5p-time.h> | 48 | #include <plat/s5p-time.h> |
49 | #include <plat/backlight.h> | ||
49 | 50 | ||
50 | #define SMDK6440_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | 51 | #define SMDK6440_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ |
51 | S3C2410_UCON_RXILEVEL | \ | 52 | S3C2410_UCON_RXILEVEL | \ |
@@ -91,45 +92,6 @@ static struct s3c2410_uartcfg smdk6440_uartcfgs[] __initdata = { | |||
91 | }, | 92 | }, |
92 | }; | 93 | }; |
93 | 94 | ||
94 | static int smdk6440_backlight_init(struct device *dev) | ||
95 | { | ||
96 | int ret; | ||
97 | |||
98 | ret = gpio_request(S5P6440_GPF(15), "Backlight"); | ||
99 | if (ret) { | ||
100 | printk(KERN_ERR "failed to request GPF for PWM-OUT1\n"); | ||
101 | return ret; | ||
102 | } | ||
103 | |||
104 | /* Configure GPIO pin with S5P6440_GPF15_PWM_TOUT1 */ | ||
105 | s3c_gpio_cfgpin(S5P6440_GPF(15), S3C_GPIO_SFN(2)); | ||
106 | |||
107 | return 0; | ||
108 | } | ||
109 | |||
110 | static void smdk6440_backlight_exit(struct device *dev) | ||
111 | { | ||
112 | s3c_gpio_cfgpin(S5P6440_GPF(15), S3C_GPIO_OUTPUT); | ||
113 | gpio_free(S5P6440_GPF(15)); | ||
114 | } | ||
115 | |||
116 | static struct platform_pwm_backlight_data smdk6440_backlight_data = { | ||
117 | .pwm_id = 1, | ||
118 | .max_brightness = 255, | ||
119 | .dft_brightness = 255, | ||
120 | .pwm_period_ns = 78770, | ||
121 | .init = smdk6440_backlight_init, | ||
122 | .exit = smdk6440_backlight_exit, | ||
123 | }; | ||
124 | |||
125 | static struct platform_device smdk6440_backlight_device = { | ||
126 | .name = "pwm-backlight", | ||
127 | .dev = { | ||
128 | .parent = &s3c_device_timer[1].dev, | ||
129 | .platform_data = &smdk6440_backlight_data, | ||
130 | }, | ||
131 | }; | ||
132 | |||
133 | static struct platform_device *smdk6440_devices[] __initdata = { | 95 | static struct platform_device *smdk6440_devices[] __initdata = { |
134 | &s3c_device_adc, | 96 | &s3c_device_adc, |
135 | &s3c_device_rtc, | 97 | &s3c_device_rtc, |
@@ -139,8 +101,6 @@ static struct platform_device *smdk6440_devices[] __initdata = { | |||
139 | &s3c_device_wdt, | 101 | &s3c_device_wdt, |
140 | &samsung_asoc_dma, | 102 | &samsung_asoc_dma, |
141 | &s5p6440_device_iis, | 103 | &s5p6440_device_iis, |
142 | &s3c_device_timer[1], | ||
143 | &smdk6440_backlight_device, | ||
144 | }; | 104 | }; |
145 | 105 | ||
146 | static struct s3c2410_platform_i2c s5p6440_i2c0_data __initdata = { | 106 | static struct s3c2410_platform_i2c s5p6440_i2c0_data __initdata = { |
@@ -175,6 +135,16 @@ static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = { | |||
175 | .oversampling_shift = 2, | 135 | .oversampling_shift = 2, |
176 | }; | 136 | }; |
177 | 137 | ||
138 | /* LCD Backlight data */ | ||
139 | static struct samsung_bl_gpio_info smdk6440_bl_gpio_info = { | ||
140 | .no = S5P6440_GPF(15), | ||
141 | .func = S3C_GPIO_SFN(2), | ||
142 | }; | ||
143 | |||
144 | static struct platform_pwm_backlight_data smdk6440_bl_data = { | ||
145 | .pwm_id = 1, | ||
146 | }; | ||
147 | |||
178 | static void __init smdk6440_map_io(void) | 148 | static void __init smdk6440_map_io(void) |
179 | { | 149 | { |
180 | s5p_init_io(NULL, 0, S5P64X0_SYS_ID); | 150 | s5p_init_io(NULL, 0, S5P64X0_SYS_ID); |
@@ -194,6 +164,8 @@ static void __init smdk6440_machine_init(void) | |||
194 | i2c_register_board_info(1, smdk6440_i2c_devs1, | 164 | i2c_register_board_info(1, smdk6440_i2c_devs1, |
195 | ARRAY_SIZE(smdk6440_i2c_devs1)); | 165 | ARRAY_SIZE(smdk6440_i2c_devs1)); |
196 | 166 | ||
167 | samsung_bl_set(&smdk6440_bl_gpio_info, &smdk6440_bl_data); | ||
168 | |||
197 | platform_add_devices(smdk6440_devices, ARRAY_SIZE(smdk6440_devices)); | 169 | platform_add_devices(smdk6440_devices, ARRAY_SIZE(smdk6440_devices)); |
198 | } | 170 | } |
199 | 171 | ||
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6450.c b/arch/arm/mach-s5p64x0/mach-smdk6450.c index d19c4690ee97..33f2adf8f3fe 100644 --- a/arch/arm/mach-s5p64x0/mach-smdk6450.c +++ b/arch/arm/mach-s5p64x0/mach-smdk6450.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <plat/adc.h> | 46 | #include <plat/adc.h> |
47 | #include <plat/ts.h> | 47 | #include <plat/ts.h> |
48 | #include <plat/s5p-time.h> | 48 | #include <plat/s5p-time.h> |
49 | #include <plat/backlight.h> | ||
49 | 50 | ||
50 | #define SMDK6450_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | 51 | #define SMDK6450_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ |
51 | S3C2410_UCON_RXILEVEL | \ | 52 | S3C2410_UCON_RXILEVEL | \ |
@@ -109,45 +110,6 @@ static struct s3c2410_uartcfg smdk6450_uartcfgs[] __initdata = { | |||
109 | #endif | 110 | #endif |
110 | }; | 111 | }; |
111 | 112 | ||
112 | static int smdk6450_backlight_init(struct device *dev) | ||
113 | { | ||
114 | int ret; | ||
115 | |||
116 | ret = gpio_request(S5P6450_GPF(15), "Backlight"); | ||
117 | if (ret) { | ||
118 | printk(KERN_ERR "failed to request GPF for PWM-OUT1\n"); | ||
119 | return ret; | ||
120 | } | ||
121 | |||
122 | /* Configure GPIO pin with S5P6450_GPF15_PWM_TOUT1 */ | ||
123 | s3c_gpio_cfgpin(S5P6450_GPF(15), S3C_GPIO_SFN(2)); | ||
124 | |||
125 | return 0; | ||
126 | } | ||
127 | |||
128 | static void smdk6450_backlight_exit(struct device *dev) | ||
129 | { | ||
130 | s3c_gpio_cfgpin(S5P6450_GPF(15), S3C_GPIO_OUTPUT); | ||
131 | gpio_free(S5P6450_GPF(15)); | ||
132 | } | ||
133 | |||
134 | static struct platform_pwm_backlight_data smdk6450_backlight_data = { | ||
135 | .pwm_id = 1, | ||
136 | .max_brightness = 255, | ||
137 | .dft_brightness = 255, | ||
138 | .pwm_period_ns = 78770, | ||
139 | .init = smdk6450_backlight_init, | ||
140 | .exit = smdk6450_backlight_exit, | ||
141 | }; | ||
142 | |||
143 | static struct platform_device smdk6450_backlight_device = { | ||
144 | .name = "pwm-backlight", | ||
145 | .dev = { | ||
146 | .parent = &s3c_device_timer[1].dev, | ||
147 | .platform_data = &smdk6450_backlight_data, | ||
148 | }, | ||
149 | }; | ||
150 | |||
151 | static struct platform_device *smdk6450_devices[] __initdata = { | 113 | static struct platform_device *smdk6450_devices[] __initdata = { |
152 | &s3c_device_adc, | 114 | &s3c_device_adc, |
153 | &s3c_device_rtc, | 115 | &s3c_device_rtc, |
@@ -157,8 +119,6 @@ static struct platform_device *smdk6450_devices[] __initdata = { | |||
157 | &s3c_device_wdt, | 119 | &s3c_device_wdt, |
158 | &samsung_asoc_dma, | 120 | &samsung_asoc_dma, |
159 | &s5p6450_device_iis0, | 121 | &s5p6450_device_iis0, |
160 | &s3c_device_timer[1], | ||
161 | &smdk6450_backlight_device, | ||
162 | /* s5p6450_device_spi0 will be added */ | 122 | /* s5p6450_device_spi0 will be added */ |
163 | }; | 123 | }; |
164 | 124 | ||
@@ -194,6 +154,16 @@ static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = { | |||
194 | .oversampling_shift = 2, | 154 | .oversampling_shift = 2, |
195 | }; | 155 | }; |
196 | 156 | ||
157 | /* LCD Backlight data */ | ||
158 | static struct samsung_bl_gpio_info smdk6450_bl_gpio_info = { | ||
159 | .no = S5P6450_GPF(15), | ||
160 | .func = S3C_GPIO_SFN(2), | ||
161 | }; | ||
162 | |||
163 | static struct platform_pwm_backlight_data smdk6450_bl_data = { | ||
164 | .pwm_id = 1, | ||
165 | }; | ||
166 | |||
197 | static void __init smdk6450_map_io(void) | 167 | static void __init smdk6450_map_io(void) |
198 | { | 168 | { |
199 | s5p_init_io(NULL, 0, S5P64X0_SYS_ID); | 169 | s5p_init_io(NULL, 0, S5P64X0_SYS_ID); |
@@ -213,6 +183,8 @@ static void __init smdk6450_machine_init(void) | |||
213 | i2c_register_board_info(1, smdk6450_i2c_devs1, | 183 | i2c_register_board_info(1, smdk6450_i2c_devs1, |
214 | ARRAY_SIZE(smdk6450_i2c_devs1)); | 184 | ARRAY_SIZE(smdk6450_i2c_devs1)); |
215 | 185 | ||
186 | samsung_bl_set(&smdk6450_bl_gpio_info, &smdk6450_bl_data); | ||
187 | |||
216 | platform_add_devices(smdk6450_devices, ARRAY_SIZE(smdk6450_devices)); | 188 | platform_add_devices(smdk6450_devices, ARRAY_SIZE(smdk6450_devices)); |
217 | } | 189 | } |
218 | 190 | ||