aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c64xx
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-s3c64xx')
-rw-r--r--arch/arm/mach-s3c64xx/Kconfig17
-rw-r--r--arch/arm/mach-s3c64xx/Makefile3
-rw-r--r--arch/arm/mach-s3c64xx/setup-sdhci-s3c6410.c68
-rw-r--r--arch/arm/mach-s3c64xx/setup-sdhci.c (renamed from arch/arm/mach-s3c64xx/setup-sdhci-s3c6400.c)13
4 files changed, 18 insertions, 83 deletions
diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig
index 551bb3faa3a..ce32e4997d7 100644
--- a/arch/arm/mach-s3c64xx/Kconfig
+++ b/arch/arm/mach-s3c64xx/Kconfig
@@ -19,17 +19,12 @@ config CPU_S3C6410
19 help 19 help
20 Enable S3C6410 CPU support 20 Enable S3C6410 CPU support
21 21
22config S3C6400_SETUP_SDHCI 22config S3C64XX_SETUP_SDHCI
23 bool
24 help
25 Internal configuration for default SDHCI
26 setup for S3C6400.
27
28config S3C6410_SETUP_SDHCI
29 bool
30 select S3C64XX_SETUP_SDHCI_GPIO 23 select S3C64XX_SETUP_SDHCI_GPIO
24 bool
31 help 25 help
32 Internal helper functions for S3C6410 based SDHCI systems 26 Internal configuration for default SDHCI setup for S3C6400 and
27 S3C6410 SoCs.
33 28
34# S36400 Macchine support 29# S36400 Macchine support
35 30
@@ -38,7 +33,7 @@ config MACH_SMDK6400
38 select CPU_S3C6400 33 select CPU_S3C6400
39 select S3C_DEV_HSMMC 34 select S3C_DEV_HSMMC
40 select S3C_DEV_NAND 35 select S3C_DEV_NAND
41 select S3C6400_SETUP_SDHCI 36 select S3C64XX_SETUP_SDHCI
42 help 37 help
43 Machine support for the Samsung SMDK6400 38 Machine support for the Samsung SMDK6400
44 39
@@ -61,7 +56,7 @@ config MACH_SMDK6410
61 select S3C_DEV_FB 56 select S3C_DEV_FB
62 select S3C_DEV_USB_HOST 57 select S3C_DEV_USB_HOST
63 select S3C_DEV_USB_HSOTG 58 select S3C_DEV_USB_HSOTG
64 select S3C6410_SETUP_SDHCI 59 select S3C64XX_SETUP_SDHCI
65 select S3C64XX_SETUP_I2C1 60 select S3C64XX_SETUP_I2C1
66 select S3C64XX_SETUP_FB_24BPP 61 select S3C64XX_SETUP_FB_24BPP
67 help 62 help
diff --git a/arch/arm/mach-s3c64xx/Makefile b/arch/arm/mach-s3c64xx/Makefile
index 24a3bc33da1..21ddf6b2928 100644
--- a/arch/arm/mach-s3c64xx/Makefile
+++ b/arch/arm/mach-s3c64xx/Makefile
@@ -17,8 +17,7 @@ obj-$(CONFIG_CPU_S3C6410) += s3c6410.o
17 17
18# setup support 18# setup support
19 19
20obj-$(CONFIG_S3C6400_SETUP_SDHCI) += setup-sdhci-s3c6400.o 20obj-$(CONFIG_S3C64XX_SETUP_SDHCI) += setup-sdhci.o
21obj-$(CONFIG_S3C6410_SETUP_SDHCI) += setup-sdhci-s3c6410.o
22 21
23# Machine support 22# Machine support
24 23
diff --git a/arch/arm/mach-s3c64xx/setup-sdhci-s3c6410.c b/arch/arm/mach-s3c64xx/setup-sdhci-s3c6410.c
deleted file mode 100644
index 8d714a1f6dc..00000000000
--- a/arch/arm/mach-s3c64xx/setup-sdhci-s3c6410.c
+++ /dev/null
@@ -1,68 +0,0 @@
1/* linux/arch/arm/mach-s3c64xx/setup-sdhci.c
2 *
3 * Copyright 2008 Simtec Electronics
4 * Copyright 2008 Simtec Electronics
5 * Ben Dooks <ben@simtec.co.uk>
6 * http://armlinux.simtec.co.uk/
7 *
8 * S3C6410 - Helper functions for settign up SDHCI device(s) (HSMMC)
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13*/
14
15#include <linux/kernel.h>
16#include <linux/types.h>
17#include <linux/interrupt.h>
18#include <linux/platform_device.h>
19#include <linux/io.h>
20
21#include <linux/mmc/card.h>
22#include <linux/mmc/host.h>
23
24#include <plat/regs-sdhci.h>
25#include <plat/sdhci.h>
26
27/* clock sources for the mmc bus clock, order as for the ctrl2[5..4] */
28
29char *s3c6410_hsmmc_clksrcs[4] = {
30 [0] = "hsmmc",
31 [1] = "hsmmc",
32 [2] = "mmc_bus",
33 /* [3] = "48m", - note not successfully used yet */
34};
35
36
37void s3c6410_setup_sdhci0_cfg_card(struct platform_device *dev,
38 void __iomem *r,
39 struct mmc_ios *ios,
40 struct mmc_card *card)
41{
42 u32 ctrl2, ctrl3;
43
44 /* don't need to alter anything acording to card-type */
45
46 writel(S3C64XX_SDHCI_CONTROL4_DRIVE_9mA, r + S3C64XX_SDHCI_CONTROL4);
47
48 ctrl2 = readl(r + S3C_SDHCI_CONTROL2);
49 ctrl2 &= S3C_SDHCI_CTRL2_SELBASECLK_MASK;
50 ctrl2 |= (S3C64XX_SDHCI_CTRL2_ENSTAASYNCCLR |
51 S3C64XX_SDHCI_CTRL2_ENCMDCNFMSK |
52 S3C_SDHCI_CTRL2_ENFBCLKRX |
53 S3C_SDHCI_CTRL2_DFCNT_NONE |
54 S3C_SDHCI_CTRL2_ENCLKOUTHOLD);
55
56 if (ios->clock < 25 * 1000000)
57 ctrl3 = (S3C_SDHCI_CTRL3_FCSEL3 |
58 S3C_SDHCI_CTRL3_FCSEL2 |
59 S3C_SDHCI_CTRL3_FCSEL1 |
60 S3C_SDHCI_CTRL3_FCSEL0);
61 else
62 ctrl3 = (S3C_SDHCI_CTRL3_FCSEL1 | S3C_SDHCI_CTRL3_FCSEL0);
63
64 printk(KERN_INFO "%s: CTRL 2=%08x, 3=%08x\n", __func__, ctrl2, ctrl3);
65 writel(ctrl2, r + S3C_SDHCI_CONTROL2);
66 writel(ctrl3, r + S3C_SDHCI_CONTROL3);
67}
68
diff --git a/arch/arm/mach-s3c64xx/setup-sdhci-s3c6400.c b/arch/arm/mach-s3c64xx/setup-sdhci.c
index ec96a5863c0..1a942037c4e 100644
--- a/arch/arm/mach-s3c64xx/setup-sdhci-s3c6400.c
+++ b/arch/arm/mach-s3c64xx/setup-sdhci.c
@@ -5,7 +5,7 @@
5 * Ben Dooks <ben@simtec.co.uk> 5 * Ben Dooks <ben@simtec.co.uk>
6 * http://armlinux.simtec.co.uk/ 6 * http://armlinux.simtec.co.uk/
7 * 7 *
8 * S3C6410 - Helper functions for settign up SDHCI device(s) (HSMMC) 8 * S3C6400/S3C6410 - Helper functions for settign up SDHCI device(s) (HSMMC)
9 * 9 *
10 * This program is free software; you can redistribute it and/or modify 10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as 11 * it under the terms of the GNU General Public License version 2 as
@@ -26,7 +26,7 @@
26 26
27/* clock sources for the mmc bus clock, order as for the ctrl2[5..4] */ 27/* clock sources for the mmc bus clock, order as for the ctrl2[5..4] */
28 28
29char *s3c6400_hsmmc_clksrcs[4] = { 29char *s3c64xx_hsmmc_clksrcs[4] = {
30 [0] = "hsmmc", 30 [0] = "hsmmc",
31 [1] = "hsmmc", 31 [1] = "hsmmc",
32 [2] = "mmc_bus", 32 [2] = "mmc_bus",
@@ -61,3 +61,12 @@ void s3c6400_setup_sdhci_cfg_card(struct platform_device *dev,
61 writel(ctrl3, r + S3C_SDHCI_CONTROL3); 61 writel(ctrl3, r + S3C_SDHCI_CONTROL3);
62} 62}
63 63
64void s3c6410_setup_sdhci_cfg_card(struct platform_device *dev,
65 void __iomem *r,
66 struct mmc_ios *ios,
67 struct mmc_card *card)
68{
69 writel(S3C64XX_SDHCI_CONTROL4_DRIVE_9mA, r + S3C64XX_SDHCI_CONTROL4);
70
71 s3c6400_setup_sdhci_cfg_card(dev, r, ios, card);
72}