aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKukjin Kim <kgene.kim@samsung.com>2011-10-02 20:46:56 -0400
committerKukjin Kim <kgene.kim@samsung.com>2011-10-05 22:15:09 -0400
commit5716714927b789a27853eaacdbba1f2675505af0 (patch)
treedfd522832c9312e0438c190a52484ca7fa1bd1d3
parent0523ec3a685573730dbd619544c46465f5df6147 (diff)
ARM: S5P: To merge devs.c files to one devs.c
This patch moves regarding s5p dev files to one devs.c file in plat-samsung directory and this help to keep it more easily. Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
-rw-r--r--arch/arm/mach-exynos4/include/mach/i2c-hdmiphy.h16
-rw-r--r--arch/arm/mach-s5pv210/include/mach/i2c-hdmiphy.h16
-rw-r--r--arch/arm/plat-s5p/Makefile12
-rw-r--r--arch/arm/plat-s5p/dev-csis0.c34
-rw-r--r--arch/arm/plat-s5p/dev-csis1.c34
-rw-r--r--arch/arm/plat-s5p/dev-ehci.c57
-rw-r--r--arch/arm/plat-s5p/dev-fimc0.c43
-rw-r--r--arch/arm/plat-s5p/dev-fimc1.c43
-rw-r--r--arch/arm/plat-s5p/dev-fimc2.c43
-rw-r--r--arch/arm/plat-s5p/dev-fimc3.c43
-rw-r--r--arch/arm/plat-s5p/dev-fimd0.c67
-rw-r--r--arch/arm/plat-s5p/dev-i2c-hdmiphy.c59
-rw-r--r--arch/arm/plat-s5p/dev-mfc.c50
-rw-r--r--arch/arm/plat-s5p/dev-onenand.c45
-rw-r--r--arch/arm/plat-s5p/dev-pmu.c36
-rw-r--r--arch/arm/plat-s5p/dev-tv.c98
-rw-r--r--arch/arm/plat-samsung/devs.c468
17 files changed, 468 insertions, 696 deletions
diff --git a/arch/arm/mach-exynos4/include/mach/i2c-hdmiphy.h b/arch/arm/mach-exynos4/include/mach/i2c-hdmiphy.h
deleted file mode 100644
index 9dbe3179ad59..000000000000
--- a/arch/arm/mach-exynos4/include/mach/i2c-hdmiphy.h
+++ /dev/null
@@ -1,16 +0,0 @@
1/*
2 * Copyright (C) 2011 Samsung Electronics Co., Ltd.
3 *
4 * S5P series i2c hdmiphy helper definitions
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef PLAT_S5P_I2C_HDMIPHY_H_
12#define PLAT_S5P_I2C_HDMIPHY_H_
13
14#define S5P_I2C_HDMIPHY_BUS_NUM (8)
15
16#endif
diff --git a/arch/arm/mach-s5pv210/include/mach/i2c-hdmiphy.h b/arch/arm/mach-s5pv210/include/mach/i2c-hdmiphy.h
deleted file mode 100644
index 6afa6242c588..000000000000
--- a/arch/arm/mach-s5pv210/include/mach/i2c-hdmiphy.h
+++ /dev/null
@@ -1,16 +0,0 @@
1/*
2 * Copyright (C) 2011 Samsung Electronics Co., Ltd.
3 *
4 * S5P series i2c hdmiphy helper definitions
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef PLAT_S5P_I2C_HDMIPHY_H_
12#define PLAT_S5P_I2C_HDMIPHY_H_
13
14#define S5P_I2C_HDMIPHY_BUS_NUM (3)
15
16#endif
diff --git a/arch/arm/plat-s5p/Makefile b/arch/arm/plat-s5p/Makefile
index 06401dc37b81..876344038b8d 100644
--- a/arch/arm/plat-s5p/Makefile
+++ b/arch/arm/plat-s5p/Makefile
@@ -12,7 +12,6 @@ obj- :=
12 12
13# Core files 13# Core files
14 14
15obj-y += dev-pmu.o
16obj-y += dev-uart.o 15obj-y += dev-uart.o
17obj-y += cpu.o 16obj-y += cpu.o
18obj-y += clock.o 17obj-y += clock.o
@@ -26,15 +25,4 @@ obj-$(CONFIG_S5P_HRT) += s5p-time.o
26 25
27# devices 26# devices
28obj-$(CONFIG_S5P_DEV_MFC) += dev-mfc.o 27obj-$(CONFIG_S5P_DEV_MFC) += dev-mfc.o
29obj-$(CONFIG_S5P_DEV_FIMC0) += dev-fimc0.o
30obj-$(CONFIG_S5P_DEV_FIMC1) += dev-fimc1.o
31obj-$(CONFIG_S5P_DEV_FIMC2) += dev-fimc2.o
32obj-$(CONFIG_S5P_DEV_FIMC3) += dev-fimc3.o
33obj-$(CONFIG_S5P_DEV_FIMD0) += dev-fimd0.o
34obj-$(CONFIG_S5P_DEV_I2C_HDMIPHY) += dev-i2c-hdmiphy.o
35obj-$(CONFIG_S5P_DEV_ONENAND) += dev-onenand.o
36obj-$(CONFIG_S5P_DEV_CSIS0) += dev-csis0.o
37obj-$(CONFIG_S5P_DEV_CSIS1) += dev-csis1.o
38obj-$(CONFIG_S5P_DEV_TV) += dev-tv.o
39obj-$(CONFIG_S5P_DEV_USB_EHCI) += dev-ehci.o
40obj-$(CONFIG_S5P_SETUP_MIPIPHY) += setup-mipiphy.o 28obj-$(CONFIG_S5P_SETUP_MIPIPHY) += setup-mipiphy.o
diff --git a/arch/arm/plat-s5p/dev-csis0.c b/arch/arm/plat-s5p/dev-csis0.c
deleted file mode 100644
index e3aabef5e347..000000000000
--- a/arch/arm/plat-s5p/dev-csis0.c
+++ /dev/null
@@ -1,34 +0,0 @@
1/*
2 * Copyright (C) 2010-2011 Samsung Electronics Co., Ltd.
3 *
4 * S5P series device definition for MIPI-CSIS channel 0
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9*/
10
11#include <linux/kernel.h>
12#include <linux/interrupt.h>
13#include <linux/platform_device.h>
14#include <mach/map.h>
15
16static struct resource s5p_mipi_csis0_resource[] = {
17 [0] = {
18 .start = S5P_PA_MIPI_CSIS0,
19 .end = S5P_PA_MIPI_CSIS0 + SZ_4K - 1,
20 .flags = IORESOURCE_MEM,
21 },
22 [1] = {
23 .start = IRQ_MIPI_CSIS0,
24 .end = IRQ_MIPI_CSIS0,
25 .flags = IORESOURCE_IRQ,
26 }
27};
28
29struct platform_device s5p_device_mipi_csis0 = {
30 .name = "s5p-mipi-csis",
31 .id = 0,
32 .num_resources = ARRAY_SIZE(s5p_mipi_csis0_resource),
33 .resource = s5p_mipi_csis0_resource,
34};
diff --git a/arch/arm/plat-s5p/dev-csis1.c b/arch/arm/plat-s5p/dev-csis1.c
deleted file mode 100644
index 08b91b580207..000000000000
--- a/arch/arm/plat-s5p/dev-csis1.c
+++ /dev/null
@@ -1,34 +0,0 @@
1/*
2 * Copyright (C) 2010-2011 Samsung Electronics Co., Ltd.
3 *
4 * S5P series device definition for MIPI-CSIS channel 1
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9*/
10
11#include <linux/kernel.h>
12#include <linux/interrupt.h>
13#include <linux/platform_device.h>
14#include <mach/map.h>
15
16static struct resource s5p_mipi_csis1_resource[] = {
17 [0] = {
18 .start = S5P_PA_MIPI_CSIS1,
19 .end = S5P_PA_MIPI_CSIS1 + SZ_4K - 1,
20 .flags = IORESOURCE_MEM,
21 },
22 [1] = {
23 .start = IRQ_MIPI_CSIS1,
24 .end = IRQ_MIPI_CSIS1,
25 .flags = IORESOURCE_IRQ,
26 },
27};
28
29struct platform_device s5p_device_mipi_csis1 = {
30 .name = "s5p-mipi-csis",
31 .id = 1,
32 .num_resources = ARRAY_SIZE(s5p_mipi_csis1_resource),
33 .resource = s5p_mipi_csis1_resource,
34};
diff --git a/arch/arm/plat-s5p/dev-ehci.c b/arch/arm/plat-s5p/dev-ehci.c
deleted file mode 100644
index 94080fff9e9b..000000000000
--- a/arch/arm/plat-s5p/dev-ehci.c
+++ /dev/null
@@ -1,57 +0,0 @@
1/*
2 * Copyright (C) 2011 Samsung Electronics Co.Ltd
3 * Author: Joonyoung Shim <jy0922.shim@samsung.com>
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
9 *
10 */
11
12#include <linux/platform_device.h>
13#include <mach/irqs.h>
14#include <mach/map.h>
15#include <plat/devs.h>
16#include <plat/ehci.h>
17#include <plat/usb-phy.h>
18
19/* USB EHCI Host Controller registration */
20static struct resource s5p_ehci_resource[] = {
21 [0] = {
22 .start = S5P_PA_EHCI,
23 .end = S5P_PA_EHCI + SZ_256 - 1,
24 .flags = IORESOURCE_MEM,
25 },
26 [1] = {
27 .start = IRQ_USB_HOST,
28 .end = IRQ_USB_HOST,
29 .flags = IORESOURCE_IRQ,
30 }
31};
32
33static u64 s5p_device_ehci_dmamask = 0xffffffffUL;
34
35struct platform_device s5p_device_ehci = {
36 .name = "s5p-ehci",
37 .id = -1,
38 .num_resources = ARRAY_SIZE(s5p_ehci_resource),
39 .resource = s5p_ehci_resource,
40 .dev = {
41 .dma_mask = &s5p_device_ehci_dmamask,
42 .coherent_dma_mask = 0xffffffffUL
43 }
44};
45
46void __init s5p_ehci_set_platdata(struct s5p_ehci_platdata *pd)
47{
48 struct s5p_ehci_platdata *npd;
49
50 npd = s3c_set_platdata(pd, sizeof(struct s5p_ehci_platdata),
51 &s5p_device_ehci);
52
53 if (!npd->phy_init)
54 npd->phy_init = s5p_usb_phy_init;
55 if (!npd->phy_exit)
56 npd->phy_exit = s5p_usb_phy_exit;
57}
diff --git a/arch/arm/plat-s5p/dev-fimc0.c b/arch/arm/plat-s5p/dev-fimc0.c
deleted file mode 100644
index 608770fc1531..000000000000
--- a/arch/arm/plat-s5p/dev-fimc0.c
+++ /dev/null
@@ -1,43 +0,0 @@
1/* linux/arch/arm/plat-s5p/dev-fimc0.c
2 *
3 * Copyright (c) 2010 Samsung Electronics
4 *
5 * Base S5P FIMC0 resource and device definitions
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#include <linux/kernel.h>
13#include <linux/dma-mapping.h>
14#include <linux/platform_device.h>
15#include <linux/interrupt.h>
16#include <linux/ioport.h>
17#include <mach/map.h>
18
19static struct resource s5p_fimc0_resource[] = {
20 [0] = {
21 .start = S5P_PA_FIMC0,
22 .end = S5P_PA_FIMC0 + SZ_4K - 1,
23 .flags = IORESOURCE_MEM,
24 },
25 [1] = {
26 .start = IRQ_FIMC0,
27 .end = IRQ_FIMC0,
28 .flags = IORESOURCE_IRQ,
29 },
30};
31
32static u64 s5p_fimc0_dma_mask = DMA_BIT_MASK(32);
33
34struct platform_device s5p_device_fimc0 = {
35 .name = "s5p-fimc",
36 .id = 0,
37 .num_resources = ARRAY_SIZE(s5p_fimc0_resource),
38 .resource = s5p_fimc0_resource,
39 .dev = {
40 .dma_mask = &s5p_fimc0_dma_mask,
41 .coherent_dma_mask = DMA_BIT_MASK(32),
42 },
43};
diff --git a/arch/arm/plat-s5p/dev-fimc1.c b/arch/arm/plat-s5p/dev-fimc1.c
deleted file mode 100644
index 76e3a97a87d3..000000000000
--- a/arch/arm/plat-s5p/dev-fimc1.c
+++ /dev/null
@@ -1,43 +0,0 @@
1/* linux/arch/arm/plat-s5p/dev-fimc1.c
2 *
3 * Copyright (c) 2010 Samsung Electronics
4 *
5 * Base S5P FIMC1 resource and device definitions
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#include <linux/kernel.h>
13#include <linux/dma-mapping.h>
14#include <linux/platform_device.h>
15#include <linux/interrupt.h>
16#include <linux/ioport.h>
17#include <mach/map.h>
18
19static struct resource s5p_fimc1_resource[] = {
20 [0] = {
21 .start = S5P_PA_FIMC1,
22 .end = S5P_PA_FIMC1 + SZ_4K - 1,
23 .flags = IORESOURCE_MEM,
24 },
25 [1] = {
26 .start = IRQ_FIMC1,
27 .end = IRQ_FIMC1,
28 .flags = IORESOURCE_IRQ,
29 },
30};
31
32static u64 s5p_fimc1_dma_mask = DMA_BIT_MASK(32);
33
34struct platform_device s5p_device_fimc1 = {
35 .name = "s5p-fimc",
36 .id = 1,
37 .num_resources = ARRAY_SIZE(s5p_fimc1_resource),
38 .resource = s5p_fimc1_resource,
39 .dev = {
40 .dma_mask = &s5p_fimc1_dma_mask,
41 .coherent_dma_mask = DMA_BIT_MASK(32),
42 },
43};
diff --git a/arch/arm/plat-s5p/dev-fimc2.c b/arch/arm/plat-s5p/dev-fimc2.c
deleted file mode 100644
index 24d29816fa2c..000000000000
--- a/arch/arm/plat-s5p/dev-fimc2.c
+++ /dev/null
@@ -1,43 +0,0 @@
1/* linux/arch/arm/plat-s5p/dev-fimc2.c
2 *
3 * Copyright (c) 2010 Samsung Electronics
4 *
5 * Base S5P FIMC2 resource and device definitions
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#include <linux/kernel.h>
13#include <linux/dma-mapping.h>
14#include <linux/platform_device.h>
15#include <linux/interrupt.h>
16#include <linux/ioport.h>
17#include <mach/map.h>
18
19static struct resource s5p_fimc2_resource[] = {
20 [0] = {
21 .start = S5P_PA_FIMC2,
22 .end = S5P_PA_FIMC2 + SZ_4K - 1,
23 .flags = IORESOURCE_MEM,
24 },
25 [1] = {
26 .start = IRQ_FIMC2,
27 .end = IRQ_FIMC2,
28 .flags = IORESOURCE_IRQ,
29 },
30};
31
32static u64 s5p_fimc2_dma_mask = DMA_BIT_MASK(32);
33
34struct platform_device s5p_device_fimc2 = {
35 .name = "s5p-fimc",
36 .id = 2,
37 .num_resources = ARRAY_SIZE(s5p_fimc2_resource),
38 .resource = s5p_fimc2_resource,
39 .dev = {
40 .dma_mask = &s5p_fimc2_dma_mask,
41 .coherent_dma_mask = DMA_BIT_MASK(32),
42 },
43};
diff --git a/arch/arm/plat-s5p/dev-fimc3.c b/arch/arm/plat-s5p/dev-fimc3.c
deleted file mode 100644
index ef31beca386c..000000000000
--- a/arch/arm/plat-s5p/dev-fimc3.c
+++ /dev/null
@@ -1,43 +0,0 @@
1/* linux/arch/arm/plat-s5p/dev-fimc3.c
2 *
3 * Copyright (c) 2010 Samsung Electronics
4 *
5 * Base S5P FIMC3 resource and device definitions
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#include <linux/kernel.h>
13#include <linux/dma-mapping.h>
14#include <linux/platform_device.h>
15#include <linux/interrupt.h>
16#include <linux/ioport.h>
17#include <mach/map.h>
18
19static struct resource s5p_fimc3_resource[] = {
20 [0] = {
21 .start = S5P_PA_FIMC3,
22 .end = S5P_PA_FIMC3 + SZ_4K - 1,
23 .flags = IORESOURCE_MEM,
24 },
25 [1] = {
26 .start = IRQ_FIMC3,
27 .end = IRQ_FIMC3,
28 .flags = IORESOURCE_IRQ,
29 },
30};
31
32static u64 s5p_fimc3_dma_mask = DMA_BIT_MASK(32);
33
34struct platform_device s5p_device_fimc3 = {
35 .name = "s5p-fimc",
36 .id = 3,
37 .num_resources = ARRAY_SIZE(s5p_fimc3_resource),
38 .resource = s5p_fimc3_resource,
39 .dev = {
40 .dma_mask = &s5p_fimc3_dma_mask,
41 .coherent_dma_mask = DMA_BIT_MASK(32),
42 },
43};
diff --git a/arch/arm/plat-s5p/dev-fimd0.c b/arch/arm/plat-s5p/dev-fimd0.c
deleted file mode 100644
index f728bb5abcef..000000000000
--- a/arch/arm/plat-s5p/dev-fimd0.c
+++ /dev/null
@@ -1,67 +0,0 @@
1/* linux/arch/arm/plat-s5p/dev-fimd0.c
2 *
3 * Copyright (c) 2009-2011 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
5 *
6 * Core file for Samsung Display Controller (FIMD) driver
7 *
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.
11*/
12
13#include <linux/kernel.h>
14#include <linux/string.h>
15#include <linux/platform_device.h>
16#include <linux/fb.h>
17#include <linux/gfp.h>
18#include <linux/dma-mapping.h>
19
20#include <mach/irqs.h>
21#include <mach/map.h>
22
23#include <plat/fb.h>
24#include <plat/devs.h>
25#include <plat/cpu.h>
26
27static struct resource s5p_fimd0_resource[] = {
28 [0] = {
29 .start = S5P_PA_FIMD0,
30 .end = S5P_PA_FIMD0 + SZ_32K - 1,
31 .flags = IORESOURCE_MEM,
32 },
33 [1] = {
34 .start = IRQ_FIMD0_VSYNC,
35 .end = IRQ_FIMD0_VSYNC,
36 .flags = IORESOURCE_IRQ,
37 },
38 [2] = {
39 .start = IRQ_FIMD0_FIFO,
40 .end = IRQ_FIMD0_FIFO,
41 .flags = IORESOURCE_IRQ,
42 },
43 [3] = {
44 .start = IRQ_FIMD0_SYSTEM,
45 .end = IRQ_FIMD0_SYSTEM,
46 .flags = IORESOURCE_IRQ,
47 },
48};
49
50static u64 fimd0_dmamask = DMA_BIT_MASK(32);
51
52struct platform_device s5p_device_fimd0 = {
53 .name = "s5p-fb",
54 .id = 0,
55 .num_resources = ARRAY_SIZE(s5p_fimd0_resource),
56 .resource = s5p_fimd0_resource,
57 .dev = {
58 .dma_mask = &fimd0_dmamask,
59 .coherent_dma_mask = DMA_BIT_MASK(32),
60 },
61};
62
63void __init s5p_fimd0_set_platdata(struct s3c_fb_platdata *pd)
64{
65 s3c_set_platdata(pd, sizeof(struct s3c_fb_platdata),
66 &s5p_device_fimd0);
67}
diff --git a/arch/arm/plat-s5p/dev-i2c-hdmiphy.c b/arch/arm/plat-s5p/dev-i2c-hdmiphy.c
deleted file mode 100644
index 37343f1999f0..000000000000
--- a/arch/arm/plat-s5p/dev-i2c-hdmiphy.c
+++ /dev/null
@@ -1,59 +0,0 @@
1/*
2 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
3 * http://www.samsung.com/
4 *
5 * S5P series device definition for i2c for hdmiphy device
6 *
7 * Based on plat-samsung/dev-i2c7.c
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#include <linux/gfp.h>
15#include <linux/kernel.h>
16#include <linux/string.h>
17#include <linux/platform_device.h>
18
19#include <mach/irqs.h>
20#include <mach/map.h>
21#include <mach/i2c-hdmiphy.h>
22
23#include <plat/regs-iic.h>
24#include <plat/devs.h>
25#include <plat/cpu.h>
26#include <plat/iic.h>
27
28static struct resource s5p_i2c_resource[] = {
29 [0] = {
30 .start = S5P_PA_IIC_HDMIPHY,
31 .end = S5P_PA_IIC_HDMIPHY + SZ_4K - 1,
32 .flags = IORESOURCE_MEM,
33 },
34 [1] = {
35 .start = IRQ_IIC_HDMIPHY,
36 .end = IRQ_IIC_HDMIPHY,
37 .flags = IORESOURCE_IRQ,
38 },
39};
40
41struct platform_device s5p_device_i2c_hdmiphy = {
42 .name = "s3c2440-hdmiphy-i2c",
43 .id = -1,
44 .num_resources = ARRAY_SIZE(s5p_i2c_resource),
45 .resource = s5p_i2c_resource,
46};
47
48void __init s5p_i2c_hdmiphy_set_platdata(struct s3c2410_platform_i2c *pd)
49{
50 struct s3c2410_platform_i2c *npd;
51
52 if (!pd) {
53 pd = &default_i2c_data;
54 pd->bus_num = S5P_I2C_HDMIPHY_BUS_NUM;
55 }
56
57 npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c),
58 &s5p_device_i2c_hdmiphy);
59}
diff --git a/arch/arm/plat-s5p/dev-mfc.c b/arch/arm/plat-s5p/dev-mfc.c
index 94226a0010f7..a30d36b7f61b 100644
--- a/arch/arm/plat-s5p/dev-mfc.c
+++ b/arch/arm/plat-s5p/dev-mfc.c
@@ -22,56 +22,6 @@
22#include <plat/irqs.h> 22#include <plat/irqs.h>
23#include <plat/mfc.h> 23#include <plat/mfc.h>
24 24
25static struct resource s5p_mfc_resource[] = {
26 [0] = {
27 .start = S5P_PA_MFC,
28 .end = S5P_PA_MFC + SZ_64K - 1,
29 .flags = IORESOURCE_MEM,
30 },
31 [1] = {
32 .start = IRQ_MFC,
33 .end = IRQ_MFC,
34 .flags = IORESOURCE_IRQ,
35 }
36};
37
38struct platform_device s5p_device_mfc = {
39 .name = "s5p-mfc",
40 .id = -1,
41 .num_resources = ARRAY_SIZE(s5p_mfc_resource),
42 .resource = s5p_mfc_resource,
43};
44
45/*
46 * MFC hardware has 2 memory interfaces which are modelled as two separate
47 * platform devices to let dma-mapping distinguish between them.
48 *
49 * MFC parent device (s5p_device_mfc) must be registered before memory
50 * interface specific devices (s5p_device_mfc_l and s5p_device_mfc_r).
51 */
52
53static u64 s5p_mfc_dma_mask = DMA_BIT_MASK(32);
54
55struct platform_device s5p_device_mfc_l = {
56 .name = "s5p-mfc-l",
57 .id = -1,
58 .dev = {
59 .parent = &s5p_device_mfc.dev,
60 .dma_mask = &s5p_mfc_dma_mask,
61 .coherent_dma_mask = DMA_BIT_MASK(32),
62 },
63};
64
65struct platform_device s5p_device_mfc_r = {
66 .name = "s5p-mfc-r",
67 .id = -1,
68 .dev = {
69 .parent = &s5p_device_mfc.dev,
70 .dma_mask = &s5p_mfc_dma_mask,
71 .coherent_dma_mask = DMA_BIT_MASK(32),
72 },
73};
74
75struct s5p_mfc_reserved_mem { 25struct s5p_mfc_reserved_mem {
76 phys_addr_t base; 26 phys_addr_t base;
77 unsigned long size; 27 unsigned long size;
diff --git a/arch/arm/plat-s5p/dev-onenand.c b/arch/arm/plat-s5p/dev-onenand.c
deleted file mode 100644
index 20336c8f2479..000000000000
--- a/arch/arm/plat-s5p/dev-onenand.c
+++ /dev/null
@@ -1,45 +0,0 @@
1/* linux/arch/arm/plat-s5p/dev-onenand.c
2 *
3 * Copyright 2010 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
5 *
6 * Copyright (c) 2008-2010 Samsung Electronics
7 * Kyungmin Park <kyungmin.park@samsung.com>
8 *
9 * S5P series device definition for OneNAND devices
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
14 */
15
16#include <linux/kernel.h>
17#include <linux/platform_device.h>
18
19#include <mach/irqs.h>
20#include <mach/map.h>
21
22static struct resource s5p_onenand_resources[] = {
23 [0] = {
24 .start = S5P_PA_ONENAND,
25 .end = S5P_PA_ONENAND + SZ_128K - 1,
26 .flags = IORESOURCE_MEM,
27 },
28 [1] = {
29 .start = S5P_PA_ONENAND_DMA,
30 .end = S5P_PA_ONENAND_DMA + SZ_8K - 1,
31 .flags = IORESOURCE_MEM,
32 },
33 [2] = {
34 .start = IRQ_ONENAND_AUDI,
35 .end = IRQ_ONENAND_AUDI,
36 .flags = IORESOURCE_IRQ,
37 },
38};
39
40struct platform_device s5p_device_onenand = {
41 .name = "s5pc110-onenand",
42 .id = -1,
43 .num_resources = ARRAY_SIZE(s5p_onenand_resources),
44 .resource = s5p_onenand_resources,
45};
diff --git a/arch/arm/plat-s5p/dev-pmu.c b/arch/arm/plat-s5p/dev-pmu.c
deleted file mode 100644
index a08576da72b0..000000000000
--- a/arch/arm/plat-s5p/dev-pmu.c
+++ /dev/null
@@ -1,36 +0,0 @@
1/*
2 * linux/arch/arm/plat-s5p/dev-pmu.c
3 *
4 * Copyright (C) 2010 Samsung Electronics Co.Ltd
5 * Author: Joonyoung Shim <jy0922.shim@samsung.com>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 *
12 */
13
14#include <linux/platform_device.h>
15#include <asm/pmu.h>
16#include <mach/irqs.h>
17
18static struct resource s5p_pmu_resource = {
19 .start = IRQ_PMU,
20 .end = IRQ_PMU,
21 .flags = IORESOURCE_IRQ,
22};
23
24struct platform_device s5p_device_pmu = {
25 .name = "arm-pmu",
26 .id = ARM_PMU_DEVICE_CPU,
27 .num_resources = 1,
28 .resource = &s5p_pmu_resource,
29};
30
31static int __init s5p_pmu_init(void)
32{
33 platform_device_register(&s5p_device_pmu);
34 return 0;
35}
36arch_initcall(s5p_pmu_init);
diff --git a/arch/arm/plat-s5p/dev-tv.c b/arch/arm/plat-s5p/dev-tv.c
deleted file mode 100644
index 361a1b63a81b..000000000000
--- a/arch/arm/plat-s5p/dev-tv.c
+++ /dev/null
@@ -1,98 +0,0 @@
1/* linux/arch/arm/plat-s5p/dev-tv.c
2 *
3 * Copyright (C) 2011 Samsung Electronics Co.Ltd
4 * Author: Tomasz Stanislawski <t.stanislaws@samsung.com>
5 *
6 * S5P series device definition for TV device
7 *
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.
11*/
12
13#include <linux/dma-mapping.h>
14
15#include <mach/irqs.h>
16#include <mach/map.h>
17
18#include <plat/devs.h>
19
20/* HDMI interface */
21static struct resource s5p_hdmi_resources[] = {
22 [0] = {
23 .start = S5P_PA_HDMI,
24 .end = S5P_PA_HDMI + SZ_1M - 1,
25 .flags = IORESOURCE_MEM,
26 },
27 [1] = {
28 .start = IRQ_HDMI,
29 .end = IRQ_HDMI,
30 .flags = IORESOURCE_IRQ,
31 },
32};
33
34struct platform_device s5p_device_hdmi = {
35 .name = "s5p-hdmi",
36 .id = -1,
37 .num_resources = ARRAY_SIZE(s5p_hdmi_resources),
38 .resource = s5p_hdmi_resources,
39};
40EXPORT_SYMBOL(s5p_device_hdmi);
41
42/* SDO interface */
43static struct resource s5p_sdo_resources[] = {
44 [0] = {
45 .start = S5P_PA_SDO,
46 .end = S5P_PA_SDO + SZ_64K - 1,
47 .flags = IORESOURCE_MEM,
48 },
49 [1] = {
50 .start = IRQ_SDO,
51 .end = IRQ_SDO,
52 .flags = IORESOURCE_IRQ,
53 }
54};
55
56struct platform_device s5p_device_sdo = {
57 .name = "s5p-sdo",
58 .id = -1,
59 .num_resources = ARRAY_SIZE(s5p_sdo_resources),
60 .resource = s5p_sdo_resources,
61};
62EXPORT_SYMBOL(s5p_device_sdo);
63
64/* MIXER */
65static struct resource s5p_mixer_resources[] = {
66 [0] = {
67 .start = S5P_PA_MIXER,
68 .end = S5P_PA_MIXER + SZ_64K - 1,
69 .flags = IORESOURCE_MEM,
70 .name = "mxr"
71 },
72 [1] = {
73 .start = S5P_PA_VP,
74 .end = S5P_PA_VP + SZ_64K - 1,
75 .flags = IORESOURCE_MEM,
76 .name = "vp"
77 },
78 [2] = {
79 .start = IRQ_MIXER,
80 .end = IRQ_MIXER,
81 .flags = IORESOURCE_IRQ,
82 .name = "irq"
83 }
84};
85
86static u64 s5p_tv_dmamask = DMA_BIT_MASK(32);
87
88struct platform_device s5p_device_mixer = {
89 .name = "s5p-mixer",
90 .id = -1,
91 .num_resources = ARRAY_SIZE(s5p_mixer_resources),
92 .resource = s5p_mixer_resources,
93 .dev = {
94 .coherent_dma_mask = DMA_BIT_MASK(32),
95 .dma_mask = &s5p_tv_dmamask,
96 }
97};
98EXPORT_SYMBOL(s5p_device_mixer);
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
index 7a00dee89ebb..d8bd7ad6367c 100644
--- a/arch/arm/plat-samsung/devs.c
+++ b/arch/arm/plat-samsung/devs.c
@@ -22,10 +22,14 @@
22#include <linux/slab.h> 22#include <linux/slab.h>
23#include <linux/string.h> 23#include <linux/string.h>
24#include <linux/dma-mapping.h> 24#include <linux/dma-mapping.h>
25#include <linux/fb.h>
26#include <linux/gfp.h>
25#include <linux/mtd/mtd.h> 27#include <linux/mtd/mtd.h>
26#include <linux/mtd/onenand.h> 28#include <linux/mtd/onenand.h>
29#include <linux/ioport.h>
27 30
28#include <asm/irq.h> 31#include <asm/irq.h>
32#include <asm/pmu.h>
29#include <asm/mach/arch.h> 33#include <asm/mach/arch.h>
30#include <asm/mach/map.h> 34#include <asm/mach/map.h>
31#include <asm/mach/irq.h> 35#include <asm/mach/irq.h>
@@ -37,11 +41,15 @@
37 41
38#include <plat/cpu.h> 42#include <plat/cpu.h>
39#include <plat/devs.h> 43#include <plat/devs.h>
44#include <plat/ehci.h>
40#include <plat/fb.h> 45#include <plat/fb.h>
41#include <plat/fb-s3c2410.h> 46#include <plat/fb-s3c2410.h>
47#include <plat/iic.h>
42#include <plat/mci.h> 48#include <plat/mci.h>
43#include <plat/ts.h> 49#include <plat/ts.h>
44#include <plat/udc.h> 50#include <plat/udc.h>
51#include <plat/usb-phy.h>
52#include <plat/regs-iic.h>
45#include <plat/regs-serial.h> 53#include <plat/regs-serial.h>
46#include <plat/regs-spi.h> 54#include <plat/regs-spi.h>
47 55
@@ -149,6 +157,199 @@ struct platform_device s3c_device_camif = {
149}; 157};
150#endif /* CONFIG_CPU_S3C2440 */ 158#endif /* CONFIG_CPU_S3C2440 */
151 159
160/* FIMC */
161
162#ifdef CONFIG_S5P_DEV_FIMC0
163static struct resource s5p_fimc0_resource[] = {
164 [0] = {
165 .start = S5P_PA_FIMC0,
166 .end = S5P_PA_FIMC0 + SZ_4K - 1,
167 .flags = IORESOURCE_MEM,
168 },
169 [1] = {
170 .start = IRQ_FIMC0,
171 .end = IRQ_FIMC0,
172 .flags = IORESOURCE_IRQ,
173 },
174};
175
176struct platform_device s5p_device_fimc0 = {
177 .name = "s5p-fimc",
178 .id = 0,
179 .num_resources = ARRAY_SIZE(s5p_fimc0_resource),
180 .resource = s5p_fimc0_resource,
181 .dev = {
182 .dma_mask = &samsung_device_dma_mask,
183 .coherent_dma_mask = DMA_BIT_MASK(32),
184 },
185};
186#endif /* CONFIG_S5P_DEV_FIMC0 */
187
188#ifdef CONFIG_S5P_DEV_FIMC1
189static struct resource s5p_fimc1_resource[] = {
190 [0] = {
191 .start = S5P_PA_FIMC1,
192 .end = S5P_PA_FIMC1 + SZ_4K - 1,
193 .flags = IORESOURCE_MEM,
194 },
195 [1] = {
196 .start = IRQ_FIMC1,
197 .end = IRQ_FIMC1,
198 .flags = IORESOURCE_IRQ,
199 },
200};
201
202struct platform_device s5p_device_fimc1 = {
203 .name = "s5p-fimc",
204 .id = 1,
205 .num_resources = ARRAY_SIZE(s5p_fimc1_resource),
206 .resource = s5p_fimc1_resource,
207 .dev = {
208 .dma_mask = &samsung_device_dma_mask,
209 .coherent_dma_mask = DMA_BIT_MASK(32),
210 },
211};
212#endif /* CONFIG_S5P_DEV_FIMC1 */
213
214#ifdef CONFIG_S5P_DEV_FIMC2
215static struct resource s5p_fimc2_resource[] = {
216 [0] = {
217 .start = S5P_PA_FIMC2,
218 .end = S5P_PA_FIMC2 + SZ_4K - 1,
219 .flags = IORESOURCE_MEM,
220 },
221 [1] = {
222 .start = IRQ_FIMC2,
223 .end = IRQ_FIMC2,
224 .flags = IORESOURCE_IRQ,
225 },
226};
227
228struct platform_device s5p_device_fimc2 = {
229 .name = "s5p-fimc",
230 .id = 2,
231 .num_resources = ARRAY_SIZE(s5p_fimc2_resource),
232 .resource = s5p_fimc2_resource,
233 .dev = {
234 .dma_mask = &samsung_device_dma_mask,
235 .coherent_dma_mask = DMA_BIT_MASK(32),
236 },
237};
238#endif /* CONFIG_S5P_DEV_FIMC2 */
239
240#ifdef CONFIG_S5P_DEV_FIMC3
241static struct resource s5p_fimc3_resource[] = {
242 [0] = {
243 .start = S5P_PA_FIMC3,
244 .end = S5P_PA_FIMC3 + SZ_4K - 1,
245 .flags = IORESOURCE_MEM,
246 },
247 [1] = {
248 .start = IRQ_FIMC3,
249 .end = IRQ_FIMC3,
250 .flags = IORESOURCE_IRQ,
251 },
252};
253
254struct platform_device s5p_device_fimc3 = {
255 .name = "s5p-fimc",
256 .id = 3,
257 .num_resources = ARRAY_SIZE(s5p_fimc3_resource),
258 .resource = s5p_fimc3_resource,
259 .dev = {
260 .dma_mask = &samsung_device_dma_mask,
261 .coherent_dma_mask = DMA_BIT_MASK(32),
262 },
263};
264#endif /* CONFIG_S5P_DEV_FIMC3 */
265
266/* FIMD0 */
267
268#ifdef CONFIG_S5P_DEV_FIMD0
269static struct resource s5p_fimd0_resource[] = {
270 [0] = {
271 .start = S5P_PA_FIMD0,
272 .end = S5P_PA_FIMD0 + SZ_32K - 1,
273 .flags = IORESOURCE_MEM,
274 },
275 [1] = {
276 .start = IRQ_FIMD0_VSYNC,
277 .end = IRQ_FIMD0_VSYNC,
278 .flags = IORESOURCE_IRQ,
279 },
280 [2] = {
281 .start = IRQ_FIMD0_FIFO,
282 .end = IRQ_FIMD0_FIFO,
283 .flags = IORESOURCE_IRQ,
284 },
285 [3] = {
286 .start = IRQ_FIMD0_SYSTEM,
287 .end = IRQ_FIMD0_SYSTEM,
288 .flags = IORESOURCE_IRQ,
289 },
290};
291
292struct platform_device s5p_device_fimd0 = {
293 .name = "s5p-fb",
294 .id = 0,
295 .num_resources = ARRAY_SIZE(s5p_fimd0_resource),
296 .resource = s5p_fimd0_resource,
297 .dev = {
298 .dma_mask = &samsung_device_dma_mask,
299 .coherent_dma_mask = DMA_BIT_MASK(32),
300 },
301};
302
303void __init s5p_fimd0_set_platdata(struct s3c_fb_platdata *pd)
304{
305 s3c_set_platdata(pd, sizeof(struct s3c_fb_platdata),
306 &s5p_device_fimd0);
307}
308#endif /* CONFIG_S5P_DEV_FIMD0 */
309
310/* I2C HDMIPHY */
311
312#ifdef CONFIG_S5P_DEV_I2C_HDMIPHY
313static struct resource s5p_i2c_resource[] = {
314 [0] = {
315 .start = S5P_PA_IIC_HDMIPHY,
316 .end = S5P_PA_IIC_HDMIPHY + SZ_4K - 1,
317 .flags = IORESOURCE_MEM,
318 },
319 [1] = {
320 .start = IRQ_IIC_HDMIPHY,
321 .end = IRQ_IIC_HDMIPHY,
322 .flags = IORESOURCE_IRQ,
323 },
324};
325
326struct platform_device s5p_device_i2c_hdmiphy = {
327 .name = "s3c2440-hdmiphy-i2c",
328 .id = -1,
329 .num_resources = ARRAY_SIZE(s5p_i2c_resource),
330 .resource = s5p_i2c_resource,
331};
332
333void __init s5p_i2c_hdmiphy_set_platdata(struct s3c2410_platform_i2c *pd)
334{
335 struct s3c2410_platform_i2c *npd;
336
337 if (!pd) {
338 pd = &default_i2c_data;
339
340 if (soc_is_exynos4210())
341 pd->bus_num = 8;
342 else if (soc_is_s5pv210())
343 pd->bus_num = 3;
344 else
345 pd->bus_num = 0;
346 }
347
348 npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c),
349 &s5p_device_i2c_hdmiphy);
350}
351#endif /* CONFIG_S5P_DEV_I2C_HDMIPHY */
352
152/* I2S */ 353/* I2S */
153 354
154#ifdef CONFIG_PLAT_S3C24XX 355#ifdef CONFIG_PLAT_S3C24XX
@@ -227,6 +428,104 @@ void __init s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info *pd)
227} 428}
228#endif /* CONFIG_PLAT_S3C24XX */ 429#endif /* CONFIG_PLAT_S3C24XX */
229 430
431/* MFC */
432
433#ifdef CONFIG_S5P_DEV_MFC
434static struct resource s5p_mfc_resource[] = {
435 [0] = {
436 .start = S5P_PA_MFC,
437 .end = S5P_PA_MFC + SZ_64K - 1,
438 .flags = IORESOURCE_MEM,
439 },
440 [1] = {
441 .start = IRQ_MFC,
442 .end = IRQ_MFC,
443 .flags = IORESOURCE_IRQ,
444 }
445};
446
447struct platform_device s5p_device_mfc = {
448 .name = "s5p-mfc",
449 .id = -1,
450 .num_resources = ARRAY_SIZE(s5p_mfc_resource),
451 .resource = s5p_mfc_resource,
452};
453
454/*
455 * MFC hardware has 2 memory interfaces which are modelled as two separate
456 * platform devices to let dma-mapping distinguish between them.
457 *
458 * MFC parent device (s5p_device_mfc) must be registered before memory
459 * interface specific devices (s5p_device_mfc_l and s5p_device_mfc_r).
460 */
461
462struct platform_device s5p_device_mfc_l = {
463 .name = "s5p-mfc-l",
464 .id = -1,
465 .dev = {
466 .parent = &s5p_device_mfc.dev,
467 .dma_mask = &samsung_device_dma_mask,
468 .coherent_dma_mask = DMA_BIT_MASK(32),
469 },
470};
471
472struct platform_device s5p_device_mfc_r = {
473 .name = "s5p-mfc-r",
474 .id = -1,
475 .dev = {
476 .parent = &s5p_device_mfc.dev,
477 .dma_mask = &samsung_device_dma_mask,
478 .coherent_dma_mask = DMA_BIT_MASK(32),
479 },
480};
481#endif /* CONFIG_S5P_DEV_MFC */
482
483/* MIPI CSIS */
484
485#ifdef CONFIG_S5P_DEV_CSIS0
486static struct resource s5p_mipi_csis0_resource[] = {
487 [0] = {
488 .start = S5P_PA_MIPI_CSIS0,
489 .end = S5P_PA_MIPI_CSIS0 + SZ_4K - 1,
490 .flags = IORESOURCE_MEM,
491 },
492 [1] = {
493 .start = IRQ_MIPI_CSIS0,
494 .end = IRQ_MIPI_CSIS0,
495 .flags = IORESOURCE_IRQ,
496 }
497};
498
499struct platform_device s5p_device_mipi_csis0 = {
500 .name = "s5p-mipi-csis",
501 .id = 0,
502 .num_resources = ARRAY_SIZE(s5p_mipi_csis0_resource),
503 .resource = s5p_mipi_csis0_resource,
504};
505#endif /* CONFIG_S5P_DEV_CSIS0 */
506
507#ifdef CONFIG_S5P_DEV_CSIS1
508static struct resource s5p_mipi_csis1_resource[] = {
509 [0] = {
510 .start = S5P_PA_MIPI_CSIS1,
511 .end = S5P_PA_MIPI_CSIS1 + SZ_4K - 1,
512 .flags = IORESOURCE_MEM,
513 },
514 [1] = {
515 .start = IRQ_MIPI_CSIS1,
516 .end = IRQ_MIPI_CSIS1,
517 .flags = IORESOURCE_IRQ,
518 },
519};
520
521struct platform_device s5p_device_mipi_csis1 = {
522 .name = "s5p-mipi-csis",
523 .id = 1,
524 .num_resources = ARRAY_SIZE(s5p_mipi_csis1_resource),
525 .resource = s5p_mipi_csis1_resource,
526};
527#endif
528
230#ifdef CONFIG_S3C64XX_DEV_ONENAND1 529#ifdef CONFIG_S3C64XX_DEV_ONENAND1
231static struct resource s3c64xx_onenand1_resources[] = { 530static struct resource s3c64xx_onenand1_resources[] = {
232 [0] = { 531 [0] = {
@@ -260,6 +559,57 @@ void s3c64xx_onenand1_set_platdata(struct onenand_platform_data *pdata)
260} 559}
261#endif /* CONFIG_S3C64XX_DEV_ONENAND1 */ 560#endif /* CONFIG_S3C64XX_DEV_ONENAND1 */
262 561
562#ifdef CONFIG_S5P_DEV_ONENAND
563static struct resource s5p_onenand_resources[] = {
564 [0] = {
565 .start = S5P_PA_ONENAND,
566 .end = S5P_PA_ONENAND + SZ_128K - 1,
567 .flags = IORESOURCE_MEM,
568 },
569 [1] = {
570 .start = S5P_PA_ONENAND_DMA,
571 .end = S5P_PA_ONENAND_DMA + SZ_8K - 1,
572 .flags = IORESOURCE_MEM,
573 },
574 [2] = {
575 .start = IRQ_ONENAND_AUDI,
576 .end = IRQ_ONENAND_AUDI,
577 .flags = IORESOURCE_IRQ,
578 },
579};
580
581struct platform_device s5p_device_onenand = {
582 .name = "s5pc110-onenand",
583 .id = -1,
584 .num_resources = ARRAY_SIZE(s5p_onenand_resources),
585 .resource = s5p_onenand_resources,
586};
587#endif /* CONFIG_S5P_DEV_ONENAND */
588
589/* PMU */
590
591#ifdef CONFIG_PLAT_S5P
592static struct resource s5p_pmu_resource = {
593 .start = IRQ_PMU,
594 .end = IRQ_PMU,
595 .flags = IORESOURCE_IRQ,
596};
597
598struct platform_device s5p_device_pmu = {
599 .name = "arm-pmu",
600 .id = ARM_PMU_DEVICE_CPU,
601 .num_resources = 1,
602 .resource = &s5p_pmu_resource,
603};
604
605static int __init s5p_pmu_init(void)
606{
607 platform_device_register(&s5p_device_pmu);
608 return 0;
609}
610arch_initcall(s5p_pmu_init);
611#endif /* CONFIG_PLAT_S5P */
612
263/* RTC */ 613/* RTC */
264 614
265#ifdef CONFIG_PLAT_S3C24XX 615#ifdef CONFIG_PLAT_S3C24XX
@@ -403,6 +753,83 @@ void __init s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *hard_s3c2410ts_
403} 753}
404#endif /* CONFIG_PLAT_S3C24XX */ 754#endif /* CONFIG_PLAT_S3C24XX */
405 755
756/* TV */
757
758#ifdef CONFIG_S5P_DEV_TV
759
760static struct resource s5p_hdmi_resources[] = {
761 [0] = {
762 .start = S5P_PA_HDMI,
763 .end = S5P_PA_HDMI + SZ_1M - 1,
764 .flags = IORESOURCE_MEM,
765 },
766 [1] = {
767 .start = IRQ_HDMI,
768 .end = IRQ_HDMI,
769 .flags = IORESOURCE_IRQ,
770 },
771};
772
773struct platform_device s5p_device_hdmi = {
774 .name = "s5p-hdmi",
775 .id = -1,
776 .num_resources = ARRAY_SIZE(s5p_hdmi_resources),
777 .resource = s5p_hdmi_resources,
778};
779
780static struct resource s5p_sdo_resources[] = {
781 [0] = {
782 .start = S5P_PA_SDO,
783 .end = S5P_PA_SDO + SZ_64K - 1,
784 .flags = IORESOURCE_MEM,
785 },
786 [1] = {
787 .start = IRQ_SDO,
788 .end = IRQ_SDO,
789 .flags = IORESOURCE_IRQ,
790 }
791};
792
793struct platform_device s5p_device_sdo = {
794 .name = "s5p-sdo",
795 .id = -1,
796 .num_resources = ARRAY_SIZE(s5p_sdo_resources),
797 .resource = s5p_sdo_resources,
798};
799
800static struct resource s5p_mixer_resources[] = {
801 [0] = {
802 .start = S5P_PA_MIXER,
803 .end = S5P_PA_MIXER + SZ_64K - 1,
804 .flags = IORESOURCE_MEM,
805 .name = "mxr"
806 },
807 [1] = {
808 .start = S5P_PA_VP,
809 .end = S5P_PA_VP + SZ_64K - 1,
810 .flags = IORESOURCE_MEM,
811 .name = "vp"
812 },
813 [2] = {
814 .start = IRQ_MIXER,
815 .end = IRQ_MIXER,
816 .flags = IORESOURCE_IRQ,
817 .name = "irq"
818 }
819};
820
821struct platform_device s5p_device_mixer = {
822 .name = "s5p-mixer",
823 .id = -1,
824 .num_resources = ARRAY_SIZE(s5p_mixer_resources),
825 .resource = s5p_mixer_resources,
826 .dev = {
827 .dma_mask = &samsung_device_dma_mask,
828 .coherent_dma_mask = DMA_BIT_MASK(32),
829 }
830};
831#endif /* CONFIG_S5P_DEV_TV */
832
406/* USB Device (Gadget) */ 833/* USB Device (Gadget) */
407 834
408#ifdef CONFIG_PLAT_S3C24XX 835#ifdef CONFIG_PLAT_S3C24XX
@@ -432,6 +859,47 @@ void __init s3c24xx_udc_set_platdata(struct s3c2410_udc_mach_info *pd)
432} 859}
433#endif /* CONFIG_PLAT_S3C24XX */ 860#endif /* CONFIG_PLAT_S3C24XX */
434 861
862/* USB EHCI Host Controller */
863
864#ifdef CONFIG_S5P_DEV_USB_EHCI
865static struct resource s5p_ehci_resource[] = {
866 [0] = {
867 .start = S5P_PA_EHCI,
868 .end = S5P_PA_EHCI + SZ_256 - 1,
869 .flags = IORESOURCE_MEM,
870 },
871 [1] = {
872 .start = IRQ_USB_HOST,
873 .end = IRQ_USB_HOST,
874 .flags = IORESOURCE_IRQ,
875 }
876};
877
878struct platform_device s5p_device_ehci = {
879 .name = "s5p-ehci",
880 .id = -1,
881 .num_resources = ARRAY_SIZE(s5p_ehci_resource),
882 .resource = s5p_ehci_resource,
883 .dev = {
884 .dma_mask = &samsung_device_dma_mask,
885 .coherent_dma_mask = DMA_BIT_MASK(32),
886 }
887};
888
889void __init s5p_ehci_set_platdata(struct s5p_ehci_platdata *pd)
890{
891 struct s5p_ehci_platdata *npd;
892
893 npd = s3c_set_platdata(pd, sizeof(struct s5p_ehci_platdata),
894 &s5p_device_ehci);
895
896 if (!npd->phy_init)
897 npd->phy_init = s5p_usb_phy_init;
898 if (!npd->phy_exit)
899 npd->phy_exit = s5p_usb_phy_exit;
900}
901#endif /* CONFIG_S5P_DEV_USB_EHCI */
902
435/* USB High Spped 2.0 Device (Gadget) */ 903/* USB High Spped 2.0 Device (Gadget) */
436 904
437#ifdef CONFIG_PLAT_S3C24XX 905#ifdef CONFIG_PLAT_S3C24XX