1 /* linux/arch/arm/plat-samsung/devs.c
3 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
6 * Base SAMSUNG platform device definitions
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
13 #include <linux/kernel.h>
14 #include <linux/types.h>
15 #include <linux/interrupt.h>
16 #include <linux/list.h>
17 #include <linux/timer.h>
18 #include <linux/init.h>
19 #include <linux/serial_core.h>
20 #include <linux/platform_device.h>
22 #include <linux/slab.h>
23 #include <linux/string.h>
24 #include <linux/dma-mapping.h>
26 #include <linux/gfp.h>
27 #include <linux/mtd/mtd.h>
28 #include <linux/mtd/onenand.h>
29 #include <linux/mtd/partitions.h>
30 #include <linux/mmc/host.h>
31 #include <linux/ioport.h>
32 #include <linux/platform_data/s3c-hsudc.h>
36 #include <asm/mach/arch.h>
37 #include <asm/mach/map.h>
38 #include <asm/mach/irq.h>
40 #include <mach/hardware.h>
42 #include <mach/irqs.h>
46 #include <plat/devs.h>
49 #include <plat/ehci.h>
51 #include <plat/fb-s3c2410.h>
52 #include <plat/hwmon.h>
54 #include <plat/keypad.h>
56 #include <plat/nand.h>
57 #include <plat/sdhci.h>
60 #include <plat/usb-control.h>
61 #include <plat/usb-phy.h>
62 #include <plat/regs-iic.h>
63 #include <plat/regs-serial.h>
64 #include <plat/regs-spi.h>
66 static u64 samsung_device_dma_mask
= DMA_BIT_MASK(32);
69 #ifdef CONFIG_CPU_S3C2440
70 static struct resource s3c_ac97_resource
[] = {
71 [0] = DEFINE_RES_MEM(S3C2440_PA_AC97
, S3C2440_SZ_AC97
),
72 [1] = DEFINE_RES_IRQ(IRQ_S3C244X_AC97
),
73 [2] = DEFINE_RES_DMA_NAMED(DMACH_PCM_OUT
, "PCM out"),
74 [3] = DEFINE_RES_DMA_NAMED(DMACH_PCM_IN
, "PCM in"),
75 [4] = DEFINE_RES_DMA_NAMED(DMACH_MIC_IN
, "Mic in"),
78 struct platform_device s3c_device_ac97
= {
79 .name
= "samsung-ac97",
81 .num_resources
= ARRAY_SIZE(s3c_ac97_resource
),
82 .resource
= s3c_ac97_resource
,
84 .dma_mask
= &samsung_device_dma_mask
,
85 .coherent_dma_mask
= DMA_BIT_MASK(32),
88 #endif /* CONFIG_CPU_S3C2440 */
92 #ifdef CONFIG_PLAT_S3C24XX
93 static struct resource s3c_adc_resource
[] = {
94 [0] = DEFINE_RES_MEM(S3C24XX_PA_ADC
, S3C24XX_SZ_ADC
),
95 [1] = DEFINE_RES_IRQ(IRQ_TC
),
96 [2] = DEFINE_RES_IRQ(IRQ_ADC
),
99 struct platform_device s3c_device_adc
= {
100 .name
= "s3c24xx-adc",
102 .num_resources
= ARRAY_SIZE(s3c_adc_resource
),
103 .resource
= s3c_adc_resource
,
105 #endif /* CONFIG_PLAT_S3C24XX */
107 #if defined(CONFIG_SAMSUNG_DEV_ADC)
108 static struct resource s3c_adc_resource
[] = {
109 [0] = DEFINE_RES_MEM(SAMSUNG_PA_ADC
, SZ_256
),
110 [1] = DEFINE_RES_IRQ(IRQ_TC
),
111 [2] = DEFINE_RES_IRQ(IRQ_ADC
),
114 struct platform_device s3c_device_adc
= {
115 .name
= "samsung-adc",
117 .num_resources
= ARRAY_SIZE(s3c_adc_resource
),
118 .resource
= s3c_adc_resource
,
120 #endif /* CONFIG_SAMSUNG_DEV_ADC */
122 /* Camif Controller */
124 #ifdef CONFIG_CPU_S3C2440
125 static struct resource s3c_camif_resource
[] = {
126 [0] = DEFINE_RES_MEM(S3C2440_PA_CAMIF
, S3C2440_SZ_CAMIF
),
127 [1] = DEFINE_RES_IRQ(IRQ_CAM
),
130 struct platform_device s3c_device_camif
= {
131 .name
= "s3c2440-camif",
133 .num_resources
= ARRAY_SIZE(s3c_camif_resource
),
134 .resource
= s3c_camif_resource
,
136 .dma_mask
= &samsung_device_dma_mask
,
137 .coherent_dma_mask
= DMA_BIT_MASK(32),
140 #endif /* CONFIG_CPU_S3C2440 */
144 struct platform_device samsung_asoc_dma
= {
145 .name
= "samsung-audio",
148 .dma_mask
= &samsung_device_dma_mask
,
149 .coherent_dma_mask
= DMA_BIT_MASK(32),
153 struct platform_device samsung_asoc_idma
= {
154 .name
= "samsung-idma",
157 .dma_mask
= &samsung_device_dma_mask
,
158 .coherent_dma_mask
= DMA_BIT_MASK(32),
164 #ifdef CONFIG_S3C_DEV_FB
165 static struct resource s3c_fb_resource
[] = {
166 [0] = DEFINE_RES_MEM(S3C_PA_FB
, SZ_16K
),
167 [1] = DEFINE_RES_IRQ(IRQ_LCD_VSYNC
),
168 [2] = DEFINE_RES_IRQ(IRQ_LCD_FIFO
),
169 [3] = DEFINE_RES_IRQ(IRQ_LCD_SYSTEM
),
172 struct platform_device s3c_device_fb
= {
175 .num_resources
= ARRAY_SIZE(s3c_fb_resource
),
176 .resource
= s3c_fb_resource
,
178 .dma_mask
= &samsung_device_dma_mask
,
179 .coherent_dma_mask
= DMA_BIT_MASK(32),
183 void __init
s3c_fb_set_platdata(struct s3c_fb_platdata
*pd
)
185 s3c_set_platdata(pd
, sizeof(struct s3c_fb_platdata
),
188 #endif /* CONFIG_S3C_DEV_FB */
192 #ifdef CONFIG_S5P_DEV_FIMC0
193 static struct resource s5p_fimc0_resource
[] = {
194 [0] = DEFINE_RES_MEM(S5P_PA_FIMC0
, SZ_4K
),
195 [1] = DEFINE_RES_IRQ(IRQ_FIMC0
),
198 struct platform_device s5p_device_fimc0
= {
201 .num_resources
= ARRAY_SIZE(s5p_fimc0_resource
),
202 .resource
= s5p_fimc0_resource
,
204 .dma_mask
= &samsung_device_dma_mask
,
205 .coherent_dma_mask
= DMA_BIT_MASK(32),
209 struct platform_device s5p_device_fimc_md
= {
210 .name
= "s5p-fimc-md",
213 #endif /* CONFIG_S5P_DEV_FIMC0 */
215 #ifdef CONFIG_S5P_DEV_FIMC1
216 static struct resource s5p_fimc1_resource
[] = {
217 [0] = DEFINE_RES_MEM(S5P_PA_FIMC1
, SZ_4K
),
218 [1] = DEFINE_RES_IRQ(IRQ_FIMC1
),
221 struct platform_device s5p_device_fimc1
= {
224 .num_resources
= ARRAY_SIZE(s5p_fimc1_resource
),
225 .resource
= s5p_fimc1_resource
,
227 .dma_mask
= &samsung_device_dma_mask
,
228 .coherent_dma_mask
= DMA_BIT_MASK(32),
231 #endif /* CONFIG_S5P_DEV_FIMC1 */
233 #ifdef CONFIG_S5P_DEV_FIMC2
234 static struct resource s5p_fimc2_resource
[] = {
235 [0] = DEFINE_RES_MEM(S5P_PA_FIMC2
, SZ_4K
),
236 [1] = DEFINE_RES_IRQ(IRQ_FIMC2
),
239 struct platform_device s5p_device_fimc2
= {
242 .num_resources
= ARRAY_SIZE(s5p_fimc2_resource
),
243 .resource
= s5p_fimc2_resource
,
245 .dma_mask
= &samsung_device_dma_mask
,
246 .coherent_dma_mask
= DMA_BIT_MASK(32),
249 #endif /* CONFIG_S5P_DEV_FIMC2 */
251 #ifdef CONFIG_S5P_DEV_FIMC3
252 static struct resource s5p_fimc3_resource
[] = {
253 [0] = DEFINE_RES_MEM(S5P_PA_FIMC3
, SZ_4K
),
254 [1] = DEFINE_RES_IRQ(IRQ_FIMC3
),
257 struct platform_device s5p_device_fimc3
= {
260 .num_resources
= ARRAY_SIZE(s5p_fimc3_resource
),
261 .resource
= s5p_fimc3_resource
,
263 .dma_mask
= &samsung_device_dma_mask
,
264 .coherent_dma_mask
= DMA_BIT_MASK(32),
267 #endif /* CONFIG_S5P_DEV_FIMC3 */
271 #ifdef CONFIG_S5P_DEV_FIMD0
272 static struct resource s5p_fimd0_resource
[] = {
273 [0] = DEFINE_RES_MEM(S5P_PA_FIMD0
, SZ_32K
),
274 [1] = DEFINE_RES_IRQ(IRQ_FIMD0_VSYNC
),
275 [2] = DEFINE_RES_IRQ(IRQ_FIMD0_FIFO
),
276 [3] = DEFINE_RES_IRQ(IRQ_FIMD0_SYSTEM
),
279 struct platform_device s5p_device_fimd0
= {
282 .num_resources
= ARRAY_SIZE(s5p_fimd0_resource
),
283 .resource
= s5p_fimd0_resource
,
285 .dma_mask
= &samsung_device_dma_mask
,
286 .coherent_dma_mask
= DMA_BIT_MASK(32),
290 void __init
s5p_fimd0_set_platdata(struct s3c_fb_platdata
*pd
)
292 s3c_set_platdata(pd
, sizeof(struct s3c_fb_platdata
),
295 #endif /* CONFIG_S5P_DEV_FIMD0 */
299 #ifdef CONFIG_S3C_DEV_HWMON
300 struct platform_device s3c_device_hwmon
= {
303 .dev
.parent
= &s3c_device_adc
.dev
,
306 void __init
s3c_hwmon_set_platdata(struct s3c_hwmon_pdata
*pd
)
308 s3c_set_platdata(pd
, sizeof(struct s3c_hwmon_pdata
),
311 #endif /* CONFIG_S3C_DEV_HWMON */
315 #ifdef CONFIG_S3C_DEV_HSMMC
316 static struct resource s3c_hsmmc_resource
[] = {
317 [0] = DEFINE_RES_MEM(S3C_PA_HSMMC0
, SZ_4K
),
318 [1] = DEFINE_RES_IRQ(IRQ_HSMMC0
),
321 struct s3c_sdhci_platdata s3c_hsmmc0_def_platdata
= {
323 .host_caps
= (MMC_CAP_4_BIT_DATA
|
324 MMC_CAP_MMC_HIGHSPEED
| MMC_CAP_SD_HIGHSPEED
),
325 .clk_type
= S3C_SDHCI_CLK_DIV_INTERNAL
,
328 struct platform_device s3c_device_hsmmc0
= {
331 .num_resources
= ARRAY_SIZE(s3c_hsmmc_resource
),
332 .resource
= s3c_hsmmc_resource
,
334 .dma_mask
= &samsung_device_dma_mask
,
335 .coherent_dma_mask
= DMA_BIT_MASK(32),
336 .platform_data
= &s3c_hsmmc0_def_platdata
,
340 void s3c_sdhci0_set_platdata(struct s3c_sdhci_platdata
*pd
)
342 s3c_sdhci_set_platdata(pd
, &s3c_hsmmc0_def_platdata
);
344 #endif /* CONFIG_S3C_DEV_HSMMC */
346 #ifdef CONFIG_S3C_DEV_HSMMC1
347 static struct resource s3c_hsmmc1_resource
[] = {
348 [0] = DEFINE_RES_MEM(S3C_PA_HSMMC1
, SZ_4K
),
349 [1] = DEFINE_RES_IRQ(IRQ_HSMMC1
),
352 struct s3c_sdhci_platdata s3c_hsmmc1_def_platdata
= {
354 .host_caps
= (MMC_CAP_4_BIT_DATA
|
355 MMC_CAP_MMC_HIGHSPEED
| MMC_CAP_SD_HIGHSPEED
),
356 .clk_type
= S3C_SDHCI_CLK_DIV_INTERNAL
,
359 struct platform_device s3c_device_hsmmc1
= {
362 .num_resources
= ARRAY_SIZE(s3c_hsmmc1_resource
),
363 .resource
= s3c_hsmmc1_resource
,
365 .dma_mask
= &samsung_device_dma_mask
,
366 .coherent_dma_mask
= DMA_BIT_MASK(32),
367 .platform_data
= &s3c_hsmmc1_def_platdata
,
371 void s3c_sdhci1_set_platdata(struct s3c_sdhci_platdata
*pd
)
373 s3c_sdhci_set_platdata(pd
, &s3c_hsmmc1_def_platdata
);
375 #endif /* CONFIG_S3C_DEV_HSMMC1 */
379 #ifdef CONFIG_S3C_DEV_HSMMC2
380 static struct resource s3c_hsmmc2_resource
[] = {
381 [0] = DEFINE_RES_MEM(S3C_PA_HSMMC2
, SZ_4K
),
382 [1] = DEFINE_RES_IRQ(IRQ_HSMMC2
),
385 struct s3c_sdhci_platdata s3c_hsmmc2_def_platdata
= {
387 .host_caps
= (MMC_CAP_4_BIT_DATA
|
388 MMC_CAP_MMC_HIGHSPEED
| MMC_CAP_SD_HIGHSPEED
),
389 .clk_type
= S3C_SDHCI_CLK_DIV_INTERNAL
,
392 struct platform_device s3c_device_hsmmc2
= {
395 .num_resources
= ARRAY_SIZE(s3c_hsmmc2_resource
),
396 .resource
= s3c_hsmmc2_resource
,
398 .dma_mask
= &samsung_device_dma_mask
,
399 .coherent_dma_mask
= DMA_BIT_MASK(32),
400 .platform_data
= &s3c_hsmmc2_def_platdata
,
404 void s3c_sdhci2_set_platdata(struct s3c_sdhci_platdata
*pd
)
406 s3c_sdhci_set_platdata(pd
, &s3c_hsmmc2_def_platdata
);
408 #endif /* CONFIG_S3C_DEV_HSMMC2 */
410 #ifdef CONFIG_S3C_DEV_HSMMC3
411 static struct resource s3c_hsmmc3_resource
[] = {
412 [0] = DEFINE_RES_MEM(S3C_PA_HSMMC3
, SZ_4K
),
413 [1] = DEFINE_RES_IRQ(IRQ_HSMMC3
),
416 struct s3c_sdhci_platdata s3c_hsmmc3_def_platdata
= {
418 .host_caps
= (MMC_CAP_4_BIT_DATA
|
419 MMC_CAP_MMC_HIGHSPEED
| MMC_CAP_SD_HIGHSPEED
),
420 .clk_type
= S3C_SDHCI_CLK_DIV_INTERNAL
,
423 struct platform_device s3c_device_hsmmc3
= {
426 .num_resources
= ARRAY_SIZE(s3c_hsmmc3_resource
),
427 .resource
= s3c_hsmmc3_resource
,
429 .dma_mask
= &samsung_device_dma_mask
,
430 .coherent_dma_mask
= DMA_BIT_MASK(32),
431 .platform_data
= &s3c_hsmmc3_def_platdata
,
435 void s3c_sdhci3_set_platdata(struct s3c_sdhci_platdata
*pd
)
437 s3c_sdhci_set_platdata(pd
, &s3c_hsmmc3_def_platdata
);
439 #endif /* CONFIG_S3C_DEV_HSMMC3 */
443 static struct resource s3c_i2c0_resource
[] = {
444 [0] = DEFINE_RES_MEM(S3C_PA_IIC
, SZ_4K
),
445 [1] = DEFINE_RES_IRQ(IRQ_IIC
),
448 struct platform_device s3c_device_i2c0
= {
449 .name
= "s3c2410-i2c",
450 #ifdef CONFIG_S3C_DEV_I2C1
455 .num_resources
= ARRAY_SIZE(s3c_i2c0_resource
),
456 .resource
= s3c_i2c0_resource
,
459 struct s3c2410_platform_i2c default_i2c_data __initdata
= {
462 .frequency
= 100*1000,
466 void __init
s3c_i2c0_set_platdata(struct s3c2410_platform_i2c
*pd
)
468 struct s3c2410_platform_i2c
*npd
;
471 pd
= &default_i2c_data
;
473 npd
= s3c_set_platdata(pd
, sizeof(struct s3c2410_platform_i2c
),
477 npd
->cfg_gpio
= s3c_i2c0_cfg_gpio
;
480 #ifdef CONFIG_S3C_DEV_I2C1
481 static struct resource s3c_i2c1_resource
[] = {
482 [0] = DEFINE_RES_MEM(S3C_PA_IIC1
, SZ_4K
),
483 [1] = DEFINE_RES_IRQ(IRQ_IIC1
),
486 struct platform_device s3c_device_i2c1
= {
487 .name
= "s3c2410-i2c",
489 .num_resources
= ARRAY_SIZE(s3c_i2c1_resource
),
490 .resource
= s3c_i2c1_resource
,
493 void __init
s3c_i2c1_set_platdata(struct s3c2410_platform_i2c
*pd
)
495 struct s3c2410_platform_i2c
*npd
;
498 pd
= &default_i2c_data
;
502 npd
= s3c_set_platdata(pd
, sizeof(struct s3c2410_platform_i2c
),
506 npd
->cfg_gpio
= s3c_i2c1_cfg_gpio
;
508 #endif /* CONFIG_S3C_DEV_I2C1 */
510 #ifdef CONFIG_S3C_DEV_I2C2
511 static struct resource s3c_i2c2_resource
[] = {
512 [0] = DEFINE_RES_MEM(S3C_PA_IIC2
, SZ_4K
),
513 [1] = DEFINE_RES_IRQ(IRQ_IIC2
),
516 struct platform_device s3c_device_i2c2
= {
517 .name
= "s3c2410-i2c",
519 .num_resources
= ARRAY_SIZE(s3c_i2c2_resource
),
520 .resource
= s3c_i2c2_resource
,
523 void __init
s3c_i2c2_set_platdata(struct s3c2410_platform_i2c
*pd
)
525 struct s3c2410_platform_i2c
*npd
;
528 pd
= &default_i2c_data
;
532 npd
= s3c_set_platdata(pd
, sizeof(struct s3c2410_platform_i2c
),
536 npd
->cfg_gpio
= s3c_i2c2_cfg_gpio
;
538 #endif /* CONFIG_S3C_DEV_I2C2 */
540 #ifdef CONFIG_S3C_DEV_I2C3
541 static struct resource s3c_i2c3_resource
[] = {
542 [0] = DEFINE_RES_MEM(S3C_PA_IIC3
, SZ_4K
),
543 [1] = DEFINE_RES_IRQ(IRQ_IIC3
),
546 struct platform_device s3c_device_i2c3
= {
547 .name
= "s3c2440-i2c",
549 .num_resources
= ARRAY_SIZE(s3c_i2c3_resource
),
550 .resource
= s3c_i2c3_resource
,
553 void __init
s3c_i2c3_set_platdata(struct s3c2410_platform_i2c
*pd
)
555 struct s3c2410_platform_i2c
*npd
;
558 pd
= &default_i2c_data
;
562 npd
= s3c_set_platdata(pd
, sizeof(struct s3c2410_platform_i2c
),
566 npd
->cfg_gpio
= s3c_i2c3_cfg_gpio
;
568 #endif /*CONFIG_S3C_DEV_I2C3 */
570 #ifdef CONFIG_S3C_DEV_I2C4
571 static struct resource s3c_i2c4_resource
[] = {
572 [0] = DEFINE_RES_MEM(S3C_PA_IIC4
, SZ_4K
),
573 [1] = DEFINE_RES_IRQ(IRQ_IIC4
),
576 struct platform_device s3c_device_i2c4
= {
577 .name
= "s3c2440-i2c",
579 .num_resources
= ARRAY_SIZE(s3c_i2c4_resource
),
580 .resource
= s3c_i2c4_resource
,
583 void __init
s3c_i2c4_set_platdata(struct s3c2410_platform_i2c
*pd
)
585 struct s3c2410_platform_i2c
*npd
;
588 pd
= &default_i2c_data
;
592 npd
= s3c_set_platdata(pd
, sizeof(struct s3c2410_platform_i2c
),
596 npd
->cfg_gpio
= s3c_i2c4_cfg_gpio
;
598 #endif /*CONFIG_S3C_DEV_I2C4 */
600 #ifdef CONFIG_S3C_DEV_I2C5
601 static struct resource s3c_i2c5_resource
[] = {
602 [0] = DEFINE_RES_MEM(S3C_PA_IIC5
, SZ_4K
),
603 [1] = DEFINE_RES_IRQ(IRQ_IIC5
),
606 struct platform_device s3c_device_i2c5
= {
607 .name
= "s3c2440-i2c",
609 .num_resources
= ARRAY_SIZE(s3c_i2c5_resource
),
610 .resource
= s3c_i2c5_resource
,
613 void __init
s3c_i2c5_set_platdata(struct s3c2410_platform_i2c
*pd
)
615 struct s3c2410_platform_i2c
*npd
;
618 pd
= &default_i2c_data
;
622 npd
= s3c_set_platdata(pd
, sizeof(struct s3c2410_platform_i2c
),
626 npd
->cfg_gpio
= s3c_i2c5_cfg_gpio
;
628 #endif /*CONFIG_S3C_DEV_I2C5 */
630 #ifdef CONFIG_S3C_DEV_I2C6
631 static struct resource s3c_i2c6_resource
[] = {
632 [0] = DEFINE_RES_MEM(S3C_PA_IIC6
, SZ_4K
),
633 [1] = DEFINE_RES_IRQ(IRQ_IIC6
),
636 struct platform_device s3c_device_i2c6
= {
637 .name
= "s3c2440-i2c",
639 .num_resources
= ARRAY_SIZE(s3c_i2c6_resource
),
640 .resource
= s3c_i2c6_resource
,
643 void __init
s3c_i2c6_set_platdata(struct s3c2410_platform_i2c
*pd
)
645 struct s3c2410_platform_i2c
*npd
;
648 pd
= &default_i2c_data
;
652 npd
= s3c_set_platdata(pd
, sizeof(struct s3c2410_platform_i2c
),
656 npd
->cfg_gpio
= s3c_i2c6_cfg_gpio
;
658 #endif /* CONFIG_S3C_DEV_I2C6 */
660 #ifdef CONFIG_S3C_DEV_I2C7
661 static struct resource s3c_i2c7_resource
[] = {
662 [0] = DEFINE_RES_MEM(S3C_PA_IIC7
, SZ_4K
),
663 [1] = DEFINE_RES_IRQ(IRQ_IIC7
),
666 struct platform_device s3c_device_i2c7
= {
667 .name
= "s3c2440-i2c",
669 .num_resources
= ARRAY_SIZE(s3c_i2c7_resource
),
670 .resource
= s3c_i2c7_resource
,
673 void __init
s3c_i2c7_set_platdata(struct s3c2410_platform_i2c
*pd
)
675 struct s3c2410_platform_i2c
*npd
;
678 pd
= &default_i2c_data
;
682 npd
= s3c_set_platdata(pd
, sizeof(struct s3c2410_platform_i2c
),
686 npd
->cfg_gpio
= s3c_i2c7_cfg_gpio
;
688 #endif /* CONFIG_S3C_DEV_I2C7 */
692 #ifdef CONFIG_S5P_DEV_I2C_HDMIPHY
693 static struct resource s5p_i2c_resource
[] = {
694 [0] = DEFINE_RES_MEM(S5P_PA_IIC_HDMIPHY
, SZ_4K
),
695 [1] = DEFINE_RES_IRQ(IRQ_IIC_HDMIPHY
),
698 struct platform_device s5p_device_i2c_hdmiphy
= {
699 .name
= "s3c2440-hdmiphy-i2c",
701 .num_resources
= ARRAY_SIZE(s5p_i2c_resource
),
702 .resource
= s5p_i2c_resource
,
705 void __init
s5p_i2c_hdmiphy_set_platdata(struct s3c2410_platform_i2c
*pd
)
707 struct s3c2410_platform_i2c
*npd
;
710 pd
= &default_i2c_data
;
712 if (soc_is_exynos4210())
714 else if (soc_is_s5pv210())
720 npd
= s3c_set_platdata(pd
, sizeof(struct s3c2410_platform_i2c
),
721 &s5p_device_i2c_hdmiphy
);
723 #endif /* CONFIG_S5P_DEV_I2C_HDMIPHY */
727 #ifdef CONFIG_PLAT_S3C24XX
728 static struct resource s3c_iis_resource
[] = {
729 [0] = DEFINE_RES_MEM(S3C24XX_PA_IIS
, S3C24XX_SZ_IIS
),
732 struct platform_device s3c_device_iis
= {
733 .name
= "s3c24xx-iis",
735 .num_resources
= ARRAY_SIZE(s3c_iis_resource
),
736 .resource
= s3c_iis_resource
,
738 .dma_mask
= &samsung_device_dma_mask
,
739 .coherent_dma_mask
= DMA_BIT_MASK(32),
742 #endif /* CONFIG_PLAT_S3C24XX */
744 #ifdef CONFIG_CPU_S3C2440
745 struct platform_device s3c2412_device_iis
= {
746 .name
= "s3c2412-iis",
749 .dma_mask
= &samsung_device_dma_mask
,
750 .coherent_dma_mask
= DMA_BIT_MASK(32),
753 #endif /* CONFIG_CPU_S3C2440 */
757 #ifdef CONFIG_SAMSUNG_DEV_IDE
758 static struct resource s3c_cfcon_resource
[] = {
759 [0] = DEFINE_RES_MEM(SAMSUNG_PA_CFCON
, SZ_16K
),
760 [1] = DEFINE_RES_IRQ(IRQ_CFCON
),
763 struct platform_device s3c_device_cfcon
= {
765 .num_resources
= ARRAY_SIZE(s3c_cfcon_resource
),
766 .resource
= s3c_cfcon_resource
,
769 void s3c_ide_set_platdata(struct s3c_ide_platdata
*pdata
)
771 s3c_set_platdata(pdata
, sizeof(struct s3c_ide_platdata
),
774 #endif /* CONFIG_SAMSUNG_DEV_IDE */
778 #ifdef CONFIG_SAMSUNG_DEV_KEYPAD
779 static struct resource samsung_keypad_resources
[] = {
780 [0] = DEFINE_RES_MEM(SAMSUNG_PA_KEYPAD
, SZ_32
),
781 [1] = DEFINE_RES_IRQ(IRQ_KEYPAD
),
784 struct platform_device samsung_device_keypad
= {
785 .name
= "samsung-keypad",
787 .num_resources
= ARRAY_SIZE(samsung_keypad_resources
),
788 .resource
= samsung_keypad_resources
,
791 void __init
samsung_keypad_set_platdata(struct samsung_keypad_platdata
*pd
)
793 struct samsung_keypad_platdata
*npd
;
795 npd
= s3c_set_platdata(pd
, sizeof(struct samsung_keypad_platdata
),
796 &samsung_device_keypad
);
799 npd
->cfg_gpio
= samsung_keypad_cfg_gpio
;
801 #endif /* CONFIG_SAMSUNG_DEV_KEYPAD */
805 #ifdef CONFIG_PLAT_S3C24XX
806 static struct resource s3c_lcd_resource
[] = {
807 [0] = DEFINE_RES_MEM(S3C24XX_PA_LCD
, S3C24XX_SZ_LCD
),
808 [1] = DEFINE_RES_IRQ(IRQ_LCD
),
811 struct platform_device s3c_device_lcd
= {
812 .name
= "s3c2410-lcd",
814 .num_resources
= ARRAY_SIZE(s3c_lcd_resource
),
815 .resource
= s3c_lcd_resource
,
817 .dma_mask
= &samsung_device_dma_mask
,
818 .coherent_dma_mask
= DMA_BIT_MASK(32),
822 void __init
s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info
*pd
)
824 struct s3c2410fb_mach_info
*npd
;
826 npd
= s3c_set_platdata(pd
, sizeof(*npd
), &s3c_device_lcd
);
828 npd
->displays
= kmemdup(pd
->displays
,
829 sizeof(struct s3c2410fb_display
) * npd
->num_displays
,
832 printk(KERN_ERR
"no memory for LCD display data\n");
834 printk(KERN_ERR
"no memory for LCD platform data\n");
837 #endif /* CONFIG_PLAT_S3C24XX */
841 #ifdef CONFIG_S5P_DEV_MFC
842 static struct resource s5p_mfc_resource
[] = {
843 [0] = DEFINE_RES_MEM(S5P_PA_MFC
, SZ_64K
),
844 [1] = DEFINE_RES_IRQ(IRQ_MFC
),
847 struct platform_device s5p_device_mfc
= {
850 .num_resources
= ARRAY_SIZE(s5p_mfc_resource
),
851 .resource
= s5p_mfc_resource
,
855 * MFC hardware has 2 memory interfaces which are modelled as two separate
856 * platform devices to let dma-mapping distinguish between them.
858 * MFC parent device (s5p_device_mfc) must be registered before memory
859 * interface specific devices (s5p_device_mfc_l and s5p_device_mfc_r).
862 struct platform_device s5p_device_mfc_l
= {
866 .parent
= &s5p_device_mfc
.dev
,
867 .dma_mask
= &samsung_device_dma_mask
,
868 .coherent_dma_mask
= DMA_BIT_MASK(32),
872 struct platform_device s5p_device_mfc_r
= {
876 .parent
= &s5p_device_mfc
.dev
,
877 .dma_mask
= &samsung_device_dma_mask
,
878 .coherent_dma_mask
= DMA_BIT_MASK(32),
881 #endif /* CONFIG_S5P_DEV_MFC */
885 #ifdef CONFIG_S5P_DEV_CSIS0
886 static struct resource s5p_mipi_csis0_resource
[] = {
887 [0] = DEFINE_RES_MEM(S5P_PA_MIPI_CSIS0
, SZ_4K
),
888 [1] = DEFINE_RES_IRQ(IRQ_MIPI_CSIS0
),
891 struct platform_device s5p_device_mipi_csis0
= {
892 .name
= "s5p-mipi-csis",
894 .num_resources
= ARRAY_SIZE(s5p_mipi_csis0_resource
),
895 .resource
= s5p_mipi_csis0_resource
,
897 #endif /* CONFIG_S5P_DEV_CSIS0 */
899 #ifdef CONFIG_S5P_DEV_CSIS1
900 static struct resource s5p_mipi_csis1_resource
[] = {
901 [0] = DEFINE_RES_MEM(S5P_PA_MIPI_CSIS1
, SZ_4K
),
902 [1] = DEFINE_RES_IRQ(IRQ_MIPI_CSIS1
),
905 struct platform_device s5p_device_mipi_csis1
= {
906 .name
= "s5p-mipi-csis",
908 .num_resources
= ARRAY_SIZE(s5p_mipi_csis1_resource
),
909 .resource
= s5p_mipi_csis1_resource
,
915 #ifdef CONFIG_S3C_DEV_NAND
916 static struct resource s3c_nand_resource
[] = {
917 [0] = DEFINE_RES_MEM(S3C_PA_NAND
, SZ_1M
),
920 struct platform_device s3c_device_nand
= {
921 .name
= "s3c2410-nand",
923 .num_resources
= ARRAY_SIZE(s3c_nand_resource
),
924 .resource
= s3c_nand_resource
,
928 * s3c_nand_copy_set() - copy nand set data
929 * @set: The new structure, directly copied from the old.
931 * Copy all the fields from the NAND set field from what is probably __initdata
932 * to new kernel memory. The code returns 0 if the copy happened correctly or
933 * an error code for the calling function to display.
935 * Note, we currently do not try and look to see if we've already copied the
936 * data in a previous set.
938 static int __init
s3c_nand_copy_set(struct s3c2410_nand_set
*set
)
943 size
= sizeof(struct mtd_partition
) * set
->nr_partitions
;
945 ptr
= kmemdup(set
->partitions
, size
, GFP_KERNEL
);
946 set
->partitions
= ptr
;
952 if (set
->nr_map
&& set
->nr_chips
) {
953 size
= sizeof(int) * set
->nr_chips
;
954 ptr
= kmemdup(set
->nr_map
, size
, GFP_KERNEL
);
961 if (set
->ecc_layout
) {
962 ptr
= kmemdup(set
->ecc_layout
,
963 sizeof(struct nand_ecclayout
), GFP_KERNEL
);
964 set
->ecc_layout
= ptr
;
973 void __init
s3c_nand_set_platdata(struct s3c2410_platform_nand
*nand
)
975 struct s3c2410_platform_nand
*npd
;
979 /* note, if we get a failure in allocation, we simply drop out of the
980 * function. If there is so little memory available at initialisation
981 * time then there is little chance the system is going to run.
984 npd
= s3c_set_platdata(nand
, sizeof(struct s3c2410_platform_nand
),
989 /* now see if we need to copy any of the nand set data */
991 size
= sizeof(struct s3c2410_nand_set
) * npd
->nr_sets
;
993 struct s3c2410_nand_set
*from
= npd
->sets
;
994 struct s3c2410_nand_set
*to
;
997 to
= kmemdup(from
, size
, GFP_KERNEL
);
998 npd
->sets
= to
; /* set, even if we failed */
1001 printk(KERN_ERR
"%s: no memory for sets\n", __func__
);
1005 for (i
= 0; i
< npd
->nr_sets
; i
++) {
1006 ret
= s3c_nand_copy_set(to
);
1008 printk(KERN_ERR
"%s: failed to copy set %d\n",
1016 #endif /* CONFIG_S3C_DEV_NAND */
1020 #ifdef CONFIG_S3C_DEV_ONENAND
1021 static struct resource s3c_onenand_resources
[] = {
1022 [0] = DEFINE_RES_MEM(S3C_PA_ONENAND
, SZ_1K
),
1023 [1] = DEFINE_RES_MEM(S3C_PA_ONENAND_BUF
, S3C_SZ_ONENAND_BUF
),
1024 [2] = DEFINE_RES_IRQ(IRQ_ONENAND
),
1027 struct platform_device s3c_device_onenand
= {
1028 .name
= "samsung-onenand",
1030 .num_resources
= ARRAY_SIZE(s3c_onenand_resources
),
1031 .resource
= s3c_onenand_resources
,
1033 #endif /* CONFIG_S3C_DEV_ONENAND */
1035 #ifdef CONFIG_S3C64XX_DEV_ONENAND1
1036 static struct resource s3c64xx_onenand1_resources
[] = {
1037 [0] = DEFINE_RES_MEM(S3C64XX_PA_ONENAND1
, SZ_1K
),
1038 [1] = DEFINE_RES_MEM(S3C64XX_PA_ONENAND1_BUF
, S3C64XX_SZ_ONENAND1_BUF
),
1039 [2] = DEFINE_RES_IRQ(IRQ_ONENAND1
),
1042 struct platform_device s3c64xx_device_onenand1
= {
1043 .name
= "samsung-onenand",
1045 .num_resources
= ARRAY_SIZE(s3c64xx_onenand1_resources
),
1046 .resource
= s3c64xx_onenand1_resources
,
1049 void s3c64xx_onenand1_set_platdata(struct onenand_platform_data
*pdata
)
1051 s3c_set_platdata(pdata
, sizeof(struct onenand_platform_data
),
1052 &s3c64xx_device_onenand1
);
1054 #endif /* CONFIG_S3C64XX_DEV_ONENAND1 */
1056 #ifdef CONFIG_S5P_DEV_ONENAND
1057 static struct resource s5p_onenand_resources
[] = {
1058 [0] = DEFINE_RES_MEM(S5P_PA_ONENAND
, SZ_128K
),
1059 [1] = DEFINE_RES_MEM(S5P_PA_ONENAND_DMA
, SZ_8K
),
1060 [2] = DEFINE_RES_IRQ(IRQ_ONENAND_AUDI
),
1063 struct platform_device s5p_device_onenand
= {
1064 .name
= "s5pc110-onenand",
1066 .num_resources
= ARRAY_SIZE(s5p_onenand_resources
),
1067 .resource
= s5p_onenand_resources
,
1069 #endif /* CONFIG_S5P_DEV_ONENAND */
1073 #ifdef CONFIG_PLAT_S5P
1074 static struct resource s5p_pmu_resource
[] = {
1075 DEFINE_RES_IRQ(IRQ_PMU
)
1078 struct platform_device s5p_device_pmu
= {
1080 .id
= ARM_PMU_DEVICE_CPU
,
1081 .num_resources
= ARRAY_SIZE(s5p_pmu_resource
),
1082 .resource
= s5p_pmu_resource
,
1085 static int __init
s5p_pmu_init(void)
1087 platform_device_register(&s5p_device_pmu
);
1090 arch_initcall(s5p_pmu_init
);
1091 #endif /* CONFIG_PLAT_S5P */
1095 #ifdef CONFIG_SAMSUNG_DEV_PWM
1097 #define TIMER_RESOURCE_SIZE (1)
1099 #define TIMER_RESOURCE(_tmr, _irq) \
1100 (struct resource [TIMER_RESOURCE_SIZE]) { \
1104 .flags = IORESOURCE_IRQ \
1108 #define DEFINE_S3C_TIMER(_tmr_no, _irq) \
1109 .name = "s3c24xx-pwm", \
1111 .num_resources = TIMER_RESOURCE_SIZE, \
1112 .resource = TIMER_RESOURCE(_tmr_no, _irq), \
1115 * since we already have an static mapping for the timer,
1116 * we do not bother setting any IO resource for the base.
1119 struct platform_device s3c_device_timer
[] = {
1120 [0] = { DEFINE_S3C_TIMER(0, IRQ_TIMER0
) },
1121 [1] = { DEFINE_S3C_TIMER(1, IRQ_TIMER1
) },
1122 [2] = { DEFINE_S3C_TIMER(2, IRQ_TIMER2
) },
1123 [3] = { DEFINE_S3C_TIMER(3, IRQ_TIMER3
) },
1124 [4] = { DEFINE_S3C_TIMER(4, IRQ_TIMER4
) },
1126 #endif /* CONFIG_SAMSUNG_DEV_PWM */
1130 #ifdef CONFIG_PLAT_S3C24XX
1131 static struct resource s3c_rtc_resource
[] = {
1132 [0] = DEFINE_RES_MEM(S3C24XX_PA_RTC
, SZ_256
),
1133 [1] = DEFINE_RES_IRQ(IRQ_RTC
),
1134 [2] = DEFINE_RES_IRQ(IRQ_TICK
),
1137 struct platform_device s3c_device_rtc
= {
1138 .name
= "s3c2410-rtc",
1140 .num_resources
= ARRAY_SIZE(s3c_rtc_resource
),
1141 .resource
= s3c_rtc_resource
,
1143 #endif /* CONFIG_PLAT_S3C24XX */
1145 #ifdef CONFIG_S3C_DEV_RTC
1146 static struct resource s3c_rtc_resource
[] = {
1147 [0] = DEFINE_RES_MEM(S3C_PA_RTC
, SZ_256
),
1148 [1] = DEFINE_RES_IRQ(IRQ_RTC_ALARM
),
1149 [2] = DEFINE_RES_IRQ(IRQ_RTC_TIC
),
1152 struct platform_device s3c_device_rtc
= {
1153 .name
= "s3c64xx-rtc",
1155 .num_resources
= ARRAY_SIZE(s3c_rtc_resource
),
1156 .resource
= s3c_rtc_resource
,
1158 #endif /* CONFIG_S3C_DEV_RTC */
1162 #ifdef CONFIG_PLAT_S3C24XX
1163 static struct resource s3c_sdi_resource
[] = {
1164 [0] = DEFINE_RES_MEM(S3C24XX_PA_SDI
, S3C24XX_SZ_SDI
),
1165 [1] = DEFINE_RES_IRQ(IRQ_SDI
),
1168 struct platform_device s3c_device_sdi
= {
1169 .name
= "s3c2410-sdi",
1171 .num_resources
= ARRAY_SIZE(s3c_sdi_resource
),
1172 .resource
= s3c_sdi_resource
,
1175 void __init
s3c24xx_mci_set_platdata(struct s3c24xx_mci_pdata
*pdata
)
1177 s3c_set_platdata(pdata
, sizeof(struct s3c24xx_mci_pdata
),
1180 #endif /* CONFIG_PLAT_S3C24XX */
1184 #ifdef CONFIG_PLAT_S3C24XX
1185 static struct resource s3c_spi0_resource
[] = {
1186 [0] = DEFINE_RES_MEM(S3C24XX_PA_SPI
, SZ_32
),
1187 [1] = DEFINE_RES_IRQ(IRQ_SPI0
),
1190 struct platform_device s3c_device_spi0
= {
1191 .name
= "s3c2410-spi",
1193 .num_resources
= ARRAY_SIZE(s3c_spi0_resource
),
1194 .resource
= s3c_spi0_resource
,
1196 .dma_mask
= &samsung_device_dma_mask
,
1197 .coherent_dma_mask
= DMA_BIT_MASK(32),
1201 static struct resource s3c_spi1_resource
[] = {
1202 [0] = DEFINE_RES_MEM(S3C24XX_PA_SPI1
, SZ_32
),
1203 [1] = DEFINE_RES_IRQ(IRQ_SPI1
),
1206 struct platform_device s3c_device_spi1
= {
1207 .name
= "s3c2410-spi",
1209 .num_resources
= ARRAY_SIZE(s3c_spi1_resource
),
1210 .resource
= s3c_spi1_resource
,
1212 .dma_mask
= &samsung_device_dma_mask
,
1213 .coherent_dma_mask
= DMA_BIT_MASK(32),
1216 #endif /* CONFIG_PLAT_S3C24XX */
1220 #ifdef CONFIG_PLAT_S3C24XX
1221 static struct resource s3c_ts_resource
[] = {
1222 [0] = DEFINE_RES_MEM(S3C24XX_PA_ADC
, S3C24XX_SZ_ADC
),
1223 [1] = DEFINE_RES_IRQ(IRQ_TC
),
1226 struct platform_device s3c_device_ts
= {
1227 .name
= "s3c2410-ts",
1229 .dev
.parent
= &s3c_device_adc
.dev
,
1230 .num_resources
= ARRAY_SIZE(s3c_ts_resource
),
1231 .resource
= s3c_ts_resource
,
1234 void __init
s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info
*hard_s3c2410ts_info
)
1236 s3c_set_platdata(hard_s3c2410ts_info
,
1237 sizeof(struct s3c2410_ts_mach_info
), &s3c_device_ts
);
1239 #endif /* CONFIG_PLAT_S3C24XX */
1241 #ifdef CONFIG_SAMSUNG_DEV_TS
1242 static struct resource s3c_ts_resource
[] = {
1243 [0] = DEFINE_RES_MEM(SAMSUNG_PA_ADC
, SZ_256
),
1244 [1] = DEFINE_RES_IRQ(IRQ_TC
),
1247 static struct s3c2410_ts_mach_info default_ts_data __initdata
= {
1250 .oversampling_shift
= 2,
1253 struct platform_device s3c_device_ts
= {
1254 .name
= "s3c64xx-ts",
1256 .num_resources
= ARRAY_SIZE(s3c_ts_resource
),
1257 .resource
= s3c_ts_resource
,
1260 void __init
s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info
*pd
)
1263 pd
= &default_ts_data
;
1265 s3c_set_platdata(pd
, sizeof(struct s3c2410_ts_mach_info
),
1268 #endif /* CONFIG_SAMSUNG_DEV_TS */
1272 #ifdef CONFIG_S5P_DEV_TV
1274 static struct resource s5p_hdmi_resources
[] = {
1275 [0] = DEFINE_RES_MEM(S5P_PA_HDMI
, SZ_1M
),
1276 [1] = DEFINE_RES_IRQ(IRQ_HDMI
),
1279 struct platform_device s5p_device_hdmi
= {
1282 .num_resources
= ARRAY_SIZE(s5p_hdmi_resources
),
1283 .resource
= s5p_hdmi_resources
,
1286 static struct resource s5p_sdo_resources
[] = {
1287 [0] = DEFINE_RES_MEM(S5P_PA_SDO
, SZ_64K
),
1288 [1] = DEFINE_RES_IRQ(IRQ_SDO
),
1291 struct platform_device s5p_device_sdo
= {
1294 .num_resources
= ARRAY_SIZE(s5p_sdo_resources
),
1295 .resource
= s5p_sdo_resources
,
1298 static struct resource s5p_mixer_resources
[] = {
1299 [0] = DEFINE_RES_MEM_NAMED(S5P_PA_MIXER
, SZ_64K
, "mxr"),
1300 [1] = DEFINE_RES_MEM_NAMED(S5P_PA_VP
, SZ_64K
, "vp"),
1301 [2] = DEFINE_RES_IRQ_NAMED(IRQ_MIXER
, "irq"),
1304 struct platform_device s5p_device_mixer
= {
1305 .name
= "s5p-mixer",
1307 .num_resources
= ARRAY_SIZE(s5p_mixer_resources
),
1308 .resource
= s5p_mixer_resources
,
1310 .dma_mask
= &samsung_device_dma_mask
,
1311 .coherent_dma_mask
= DMA_BIT_MASK(32),
1314 #endif /* CONFIG_S5P_DEV_TV */
1318 #ifdef CONFIG_S3C_DEV_USB_HOST
1319 static struct resource s3c_usb_resource
[] = {
1320 [0] = DEFINE_RES_MEM(S3C_PA_USBHOST
, SZ_256
),
1321 [1] = DEFINE_RES_IRQ(IRQ_USBH
),
1324 struct platform_device s3c_device_ohci
= {
1325 .name
= "s3c2410-ohci",
1327 .num_resources
= ARRAY_SIZE(s3c_usb_resource
),
1328 .resource
= s3c_usb_resource
,
1330 .dma_mask
= &samsung_device_dma_mask
,
1331 .coherent_dma_mask
= DMA_BIT_MASK(32),
1336 * s3c_ohci_set_platdata - initialise OHCI device platform data
1337 * @info: The platform data.
1339 * This call copies the @info passed in and sets the device .platform_data
1340 * field to that copy. The @info is copied so that the original can be marked
1344 void __init
s3c_ohci_set_platdata(struct s3c2410_hcd_info
*info
)
1346 s3c_set_platdata(info
, sizeof(struct s3c2410_hcd_info
),
1349 #endif /* CONFIG_S3C_DEV_USB_HOST */
1351 /* USB Device (Gadget) */
1353 #ifdef CONFIG_PLAT_S3C24XX
1354 static struct resource s3c_usbgadget_resource
[] = {
1355 [0] = DEFINE_RES_MEM(S3C24XX_PA_USBDEV
, S3C24XX_SZ_USBDEV
),
1356 [1] = DEFINE_RES_IRQ(IRQ_USBD
),
1359 struct platform_device s3c_device_usbgadget
= {
1360 .name
= "s3c2410-usbgadget",
1362 .num_resources
= ARRAY_SIZE(s3c_usbgadget_resource
),
1363 .resource
= s3c_usbgadget_resource
,
1366 void __init
s3c24xx_udc_set_platdata(struct s3c2410_udc_mach_info
*pd
)
1368 s3c_set_platdata(pd
, sizeof(*pd
), &s3c_device_usbgadget
);
1370 #endif /* CONFIG_PLAT_S3C24XX */
1372 /* USB EHCI Host Controller */
1374 #ifdef CONFIG_S5P_DEV_USB_EHCI
1375 static struct resource s5p_ehci_resource
[] = {
1376 [0] = DEFINE_RES_MEM(S5P_PA_EHCI
, SZ_256
),
1377 [1] = DEFINE_RES_IRQ(IRQ_USB_HOST
),
1380 struct platform_device s5p_device_ehci
= {
1383 .num_resources
= ARRAY_SIZE(s5p_ehci_resource
),
1384 .resource
= s5p_ehci_resource
,
1386 .dma_mask
= &samsung_device_dma_mask
,
1387 .coherent_dma_mask
= DMA_BIT_MASK(32),
1391 void __init
s5p_ehci_set_platdata(struct s5p_ehci_platdata
*pd
)
1393 struct s5p_ehci_platdata
*npd
;
1395 npd
= s3c_set_platdata(pd
, sizeof(struct s5p_ehci_platdata
),
1399 npd
->phy_init
= s5p_usb_phy_init
;
1401 npd
->phy_exit
= s5p_usb_phy_exit
;
1403 #endif /* CONFIG_S5P_DEV_USB_EHCI */
1407 #ifdef CONFIG_S3C_DEV_USB_HSOTG
1408 static struct resource s3c_usb_hsotg_resources
[] = {
1409 [0] = DEFINE_RES_MEM(S3C_PA_USB_HSOTG
, SZ_16K
),
1410 [1] = DEFINE_RES_IRQ(IRQ_OTG
),
1413 struct platform_device s3c_device_usb_hsotg
= {
1414 .name
= "s3c-hsotg",
1416 .num_resources
= ARRAY_SIZE(s3c_usb_hsotg_resources
),
1417 .resource
= s3c_usb_hsotg_resources
,
1419 .dma_mask
= &samsung_device_dma_mask
,
1420 .coherent_dma_mask
= DMA_BIT_MASK(32),
1423 #endif /* CONFIG_S3C_DEV_USB_HSOTG */
1425 /* USB High Spped 2.0 Device (Gadget) */
1427 #ifdef CONFIG_PLAT_S3C24XX
1428 static struct resource s3c_hsudc_resource
[] = {
1429 [0] = DEFINE_RES_MEM(S3C2416_PA_HSUDC
, S3C2416_SZ_HSUDC
),
1430 [1] = DEFINE_RES_IRQ(IRQ_USBD
),
1433 struct platform_device s3c_device_usb_hsudc
= {
1434 .name
= "s3c-hsudc",
1436 .num_resources
= ARRAY_SIZE(s3c_hsudc_resource
),
1437 .resource
= s3c_hsudc_resource
,
1439 .dma_mask
= &samsung_device_dma_mask
,
1440 .coherent_dma_mask
= DMA_BIT_MASK(32),
1444 void __init
s3c24xx_hsudc_set_platdata(struct s3c24xx_hsudc_platdata
*pd
)
1446 s3c_set_platdata(pd
, sizeof(*pd
), &s3c_device_usb_hsudc
);
1448 #endif /* CONFIG_PLAT_S3C24XX */
1452 #ifdef CONFIG_S3C_DEV_WDT
1453 static struct resource s3c_wdt_resource
[] = {
1454 [0] = DEFINE_RES_MEM(S3C_PA_WDT
, SZ_1K
),
1455 [1] = DEFINE_RES_IRQ(IRQ_WDT
),
1458 struct platform_device s3c_device_wdt
= {
1459 .name
= "s3c2410-wdt",
1461 .num_resources
= ARRAY_SIZE(s3c_wdt_resource
),
1462 .resource
= s3c_wdt_resource
,
1464 #endif /* CONFIG_S3C_DEV_WDT */