/* 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 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include static u64 samsung_device_dma_mask = DMA_BIT_MASK(32); /* AC97 */ #ifdef CONFIG_CPU_S3C2440 static 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_S3C24XX static 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_S3C2440 static 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_FB static 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_FIMC0 static 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 = {