2007-02-11 17:31:01 +00:00
|
|
|
/* linux/arch/arm/plat-s3c24xx/devs.c
|
2005-04-16 22:20:36 +00:00
|
|
|
*
|
|
|
|
* Copyright (c) 2004 Simtec Electronics
|
2006-09-06 18:03:21 +00:00
|
|
|
* Ben Dooks <ben@simtec.co.uk>
|
2005-04-16 22:20:36 +00:00
|
|
|
*
|
2006-09-06 18:03:21 +00:00
|
|
|
* Base S3C24XX platform device definitions
|
2005-04-16 22:20:36 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/types.h>
|
|
|
|
#include <linux/interrupt.h>
|
|
|
|
#include <linux/list.h>
|
|
|
|
#include <linux/timer.h>
|
|
|
|
#include <linux/init.h>
|
2006-12-17 22:22:26 +00:00
|
|
|
#include <linux/serial_core.h>
|
2005-10-29 18:07:23 +00:00
|
|
|
#include <linux/platform_device.h>
|
2008-09-06 11:10:45 +00:00
|
|
|
#include <linux/io.h>
|
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.
percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.
http://userweb.kernel.org/~tj/misc/slabh-sweep.py
The script does the followings.
* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.
* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.
* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.
The conversion was done in the following steps.
1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.
2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.
3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.
4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.
5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.
6. percpu.h was updated not to include slab.h.
7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).
* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig
8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.
Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.
Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-24 08:04:11 +00:00
|
|
|
#include <linux/slab.h>
|
2010-04-22 08:47:44 +00:00
|
|
|
#include <linux/string.h>
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
#include <asm/mach/arch.h>
|
|
|
|
#include <asm/mach/map.h>
|
|
|
|
#include <asm/mach/irq.h>
|
2008-08-05 15:14:15 +00:00
|
|
|
#include <mach/fb.h>
|
|
|
|
#include <mach/hardware.h>
|
2009-08-05 17:29:57 +00:00
|
|
|
#include <mach/dma.h>
|
|
|
|
#include <mach/irqs.h>
|
2005-04-16 22:20:36 +00:00
|
|
|
#include <asm/irq.h>
|
|
|
|
|
2008-10-07 21:26:09 +00:00
|
|
|
#include <plat/regs-serial.h>
|
2008-10-30 10:14:37 +00:00
|
|
|
#include <plat/udc.h>
|
2010-01-18 07:24:22 +00:00
|
|
|
#include <plat/mci.h>
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2008-10-07 21:26:09 +00:00
|
|
|
#include <plat/devs.h>
|
|
|
|
#include <plat/cpu.h>
|
2008-10-30 10:14:38 +00:00
|
|
|
#include <plat/regs-spi.h>
|
2010-05-04 11:12:41 +00:00
|
|
|
#include <plat/ts.h>
|
2009-12-23 19:25:05 +00:00
|
|
|
|
2005-04-16 22:20:36 +00:00
|
|
|
/* Serial port registrations */
|
|
|
|
|
2006-06-18 22:04:05 +00:00
|
|
|
static struct resource s3c2410_uart0_resource[] = {
|
|
|
|
[0] = {
|
|
|
|
.start = S3C2410_PA_UART0,
|
|
|
|
.end = S3C2410_PA_UART0 + 0x3fff,
|
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
},
|
|
|
|
[1] = {
|
|
|
|
.start = IRQ_S3CUART_RX0,
|
|
|
|
.end = IRQ_S3CUART_ERR0,
|
|
|
|
.flags = IORESOURCE_IRQ,
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct resource s3c2410_uart1_resource[] = {
|
|
|
|
[0] = {
|
|
|
|
.start = S3C2410_PA_UART1,
|
|
|
|
.end = S3C2410_PA_UART1 + 0x3fff,
|
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
},
|
|
|
|
[1] = {
|
|
|
|
.start = IRQ_S3CUART_RX1,
|
|
|
|
.end = IRQ_S3CUART_ERR1,
|
|
|
|
.flags = IORESOURCE_IRQ,
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct resource s3c2410_uart2_resource[] = {
|
|
|
|
[0] = {
|
|
|
|
.start = S3C2410_PA_UART2,
|
|
|
|
.end = S3C2410_PA_UART2 + 0x3fff,
|
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
},
|
|
|
|
[1] = {
|
|
|
|
.start = IRQ_S3CUART_RX2,
|
|
|
|
.end = IRQ_S3CUART_ERR2,
|
|
|
|
.flags = IORESOURCE_IRQ,
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2008-11-04 15:29:09 +00:00
|
|
|
static struct resource s3c2410_uart3_resource[] = {
|
|
|
|
[0] = {
|
|
|
|
.start = S3C2443_PA_UART3,
|
|
|
|
.end = S3C2443_PA_UART3 + 0x3fff,
|
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
},
|
|
|
|
[1] = {
|
|
|
|
.start = IRQ_S3CUART_RX3,
|
|
|
|
.end = IRQ_S3CUART_ERR3,
|
|
|
|
.flags = IORESOURCE_IRQ,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2006-06-18 22:04:05 +00:00
|
|
|
struct s3c24xx_uart_resources s3c2410_uart_resources[] __initdata = {
|
|
|
|
[0] = {
|
|
|
|
.resources = s3c2410_uart0_resource,
|
|
|
|
.nr_resources = ARRAY_SIZE(s3c2410_uart0_resource),
|
|
|
|
},
|
|
|
|
[1] = {
|
|
|
|
.resources = s3c2410_uart1_resource,
|
|
|
|
.nr_resources = ARRAY_SIZE(s3c2410_uart1_resource),
|
|
|
|
},
|
|
|
|
[2] = {
|
|
|
|
.resources = s3c2410_uart2_resource,
|
|
|
|
.nr_resources = ARRAY_SIZE(s3c2410_uart2_resource),
|
|
|
|
},
|
2008-11-04 15:29:09 +00:00
|
|
|
[3] = {
|
|
|
|
.resources = s3c2410_uart3_resource,
|
|
|
|
.nr_resources = ARRAY_SIZE(s3c2410_uart3_resource),
|
|
|
|
},
|
2006-06-18 22:04:05 +00:00
|
|
|
};
|
|
|
|
|
2005-04-16 22:20:36 +00:00
|
|
|
/* LCD Controller */
|
|
|
|
|
|
|
|
static struct resource s3c_lcd_resource[] = {
|
|
|
|
[0] = {
|
2006-01-26 15:20:50 +00:00
|
|
|
.start = S3C24XX_PA_LCD,
|
|
|
|
.end = S3C24XX_PA_LCD + S3C24XX_SZ_LCD - 1,
|
2005-04-16 22:20:36 +00:00
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
},
|
|
|
|
[1] = {
|
|
|
|
.start = IRQ_LCD,
|
|
|
|
.end = IRQ_LCD,
|
|
|
|
.flags = IORESOURCE_IRQ,
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
static u64 s3c_device_lcd_dmamask = 0xffffffffUL;
|
|
|
|
|
|
|
|
struct platform_device s3c_device_lcd = {
|
|
|
|
.name = "s3c2410-lcd",
|
|
|
|
.id = -1,
|
|
|
|
.num_resources = ARRAY_SIZE(s3c_lcd_resource),
|
|
|
|
.resource = s3c_lcd_resource,
|
|
|
|
.dev = {
|
2005-06-29 10:09:15 +00:00
|
|
|
.dma_mask = &s3c_device_lcd_dmamask,
|
|
|
|
.coherent_dma_mask = 0xffffffffUL
|
2005-04-16 22:20:36 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
EXPORT_SYMBOL(s3c_device_lcd);
|
|
|
|
|
2005-10-28 14:31:45 +00:00
|
|
|
void __init s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info *pd)
|
2005-09-09 20:10:10 +00:00
|
|
|
{
|
2005-10-28 14:31:45 +00:00
|
|
|
struct s3c2410fb_mach_info *npd;
|
|
|
|
|
2010-04-22 08:47:44 +00:00
|
|
|
npd = kmemdup(pd, sizeof(*npd), GFP_KERNEL);
|
2005-10-28 14:31:45 +00:00
|
|
|
if (npd) {
|
|
|
|
s3c_device_lcd.dev.platform_data = npd;
|
2010-04-22 08:47:44 +00:00
|
|
|
npd->displays = kmemdup(pd->displays,
|
|
|
|
sizeof(struct s3c2410fb_display) * npd->num_displays,
|
|
|
|
GFP_KERNEL);
|
|
|
|
if (!npd->displays)
|
|
|
|
printk(KERN_ERR "no memory for LCD display data\n");
|
2005-10-28 14:31:45 +00:00
|
|
|
} else {
|
|
|
|
printk(KERN_ERR "no memory for LCD platform data\n");
|
|
|
|
}
|
2005-09-09 20:10:10 +00:00
|
|
|
}
|
|
|
|
|
2009-12-23 19:25:05 +00:00
|
|
|
/* Touchscreen */
|
2010-02-18 16:32:27 +00:00
|
|
|
|
|
|
|
static struct resource s3c_ts_resource[] = {
|
|
|
|
[0] = {
|
|
|
|
.start = S3C24XX_PA_ADC,
|
|
|
|
.end = S3C24XX_PA_ADC + S3C24XX_SZ_ADC - 1,
|
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
},
|
|
|
|
[1] = {
|
|
|
|
.start = IRQ_TC,
|
|
|
|
.end = IRQ_TC,
|
|
|
|
.flags = IORESOURCE_IRQ,
|
|
|
|
},
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2009-12-23 19:25:05 +00:00
|
|
|
struct platform_device s3c_device_ts = {
|
|
|
|
.name = "s3c2410-ts",
|
|
|
|
.id = -1,
|
2010-02-18 16:32:27 +00:00
|
|
|
.dev.parent = &s3c_device_adc.dev,
|
|
|
|
.num_resources = ARRAY_SIZE(s3c_ts_resource),
|
|
|
|
.resource = s3c_ts_resource,
|
2009-12-23 19:25:05 +00:00
|
|
|
};
|
|
|
|
EXPORT_SYMBOL(s3c_device_ts);
|
|
|
|
|
|
|
|
static struct s3c2410_ts_mach_info s3c2410ts_info;
|
|
|
|
|
|
|
|
void __init s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *hard_s3c2410ts_info)
|
|
|
|
{
|
|
|
|
memcpy(&s3c2410ts_info, hard_s3c2410ts_info, sizeof(struct s3c2410_ts_mach_info));
|
|
|
|
s3c_device_ts.dev.platform_data = &s3c2410ts_info;
|
|
|
|
}
|
|
|
|
EXPORT_SYMBOL(s3c24xx_ts_set_platdata);
|
|
|
|
|
2005-04-16 22:20:36 +00:00
|
|
|
/* USB Device (Gadget)*/
|
|
|
|
|
|
|
|
static struct resource s3c_usbgadget_resource[] = {
|
|
|
|
[0] = {
|
2006-01-26 15:20:50 +00:00
|
|
|
.start = S3C24XX_PA_USBDEV,
|
|
|
|
.end = S3C24XX_PA_USBDEV + S3C24XX_SZ_USBDEV - 1,
|
2005-04-16 22:20:36 +00:00
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
},
|
|
|
|
[1] = {
|
|
|
|
.start = IRQ_USBD,
|
|
|
|
.end = IRQ_USBD,
|
|
|
|
.flags = IORESOURCE_IRQ,
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
struct platform_device s3c_device_usbgadget = {
|
|
|
|
.name = "s3c2410-usbgadget",
|
|
|
|
.id = -1,
|
|
|
|
.num_resources = ARRAY_SIZE(s3c_usbgadget_resource),
|
|
|
|
.resource = s3c_usbgadget_resource,
|
|
|
|
};
|
|
|
|
|
|
|
|
EXPORT_SYMBOL(s3c_device_usbgadget);
|
|
|
|
|
2007-02-12 23:18:33 +00:00
|
|
|
void __init s3c24xx_udc_set_platdata(struct s3c2410_udc_mach_info *pd)
|
|
|
|
{
|
|
|
|
struct s3c2410_udc_mach_info *npd;
|
|
|
|
|
|
|
|
npd = kmalloc(sizeof(*npd), GFP_KERNEL);
|
|
|
|
if (npd) {
|
|
|
|
memcpy(npd, pd, sizeof(*npd));
|
|
|
|
s3c_device_usbgadget.dev.platform_data = npd;
|
|
|
|
} else {
|
|
|
|
printk(KERN_ERR "no memory for udc platform data\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-04-16 22:20:36 +00:00
|
|
|
/* IIS */
|
|
|
|
|
|
|
|
static struct resource s3c_iis_resource[] = {
|
|
|
|
[0] = {
|
2006-01-26 15:20:50 +00:00
|
|
|
.start = S3C24XX_PA_IIS,
|
|
|
|
.end = S3C24XX_PA_IIS + S3C24XX_SZ_IIS -1,
|
2005-04-16 22:20:36 +00:00
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
static u64 s3c_device_iis_dmamask = 0xffffffffUL;
|
|
|
|
|
|
|
|
struct platform_device s3c_device_iis = {
|
2010-08-30 08:28:09 +00:00
|
|
|
.name = "s3c24xx-iis",
|
2005-04-16 22:20:36 +00:00
|
|
|
.id = -1,
|
|
|
|
.num_resources = ARRAY_SIZE(s3c_iis_resource),
|
|
|
|
.resource = s3c_iis_resource,
|
|
|
|
.dev = {
|
|
|
|
.dma_mask = &s3c_device_iis_dmamask,
|
|
|
|
.coherent_dma_mask = 0xffffffffUL
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
EXPORT_SYMBOL(s3c_device_iis);
|
|
|
|
|
2010-08-30 08:28:09 +00:00
|
|
|
/* ASoC PCM DMA */
|
|
|
|
|
|
|
|
static u64 s3c_device_audio_dmamask = 0xffffffffUL;
|
|
|
|
|
|
|
|
struct platform_device s3c_device_pcm = {
|
|
|
|
.name = "s3c24xx-pcm-audio",
|
|
|
|
.id = -1,
|
|
|
|
.dev = {
|
|
|
|
.dma_mask = &s3c_device_audio_dmamask,
|
|
|
|
.coherent_dma_mask = 0xffffffffUL
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
EXPORT_SYMBOL(s3c_device_pcm);
|
|
|
|
|
2005-04-16 22:20:36 +00:00
|
|
|
/* RTC */
|
|
|
|
|
|
|
|
static struct resource s3c_rtc_resource[] = {
|
|
|
|
[0] = {
|
2006-01-26 15:20:50 +00:00
|
|
|
.start = S3C24XX_PA_RTC,
|
|
|
|
.end = S3C24XX_PA_RTC + 0xff,
|
2005-04-16 22:20:36 +00:00
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
},
|
|
|
|
[1] = {
|
|
|
|
.start = IRQ_RTC,
|
|
|
|
.end = IRQ_RTC,
|
|
|
|
.flags = IORESOURCE_IRQ,
|
|
|
|
},
|
|
|
|
[2] = {
|
|
|
|
.start = IRQ_TICK,
|
|
|
|
.end = IRQ_TICK,
|
|
|
|
.flags = IORESOURCE_IRQ
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
struct platform_device s3c_device_rtc = {
|
|
|
|
.name = "s3c2410-rtc",
|
|
|
|
.id = -1,
|
|
|
|
.num_resources = ARRAY_SIZE(s3c_rtc_resource),
|
|
|
|
.resource = s3c_rtc_resource,
|
|
|
|
};
|
|
|
|
|
|
|
|
EXPORT_SYMBOL(s3c_device_rtc);
|
|
|
|
|
|
|
|
/* ADC */
|
|
|
|
|
|
|
|
static struct resource s3c_adc_resource[] = {
|
|
|
|
[0] = {
|
2006-01-26 15:20:50 +00:00
|
|
|
.start = S3C24XX_PA_ADC,
|
|
|
|
.end = S3C24XX_PA_ADC + S3C24XX_SZ_ADC - 1,
|
2005-04-16 22:20:36 +00:00
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
},
|
|
|
|
[1] = {
|
|
|
|
.start = IRQ_TC,
|
2006-02-08 22:03:31 +00:00
|
|
|
.end = IRQ_TC,
|
|
|
|
.flags = IORESOURCE_IRQ,
|
|
|
|
},
|
|
|
|
[2] = {
|
|
|
|
.start = IRQ_ADC,
|
2005-04-16 22:20:36 +00:00
|
|
|
.end = IRQ_ADC,
|
|
|
|
.flags = IORESOURCE_IRQ,
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
struct platform_device s3c_device_adc = {
|
2008-12-18 14:20:04 +00:00
|
|
|
.name = "s3c24xx-adc",
|
2005-04-16 22:20:36 +00:00
|
|
|
.id = -1,
|
|
|
|
.num_resources = ARRAY_SIZE(s3c_adc_resource),
|
|
|
|
.resource = s3c_adc_resource,
|
|
|
|
};
|
|
|
|
|
|
|
|
/* SDI */
|
|
|
|
|
|
|
|
static struct resource s3c_sdi_resource[] = {
|
|
|
|
[0] = {
|
2008-10-21 13:06:26 +00:00
|
|
|
.start = S3C24XX_PA_SDI,
|
|
|
|
.end = S3C24XX_PA_SDI + S3C24XX_SZ_SDI - 1,
|
2005-04-16 22:20:36 +00:00
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
},
|
|
|
|
[1] = {
|
|
|
|
.start = IRQ_SDI,
|
|
|
|
.end = IRQ_SDI,
|
|
|
|
.flags = IORESOURCE_IRQ,
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
struct platform_device s3c_device_sdi = {
|
|
|
|
.name = "s3c2410-sdi",
|
|
|
|
.id = -1,
|
|
|
|
.num_resources = ARRAY_SIZE(s3c_sdi_resource),
|
|
|
|
.resource = s3c_sdi_resource,
|
|
|
|
};
|
|
|
|
|
|
|
|
EXPORT_SYMBOL(s3c_device_sdi);
|
|
|
|
|
2010-04-22 08:47:45 +00:00
|
|
|
void __init s3c24xx_mci_set_platdata(struct s3c24xx_mci_pdata *pdata)
|
2010-01-18 07:24:22 +00:00
|
|
|
{
|
|
|
|
struct s3c24xx_mci_pdata *npd;
|
|
|
|
|
|
|
|
npd = kmemdup(pdata, sizeof(struct s3c24xx_mci_pdata), GFP_KERNEL);
|
|
|
|
if (!npd)
|
|
|
|
printk(KERN_ERR "%s: no memory to copy pdata", __func__);
|
|
|
|
|
|
|
|
s3c_device_sdi.dev.platform_data = npd;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2005-04-16 22:20:36 +00:00
|
|
|
/* SPI (0) */
|
|
|
|
|
|
|
|
static struct resource s3c_spi0_resource[] = {
|
|
|
|
[0] = {
|
2006-01-26 15:20:50 +00:00
|
|
|
.start = S3C24XX_PA_SPI,
|
|
|
|
.end = S3C24XX_PA_SPI + 0x1f,
|
2005-04-16 22:20:36 +00:00
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
},
|
|
|
|
[1] = {
|
|
|
|
.start = IRQ_SPI0,
|
|
|
|
.end = IRQ_SPI0,
|
|
|
|
.flags = IORESOURCE_IRQ,
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2006-03-15 16:03:05 +00:00
|
|
|
static u64 s3c_device_spi0_dmamask = 0xffffffffUL;
|
|
|
|
|
2005-04-16 22:20:36 +00:00
|
|
|
struct platform_device s3c_device_spi0 = {
|
|
|
|
.name = "s3c2410-spi",
|
|
|
|
.id = 0,
|
|
|
|
.num_resources = ARRAY_SIZE(s3c_spi0_resource),
|
|
|
|
.resource = s3c_spi0_resource,
|
2006-03-15 16:03:05 +00:00
|
|
|
.dev = {
|
|
|
|
.dma_mask = &s3c_device_spi0_dmamask,
|
|
|
|
.coherent_dma_mask = 0xffffffffUL
|
|
|
|
}
|
2005-04-16 22:20:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
EXPORT_SYMBOL(s3c_device_spi0);
|
|
|
|
|
|
|
|
/* SPI (1) */
|
|
|
|
|
|
|
|
static struct resource s3c_spi1_resource[] = {
|
|
|
|
[0] = {
|
2007-05-16 09:51:45 +00:00
|
|
|
.start = S3C24XX_PA_SPI + S3C2410_SPI1,
|
|
|
|
.end = S3C24XX_PA_SPI + S3C2410_SPI1 + 0x1f,
|
2005-04-16 22:20:36 +00:00
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
},
|
|
|
|
[1] = {
|
|
|
|
.start = IRQ_SPI1,
|
|
|
|
.end = IRQ_SPI1,
|
|
|
|
.flags = IORESOURCE_IRQ,
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2006-03-15 16:03:05 +00:00
|
|
|
static u64 s3c_device_spi1_dmamask = 0xffffffffUL;
|
|
|
|
|
2005-04-16 22:20:36 +00:00
|
|
|
struct platform_device s3c_device_spi1 = {
|
|
|
|
.name = "s3c2410-spi",
|
|
|
|
.id = 1,
|
|
|
|
.num_resources = ARRAY_SIZE(s3c_spi1_resource),
|
|
|
|
.resource = s3c_spi1_resource,
|
2006-03-15 16:03:05 +00:00
|
|
|
.dev = {
|
|
|
|
.dma_mask = &s3c_device_spi1_dmamask,
|
|
|
|
.coherent_dma_mask = 0xffffffffUL
|
|
|
|
}
|
2005-04-16 22:20:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
EXPORT_SYMBOL(s3c_device_spi1);
|
|
|
|
|
|
|
|
#ifdef CONFIG_CPU_S3C2440
|
|
|
|
|
|
|
|
/* Camif Controller */
|
|
|
|
|
|
|
|
static struct resource s3c_camif_resource[] = {
|
|
|
|
[0] = {
|
|
|
|
.start = S3C2440_PA_CAMIF,
|
2005-10-28 14:26:42 +00:00
|
|
|
.end = S3C2440_PA_CAMIF + S3C2440_SZ_CAMIF - 1,
|
2005-04-16 22:20:36 +00:00
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
},
|
|
|
|
[1] = {
|
|
|
|
.start = IRQ_CAM,
|
|
|
|
.end = IRQ_CAM,
|
|
|
|
.flags = IORESOURCE_IRQ,
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
static u64 s3c_device_camif_dmamask = 0xffffffffUL;
|
|
|
|
|
|
|
|
struct platform_device s3c_device_camif = {
|
|
|
|
.name = "s3c2440-camif",
|
|
|
|
.id = -1,
|
|
|
|
.num_resources = ARRAY_SIZE(s3c_camif_resource),
|
|
|
|
.resource = s3c_camif_resource,
|
|
|
|
.dev = {
|
|
|
|
.dma_mask = &s3c_device_camif_dmamask,
|
|
|
|
.coherent_dma_mask = 0xffffffffUL
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
EXPORT_SYMBOL(s3c_device_camif);
|
|
|
|
|
2009-08-05 17:29:57 +00:00
|
|
|
/* AC97 */
|
|
|
|
|
|
|
|
static struct resource s3c_ac97_resource[] = {
|
|
|
|
[0] = {
|
|
|
|
.start = S3C2440_PA_AC97,
|
|
|
|
.end = S3C2440_PA_AC97 + S3C2440_SZ_AC97 -1,
|
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
},
|
|
|
|
[1] = {
|
|
|
|
.start = IRQ_S3C244x_AC97,
|
|
|
|
.end = IRQ_S3C244x_AC97,
|
|
|
|
.flags = IORESOURCE_IRQ,
|
|
|
|
},
|
|
|
|
[2] = {
|
|
|
|
.name = "PCM out",
|
|
|
|
.start = DMACH_PCM_OUT,
|
|
|
|
.end = DMACH_PCM_OUT,
|
|
|
|
.flags = IORESOURCE_DMA,
|
|
|
|
},
|
|
|
|
[3] = {
|
|
|
|
.name = "PCM in",
|
|
|
|
.start = DMACH_PCM_IN,
|
|
|
|
.end = DMACH_PCM_IN,
|
|
|
|
.flags = IORESOURCE_DMA,
|
|
|
|
},
|
|
|
|
[4] = {
|
|
|
|
.name = "Mic in",
|
|
|
|
.start = DMACH_MIC_IN,
|
|
|
|
.end = DMACH_MIC_IN,
|
|
|
|
.flags = IORESOURCE_DMA,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
struct platform_device s3c_device_ac97 = {
|
|
|
|
.name = "s3c-ac97",
|
|
|
|
.id = -1,
|
|
|
|
.num_resources = ARRAY_SIZE(s3c_ac97_resource),
|
|
|
|
.resource = s3c_ac97_resource,
|
|
|
|
.dev = {
|
2010-03-17 20:15:21 +00:00
|
|
|
.dma_mask = &s3c_device_audio_dmamask,
|
2009-08-05 17:29:57 +00:00
|
|
|
.coherent_dma_mask = 0xffffffffUL
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
EXPORT_SYMBOL(s3c_device_ac97);
|
|
|
|
|
2010-03-17 20:15:21 +00:00
|
|
|
/* ASoC I2S */
|
|
|
|
|
|
|
|
struct platform_device s3c2412_device_iis = {
|
|
|
|
.name = "s3c2412-iis",
|
|
|
|
.id = -1,
|
|
|
|
.dev = {
|
|
|
|
.dma_mask = &s3c_device_audio_dmamask,
|
|
|
|
.coherent_dma_mask = 0xffffffffUL
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
EXPORT_SYMBOL(s3c2412_device_iis);
|
|
|
|
|
2005-04-16 22:20:36 +00:00
|
|
|
#endif // CONFIG_CPU_S32440
|