1 /* linux/arch/arm/plat-s3c24xx/cpu.c
3 * Copyright (c) 2004-2005 Simtec Electronics
4 * http://www.simtec.co.uk/products/SWLINUX/
5 * Ben Dooks <ben@simtec.co.uk>
7 * Common code for S3C24XX machines
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 #include <linux/init.h>
26 #include <linux/module.h>
27 #include <linux/interrupt.h>
28 #include <linux/ioport.h>
29 #include <linux/serial_core.h>
30 #include <linux/serial_s3c.h>
31 #include <clocksource/samsung_pwm.h>
32 #include <linux/platform_device.h>
33 #include <linux/delay.h>
35 #include <linux/platform_data/dma-s3c24xx.h>
37 #include <mach/hardware.h>
38 #include <mach/regs-clock.h>
40 #include <asm/cacheflush.h>
41 #include <asm/system_info.h>
42 #include <asm/system_misc.h>
44 #include <asm/mach/arch.h>
45 #include <asm/mach/map.h>
47 #include <mach/regs-gpio.h>
51 #include <plat/devs.h>
52 #include <plat/clock.h>
53 #include <plat/cpu-freq.h>
55 #include <plat/pwm-core.h>
56 #include <plat/watchdog-reset.h>
60 /* table of supported CPUs */
62 static const char name_s3c2410[] = "S3C2410";
63 static const char name_s3c2412[] = "S3C2412";
64 static const char name_s3c2416[] = "S3C2416/S3C2450";
65 static const char name_s3c2440[] = "S3C2440";
66 static const char name_s3c2442[] = "S3C2442";
67 static const char name_s3c2442b[] = "S3C2442B";
68 static const char name_s3c2443[] = "S3C2443";
69 static const char name_s3c2410a[] = "S3C2410A";
70 static const char name_s3c2440a[] = "S3C2440A";
72 static struct cpu_table cpu_ids[] __initdata = {
76 .map_io = s3c2410_map_io,
77 .init_clocks = s3c2410_init_clocks,
78 .init_uarts = s3c2410_init_uarts,
85 .map_io = s3c2410_map_io,
86 .init_clocks = s3c2410_init_clocks,
87 .init_uarts = s3c2410_init_uarts,
88 .init = s3c2410a_init,
94 .map_io = s3c2440_map_io,
95 .init_clocks = s3c244x_init_clocks,
96 .init_uarts = s3c244x_init_uarts,
101 .idcode = 0x32440001,
102 .idmask = 0xffffffff,
103 .map_io = s3c2440_map_io,
104 .init_clocks = s3c244x_init_clocks,
105 .init_uarts = s3c244x_init_uarts,
106 .init = s3c2440_init,
107 .name = name_s3c2440a
110 .idcode = 0x32440aaa,
111 .idmask = 0xffffffff,
112 .map_io = s3c2442_map_io,
113 .init_clocks = s3c244x_init_clocks,
114 .init_uarts = s3c244x_init_uarts,
115 .init = s3c2442_init,
119 .idcode = 0x32440aab,
120 .idmask = 0xffffffff,
121 .map_io = s3c2442_map_io,
122 .init_clocks = s3c244x_init_clocks,
123 .init_uarts = s3c244x_init_uarts,
124 .init = s3c2442_init,
125 .name = name_s3c2442b
128 .idcode = 0x32412001,
129 .idmask = 0xffffffff,
130 .map_io = s3c2412_map_io,
131 .init_uarts = s3c2412_init_uarts,
132 .init = s3c2412_init,
133 .name = name_s3c2412,
135 { /* a newer version of the s3c2412 */
136 .idcode = 0x32412003,
137 .idmask = 0xffffffff,
138 .map_io = s3c2412_map_io,
139 .init_uarts = s3c2412_init_uarts,
140 .init = s3c2412_init,
141 .name = name_s3c2412,
143 { /* a strange version of the s3c2416 */
144 .idcode = 0x32450003,
145 .idmask = 0xffffffff,
146 .map_io = s3c2416_map_io,
147 .init_uarts = s3c2416_init_uarts,
148 .init = s3c2416_init,
149 .name = name_s3c2416,
152 .idcode = 0x32443001,
153 .idmask = 0xffffffff,
154 .map_io = s3c2443_map_io,
155 .init_uarts = s3c2443_init_uarts,
156 .init = s3c2443_init,
157 .name = name_s3c2443,
161 /* minimal IO mapping */
163 static struct map_desc s3c_iodesc[] __initdata = {
170 /* read cpu identificaiton code */
172 static unsigned long s3c24xx_read_idcode_v5(void)
174 #if defined(CONFIG_CPU_S3C2416)
175 /* s3c2416 is v5, with S3C24XX_GSTATUS1 instead of S3C2412_GSTATUS1 */
177 u32 gs = __raw_readl(S3C24XX_GSTATUS1);
179 /* test for s3c2416 or similar device */
180 if ((gs >> 16) == 0x3245)
184 #if defined(CONFIG_CPU_S3C2412) || defined(CONFIG_CPU_S3C2413)
185 return __raw_readl(S3C2412_GSTATUS1);
187 return 1UL; /* don't look like an 2400 */
191 static unsigned long s3c24xx_read_idcode_v4(void)
193 return __raw_readl(S3C2410_GSTATUS1);
196 static void s3c24xx_default_idle(void)
198 unsigned long tmp = 0;
201 /* idle the system by using the idle mode which will wait for an
202 * interrupt to happen before restarting the system.
205 /* Warning: going into idle state upsets jtag scanning */
207 __raw_writel(__raw_readl(S3C2410_CLKCON) | S3C2410_CLKCON_IDLE,
210 /* the samsung port seems to do a loop and then unset idle.. */
211 for (i = 0; i < 50; i++)
212 tmp += __raw_readl(S3C2410_CLKCON); /* ensure loop not optimised out */
214 /* this bit is not cleared on re-start... */
216 __raw_writel(__raw_readl(S3C2410_CLKCON) & ~S3C2410_CLKCON_IDLE,
220 static struct samsung_pwm_variant s3c24xx_pwm_variant = {
223 .has_tint_cstat = false,
224 .tclk_mask = (1 << 4),
227 void __init s3c24xx_init_io(struct map_desc *mach_desc, int size)
229 arm_pm_idle = s3c24xx_default_idle;
231 /* initialise the io descriptors we need for initialisation */
232 iotable_init(mach_desc, size);
233 iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc));
235 if (cpu_architecture() >= CPU_ARCH_ARMv5) {
236 samsung_cpu_id = s3c24xx_read_idcode_v5();
238 samsung_cpu_id = s3c24xx_read_idcode_v4();
241 s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids));
243 samsung_pwm_set_platdata(&s3c24xx_pwm_variant);
246 void __init samsung_set_timer_source(unsigned int event, unsigned int source)
248 s3c24xx_pwm_variant.output_mask = BIT(SAMSUNG_PWM_NUM) - 1;
249 s3c24xx_pwm_variant.output_mask &= ~(BIT(event) | BIT(source));
252 void __init samsung_timer_init(void)
254 unsigned int timer_irqs[SAMSUNG_PWM_NUM] = {
255 IRQ_TIMER0, IRQ_TIMER1, IRQ_TIMER2, IRQ_TIMER3, IRQ_TIMER4,
258 samsung_pwm_clocksource_init(S3C_VA_TIMER,
259 timer_irqs, &s3c24xx_pwm_variant);
262 /* Serial port registrations */
264 #define S3C2410_PA_UART0 (S3C24XX_PA_UART)
265 #define S3C2410_PA_UART1 (S3C24XX_PA_UART + 0x4000 )
266 #define S3C2410_PA_UART2 (S3C24XX_PA_UART + 0x8000 )
267 #define S3C2443_PA_UART3 (S3C24XX_PA_UART + 0xC000 )
269 static struct resource s3c2410_uart0_resource[] = {
270 [0] = DEFINE_RES_MEM(S3C2410_PA_UART0, SZ_16K),
271 [1] = DEFINE_RES_NAMED(IRQ_S3CUART_RX0, \
272 IRQ_S3CUART_ERR0 - IRQ_S3CUART_RX0 + 1, \
273 NULL, IORESOURCE_IRQ)
276 static struct resource s3c2410_uart1_resource[] = {
277 [0] = DEFINE_RES_MEM(S3C2410_PA_UART1, SZ_16K),
278 [1] = DEFINE_RES_NAMED(IRQ_S3CUART_RX1, \
279 IRQ_S3CUART_ERR1 - IRQ_S3CUART_RX1 + 1, \
280 NULL, IORESOURCE_IRQ)
283 static struct resource s3c2410_uart2_resource[] = {
284 [0] = DEFINE_RES_MEM(S3C2410_PA_UART2, SZ_16K),
285 [1] = DEFINE_RES_NAMED(IRQ_S3CUART_RX2, \
286 IRQ_S3CUART_ERR2 - IRQ_S3CUART_RX2 + 1, \
287 NULL, IORESOURCE_IRQ)
290 static struct resource s3c2410_uart3_resource[] = {
291 [0] = DEFINE_RES_MEM(S3C2443_PA_UART3, SZ_16K),
292 [1] = DEFINE_RES_NAMED(IRQ_S3CUART_RX3, \
293 IRQ_S3CUART_ERR3 - IRQ_S3CUART_RX3 + 1, \
294 NULL, IORESOURCE_IRQ)
297 struct s3c24xx_uart_resources s3c2410_uart_resources[] __initdata = {
299 .resources = s3c2410_uart0_resource,
300 .nr_resources = ARRAY_SIZE(s3c2410_uart0_resource),
303 .resources = s3c2410_uart1_resource,
304 .nr_resources = ARRAY_SIZE(s3c2410_uart1_resource),
307 .resources = s3c2410_uart2_resource,
308 .nr_resources = ARRAY_SIZE(s3c2410_uart2_resource),
311 .resources = s3c2410_uart3_resource,
312 .nr_resources = ARRAY_SIZE(s3c2410_uart3_resource),
316 /* initialise all the clocks */
318 #ifdef CONFIG_SAMSUNG_CLOCK
319 void __init_or_cpufreq s3c24xx_setup_clocks(unsigned long fclk,
323 clk_upll.rate = s3c24xx_get_pll(__raw_readl(S3C2410_UPLLCON),
326 clk_mpll.rate = fclk;
333 #if defined(CONFIG_CPU_S3C2410) || defined(CONFIG_CPU_S3C2412) || \
334 defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442)
335 static struct resource s3c2410_dma_resource[] = {
336 [0] = DEFINE_RES_MEM(S3C24XX_PA_DMA, S3C24XX_SZ_DMA),
337 [1] = DEFINE_RES_IRQ(IRQ_DMA0),
338 [2] = DEFINE_RES_IRQ(IRQ_DMA1),
339 [3] = DEFINE_RES_IRQ(IRQ_DMA2),
340 [4] = DEFINE_RES_IRQ(IRQ_DMA3),
344 #if defined(CONFIG_CPU_S3C2410) || defined(CONFIG_CPU_S3C2442)
345 static struct s3c24xx_dma_channel s3c2410_dma_channels[DMACH_MAX] = {
346 [DMACH_XD0] = { S3C24XX_DMA_AHB, true, S3C24XX_DMA_CHANREQ(0, 0), },
347 [DMACH_XD1] = { S3C24XX_DMA_AHB, true, S3C24XX_DMA_CHANREQ(0, 1), },
348 [DMACH_SDI] = { S3C24XX_DMA_APB, false, S3C24XX_DMA_CHANREQ(2, 0) |
349 S3C24XX_DMA_CHANREQ(2, 2) |
350 S3C24XX_DMA_CHANREQ(1, 3),
352 [DMACH_SPI0] = { S3C24XX_DMA_APB, true, S3C24XX_DMA_CHANREQ(3, 1), },
353 [DMACH_SPI1] = { S3C24XX_DMA_APB, true, S3C24XX_DMA_CHANREQ(2, 3), },
354 [DMACH_UART0] = { S3C24XX_DMA_APB, true, S3C24XX_DMA_CHANREQ(1, 0), },
355 [DMACH_UART1] = { S3C24XX_DMA_APB, true, S3C24XX_DMA_CHANREQ(1, 1), },
356 [DMACH_UART2] = { S3C24XX_DMA_APB, true, S3C24XX_DMA_CHANREQ(0, 3), },
357 [DMACH_TIMER] = { S3C24XX_DMA_APB, true, S3C24XX_DMA_CHANREQ(3, 0) |
358 S3C24XX_DMA_CHANREQ(3, 2) |
359 S3C24XX_DMA_CHANREQ(3, 3),
361 [DMACH_I2S_IN] = { S3C24XX_DMA_APB, true, S3C24XX_DMA_CHANREQ(2, 1) |
362 S3C24XX_DMA_CHANREQ(1, 2),
364 [DMACH_I2S_OUT] = { S3C24XX_DMA_APB, true, S3C24XX_DMA_CHANREQ(0, 2), },
365 [DMACH_USB_EP1] = { S3C24XX_DMA_APB, true, S3C24XX_DMA_CHANREQ(4, 0), },
366 [DMACH_USB_EP2] = { S3C24XX_DMA_APB, true, S3C24XX_DMA_CHANREQ(4, 1), },
367 [DMACH_USB_EP3] = { S3C24XX_DMA_APB, true, S3C24XX_DMA_CHANREQ(4, 2), },
368 [DMACH_USB_EP4] = { S3C24XX_DMA_APB, true, S3C24XX_DMA_CHANREQ(4, 3), },
371 static struct s3c24xx_dma_platdata s3c2410_dma_platdata = {
372 .num_phy_channels = 4,
373 .channels = s3c2410_dma_channels,
374 .num_channels = DMACH_MAX,
377 struct platform_device s3c2410_device_dma = {
378 .name = "s3c2410-dma",
380 .num_resources = ARRAY_SIZE(s3c2410_dma_resource),
381 .resource = s3c2410_dma_resource,
383 .platform_data = &s3c2410_dma_platdata,
388 #ifdef CONFIG_CPU_S3C2412
389 static struct s3c24xx_dma_channel s3c2412_dma_channels[DMACH_MAX] = {
390 [DMACH_XD0] = { S3C24XX_DMA_AHB, true, 17 },
391 [DMACH_XD1] = { S3C24XX_DMA_AHB, true, 18 },
392 [DMACH_SDI] = { S3C24XX_DMA_APB, false, 10 },
393 [DMACH_SPI0_RX] = { S3C24XX_DMA_APB, true, 1 },
394 [DMACH_SPI0_TX] = { S3C24XX_DMA_APB, true, 0 },
395 [DMACH_SPI1_RX] = { S3C24XX_DMA_APB, true, 3 },
396 [DMACH_SPI1_TX] = { S3C24XX_DMA_APB, true, 2 },
397 [DMACH_UART0] = { S3C24XX_DMA_APB, true, 19 },
398 [DMACH_UART1] = { S3C24XX_DMA_APB, true, 21 },
399 [DMACH_UART2] = { S3C24XX_DMA_APB, true, 23 },
400 [DMACH_UART0_SRC2] = { S3C24XX_DMA_APB, true, 20 },
401 [DMACH_UART1_SRC2] = { S3C24XX_DMA_APB, true, 22 },
402 [DMACH_UART2_SRC2] = { S3C24XX_DMA_APB, true, 24 },
403 [DMACH_TIMER] = { S3C24XX_DMA_APB, true, 9 },
404 [DMACH_I2S_IN] = { S3C24XX_DMA_APB, true, 5 },
405 [DMACH_I2S_OUT] = { S3C24XX_DMA_APB, true, 4 },
406 [DMACH_USB_EP1] = { S3C24XX_DMA_APB, true, 13 },
407 [DMACH_USB_EP2] = { S3C24XX_DMA_APB, true, 14 },
408 [DMACH_USB_EP3] = { S3C24XX_DMA_APB, true, 15 },
409 [DMACH_USB_EP4] = { S3C24XX_DMA_APB, true, 16 },
412 static struct s3c24xx_dma_platdata s3c2412_dma_platdata = {
413 .num_phy_channels = 4,
414 .channels = s3c2412_dma_channels,
415 .num_channels = DMACH_MAX,
418 struct platform_device s3c2412_device_dma = {
419 .name = "s3c2412-dma",
421 .num_resources = ARRAY_SIZE(s3c2410_dma_resource),
422 .resource = s3c2410_dma_resource,
424 .platform_data = &s3c2412_dma_platdata,
429 #if defined(CONFIG_CPU_S3C2440)
430 static struct s3c24xx_dma_channel s3c2440_dma_channels[DMACH_MAX] = {
431 [DMACH_XD0] = { S3C24XX_DMA_AHB, true, S3C24XX_DMA_CHANREQ(0, 0), },
432 [DMACH_XD1] = { S3C24XX_DMA_AHB, true, S3C24XX_DMA_CHANREQ(0, 1), },
433 [DMACH_SDI] = { S3C24XX_DMA_APB, false, S3C24XX_DMA_CHANREQ(2, 0) |
434 S3C24XX_DMA_CHANREQ(6, 1) |
435 S3C24XX_DMA_CHANREQ(2, 2) |
436 S3C24XX_DMA_CHANREQ(1, 3),
438 [DMACH_SPI0] = { S3C24XX_DMA_APB, true, S3C24XX_DMA_CHANREQ(3, 1), },
439 [DMACH_SPI1] = { S3C24XX_DMA_APB, true, S3C24XX_DMA_CHANREQ(2, 3), },
440 [DMACH_UART0] = { S3C24XX_DMA_APB, true, S3C24XX_DMA_CHANREQ(1, 0), },
441 [DMACH_UART1] = { S3C24XX_DMA_APB, true, S3C24XX_DMA_CHANREQ(1, 1), },
442 [DMACH_UART2] = { S3C24XX_DMA_APB, true, S3C24XX_DMA_CHANREQ(0, 3), },
443 [DMACH_TIMER] = { S3C24XX_DMA_APB, true, S3C24XX_DMA_CHANREQ(3, 0) |
444 S3C24XX_DMA_CHANREQ(3, 2) |
445 S3C24XX_DMA_CHANREQ(3, 3),
447 [DMACH_I2S_IN] = { S3C24XX_DMA_APB, true, S3C24XX_DMA_CHANREQ(2, 1) |
448 S3C24XX_DMA_CHANREQ(1, 2),
450 [DMACH_I2S_OUT] = { S3C24XX_DMA_APB, true, S3C24XX_DMA_CHANREQ(5, 0) |
451 S3C24XX_DMA_CHANREQ(0, 2),
453 [DMACH_PCM_IN] = { S3C24XX_DMA_APB, true, S3C24XX_DMA_CHANREQ(6, 0) |
454 S3C24XX_DMA_CHANREQ(5, 2),
456 [DMACH_PCM_OUT] = { S3C24XX_DMA_APB, true, S3C24XX_DMA_CHANREQ(5, 1) |
457 S3C24XX_DMA_CHANREQ(6, 3),
459 [DMACH_MIC_IN] = { S3C24XX_DMA_APB, true, S3C24XX_DMA_CHANREQ(6, 2) |
460 S3C24XX_DMA_CHANREQ(5, 3),
462 [DMACH_USB_EP1] = { S3C24XX_DMA_APB, true, S3C24XX_DMA_CHANREQ(4, 0), },
463 [DMACH_USB_EP2] = { S3C24XX_DMA_APB, true, S3C24XX_DMA_CHANREQ(4, 1), },
464 [DMACH_USB_EP3] = { S3C24XX_DMA_APB, true, S3C24XX_DMA_CHANREQ(4, 2), },
465 [DMACH_USB_EP4] = { S3C24XX_DMA_APB, true, S3C24XX_DMA_CHANREQ(4, 3), },
468 static struct s3c24xx_dma_platdata s3c2440_dma_platdata = {
469 .num_phy_channels = 4,
470 .channels = s3c2440_dma_channels,
471 .num_channels = DMACH_MAX,
474 struct platform_device s3c2440_device_dma = {
475 .name = "s3c2410-dma",
477 .num_resources = ARRAY_SIZE(s3c2410_dma_resource),
478 .resource = s3c2410_dma_resource,
480 .platform_data = &s3c2440_dma_platdata,
485 #if defined(CONFIG_CPU_S3C2443) || defined(CONFIG_CPU_S3C2416)
486 static struct resource s3c2443_dma_resource[] = {
487 [0] = DEFINE_RES_MEM(S3C24XX_PA_DMA, S3C24XX_SZ_DMA),
488 [1] = DEFINE_RES_IRQ(IRQ_S3C2443_DMA0),
489 [2] = DEFINE_RES_IRQ(IRQ_S3C2443_DMA1),
490 [3] = DEFINE_RES_IRQ(IRQ_S3C2443_DMA2),
491 [4] = DEFINE_RES_IRQ(IRQ_S3C2443_DMA3),
492 [5] = DEFINE_RES_IRQ(IRQ_S3C2443_DMA4),
493 [6] = DEFINE_RES_IRQ(IRQ_S3C2443_DMA5),
496 static struct s3c24xx_dma_channel s3c2443_dma_channels[DMACH_MAX] = {
497 [DMACH_XD0] = { S3C24XX_DMA_AHB, true, 17 },
498 [DMACH_XD1] = { S3C24XX_DMA_AHB, true, 18 },
499 [DMACH_SDI] = { S3C24XX_DMA_APB, false, 10 },
500 [DMACH_SPI0_RX] = { S3C24XX_DMA_APB, true, 1 },
501 [DMACH_SPI0_TX] = { S3C24XX_DMA_APB, true, 0 },
502 [DMACH_SPI1_RX] = { S3C24XX_DMA_APB, true, 3 },
503 [DMACH_SPI1_TX] = { S3C24XX_DMA_APB, true, 2 },
504 [DMACH_UART0] = { S3C24XX_DMA_APB, true, 19 },
505 [DMACH_UART1] = { S3C24XX_DMA_APB, true, 21 },
506 [DMACH_UART2] = { S3C24XX_DMA_APB, true, 23 },
507 [DMACH_UART3] = { S3C24XX_DMA_APB, true, 25 },
508 [DMACH_UART0_SRC2] = { S3C24XX_DMA_APB, true, 20 },
509 [DMACH_UART1_SRC2] = { S3C24XX_DMA_APB, true, 22 },
510 [DMACH_UART2_SRC2] = { S3C24XX_DMA_APB, true, 24 },
511 [DMACH_UART3_SRC2] = { S3C24XX_DMA_APB, true, 26 },
512 [DMACH_TIMER] = { S3C24XX_DMA_APB, true, 9 },
513 [DMACH_I2S_IN] = { S3C24XX_DMA_APB, true, 5 },
514 [DMACH_I2S_OUT] = { S3C24XX_DMA_APB, true, 4 },
515 [DMACH_PCM_IN] = { S3C24XX_DMA_APB, true, 28 },
516 [DMACH_PCM_OUT] = { S3C24XX_DMA_APB, true, 27 },
517 [DMACH_MIC_IN] = { S3C24XX_DMA_APB, true, 29 },
520 static struct s3c24xx_dma_platdata s3c2443_dma_platdata = {
521 .num_phy_channels = 6,
522 .channels = s3c2443_dma_channels,
523 .num_channels = DMACH_MAX,
526 struct platform_device s3c2443_device_dma = {
527 .name = "s3c2443-dma",
529 .num_resources = ARRAY_SIZE(s3c2443_dma_resource),
530 .resource = s3c2443_dma_resource,
532 .platform_data = &s3c2443_dma_platdata,
537 #if defined(CONFIG_COMMON_CLK) && defined(CONFIG_CPU_S3C2410)
538 void __init s3c2410_init_clocks(int xtal)
540 s3c2410_common_clk_init(NULL, xtal, 0, S3C24XX_VA_CLKPWR);
541 samsung_wdt_reset_init(S3C24XX_VA_WATCHDOG);
545 #ifdef CONFIG_CPU_S3C2412
546 void __init s3c2412_init_clocks(int xtal)
548 s3c2412_common_clk_init(NULL, xtal, 0, S3C24XX_VA_CLKPWR);
552 #ifdef CONFIG_CPU_S3C2416
553 void __init s3c2416_init_clocks(int xtal)
555 s3c2443_common_clk_init(NULL, xtal, 0, S3C24XX_VA_CLKPWR);
559 #if defined(CONFIG_COMMON_CLK) && defined(CONFIG_CPU_S3C2440)
560 void __init s3c2440_init_clocks(int xtal)
562 s3c2410_common_clk_init(NULL, xtal, 1, S3C24XX_VA_CLKPWR);
563 samsung_wdt_reset_init(S3C24XX_VA_WATCHDOG);
567 #if defined(CONFIG_COMMON_CLK) && defined(CONFIG_CPU_S3C2442)
568 void __init s3c2442_init_clocks(int xtal)
570 s3c2410_common_clk_init(NULL, xtal, 2, S3C24XX_VA_CLKPWR);
571 samsung_wdt_reset_init(S3C24XX_VA_WATCHDOG);
575 #ifdef CONFIG_CPU_S3C2443
576 void __init s3c2443_init_clocks(int xtal)
578 s3c2443_common_clk_init(NULL, xtal, 1, S3C24XX_VA_CLKPWR);
582 #if defined(CONFIG_CPU_S3C2410) || defined(CONFIG_CPU_S3C2440) || \
583 defined(CONFIG_CPU_S3C2442)
584 static struct resource s3c2410_dclk_resource[] = {
585 [0] = DEFINE_RES_MEM(0x56000084, 0x4),
588 struct platform_device s3c2410_device_dclk = {
589 .name = "s3c2410-dclk",
591 .num_resources = ARRAY_SIZE(s3c2410_dclk_resource),
592 .resource = s3c2410_dclk_resource,