aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-s3c2410/include/mach/irqs.h2
-rw-r--r--arch/arm/mach-s3c2410/include/mach/map.h1
-rw-r--r--arch/arm/mach-s3c2443/Kconfig1
-rw-r--r--arch/arm/mach-s3c2443/mach-smdk2443.c2
-rw-r--r--arch/arm/mach-s3c6400/include/mach/map.h9
-rw-r--r--arch/arm/mach-s3c6410/Kconfig1
-rw-r--r--arch/arm/plat-s3c/Kconfig8
-rw-r--r--arch/arm/plat-s3c/Makefile6
-rw-r--r--arch/arm/plat-s3c/dev-hsmmc.c47
-rw-r--r--arch/arm/plat-s3c/include/plat/devs.h4
-rw-r--r--arch/arm/plat-s3c24xx/devs.c30
11 files changed, 78 insertions, 33 deletions
diff --git a/arch/arm/mach-s3c2410/include/mach/irqs.h b/arch/arm/mach-s3c2410/include/mach/irqs.h
index 950c71bf1489..fa8764b05692 100644
--- a/arch/arm/mach-s3c2410/include/mach/irqs.h
+++ b/arch/arm/mach-s3c2410/include/mach/irqs.h
@@ -134,6 +134,8 @@
134#define IRQ_S3C2443_HSMMC S3C2410_IRQ(20) /* IRQ_SDI */ 134#define IRQ_S3C2443_HSMMC S3C2410_IRQ(20) /* IRQ_SDI */
135#define IRQ_S3C2443_NAND S3C2410_IRQ(24) /* reserved */ 135#define IRQ_S3C2443_NAND S3C2410_IRQ(24) /* reserved */
136 136
137#define IRQ_HSMMC0 IRQ_S3C2443_HSMMC
138
137#define IRQ_S3C2443_LCD1 S3C2410_IRQSUB(14) 139#define IRQ_S3C2443_LCD1 S3C2410_IRQSUB(14)
138#define IRQ_S3C2443_LCD2 S3C2410_IRQSUB(15) 140#define IRQ_S3C2443_LCD2 S3C2410_IRQSUB(15)
139#define IRQ_S3C2443_LCD3 S3C2410_IRQSUB(16) 141#define IRQ_S3C2443_LCD3 S3C2410_IRQSUB(16)
diff --git a/arch/arm/mach-s3c2410/include/mach/map.h b/arch/arm/mach-s3c2410/include/mach/map.h
index 918e3463297f..d5ae6823fed4 100644
--- a/arch/arm/mach-s3c2410/include/mach/map.h
+++ b/arch/arm/mach-s3c2410/include/mach/map.h
@@ -102,5 +102,6 @@
102#define S3C24XX_PA_NAND S3C2410_PA_NAND 102#define S3C24XX_PA_NAND S3C2410_PA_NAND
103 103
104#define S3C_PA_UART S3C24XX_PA_UART 104#define S3C_PA_UART S3C24XX_PA_UART
105#define S3C_PA_HSMMC0 S3C2443_PA_HSMMC
105 106
106#endif /* __ASM_ARCH_MAP_H */ 107#endif /* __ASM_ARCH_MAP_H */
diff --git a/arch/arm/mach-s3c2443/Kconfig b/arch/arm/mach-s3c2443/Kconfig
index 14252f573754..212141baebec 100644
--- a/arch/arm/mach-s3c2443/Kconfig
+++ b/arch/arm/mach-s3c2443/Kconfig
@@ -24,6 +24,7 @@ config MACH_SMDK2443
24 bool "SMDK2443" 24 bool "SMDK2443"
25 select CPU_S3C2443 25 select CPU_S3C2443
26 select MACH_SMDK 26 select MACH_SMDK
27 select S3C_DEV_HSMMC
27 help 28 help
28 Say Y here if you are using an SMDK2443 29 Say Y here if you are using an SMDK2443
29 30
diff --git a/arch/arm/mach-s3c2443/mach-smdk2443.c b/arch/arm/mach-s3c2443/mach-smdk2443.c
index a7fe65f3dcc1..815a3bd1d37b 100644
--- a/arch/arm/mach-s3c2443/mach-smdk2443.c
+++ b/arch/arm/mach-s3c2443/mach-smdk2443.c
@@ -104,7 +104,7 @@ static struct s3c2410_uartcfg smdk2443_uartcfgs[] __initdata = {
104static struct platform_device *smdk2443_devices[] __initdata = { 104static struct platform_device *smdk2443_devices[] __initdata = {
105 &s3c_device_wdt, 105 &s3c_device_wdt,
106 &s3c_device_i2c, 106 &s3c_device_i2c,
107 &s3c_device_hsmmc, 107 &s3c_device_hsmmc0,
108}; 108};
109 109
110static void __init smdk2443_map_io(void) 110static void __init smdk2443_map_io(void)
diff --git a/arch/arm/mach-s3c6400/include/mach/map.h b/arch/arm/mach-s3c6400/include/mach/map.h
index 618f09d637b2..aadaaaf2d8b6 100644
--- a/arch/arm/mach-s3c6400/include/mach/map.h
+++ b/arch/arm/mach-s3c6400/include/mach/map.h
@@ -17,6 +17,12 @@
17 17
18#include <plat/map-base.h> 18#include <plat/map-base.h>
19 19
20/* HSMMC units */
21#define S3C64XX_PA_HSMMC(x) (0x7C200000 + ((x) * 0x100000))
22#define S3C64XX_PA_HSMMC0 S3C64XX_PA_HSMMC(0)
23#define S3C64XX_PA_HSMMC1 S3C64XX_PA_HSMMC(1)
24#define S3C64XX_PA_HSMMC2 S3C64XX_PA_HSMMC(2)
25
20#define S3C_PA_UART (0x7F005000) 26#define S3C_PA_UART (0x7F005000)
21#define S3C_PA_UART0 (S3C_PA_UART + 0x00) 27#define S3C_PA_UART0 (S3C_PA_UART + 0x00)
22#define S3C_PA_UART1 (S3C_PA_UART + 0x400) 28#define S3C_PA_UART1 (S3C_PA_UART + 0x400)
@@ -49,5 +55,8 @@
49 55
50/* compatibiltiy defines. */ 56/* compatibiltiy defines. */
51#define S3C_PA_TIMER S3C64XX_PA_TIMER 57#define S3C_PA_TIMER S3C64XX_PA_TIMER
58#define S3C_PA_HSMMC0 S3C64XX_PA_HSMMC0
59#define S3C_PA_HSMMC1 S3C64XX_PA_HSMMC1
60#define S3C_PA_HSMMC2 S3C64XX_PA_HSMMC2
52 61
53#endif /* __ASM_ARCH_6400_MAP_H */ 62#endif /* __ASM_ARCH_6400_MAP_H */
diff --git a/arch/arm/mach-s3c6410/Kconfig b/arch/arm/mach-s3c6410/Kconfig
index 75b1244cf8ab..d7ccc269086c 100644
--- a/arch/arm/mach-s3c6410/Kconfig
+++ b/arch/arm/mach-s3c6410/Kconfig
@@ -17,5 +17,6 @@ config CPU_S3C6410
17config MACH_SMDK6410 17config MACH_SMDK6410
18 bool "SMDK6410" 18 bool "SMDK6410"
19 select CPU_S3C6410 19 select CPU_S3C6410
20 select S3C_DEV_HSMMC
20 help 21 help
21 Machine support for the Samsung SMDK6410 22 Machine support for the Samsung SMDK6410
diff --git a/arch/arm/plat-s3c/Kconfig b/arch/arm/plat-s3c/Kconfig
index 6fa261a3d405..0deb1054975f 100644
--- a/arch/arm/plat-s3c/Kconfig
+++ b/arch/arm/plat-s3c/Kconfig
@@ -102,3 +102,11 @@ config S3C_LOWLEVEL_UART_PORT
102 such as the `Uncompressing...` at start time. The value of 102 such as the `Uncompressing...` at start time. The value of
103 this configuration should be between zero and two. The port 103 this configuration should be between zero and two. The port
104 must have been initialised by the boot-loader before use. 104 must have been initialised by the boot-loader before use.
105
106# device definitions to compile in
107
108config S3C_DEV_HSMMC
109 bool
110 depends on PLAT_S3C
111 help
112 Compile in platform device definitions for HSMMC code
diff --git a/arch/arm/plat-s3c/Makefile b/arch/arm/plat-s3c/Makefile
index a2fe3c77564e..b95a9c106467 100644
--- a/arch/arm/plat-s3c/Makefile
+++ b/arch/arm/plat-s3c/Makefile
@@ -14,4 +14,8 @@ obj- :=
14obj-y += init.o 14obj-y += init.o
15obj-y += time.o 15obj-y += time.o
16obj-y += clock.o 16obj-y += clock.o
17obj-y += pwm-clock.o \ No newline at end of file 17obj-y += pwm-clock.o
18
19# devices
20
21obj-$(CONFIG_S3C_DEV_HSMMC) += dev-hsmmc.o
diff --git a/arch/arm/plat-s3c/dev-hsmmc.c b/arch/arm/plat-s3c/dev-hsmmc.c
new file mode 100644
index 000000000000..5a5ef74ebde3
--- /dev/null
+++ b/arch/arm/plat-s3c/dev-hsmmc.c
@@ -0,0 +1,47 @@
1/* linux/arch/arm/plat-s3c/dev-hsmmc.c
2 *
3 * Copyright (c) 2008 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 * http://armlinux.simtec.co.uk/
6 *
7 * S3C series device definition for hsmmc devices
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/kernel.h>
15#include <linux/platform_device.h>
16
17#include <mach/map.h>
18#include <plat/devs.h>
19#include <plat/cpu.h>
20
21#define S3C_SZ_HSMMC (0x1000)
22
23static struct resource s3c_hsmmc_resource[] = {
24 [0] = {
25 .start = S3C_PA_HSMMC0,
26 .end = S3C_PA_HSMMC0 + S3C_SZ_HSMMC - 1,
27 .flags = IORESOURCE_MEM,
28 },
29 [1] = {
30 .start = IRQ_HSMMC0,
31 .end = IRQ_HSMMC0,
32 .flags = IORESOURCE_IRQ,
33 }
34};
35
36static u64 s3c_device_hsmmc_dmamask = 0xffffffffUL;
37
38struct platform_device s3c_device_hsmmc0 = {
39 .name = "s3c-sdhci",
40 .id = 0,
41 .num_resources = ARRAY_SIZE(s3c_hsmmc_resource),
42 .resource = s3c_hsmmc_resource,
43 .dev = {
44 .dma_mask = &s3c_device_hsmmc_dmamask,
45 .coherent_dma_mask = 0xffffffffUL
46 }
47};
diff --git a/arch/arm/plat-s3c/include/plat/devs.h b/arch/arm/plat-s3c/include/plat/devs.h
index a689c7c5ac23..f173863b8cc7 100644
--- a/arch/arm/plat-s3c/include/plat/devs.h
+++ b/arch/arm/plat-s3c/include/plat/devs.h
@@ -32,7 +32,9 @@ extern struct platform_device s3c_device_iis;
32extern struct platform_device s3c_device_rtc; 32extern struct platform_device s3c_device_rtc;
33extern struct platform_device s3c_device_adc; 33extern struct platform_device s3c_device_adc;
34extern struct platform_device s3c_device_sdi; 34extern struct platform_device s3c_device_sdi;
35extern struct platform_device s3c_device_hsmmc; 35extern struct platform_device s3c_device_hsmmc0;
36extern struct platform_device s3c_device_hsmmc1;
37extern struct platform_device s3c_device_hsmmc2;
36 38
37extern struct platform_device s3c_device_spi0; 39extern struct platform_device s3c_device_spi0;
38extern struct platform_device s3c_device_spi1; 40extern struct platform_device s3c_device_spi1;
diff --git a/arch/arm/plat-s3c24xx/devs.c b/arch/arm/plat-s3c24xx/devs.c
index ea445850ff47..3a2fcd94791e 100644
--- a/arch/arm/plat-s3c24xx/devs.c
+++ b/arch/arm/plat-s3c24xx/devs.c
@@ -403,36 +403,6 @@ struct platform_device s3c_device_sdi = {
403 403
404EXPORT_SYMBOL(s3c_device_sdi); 404EXPORT_SYMBOL(s3c_device_sdi);
405 405
406/* High-speed MMC/SD */
407
408static struct resource s3c_hsmmc_resource[] = {
409 [0] = {
410 .start = S3C2443_PA_HSMMC,
411 .end = S3C2443_PA_HSMMC + S3C2443_SZ_HSMMC - 1,
412 .flags = IORESOURCE_MEM,
413 },
414 [1] = {
415 .start = IRQ_S3C2443_HSMMC,
416 .end = IRQ_S3C2443_HSMMC,
417 .flags = IORESOURCE_IRQ,
418 }
419};
420
421static u64 s3c_device_hsmmc_dmamask = 0xffffffffUL;
422
423struct platform_device s3c_device_hsmmc = {
424 .name = "s3c-sdhci",
425 .id = -1,
426 .num_resources = ARRAY_SIZE(s3c_hsmmc_resource),
427 .resource = s3c_hsmmc_resource,
428 .dev = {
429 .dma_mask = &s3c_device_hsmmc_dmamask,
430 .coherent_dma_mask = 0xffffffffUL
431 }
432};
433
434
435
436/* SPI (0) */ 406/* SPI (0) */
437 407
438static struct resource s3c_spi0_resource[] = { 408static struct resource s3c_spi0_resource[] = {