1 /* linux/arch/arm/mach-s3c2410/devs.c
3 * Copyright (c) 2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
6 * Base S3C2410 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 * 18-Aug-2004 BJD Created initial version
16 #include <linux/kernel.h>
17 #include <linux/types.h>
18 #include <linux/interrupt.h>
19 #include <linux/list.h>
20 #include <linux/timer.h>
21 #include <linux/init.h>
22 #include <linux/device.h>
24 #include <asm/mach/arch.h>
25 #include <asm/mach/map.h>
26 #include <asm/mach/irq.h>
28 #include <asm/hardware.h>
34 /* USB Host Controller */
36 static struct resource s3c_usb_resource[] = {
38 .start = S3C2410_PA_USBHOST,
39 .end = S3C2410_PA_USBHOST + S3C2410_SZ_USBHOST,
40 .flags = IORESOURCE_MEM,
45 .flags = IORESOURCE_IRQ,
49 static u64 s3c_device_usb_dmamask = 0xffffffffUL;
51 struct platform_device s3c_device_usb = {
52 .name = "s3c2410-ohci",
54 .num_resources = ARRAY_SIZE(s3c_usb_resource),
55 .resource = s3c_usb_resource,
57 .dma_mask = &s3c_device_usb_dmamask,
58 .coherent_dma_mask = 0xffffffffUL
62 EXPORT_SYMBOL(s3c_device_usb);
66 static struct resource s3c_lcd_resource[] = {
68 .start = S3C2410_PA_LCD,
69 .end = S3C2410_PA_LCD + S3C2410_SZ_LCD,
70 .flags = IORESOURCE_MEM,
75 .flags = IORESOURCE_IRQ,
80 static u64 s3c_device_lcd_dmamask = 0xffffffffUL;
82 struct platform_device s3c_device_lcd = {
83 .name = "s3c2410-lcd",
85 .num_resources = ARRAY_SIZE(s3c_lcd_resource),
86 .resource = s3c_lcd_resource,
88 .dma_mask = &s3c_device_lcd_dmamask,
89 .coherent_dma_mask = 0xffffffffUL
93 EXPORT_SYMBOL(s3c_device_lcd);
97 static struct resource s3c_nand_resource[] = {
99 .start = S3C2410_PA_NAND,
100 .end = S3C2410_PA_NAND + S3C2410_SZ_NAND,
101 .flags = IORESOURCE_MEM,
104 .start = IRQ_S3CUART_RX0,
105 .end = IRQ_S3CUART_ERR0,
106 .flags = IORESOURCE_IRQ,
111 struct platform_device s3c_device_nand = {
112 .name = "s3c2410-nand",
114 .num_resources = ARRAY_SIZE(s3c_nand_resource),
115 .resource = s3c_nand_resource,
118 EXPORT_SYMBOL(s3c_device_nand);
120 /* USB Device (Gadget)*/
122 static struct resource s3c_usbgadget_resource[] = {
124 .start = S3C2410_PA_USBDEV,
125 .end = S3C2410_PA_USBDEV + S3C2410_SZ_USBDEV,
126 .flags = IORESOURCE_MEM,
131 .flags = IORESOURCE_IRQ,
136 struct platform_device s3c_device_usbgadget = {
137 .name = "s3c2410-usbgadget",
139 .num_resources = ARRAY_SIZE(s3c_usbgadget_resource),
140 .resource = s3c_usbgadget_resource,
143 EXPORT_SYMBOL(s3c_device_usbgadget);
147 static struct resource s3c_wdt_resource[] = {
149 .start = S3C2410_PA_WATCHDOG,
150 .end = S3C2410_PA_WATCHDOG + S3C2410_SZ_WATCHDOG,
151 .flags = IORESOURCE_MEM,
156 .flags = IORESOURCE_IRQ,
161 struct platform_device s3c_device_wdt = {
162 .name = "s3c2410-wdt",
164 .num_resources = ARRAY_SIZE(s3c_wdt_resource),
165 .resource = s3c_wdt_resource,
168 EXPORT_SYMBOL(s3c_device_wdt);
172 static struct resource s3c_i2c_resource[] = {
174 .start = S3C2410_PA_IIC,
175 .end = S3C2410_PA_IIC + S3C2410_SZ_IIC,
176 .flags = IORESOURCE_MEM,
181 .flags = IORESOURCE_IRQ,
186 struct platform_device s3c_device_i2c = {
187 .name = "s3c2410-i2c",
189 .num_resources = ARRAY_SIZE(s3c_i2c_resource),
190 .resource = s3c_i2c_resource,
193 EXPORT_SYMBOL(s3c_device_i2c);
197 static struct resource s3c_iis_resource[] = {
199 .start = S3C2410_PA_IIS,
200 .end = S3C2410_PA_IIS + S3C2410_SZ_IIS,
201 .flags = IORESOURCE_MEM,
205 static u64 s3c_device_iis_dmamask = 0xffffffffUL;
207 struct platform_device s3c_device_iis = {
208 .name = "s3c2410-iis",
210 .num_resources = ARRAY_SIZE(s3c_iis_resource),
211 .resource = s3c_iis_resource,
213 .dma_mask = &s3c_device_iis_dmamask,
214 .coherent_dma_mask = 0xffffffffUL
218 EXPORT_SYMBOL(s3c_device_iis);
222 static struct resource s3c_rtc_resource[] = {
224 .start = S3C2410_PA_RTC,
225 .end = S3C2410_PA_RTC + 0xff,
226 .flags = IORESOURCE_MEM,
231 .flags = IORESOURCE_IRQ,
236 struct platform_device s3c_device_rtc = {
237 .name = "s3c2410-rtc",
239 .num_resources = ARRAY_SIZE(s3c_rtc_resource),
240 .resource = s3c_rtc_resource,
243 EXPORT_SYMBOL(s3c_device_rtc);
247 static struct resource s3c_adc_resource[] = {
249 .start = S3C2410_PA_ADC,
250 .end = S3C2410_PA_ADC + S3C2410_SZ_ADC,
251 .flags = IORESOURCE_MEM,
256 .flags = IORESOURCE_IRQ,
261 struct platform_device s3c_device_adc = {
262 .name = "s3c2410-adc",
264 .num_resources = ARRAY_SIZE(s3c_adc_resource),
265 .resource = s3c_adc_resource,
270 static struct resource s3c_sdi_resource[] = {
272 .start = S3C2410_PA_SDI,
273 .end = S3C2410_PA_SDI + S3C2410_SZ_SDI,
274 .flags = IORESOURCE_MEM,
279 .flags = IORESOURCE_IRQ,
284 struct platform_device s3c_device_sdi = {
285 .name = "s3c2410-sdi",
287 .num_resources = ARRAY_SIZE(s3c_sdi_resource),
288 .resource = s3c_sdi_resource,
291 EXPORT_SYMBOL(s3c_device_sdi);
295 static struct resource s3c_spi0_resource[] = {
297 .start = S3C2410_PA_SPI,
298 .end = S3C2410_PA_SPI + 0x1f,
299 .flags = IORESOURCE_MEM,
304 .flags = IORESOURCE_IRQ,
309 struct platform_device s3c_device_spi0 = {
310 .name = "s3c2410-spi",
312 .num_resources = ARRAY_SIZE(s3c_spi0_resource),
313 .resource = s3c_spi0_resource,
316 EXPORT_SYMBOL(s3c_device_spi0);
320 static struct resource s3c_spi1_resource[] = {
322 .start = S3C2410_PA_SPI + 0x20,
323 .end = S3C2410_PA_SPI + 0x20 + 0x1f,
324 .flags = IORESOURCE_MEM,
329 .flags = IORESOURCE_IRQ,
334 struct platform_device s3c_device_spi1 = {
335 .name = "s3c2410-spi",
337 .num_resources = ARRAY_SIZE(s3c_spi1_resource),
338 .resource = s3c_spi1_resource,
341 EXPORT_SYMBOL(s3c_device_spi1);