aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-exynos4/Kconfig5
-rw-r--r--arch/arm/mach-exynos4/Makefile1
-rw-r--r--arch/arm/mach-exynos4/dev-dwmci.c82
-rw-r--r--arch/arm/mach-exynos4/include/mach/dwmci.h20
-rw-r--r--arch/arm/mach-exynos4/include/mach/irqs.h1
-rw-r--r--arch/arm/mach-exynos4/include/mach/map.h1
-rw-r--r--arch/arm/plat-samsung/include/plat/devs.h1
7 files changed, 111 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig
index 0cdb1fd5385a..b735705c8b47 100644
--- a/arch/arm/mach-exynos4/Kconfig
+++ b/arch/arm/mach-exynos4/Kconfig
@@ -36,6 +36,11 @@ config EXYNOS4_DEV_SYSMMU
36 help 36 help
37 Common setup code for SYSTEM MMU in EXYNOS4 37 Common setup code for SYSTEM MMU in EXYNOS4
38 38
39config EXYNOS4_DEV_DWMCI
40 bool
41 help
42 Compile in platform device definitions for DWMCI
43
39config EXYNOS4_SETUP_I2C1 44config EXYNOS4_SETUP_I2C1
40 bool 45 bool
41 help 46 help
diff --git a/arch/arm/mach-exynos4/Makefile b/arch/arm/mach-exynos4/Makefile
index c8e880e7144a..2a0b68220b2f 100644
--- a/arch/arm/mach-exynos4/Makefile
+++ b/arch/arm/mach-exynos4/Makefile
@@ -38,6 +38,7 @@ obj-y += dev-audio.o
38obj-$(CONFIG_EXYNOS4_DEV_AHCI) += dev-ahci.o 38obj-$(CONFIG_EXYNOS4_DEV_AHCI) += dev-ahci.o
39obj-$(CONFIG_EXYNOS4_DEV_PD) += dev-pd.o 39obj-$(CONFIG_EXYNOS4_DEV_PD) += dev-pd.o
40obj-$(CONFIG_EXYNOS4_DEV_SYSMMU) += dev-sysmmu.o 40obj-$(CONFIG_EXYNOS4_DEV_SYSMMU) += dev-sysmmu.o
41obj-$(CONFIG_EXYNOS4_DEV_DWMCI) += dev-dwmci.o
41 42
42obj-$(CONFIG_EXYNOS4_SETUP_FIMC) += setup-fimc.o 43obj-$(CONFIG_EXYNOS4_SETUP_FIMC) += setup-fimc.o
43obj-$(CONFIG_EXYNOS4_SETUP_I2C1) += setup-i2c1.o 44obj-$(CONFIG_EXYNOS4_SETUP_I2C1) += setup-i2c1.o
diff --git a/arch/arm/mach-exynos4/dev-dwmci.c b/arch/arm/mach-exynos4/dev-dwmci.c
new file mode 100644
index 000000000000..b025db4bf602
--- /dev/null
+++ b/arch/arm/mach-exynos4/dev-dwmci.c
@@ -0,0 +1,82 @@
1/*
2 * linux/arch/arm/mach-exynos4/dev-dwmci.c
3 *
4 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
5 * http://www.samsung.com
6 *
7 * Platform device for Synopsys DesignWare Mobile Storage IP
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 as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 */
14
15#include <linux/kernel.h>
16#include <linux/dma-mapping.h>
17#include <linux/platform_device.h>
18#include <linux/interrupt.h>
19#include <linux/mmc/dw_mmc.h>
20
21#include <plat/devs.h>
22
23#include <mach/map.h>
24
25static int exynos4_dwmci_get_bus_wd(u32 slot_id)
26{
27 return 4;
28}
29
30static int exynos4_dwmci_init(u32 slot_id, irq_handler_t handler, void *data)
31{
32 return 0;
33}
34
35static struct resource exynos4_dwmci_resource[] = {
36 [0] = {
37 .start = EXYNOS4_PA_DWMCI,
38 .end = EXYNOS4_PA_DWMCI + SZ_4K - 1,
39 .flags = IORESOURCE_MEM,
40 },
41 [1] = {
42 .start = IRQ_DWMCI,
43 .end = IRQ_DWMCI,
44 .flags = IORESOURCE_IRQ,
45 }
46};
47
48static struct dw_mci_board exynos4_dwci_pdata = {
49 .num_slots = 1,
50 .quirks = DW_MCI_QUIRK_BROKEN_CARD_DETECTION,
51 .bus_hz = 80 * 1000 * 1000,
52 .detect_delay_ms = 200,
53 .init = exynos4_dwmci_init,
54 .get_bus_wd = exynos4_dwmci_get_bus_wd,
55};
56
57static u64 exynos4_dwmci_dmamask = DMA_BIT_MASK(32);
58
59struct platform_device exynos4_device_dwmci = {
60 .name = "dw_mmc",
61 .id = -1,
62 .num_resources = ARRAY_SIZE(exynos4_dwmci_resource),
63 .resource = exynos4_dwmci_resource,
64 .dev = {
65 .dma_mask = &exynos4_dwmci_dmamask,
66 .coherent_dma_mask = DMA_BIT_MASK(32),
67 .platform_data = &exynos4_dwci_pdata,
68 },
69};
70
71void __init exynos4_dwmci_set_platdata(struct dw_mci_board *pd)
72{
73 struct dw_mci_board *npd;
74
75 npd = s3c_set_platdata(pd, sizeof(struct dw_mci_board),
76 &exynos4_device_dwmci);
77
78 if (!npd->init)
79 npd->init = exynos4_dwmci_init;
80 if (!npd->get_bus_wd)
81 npd->get_bus_wd = exynos4_dwmci_get_bus_wd;
82}
diff --git a/arch/arm/mach-exynos4/include/mach/dwmci.h b/arch/arm/mach-exynos4/include/mach/dwmci.h
new file mode 100644
index 000000000000..7ce657459cc0
--- /dev/null
+++ b/arch/arm/mach-exynos4/include/mach/dwmci.h
@@ -0,0 +1,20 @@
1/* linux/arch/arm/mach-exynos4/include/mach/dwmci.h
2 *
3 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com/
5 *
6 * Synopsys DesignWare Mobile Storage for EXYNOS4210
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#ifndef __ASM_ARM_ARCH_DWMCI_H
14#define __ASM_ARM_ARCH_DWMCI_H __FILE__
15
16#include <linux/mmc/dw_mmc.h>
17
18extern void exynos4_dwmci_set_platdata(struct dw_mci_board *pd);
19
20#endif /* __ASM_ARM_ARCH_DWMCI_H */
diff --git a/arch/arm/mach-exynos4/include/mach/irqs.h b/arch/arm/mach-exynos4/include/mach/irqs.h
index 51b5db5ea93b..e2995be40c3f 100644
--- a/arch/arm/mach-exynos4/include/mach/irqs.h
+++ b/arch/arm/mach-exynos4/include/mach/irqs.h
@@ -78,6 +78,7 @@
78#define IRQ_HSMMC1 IRQ_SPI(74) 78#define IRQ_HSMMC1 IRQ_SPI(74)
79#define IRQ_HSMMC2 IRQ_SPI(75) 79#define IRQ_HSMMC2 IRQ_SPI(75)
80#define IRQ_HSMMC3 IRQ_SPI(76) 80#define IRQ_HSMMC3 IRQ_SPI(76)
81#define IRQ_DWMCI IRQ_SPI(77)
81 82
82#define IRQ_MIPICSI0 IRQ_SPI(78) 83#define IRQ_MIPICSI0 IRQ_SPI(78)
83 84
diff --git a/arch/arm/mach-exynos4/include/mach/map.h b/arch/arm/mach-exynos4/include/mach/map.h
index 0e0016fad20f..0aa77fb707d2 100644
--- a/arch/arm/mach-exynos4/include/mach/map.h
+++ b/arch/arm/mach-exynos4/include/mach/map.h
@@ -96,6 +96,7 @@
96#define EXYNOS4_PA_MIPI_CSIS1 0x11890000 96#define EXYNOS4_PA_MIPI_CSIS1 0x11890000
97 97
98#define EXYNOS4_PA_HSMMC(x) (0x12510000 + ((x) * 0x10000)) 98#define EXYNOS4_PA_HSMMC(x) (0x12510000 + ((x) * 0x10000))
99#define EXYNOS4_PA_DWMCI 0x12550000
99 100
100#define EXYNOS4_PA_SATA 0x12560000 101#define EXYNOS4_PA_SATA 0x12560000
101#define EXYNOS4_PA_SATAPHY 0x125D0000 102#define EXYNOS4_PA_SATAPHY 0x125D0000
diff --git a/arch/arm/plat-samsung/include/plat/devs.h b/arch/arm/plat-samsung/include/plat/devs.h
index e3b31c26ac3e..29fa1cf9c6f8 100644
--- a/arch/arm/plat-samsung/include/plat/devs.h
+++ b/arch/arm/plat-samsung/include/plat/devs.h
@@ -112,6 +112,7 @@ extern struct platform_device exynos4_device_i2s2;
112extern struct platform_device exynos4_device_spdif; 112extern struct platform_device exynos4_device_spdif;
113extern struct platform_device exynos4_device_pd[]; 113extern struct platform_device exynos4_device_pd[];
114extern struct platform_device exynos4_device_ahci; 114extern struct platform_device exynos4_device_ahci;
115extern struct platform_device exynos4_device_dwmci;
115 116
116extern struct platform_device s5p6440_device_pcm; 117extern struct platform_device s5p6440_device_pcm;
117extern struct platform_device s5p6440_device_iis; 118extern struct platform_device s5p6440_device_iis;