| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194 | /* linux/arch/arm/plat-samsung/devs.c * * Copyright (c) 2011 Samsung Electronics Co., Ltd. *		http://www.samsung.com * * Base SAMSUNG platform device definitions * * 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>#include <linux/serial_core.h>#include <linux/platform_device.h>#include <linux/io.h>#include <linux/slab.h>#include <linux/string.h>#include <linux/dma-mapping.h>#include <linux/fb.h>#include <linux/gfp.h>#include <linux/mtd/mtd.h>#include <linux/mtd/onenand.h>#include <linux/mtd/partitions.h>#include <linux/mmc/host.h>#include <linux/ioport.h>#include <linux/platform_data/s3c-hsudc.h>#include <linux/platform_data/s3c-hsotg.h>#include <media/s5p_hdmi.h>#include <asm/irq.h>#include <asm/mach/arch.h>#include <asm/mach/map.h>#include <asm/mach/irq.h>#include <mach/hardware.h>#include <mach/dma.h>#include <mach/irqs.h>#include <mach/map.h>#include <plat/cpu.h>#include <plat/devs.h>#include <plat/adc.h>#include <linux/platform_data/ata-samsung_cf.h>#include <linux/platform_data/usb-ehci-s5p.h>#include <plat/fb.h>#include <plat/fb-s3c2410.h>#include <plat/hdmi.h>#include <linux/platform_data/hwmon-s3c.h>#include <linux/platform_data/i2c-s3c2410.h>#include <plat/keypad.h>#include <linux/platform_data/mmc-s3cmci.h>#include <linux/platform_data/mtd-nand-s3c2410.h>#include <plat/sdhci.h>#include <linux/platform_data/touchscreen-s3c2410.h>#include <linux/platform_data/usb-s3c2410_udc.h>#include <linux/platform_data/usb-ohci-s3c2410.h>#include <plat/usb-phy.h>#include <plat/regs-iic.h>#include <plat/regs-serial.h>#include <plat/regs-spi.h>#include <linux/platform_data/spi-s3c64xx.h>static u64 samsung_device_dma_mask = DMA_BIT_MASK(32);/* AC97 */#ifdef CONFIG_CPU_S3C2440static struct resource s3c_ac97_resource[] = {	[0] = DEFINE_RES_MEM(S3C2440_PA_AC97, S3C2440_SZ_AC97),	[1] = DEFINE_RES_IRQ(IRQ_S3C244X_AC97),	[2] = DEFINE_RES_DMA_NAMED(DMACH_PCM_OUT, "PCM out"),	[3] = DEFINE_RES_DMA_NAMED(DMACH_PCM_IN, "PCM in"),	[4] = DEFINE_RES_DMA_NAMED(DMACH_MIC_IN, "Mic in"),};struct platform_device s3c_device_ac97 = {	.name		= "samsung-ac97",	.id		= -1,	.num_resources	= ARRAY_SIZE(s3c_ac97_resource),	.resource	= s3c_ac97_resource,	.dev		= {		.dma_mask		= &samsung_device_dma_mask,		.coherent_dma_mask	= DMA_BIT_MASK(32),	}};#endif /* CONFIG_CPU_S3C2440 *//* ADC */#ifdef CONFIG_PLAT_S3C24XXstatic struct resource s3c_adc_resource[] = {	[0] = DEFINE_RES_MEM(S3C24XX_PA_ADC, S3C24XX_SZ_ADC),	[1] = DEFINE_RES_IRQ(IRQ_TC),	[2] = DEFINE_RES_IRQ(IRQ_ADC),};struct platform_device s3c_device_adc = {	.name		= "s3c24xx-adc",	.id		= -1,	.num_resources	= ARRAY_SIZE(s3c_adc_resource),	.resource	= s3c_adc_resource,};#endif /* CONFIG_PLAT_S3C24XX */#if defined(CONFIG_SAMSUNG_DEV_ADC)static struct resource s3c_adc_resource[] = {	[0] = DEFINE_RES_MEM(SAMSUNG_PA_ADC, SZ_256),	[1] = DEFINE_RES_IRQ(IRQ_TC),	[2] = DEFINE_RES_IRQ(IRQ_ADC),};struct platform_device s3c_device_adc = {	.name		= "samsung-adc",	.id		= -1,	.num_resources	= ARRAY_SIZE(s3c_adc_resource),	.resource	= s3c_adc_resource,};#endif /* CONFIG_SAMSUNG_DEV_ADC *//* Camif Controller */#ifdef CONFIG_CPU_S3C2440static struct resource s3c_camif_resource[] = {	[0] = DEFINE_RES_MEM(S3C2440_PA_CAMIF, S3C2440_SZ_CAMIF),	[1] = DEFINE_RES_IRQ(IRQ_S3C2440_CAM_C),	[2] = DEFINE_RES_IRQ(IRQ_S3C2440_CAM_P),};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		= &samsung_device_dma_mask,		.coherent_dma_mask	= DMA_BIT_MASK(32),	}};#endif /* CONFIG_CPU_S3C2440 *//* ASOC DMA */struct platform_device samsung_asoc_idma = {	.name		= "samsung-idma",	.id		= -1,	.dev		= {		.dma_mask		= &samsung_device_dma_mask,		.coherent_dma_mask	= DMA_BIT_MASK(32),	}};/* FB */#ifdef CONFIG_S3C_DEV_FBstatic struct resource s3c_fb_resource[] = {	[0] = DEFINE_RES_MEM(S3C_PA_FB, SZ_16K),	[1] = DEFINE_RES_IRQ(IRQ_LCD_VSYNC),	[2] = DEFINE_RES_IRQ(IRQ_LCD_FIFO),	[3] = DEFINE_RES_IRQ(IRQ_LCD_SYSTEM),};struct platform_device s3c_device_fb = {	.name		= "s3c-fb",	.id		= -1,	.num_resources	= ARRAY_SIZE(s3c_fb_resource),	.resource	= s3c_fb_resource,	.dev		= {		.dma_mask		= &samsung_device_dma_mask,		.coherent_dma_mask	= DMA_BIT_MASK(32),	},};void __init s3c_fb_set_platdata(struct s3c_fb_platdata *pd){	s3c_set_platdata(pd, sizeof(struct s3c_fb_platdata),			 &s3c_device_fb);}#endif /* CONFIG_S3C_DEV_FB *//* FIMC */#ifdef CONFIG_S5P_DEV_FIMC0static struct resource s5p_fimc0_resource[] = {	[0] = DEFINE_RES_MEM(S5P_PA_FIMC0, SZ_4K),	[1] = DEFINE_RES_IRQ(IRQ_FIMC0),};struct platform_device s5p_device_fimc0 = {
 |