* [PATCH 0/3] ARM: S5PV310: Add support HSMMC on SMDKC210 and SMDKV310
@ 2010-08-20 12:33 Kukjin Kim
2010-08-20 12:33 ` [PATCH 1/3] ARM: SAMSUNG: Change the 3rd HSMMC interrupt name for compatibility Kukjin Kim
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Kukjin Kim @ 2010-08-20 12:33 UTC (permalink / raw)
To: linux-arm-kernel
This patch changes HSMMC interrupt name and adds initial map for GPIO2 and GPIO3
so that can support 4 HSMMC on SMDKC210 and SMDKV310.
NOTE: depends on Kyungmin's 'Fix on GPIO base addresses'
[PATCH 1/3] ARM: SAMSUNG: Change the 3rd HSMMC interrupt name for compatibility
[PATCH 2/3] ARM: S5P: Add initial map for GPIO2 and GPIO3
[PATCH 3/3] ARM: S5PV310: Add support HSMMC on SMDKC210 and SMDKV310
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/3] ARM: SAMSUNG: Change the 3rd HSMMC interrupt name for compatibility
2010-08-20 12:33 [PATCH 0/3] ARM: S5PV310: Add support HSMMC on SMDKC210 and SMDKV310 Kukjin Kim
@ 2010-08-20 12:33 ` Kukjin Kim
2010-08-22 3:33 ` Kyungmin Park
2010-08-20 12:33 ` [PATCH 2/3] ARM: S5P: Add initial map for GPIO2 and GPIO3 Kukjin Kim
2010-08-20 12:33 ` [PATCH 3/3] ARM: S5PV310: Add support HSMMC on SMDKC210 and SMDKV310 Kukjin Kim
2 siblings, 1 reply; 11+ messages in thread
From: Kukjin Kim @ 2010-08-20 12:33 UTC (permalink / raw)
To: linux-arm-kernel
This patch changes the 3rd HSMMC interrupt name for compatibility
from IRQ_MMC to IRQ_HSMMC3.
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
---
arch/arm/mach-s5pv210/include/mach/irqs.h | 2 +-
arch/arm/mach-s5pv310/include/mach/irqs.h | 5 +++++
arch/arm/plat-samsung/dev-hsmmc3.c | 4 ++--
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-s5pv210/include/mach/irqs.h b/arch/arm/mach-s5pv210/include/mach/irqs.h
index e1c020e..cdb8ae4 100644
--- a/arch/arm/mach-s5pv210/include/mach/irqs.h
+++ b/arch/arm/mach-s5pv210/include/mach/irqs.h
@@ -109,7 +109,7 @@
#define IRQ_IPC S5P_IRQ_VIC3(0)
#define IRQ_HOSTIF S5P_IRQ_VIC3(1)
-#define IRQ_MMC3 S5P_IRQ_VIC3(2)
+#define IRQ_HSMMC3 S5P_IRQ_VIC3(2)
#define IRQ_CEC S5P_IRQ_VIC3(3)
#define IRQ_TSI S5P_IRQ_VIC3(4)
#define IRQ_MDNIE0 S5P_IRQ_VIC3(5)
diff --git a/arch/arm/mach-s5pv310/include/mach/irqs.h b/arch/arm/mach-s5pv310/include/mach/irqs.h
index 4cdedda..522352f 100644
--- a/arch/arm/mach-s5pv310/include/mach/irqs.h
+++ b/arch/arm/mach-s5pv310/include/mach/irqs.h
@@ -68,6 +68,11 @@
#define IRQ_IIC COMBINER_IRQ(27, 0)
+#define IRQ_HSMMC0 COMBINER_IRQ(29, 0)
+#define IRQ_HSMMC1 COMBINER_IRQ(29, 1)
+#define IRQ_HSMMC2 COMBINER_IRQ(29, 2)
+#define IRQ_HSMMC3 COMBINER_IRQ(29, 3)
+
/* Set the default NR_IRQS */
#define NR_IRQS COMBINER_IRQ(MAX_COMBINER_NR, 0)
diff --git a/arch/arm/plat-samsung/dev-hsmmc3.c b/arch/arm/plat-samsung/dev-hsmmc3.c
index 85aaf0f..335bc35 100644
--- a/arch/arm/plat-samsung/dev-hsmmc3.c
+++ b/arch/arm/plat-samsung/dev-hsmmc3.c
@@ -33,8 +33,8 @@ static struct resource s3c_hsmmc3_resource[] = {
.flags = IORESOURCE_MEM,
},
[1] = {
- .start = IRQ_MMC3,
- .end = IRQ_MMC3,
+ .start = IRQ_HSMMC3,
+ .end = IRQ_HSMMC3,
.flags = IORESOURCE_IRQ,
}
};
--
1.6.2.5
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/3] ARM: S5P: Add initial map for GPIO2 and GPIO3
2010-08-20 12:33 [PATCH 0/3] ARM: S5PV310: Add support HSMMC on SMDKC210 and SMDKV310 Kukjin Kim
2010-08-20 12:33 ` [PATCH 1/3] ARM: SAMSUNG: Change the 3rd HSMMC interrupt name for compatibility Kukjin Kim
@ 2010-08-20 12:33 ` Kukjin Kim
2010-08-22 3:33 ` Kyungmin Park
2010-08-20 12:33 ` [PATCH 3/3] ARM: S5PV310: Add support HSMMC on SMDKC210 and SMDKV310 Kukjin Kim
2 siblings, 1 reply; 11+ messages in thread
From: Kukjin Kim @ 2010-08-20 12:33 UTC (permalink / raw)
To: linux-arm-kernel
From: Jongpill Lee <boyko.lee@samsung.com>
This patch adds initial map for GPIO2 and GPIO3.
S5PV310/S5PC210 has separated GPIO1, GPIO2 and GPIO3.
Signed-off-by: Jongpill Lee <boyko.lee@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
---
arch/arm/mach-s5pv310/cpu.c | 10 ++++++++++
arch/arm/plat-s5p/include/plat/map-s5p.h | 2 ++
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-s5pv310/cpu.c b/arch/arm/mach-s5pv310/cpu.c
index 196c9f1..db4f55a 100644
--- a/arch/arm/mach-s5pv310/cpu.c
+++ b/arch/arm/mach-s5pv310/cpu.c
@@ -45,6 +45,16 @@ static struct map_desc s5pv310_iodesc[] __initdata = {
.pfn = __phys_to_pfn(S5PV310_PA_L2CC),
.length = SZ_4K,
.type = MT_DEVICE,
+ }, {
+ .virtual = (unsigned long)S5P_VA_GPIO2,
+ .pfn = __phys_to_pfn(S5PV310_PA_GPIO2),
+ .length = SZ_4K,
+ .type = MT_DEVICE,
+ }, {
+ .virtual = (unsigned long)S5P_VA_GPIO3,
+ .pfn = __phys_to_pfn(S5PV310_PA_GPIO3),
+ .length = SZ_256K,
+ .type = MT_DEVICE,
},
};
diff --git a/arch/arm/plat-s5p/include/plat/map-s5p.h b/arch/arm/plat-s5p/include/plat/map-s5p.h
index 54e9fb9..bc52595 100644
--- a/arch/arm/plat-s5p/include/plat/map-s5p.h
+++ b/arch/arm/plat-s5p/include/plat/map-s5p.h
@@ -15,6 +15,8 @@
#define S5P_VA_CHIPID S3C_ADDR(0x00700000)
#define S5P_VA_GPIO S3C_ADDR(0x00500000)
+#define S5P_VA_GPIO2 S3C_ADDR(0x00510000)
+#define S5P_VA_GPIO3 S3C_ADDR(0x00520000)
#define S5P_VA_SYSTIMER S3C_ADDR(0x01200000)
#define S5P_VA_SROMC S3C_ADDR(0x01100000)
--
1.6.2.5
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 3/3] ARM: S5PV310: Add support HSMMC on SMDKC210 and SMDKV310
2010-08-20 12:33 [PATCH 0/3] ARM: S5PV310: Add support HSMMC on SMDKC210 and SMDKV310 Kukjin Kim
2010-08-20 12:33 ` [PATCH 1/3] ARM: SAMSUNG: Change the 3rd HSMMC interrupt name for compatibility Kukjin Kim
2010-08-20 12:33 ` [PATCH 2/3] ARM: S5P: Add initial map for GPIO2 and GPIO3 Kukjin Kim
@ 2010-08-20 12:33 ` Kukjin Kim
2010-08-22 2:04 ` Kyungmin Park
2 siblings, 1 reply; 11+ messages in thread
From: Kukjin Kim @ 2010-08-20 12:33 UTC (permalink / raw)
To: linux-arm-kernel
From: Hyuk Lee <hyuk1.lee@samsung.com>
This patch adds support HSMMC on SMDKC210 and SMDKV310, and adds
setup functions for it. S5PV310/S5PC210 can support 4 hsmmc such
as hsmmc0, hsmmc1, hsmmc2 and hsmmc3.
Signed-off-by: Hyuk Lee <hyuk1.lee@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
---
arch/arm/mach-s5pv310/Kconfig | 21 ++++
arch/arm/mach-s5pv310/Makefile | 2 +
arch/arm/mach-s5pv310/cpu.c | 8 ++
arch/arm/mach-s5pv310/mach-smdkc210.c | 50 ++++++++++
arch/arm/mach-s5pv310/mach-smdkv310.c | 50 ++++++++++
arch/arm/mach-s5pv310/setup-sdhci-gpio.c | 141 ++++++++++++++++++++++++++++
arch/arm/mach-s5pv310/setup-sdhci.c | 56 +++++++++++
arch/arm/plat-samsung/include/plat/sdhci.h | 58 +++++++++++
8 files changed, 386 insertions(+), 0 deletions(-)
create mode 100644 arch/arm/mach-s5pv310/setup-sdhci-gpio.c
create mode 100644 arch/arm/mach-s5pv310/setup-sdhci.c
diff --git a/arch/arm/mach-s5pv310/Kconfig b/arch/arm/mach-s5pv310/Kconfig
index 9ac29fe..bebad32 100644
--- a/arch/arm/mach-s5pv310/Kconfig
+++ b/arch/arm/mach-s5pv310/Kconfig
@@ -25,6 +25,17 @@ config S5PV310_SETUP_I2C2
help
Common setup code for i2c bus 2.
+config S5PV310_SETUP_SDHCI
+ bool
+ select S5PV310_SETUP_SDHCI_GPIO
+ help
+ Internal helper functions for S5PV310 based SDHCI systems.
+
+config S5PV310_SETUP_SDHCI_GPIO
+ bool
+ help
+ Common setup code for SDHCI GPIO.
+
# machine support
menu "S5PC210 Machines"
@@ -33,6 +44,11 @@ config MACH_SMDKC210
bool "SMDKC210"
select CPU_S5PV310
select ARCH_SPARSEMEM_ENABLE
+ select S3C_DEV_HSMMC
+ select S3C_DEV_HSMMC1
+ select S3C_DEV_HSMMC2
+ select S3C_DEV_HSMMC3
+ select S5PV310_SETUP_SDHCI
help
Machine support for Samsung SMDKC210
S5PC210(MCP) is one of package option of S5PV310
@@ -53,6 +69,11 @@ config MACH_SMDKV310
bool "SMDKV310"
select CPU_S5PV310
select ARCH_SPARSEMEM_ENABLE
+ select S3C_DEV_HSMMC
+ select S3C_DEV_HSMMC1
+ select S3C_DEV_HSMMC2
+ select S3C_DEV_HSMMC3
+ select S5PV310_SETUP_SDHCI
help
Machine support for Samsung SMDKV310
diff --git a/arch/arm/mach-s5pv310/Makefile b/arch/arm/mach-s5pv310/Makefile
index aefb14f..c89b6b0 100644
--- a/arch/arm/mach-s5pv310/Makefile
+++ b/arch/arm/mach-s5pv310/Makefile
@@ -29,3 +29,5 @@ obj-$(CONFIG_MACH_UNIVERSAL_C210) += mach-universal_c210.o
obj-$(CONFIG_S5PV310_SETUP_I2C1) += setup-i2c1.o
obj-$(CONFIG_S5PV310_SETUP_I2C2) += setup-i2c2.o
+obj-$(CONFIG_S5PV310_SETUP_SDHCI) += setup-sdhci.o
+obj-$(CONFIG_S5PV310_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o
diff --git a/arch/arm/mach-s5pv310/cpu.c b/arch/arm/mach-s5pv310/cpu.c
index db4f55a..3514e87 100644
--- a/arch/arm/mach-s5pv310/cpu.c
+++ b/arch/arm/mach-s5pv310/cpu.c
@@ -19,6 +19,7 @@
#include <plat/cpu.h>
#include <plat/clock.h>
#include <plat/s5pv310.h>
+#include <plat/sdhci.h>
#include <mach/regs-irq.h>
@@ -73,6 +74,13 @@ static void s5pv310_idle(void)
void __init s5pv310_map_io(void)
{
iotable_init(s5pv310_iodesc, ARRAY_SIZE(s5pv310_iodesc));
+
+ /* initialize device information early */
+
+ s5pv310_default_sdhci0();
+ s5pv310_default_sdhci1();
+ s5pv310_default_sdhci2();
+ s5pv310_default_sdhci3();
}
void __init s5pv310_init_clocks(int xtal)
diff --git a/arch/arm/mach-s5pv310/mach-smdkc210.c b/arch/arm/mach-s5pv310/mach-smdkc210.c
index 71a3bec..52c85de 100644
--- a/arch/arm/mach-s5pv310/mach-smdkc210.c
+++ b/arch/arm/mach-s5pv310/mach-smdkc210.c
@@ -9,6 +9,7 @@
*/
#include <linux/serial_core.h>
+#include <linux/gpio.h>
#include <asm/mach/arch.h>
#include <asm/mach-types.h>
@@ -16,7 +17,9 @@
#include <plat/regs-serial.h>
#include <plat/s5pv310.h>
+#include <plat/devs.h>
#include <plat/cpu.h>
+#include <plat/sdhci.h>
#include <mach/map.h>
@@ -65,6 +68,49 @@ static struct s3c2410_uartcfg smdkc210_uartcfgs[] __initdata = {
},
};
+static struct s3c_sdhci_platdata smdkc210_hsmmc0_pdata __initdata = {
+ .max_width = 4,
+ .cd_type = S3C_SDHCI_CD_GPIO,
+ .ext_cd_gpio = S5PV310_GPK0(2),
+ .ext_cd_gpio_invert = 1,
+};
+
+static struct s3c_sdhci_platdata smdkc210_hsmmc1_pdata __initdata = {
+ .max_width = 4,
+ .cd_type = S3C_SDHCI_CD_GPIO,
+ .ext_cd_gpio = S5PV310_GPK0(2),
+ .ext_cd_gpio_invert = 1,
+};
+
+static struct s3c_sdhci_platdata smdkc210_hsmmc2_pdata __initdata = {
+ .max_width = 4,
+ .cd_type = S3C_SDHCI_CD_GPIO,
+ .ext_cd_gpio = S5PV310_GPK2(2),
+ .ext_cd_gpio_invert = 1,
+};
+
+static struct s3c_sdhci_platdata smdkc210_hsmmc3_pdata __initdata = {
+ .max_width = 4,
+ .cd_type = S3C_SDHCI_CD_GPIO,
+ .ext_cd_gpio = S5PV310_GPK2(2),
+ .ext_cd_gpio_invert = 1,
+};
+
+static void smdkc210_setup_sdhci(void)
+{
+ s3c_sdhci0_set_platdata(&smdkc210_hsmmc0_pdata);
+ s3c_sdhci1_set_platdata(&smdkc210_hsmmc1_pdata);
+ s3c_sdhci2_set_platdata(&smdkc210_hsmmc2_pdata);
+ s3c_sdhci3_set_platdata(&smdkc210_hsmmc3_pdata);
+}
+
+static struct platform_device *smdkc210_devices[] __initdata = {
+ &s3c_device_hsmmc0,
+ &s3c_device_hsmmc1,
+ &s3c_device_hsmmc2,
+ &s3c_device_hsmmc3,
+};
+
static void __init smdkc210_map_io(void)
{
s5p_init_io(NULL, 0, S5P_VA_CHIPID);
@@ -77,6 +123,10 @@ static void __init smdkc210_machine_init(void)
#ifdef CONFIG_CACHE_L2X0
l2x0_init(S5P_VA_L2CC, 1 << 28, 0xffffffff);
#endif
+
+ smdkc210_setup_sdhci();
+
+ platform_add_devices(smdkc210_devices, ARRAY_SIZE(smdkc210_devices));
}
MACHINE_START(SMDKC210, "SMDKC210")
diff --git a/arch/arm/mach-s5pv310/mach-smdkv310.c b/arch/arm/mach-s5pv310/mach-smdkv310.c
index 0d6ab77..72f03ae 100644
--- a/arch/arm/mach-s5pv310/mach-smdkv310.c
+++ b/arch/arm/mach-s5pv310/mach-smdkv310.c
@@ -9,6 +9,7 @@
*/
#include <linux/serial_core.h>
+#include <linux/gpio.h>
#include <asm/mach/arch.h>
#include <asm/mach-types.h>
@@ -16,7 +17,9 @@
#include <plat/regs-serial.h>
#include <plat/s5pv310.h>
+#include <plat/devs.h>
#include <plat/cpu.h>
+#include <plat/sdhci.h>
#include <mach/map.h>
@@ -65,6 +68,49 @@ static struct s3c2410_uartcfg smdkv310_uartcfgs[] __initdata = {
},
};
+static struct s3c_sdhci_platdata smdkv310_hsmmc0_pdata __initdata = {
+ .max_width = 4,
+ .cd_type = S3C_SDHCI_CD_GPIO,
+ .ext_cd_gpio = S5PV310_GPK0(2),
+ .ext_cd_gpio_invert = 1,
+};
+
+static struct s3c_sdhci_platdata smdkv310_hsmmc1_pdata __initdata = {
+ .max_width = 4,
+ .cd_type = S3C_SDHCI_CD_GPIO,
+ .ext_cd_gpio = S5PV310_GPK0(2),
+ .ext_cd_gpio_invert = 1,
+};
+
+static struct s3c_sdhci_platdata smdkv310_hsmmc2_pdata __initdata = {
+ .max_width = 4,
+ .cd_type = S3C_SDHCI_CD_GPIO,
+ .ext_cd_gpio = S5PV310_GPK2(2),
+ .ext_cd_gpio_invert = 1,
+};
+
+static struct s3c_sdhci_platdata smdkv310_hsmmc3_pdata __initdata = {
+ .max_width = 4,
+ .cd_type = S3C_SDHCI_CD_GPIO,
+ .ext_cd_gpio = S5PV310_GPK2(2),
+ .ext_cd_gpio_invert = 1,
+};
+
+static void smdkv310_setup_sdhci(void)
+{
+ s3c_sdhci0_set_platdata(&smdkv310_hsmmc0_pdata);
+ s3c_sdhci1_set_platdata(&smdkv310_hsmmc1_pdata);
+ s3c_sdhci2_set_platdata(&smdkv310_hsmmc2_pdata);
+ s3c_sdhci3_set_platdata(&smdkv310_hsmmc3_pdata);
+}
+
+static struct platform_device *smdkv310_devices[] __initdata = {
+ &s3c_device_hsmmc0,
+ &s3c_device_hsmmc1,
+ &s3c_device_hsmmc2,
+ &s3c_device_hsmmc3,
+};
+
static void __init smdkv310_map_io(void)
{
s5p_init_io(NULL, 0, S5P_VA_CHIPID);
@@ -77,6 +123,10 @@ static void __init smdkv310_machine_init(void)
#ifdef CONFIG_CACHE_L2X0
l2x0_init(S5P_VA_L2CC, 1 << 28, 0xffffffff);
#endif
+
+ smdkv310_setup_sdhci();
+
+ platform_add_devices(smdkv310_devices, ARRAY_SIZE(smdkv310_devices));
}
MACHINE_START(SMDKV310, "SMDKV310")
diff --git a/arch/arm/mach-s5pv310/setup-sdhci-gpio.c b/arch/arm/mach-s5pv310/setup-sdhci-gpio.c
new file mode 100644
index 0000000..96332d9
--- /dev/null
+++ b/arch/arm/mach-s5pv310/setup-sdhci-gpio.c
@@ -0,0 +1,141 @@
+/* linux/arch/arm/plat-s5pc1xx/setup-sdhci-gpio.c
+ *
+ * Copyright (c) 2009-2010 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com
+ *
+ * S5PV310 - Helper functions for setting up SDHCI device(s) GPIO (HSMMC)
+ *
+ * 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 <linux/kernel.h>
+#include <linux/types.h>
+#include <linux/interrupt.h>
+#include <linux/platform_device.h>
+#include <linux/io.h>
+#include <linux/gpio.h>
+#include <linux/mmc/host.h>
+#include <linux/mmc/card.h>
+
+#include <mach/map.h>
+
+#include <plat/gpio-cfg.h>
+#include <plat/regs-sdhci.h>
+#include <plat/sdhci.h>
+
+#define S5PV310_GPK0DRV (S5P_VA_GPIO2 + 0x4C)
+#define S5PV310_GPK1DRV (S5P_VA_GPIO2 + 0x6C)
+#define S5PV310_GPK2DRV (S5P_VA_GPIO2 + 0x8C)
+#define S5PV310_GPK3DRV (S5P_VA_GPIO2 + 0xAC)
+
+void s5pv310_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
+{
+ unsigned int gpio;
+
+ /* Set all the necessary GPK0[0:1] pins to special-function 2 */
+ for (gpio = S5PV310_GPK0(0); gpio < S5PV310_GPK0(2); gpio++) {
+ s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
+ s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
+ }
+
+ switch (width) {
+ case 8:
+ /* GPK1[3:6] special-funtion 3 */
+ for (gpio = S5PV310_GPK1(3); gpio <= S5PV310_GPK1(6); gpio++) {
+ s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(3));
+ s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
+ s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP);
+ }
+ __raw_writel(0x3FC0, S5PV310_GPK1DRV);
+ case 4:
+ /* GPK0[3:6] special-funtion 2 */
+ for (gpio = S5PV310_GPK0(3); gpio <= S5PV310_GPK0(6); gpio++) {
+ s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
+ s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP);
+ }
+ __raw_writel(0x3FFF, S5PV310_GPK0DRV);
+ default:
+ break;
+ }
+
+ s3c_gpio_setpull(S5PV310_GPK0(2), S3C_GPIO_PULL_UP);
+ s3c_gpio_cfgpin(S5PV310_GPK0(2), S3C_GPIO_SFN(2));
+}
+
+void s5pv310_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width)
+{
+ unsigned int gpio;
+
+ /* Set all the necessary GPK1[0:1] pins to special-function 2 */
+ for (gpio = S5PV310_GPK1(0); gpio < S5PV310_GPK1(2); gpio++) {
+ s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
+ s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
+ }
+
+ /* Data pin GPK1[3:6] to special-function 2 */
+ for (gpio = S5PV310_GPK1(3); gpio <= S5PV310_GPK1(6); gpio++) {
+ s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
+ s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
+ s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP);
+ }
+ __raw_writel(0x3FFF, S5PV310_GPK1DRV);
+
+ s3c_gpio_setpull(S5PV310_GPK1(2), S3C_GPIO_PULL_UP);
+ s3c_gpio_cfgpin(S5PV310_GPK1(2), S3C_GPIO_SFN(2));
+}
+
+void s5pv310_setup_sdhci2_cfg_gpio(struct platform_device *dev, int width)
+{
+ unsigned int gpio;
+
+ /* Set all the necessary GPK2[0:1] pins to special-function 2 */
+ for (gpio = S5PV310_GPK2(0); gpio < S5PV310_GPK2(2); gpio++) {
+ s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
+ s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
+ }
+
+ switch (width) {
+ case 8:
+ /* Data pin GPK3[3:6] to special-function 3 */
+ for (gpio = S5PV310_GPK3(3); gpio <= S5PV310_GPK3(6); gpio++) {
+ s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(3));
+ s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP);
+ }
+ __raw_writel(0x3FC0, S5PV310_GPK3DRV);
+ case 4:
+ /* Data pin GPK2[3:6] to special-function 2 */
+ for (gpio = S5PV310_GPK2(3); gpio <= S5PV310_GPK2(6); gpio++) {
+ s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
+ s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP);
+ }
+ __raw_writel(0x3FFF, S5PV310_GPK2DRV);
+ default:
+ break;
+ }
+
+ s3c_gpio_setpull(S5PV310_GPK2(2), S3C_GPIO_PULL_UP);
+ s3c_gpio_cfgpin(S5PV310_GPK2(2), S3C_GPIO_SFN(2));
+}
+
+void s5pv310_setup_sdhci3_cfg_gpio(struct platform_device *dev, int width)
+{
+ unsigned int gpio;
+
+ /* Set all the necessary GPK3[0:1] pins to special-function 2 */
+ for (gpio = S5PV310_GPK3(0); gpio < S5PV310_GPK3(2); gpio++) {
+ s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
+ s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
+ }
+
+ /* Data pin GPK3[3:6] to special-function 2 */
+ for (gpio = S5PV310_GPK3(3); gpio <= S5PV310_GPK3(6); gpio++) {
+ s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
+ s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP);
+ }
+ __raw_writel(0x3FFF, S5PV310_GPK3DRV);
+
+ s3c_gpio_setpull(S5PV310_GPK3(2), S3C_GPIO_PULL_UP);
+ s3c_gpio_cfgpin(S5PV310_GPK3(2), S3C_GPIO_SFN(2));
+}
diff --git a/arch/arm/mach-s5pv310/setup-sdhci.c b/arch/arm/mach-s5pv310/setup-sdhci.c
new file mode 100644
index 0000000..f7750ca
--- /dev/null
+++ b/arch/arm/mach-s5pv310/setup-sdhci.c
@@ -0,0 +1,56 @@
+/* linux/arch/arm/mach-s5pv310/setup-sdhci.c
+ *
+ * Copyright (c) 2009-2010 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com
+ *
+ * S5PV310 - Helper functions for settign up SDHCI device(s) (HSMMC)
+ *
+ * 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 <linux/kernel.h>
+#include <linux/types.h>
+#include <linux/interrupt.h>
+#include <linux/platform_device.h>
+#include <linux/io.h>
+
+#include <linux/mmc/card.h>
+#include <linux/mmc/host.h>
+
+#include <plat/regs-sdhci.h>
+#include <plat/sdhci.h>
+
+/* clock sources for the mmc bus clock, order as for the ctrl2[5..4] */
+
+char *s5pv310_hsmmc_clksrcs[4] = {
+ [2] = "sclk_mmc", /* mmc_bus */
+};
+
+void s5pv310_setup_sdhci_cfg_card(struct platform_device *dev, void __iomem *r,
+ struct mmc_ios *ios, struct mmc_card *card)
+{
+ u32 ctrl2, ctrl3;
+
+ /* don't need to alter anything acording to card-type */
+
+ ctrl2 = __raw_readl(r + S3C_SDHCI_CONTROL2);
+ ctrl2 &= S3C_SDHCI_CTRL2_SELBASECLK_MASK;
+ ctrl2 |= (S3C64XX_SDHCI_CTRL2_ENSTAASYNCCLR |
+ S3C64XX_SDHCI_CTRL2_ENCMDCNFMSK |
+ S3C_SDHCI_CTRL2_ENFBCLKRX |
+ S3C_SDHCI_CTRL2_DFCNT_NONE |
+ S3C_SDHCI_CTRL2_ENCLKOUTHOLD);
+
+ if (ios->clock < 25 * 1000000)
+ ctrl3 = (S3C_SDHCI_CTRL3_FCSEL3 |
+ S3C_SDHCI_CTRL3_FCSEL2 |
+ S3C_SDHCI_CTRL3_FCSEL1 |
+ S3C_SDHCI_CTRL3_FCSEL0);
+ else
+ ctrl3 = (S3C_SDHCI_CTRL3_FCSEL1 | S3C_SDHCI_CTRL3_FCSEL0);
+
+ __raw_writel(ctrl2, r + S3C_SDHCI_CONTROL2);
+ __raw_writel(ctrl3, r + S3C_SDHCI_CONTROL3);
+}
diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h b/arch/arm/plat-samsung/include/plat/sdhci.h
index 30844c2..a804733 100644
--- a/arch/arm/plat-samsung/include/plat/sdhci.h
+++ b/arch/arm/plat-samsung/include/plat/sdhci.h
@@ -110,6 +110,10 @@ extern void s5pv210_setup_sdhci0_cfg_gpio(struct platform_device *, int w);
extern void s5pv210_setup_sdhci1_cfg_gpio(struct platform_device *, int w);
extern void s5pv210_setup_sdhci2_cfg_gpio(struct platform_device *, int w);
extern void s5pv210_setup_sdhci3_cfg_gpio(struct platform_device *, int w);
+extern void s5pv310_setup_sdhci0_cfg_gpio(struct platform_device *, int w);
+extern void s5pv310_setup_sdhci1_cfg_gpio(struct platform_device *, int w);
+extern void s5pv310_setup_sdhci2_cfg_gpio(struct platform_device *, int w);
+extern void s5pv310_setup_sdhci3_cfg_gpio(struct platform_device *, int w);
/* S3C64XX SDHCI setup */
@@ -288,4 +292,58 @@ static inline void s5pv210_default_sdhci3(void) { }
#endif /* CONFIG_S5PV210_SETUP_SDHCI */
+/* S5PV310 SDHCI setup */
+
+#ifdef CONFIG_S5PV310_SETUP_SDHCI
+extern char *s5pv310_hsmmc_clksrcs[4];
+
+extern void s5pv310_setup_sdhci_cfg_card(struct platform_device *dev,
+ void __iomem *r,
+ struct mmc_ios *ios,
+ struct mmc_card *card);
+
+static inline void s5pv310_default_sdhci0(void)
+{
+#ifdef CONFIG_S3C_DEV_HSMMC
+ s3c_hsmmc0_def_platdata.clocks = s5pv310_hsmmc_clksrcs;
+ s3c_hsmmc0_def_platdata.cfg_gpio = s5pv310_setup_sdhci0_cfg_gpio;
+ s3c_hsmmc0_def_platdata.cfg_card = s5pv310_setup_sdhci_cfg_card;
+#endif
+}
+
+static inline void s5pv310_default_sdhci1(void)
+{
+#ifdef CONFIG_S3C_DEV_HSMMC1
+ s3c_hsmmc1_def_platdata.clocks = s5pv310_hsmmc_clksrcs;
+ s3c_hsmmc1_def_platdata.cfg_gpio = s5pv310_setup_sdhci1_cfg_gpio;
+ s3c_hsmmc1_def_platdata.cfg_card = s5pv310_setup_sdhci_cfg_card;
+#endif
+}
+
+static inline void s5pv310_default_sdhci2(void)
+{
+#ifdef CONFIG_S3C_DEV_HSMMC2
+ s3c_hsmmc2_def_platdata.clocks = s5pv310_hsmmc_clksrcs;
+ s3c_hsmmc2_def_platdata.cfg_gpio = s5pv310_setup_sdhci2_cfg_gpio;
+ s3c_hsmmc2_def_platdata.cfg_card = s5pv310_setup_sdhci_cfg_card;
+#endif
+}
+
+static inline void s5pv310_default_sdhci3(void)
+{
+#ifdef CONFIG_S3C_DEV_HSMMC3
+ s3c_hsmmc3_def_platdata.clocks = s5pv310_hsmmc_clksrcs;
+ s3c_hsmmc3_def_platdata.cfg_gpio = s5pv310_setup_sdhci3_cfg_gpio;
+ s3c_hsmmc3_def_platdata.cfg_card = s5pv310_setup_sdhci_cfg_card;
+#endif
+}
+
+#else
+static inline void s5pv310_default_sdhci0(void) { }
+static inline void s5pv310_default_sdhci1(void) { }
+static inline void s5pv310_default_sdhci2(void) { }
+static inline void s5pv310_default_sdhci3(void) { }
+
+#endif /* CONFIG_S5PV310_SETUP_SDHCI */
+
#endif /* __PLAT_S3C_SDHCI_H */
--
1.6.2.5
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 3/3] ARM: S5PV310: Add support HSMMC on SMDKC210 and SMDKV310
2010-08-20 12:33 ` [PATCH 3/3] ARM: S5PV310: Add support HSMMC on SMDKC210 and SMDKV310 Kukjin Kim
@ 2010-08-22 2:04 ` Kyungmin Park
0 siblings, 0 replies; 11+ messages in thread
From: Kyungmin Park @ 2010-08-22 2:04 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Aug 20, 2010 at 9:33 PM, Kukjin Kim <kgene.kim@samsung.com> wrote:
> From: Hyuk Lee <hyuk1.lee@samsung.com>
>
> This patch adds support HSMMC on SMDKC210 and SMDKV310, and adds
> setup functions for it. S5PV310/S5PC210 can support 4 hsmmc such
> as hsmmc0, hsmmc1, hsmmc2 and hsmmc3.
>
> Signed-off-by: Hyuk Lee <hyuk1.lee@samsung.com>
> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
> ---
> ?arch/arm/mach-s5pv310/Kconfig ? ? ? ? ? ? ?| ? 21 ++++
> ?arch/arm/mach-s5pv310/Makefile ? ? ? ? ? ? | ? ?2 +
> ?arch/arm/mach-s5pv310/cpu.c ? ? ? ? ? ? ? ?| ? ?8 ++
> ?arch/arm/mach-s5pv310/mach-smdkc210.c ? ? ?| ? 50 ++++++++++
> ?arch/arm/mach-s5pv310/mach-smdkv310.c ? ? ?| ? 50 ++++++++++
> ?arch/arm/mach-s5pv310/setup-sdhci-gpio.c ? | ?141 ++++++++++++++++++++++++++++
> ?arch/arm/mach-s5pv310/setup-sdhci.c ? ? ? ?| ? 56 +++++++++++
> ?arch/arm/plat-samsung/include/plat/sdhci.h | ? 58 +++++++++++
> ?8 files changed, 386 insertions(+), 0 deletions(-)
> ?create mode 100644 arch/arm/mach-s5pv310/setup-sdhci-gpio.c
> ?create mode 100644 arch/arm/mach-s5pv310/setup-sdhci.c
>
> diff --git a/arch/arm/mach-s5pv310/Kconfig b/arch/arm/mach-s5pv310/Kconfig
> index 9ac29fe..bebad32 100644
> --- a/arch/arm/mach-s5pv310/Kconfig
> +++ b/arch/arm/mach-s5pv310/Kconfig
> @@ -25,6 +25,17 @@ config S5PV310_SETUP_I2C2
> ? ? ? ?help
> ? ? ? ? ?Common setup code for i2c bus 2.
>
> +config S5PV310_SETUP_SDHCI
> + ? ? ? bool
> + ? ? ? select S5PV310_SETUP_SDHCI_GPIO
> + ? ? ? help
> + ? ? ? ? Internal helper functions for S5PV310 based SDHCI systems.
> +
> +config S5PV310_SETUP_SDHCI_GPIO
> + ? ? ? bool
> + ? ? ? help
> + ? ? ? ? Common setup code for SDHCI GPIO.
> +
> ?# machine support
>
> ?menu "S5PC210 Machines"
> @@ -33,6 +44,11 @@ config MACH_SMDKC210
> ? ? ? ?bool "SMDKC210"
> ? ? ? ?select CPU_S5PV310
> ? ? ? ?select ARCH_SPARSEMEM_ENABLE
> + ? ? ? select S3C_DEV_HSMMC
> + ? ? ? select S3C_DEV_HSMMC1
> + ? ? ? select S3C_DEV_HSMMC2
> + ? ? ? select S3C_DEV_HSMMC3
> + ? ? ? select S5PV310_SETUP_SDHCI
> ? ? ? ?help
> ? ? ? ? ?Machine support for Samsung SMDKC210
> ? ? ? ? ?S5PC210(MCP) is one of package option of S5PV310
> @@ -53,6 +69,11 @@ config MACH_SMDKV310
> ? ? ? ?bool "SMDKV310"
> ? ? ? ?select CPU_S5PV310
> ? ? ? ?select ARCH_SPARSEMEM_ENABLE
> + ? ? ? select S3C_DEV_HSMMC
> + ? ? ? select S3C_DEV_HSMMC1
> + ? ? ? select S3C_DEV_HSMMC2
> + ? ? ? select S3C_DEV_HSMMC3
> + ? ? ? select S5PV310_SETUP_SDHCI
> ? ? ? ?help
> ? ? ? ? ?Machine support for Samsung SMDKV310
>
> diff --git a/arch/arm/mach-s5pv310/Makefile b/arch/arm/mach-s5pv310/Makefile
> index aefb14f..c89b6b0 100644
> --- a/arch/arm/mach-s5pv310/Makefile
> +++ b/arch/arm/mach-s5pv310/Makefile
> @@ -29,3 +29,5 @@ obj-$(CONFIG_MACH_UNIVERSAL_C210) ? ? += mach-universal_c210.o
>
> ?obj-$(CONFIG_S5PV310_SETUP_I2C1) ? ? ? += setup-i2c1.o
> ?obj-$(CONFIG_S5PV310_SETUP_I2C2) ? ? ? += setup-i2c2.o
> +obj-$(CONFIG_S5PV310_SETUP_SDHCI) ? ? ?+= setup-sdhci.o
> +obj-$(CONFIG_S5PV310_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o
> diff --git a/arch/arm/mach-s5pv310/cpu.c b/arch/arm/mach-s5pv310/cpu.c
> index db4f55a..3514e87 100644
> --- a/arch/arm/mach-s5pv310/cpu.c
> +++ b/arch/arm/mach-s5pv310/cpu.c
> @@ -19,6 +19,7 @@
> ?#include <plat/cpu.h>
> ?#include <plat/clock.h>
> ?#include <plat/s5pv310.h>
> +#include <plat/sdhci.h>
>
> ?#include <mach/regs-irq.h>
>
> @@ -73,6 +74,13 @@ static void s5pv310_idle(void)
> ?void __init s5pv310_map_io(void)
> ?{
> ? ? ? ?iotable_init(s5pv310_iodesc, ARRAY_SIZE(s5pv310_iodesc));
> +
> + ? ? ? /* initialize device information early */
> +
> + ? ? ? s5pv310_default_sdhci0();
> + ? ? ? s5pv310_default_sdhci1();
> + ? ? ? s5pv310_default_sdhci2();
> + ? ? ? s5pv310_default_sdhci3();
> ?}
>
> ?void __init s5pv310_init_clocks(int xtal)
> diff --git a/arch/arm/mach-s5pv310/mach-smdkc210.c b/arch/arm/mach-s5pv310/mach-smdkc210.c
> index 71a3bec..52c85de 100644
> --- a/arch/arm/mach-s5pv310/mach-smdkc210.c
> +++ b/arch/arm/mach-s5pv310/mach-smdkc210.c
> @@ -9,6 +9,7 @@
> ?*/
>
> ?#include <linux/serial_core.h>
> +#include <linux/gpio.h>
>
> ?#include <asm/mach/arch.h>
> ?#include <asm/mach-types.h>
> @@ -16,7 +17,9 @@
>
> ?#include <plat/regs-serial.h>
> ?#include <plat/s5pv310.h>
> +#include <plat/devs.h>
> ?#include <plat/cpu.h>
> +#include <plat/sdhci.h>
>
> ?#include <mach/map.h>
>
> @@ -65,6 +68,49 @@ static struct s3c2410_uartcfg smdkc210_uartcfgs[] __initdata = {
> ? ? ? ?},
> ?};
>
> +static struct s3c_sdhci_platdata smdkc210_hsmmc0_pdata __initdata = {
> + ? ? ? .max_width ? ? ? ? ? ? ?= 4,
> + ? ? ? .cd_type ? ? ? ? ? ? ? ?= S3C_SDHCI_CD_GPIO,
> + ? ? ? .ext_cd_gpio ? ? ? ? ? ?= S5PV310_GPK0(2),
> + ? ? ? .ext_cd_gpio_invert ? ? = 1,
> +};
> +
> +static struct s3c_sdhci_platdata smdkc210_hsmmc1_pdata __initdata = {
> + ? ? ? .max_width ? ? ? ? ? ? ?= 4,
> + ? ? ? .cd_type ? ? ? ? ? ? ? ?= S3C_SDHCI_CD_GPIO,
> + ? ? ? .ext_cd_gpio ? ? ? ? ? ?= S5PV310_GPK0(2),
> + ? ? ? .ext_cd_gpio_invert ? ? = 1,
> +};
> +
> +static struct s3c_sdhci_platdata smdkc210_hsmmc2_pdata __initdata = {
> + ? ? ? .max_width ? ? ? ? ? ? ?= 4,
> + ? ? ? .cd_type ? ? ? ? ? ? ? ?= S3C_SDHCI_CD_GPIO,
> + ? ? ? .ext_cd_gpio ? ? ? ? ? ?= S5PV310_GPK2(2),
> + ? ? ? .ext_cd_gpio_invert ? ? = 1,
> +};
> +
> +static struct s3c_sdhci_platdata smdkc210_hsmmc3_pdata __initdata = {
> + ? ? ? .max_width ? ? ? ? ? ? ?= 4,
> + ? ? ? .cd_type ? ? ? ? ? ? ? ?= S3C_SDHCI_CD_GPIO,
> + ? ? ? .ext_cd_gpio ? ? ? ? ? ?= S5PV310_GPK2(2),
> + ? ? ? .ext_cd_gpio_invert ? ? = 1,
> +};
> +
> +static void smdkc210_setup_sdhci(void)
> +{
> + ? ? ? s3c_sdhci0_set_platdata(&smdkc210_hsmmc0_pdata);
> + ? ? ? s3c_sdhci1_set_platdata(&smdkc210_hsmmc1_pdata);
> + ? ? ? s3c_sdhci2_set_platdata(&smdkc210_hsmmc2_pdata);
> + ? ? ? s3c_sdhci3_set_platdata(&smdkc210_hsmmc3_pdata);
> +}
> +
> +static struct platform_device *smdkc210_devices[] __initdata = {
> + ? ? ? &s3c_device_hsmmc0,
> + ? ? ? &s3c_device_hsmmc1,
> + ? ? ? &s3c_device_hsmmc2,
> + ? ? ? &s3c_device_hsmmc3,
> +};
> +
> ?static void __init smdkc210_map_io(void)
> ?{
> ? ? ? ?s5p_init_io(NULL, 0, S5P_VA_CHIPID);
> @@ -77,6 +123,10 @@ static void __init smdkc210_machine_init(void)
> ?#ifdef CONFIG_CACHE_L2X0
> ? ? ? ?l2x0_init(S5P_VA_L2CC, 1 << 28, 0xffffffff);
> ?#endif
> +
> + ? ? ? smdkc210_setup_sdhci();
> +
> + ? ? ? platform_add_devices(smdkc210_devices, ARRAY_SIZE(smdkc210_devices));
> ?}
>
> ?MACHINE_START(SMDKC210, "SMDKC210")
> diff --git a/arch/arm/mach-s5pv310/mach-smdkv310.c b/arch/arm/mach-s5pv310/mach-smdkv310.c
> index 0d6ab77..72f03ae 100644
> --- a/arch/arm/mach-s5pv310/mach-smdkv310.c
> +++ b/arch/arm/mach-s5pv310/mach-smdkv310.c
> @@ -9,6 +9,7 @@
> ?*/
>
> ?#include <linux/serial_core.h>
> +#include <linux/gpio.h>
>
> ?#include <asm/mach/arch.h>
> ?#include <asm/mach-types.h>
> @@ -16,7 +17,9 @@
>
> ?#include <plat/regs-serial.h>
> ?#include <plat/s5pv310.h>
> +#include <plat/devs.h>
> ?#include <plat/cpu.h>
> +#include <plat/sdhci.h>
>
> ?#include <mach/map.h>
>
> @@ -65,6 +68,49 @@ static struct s3c2410_uartcfg smdkv310_uartcfgs[] __initdata = {
> ? ? ? ?},
> ?};
>
> +static struct s3c_sdhci_platdata smdkv310_hsmmc0_pdata __initdata = {
> + ? ? ? .max_width ? ? ? ? ? ? ?= 4,
> + ? ? ? .cd_type ? ? ? ? ? ? ? ?= S3C_SDHCI_CD_GPIO,
> + ? ? ? .ext_cd_gpio ? ? ? ? ? ?= S5PV310_GPK0(2),
> + ? ? ? .ext_cd_gpio_invert ? ? = 1,
> +};
> +
> +static struct s3c_sdhci_platdata smdkv310_hsmmc1_pdata __initdata = {
> + ? ? ? .max_width ? ? ? ? ? ? ?= 4,
> + ? ? ? .cd_type ? ? ? ? ? ? ? ?= S3C_SDHCI_CD_GPIO,
> + ? ? ? .ext_cd_gpio ? ? ? ? ? ?= S5PV310_GPK0(2),
> + ? ? ? .ext_cd_gpio_invert ? ? = 1,
> +};
> +
> +static struct s3c_sdhci_platdata smdkv310_hsmmc2_pdata __initdata = {
> + ? ? ? .max_width ? ? ? ? ? ? ?= 4,
> + ? ? ? .cd_type ? ? ? ? ? ? ? ?= S3C_SDHCI_CD_GPIO,
> + ? ? ? .ext_cd_gpio ? ? ? ? ? ?= S5PV310_GPK2(2),
> + ? ? ? .ext_cd_gpio_invert ? ? = 1,
> +};
> +
> +static struct s3c_sdhci_platdata smdkv310_hsmmc3_pdata __initdata = {
> + ? ? ? .max_width ? ? ? ? ? ? ?= 4,
> + ? ? ? .cd_type ? ? ? ? ? ? ? ?= S3C_SDHCI_CD_GPIO,
> + ? ? ? .ext_cd_gpio ? ? ? ? ? ?= S5PV310_GPK2(2),
> + ? ? ? .ext_cd_gpio_invert ? ? = 1,
> +};
> +
> +static void smdkv310_setup_sdhci(void)
> +{
> + ? ? ? s3c_sdhci0_set_platdata(&smdkv310_hsmmc0_pdata);
> + ? ? ? s3c_sdhci1_set_platdata(&smdkv310_hsmmc1_pdata);
> + ? ? ? s3c_sdhci2_set_platdata(&smdkv310_hsmmc2_pdata);
> + ? ? ? s3c_sdhci3_set_platdata(&smdkv310_hsmmc3_pdata);
> +}
> +
> +static struct platform_device *smdkv310_devices[] __initdata = {
> + ? ? ? &s3c_device_hsmmc0,
> + ? ? ? &s3c_device_hsmmc1,
> + ? ? ? &s3c_device_hsmmc2,
> + ? ? ? &s3c_device_hsmmc3,
> +};
> +
> ?static void __init smdkv310_map_io(void)
> ?{
> ? ? ? ?s5p_init_io(NULL, 0, S5P_VA_CHIPID);
> @@ -77,6 +123,10 @@ static void __init smdkv310_machine_init(void)
> ?#ifdef CONFIG_CACHE_L2X0
> ? ? ? ?l2x0_init(S5P_VA_L2CC, 1 << 28, 0xffffffff);
> ?#endif
> +
> + ? ? ? smdkv310_setup_sdhci();
> +
> + ? ? ? platform_add_devices(smdkv310_devices, ARRAY_SIZE(smdkv310_devices));
> ?}
>
> ?MACHINE_START(SMDKV310, "SMDKV310")
> diff --git a/arch/arm/mach-s5pv310/setup-sdhci-gpio.c b/arch/arm/mach-s5pv310/setup-sdhci-gpio.c
> new file mode 100644
> index 0000000..96332d9
> --- /dev/null
> +++ b/arch/arm/mach-s5pv310/setup-sdhci-gpio.c
> @@ -0,0 +1,141 @@
> +/* linux/arch/arm/plat-s5pc1xx/setup-sdhci-gpio.c
> + *
> + * Copyright (c) 2009-2010 Samsung Electronics Co., Ltd.
> + * ? ? ? ? ? ? http://www.samsung.com
> + *
> + * S5PV310 - Helper functions for setting up SDHCI device(s) GPIO (HSMMC)
> + *
> + * 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 <linux/kernel.h>
> +#include <linux/types.h>
> +#include <linux/interrupt.h>
> +#include <linux/platform_device.h>
> +#include <linux/io.h>
> +#include <linux/gpio.h>
> +#include <linux/mmc/host.h>
> +#include <linux/mmc/card.h>
> +
> +#include <mach/map.h>
> +
> +#include <plat/gpio-cfg.h>
> +#include <plat/regs-sdhci.h>
> +#include <plat/sdhci.h>
> +
> +#define S5PV310_GPK0DRV ? ? ? ? ? ? ? ?(S5P_VA_GPIO2 + 0x4C)
> +#define S5PV310_GPK1DRV ? ? ? ? ? ? ? ?(S5P_VA_GPIO2 + 0x6C)
> +#define S5PV310_GPK2DRV ? ? ? ? ? ? ? ?(S5P_VA_GPIO2 + 0x8C)
> +#define S5PV310_GPK3DRV ? ? ? ? ? ? ? ?(S5P_VA_GPIO2 + 0xAC)
As I know there are the driver strength function. please use it.
Related with VA_GPIOx I will comment it at different patch.
> +
> +void s5pv310_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
> +{
> + ? ? ? unsigned int gpio;
> +
> + ? ? ? /* Set all the necessary GPK0[0:1] pins to special-function 2 */
> + ? ? ? for (gpio = S5PV310_GPK0(0); gpio < S5PV310_GPK0(2); gpio++) {
> + ? ? ? ? ? ? ? s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
> + ? ? ? ? ? ? ? s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
> + ? ? ? }
> +
> + ? ? ? switch (width) {
> + ? ? ? case 8:
> + ? ? ? ? ? ? ? /* GPK1[3:6] special-funtion 3 */
> + ? ? ? ? ? ? ? for (gpio = S5PV310_GPK1(3); gpio <= S5PV310_GPK1(6); gpio++) {
> + ? ? ? ? ? ? ? ? ? ? ? s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(3));
> + ? ? ? ? ? ? ? ? ? ? ? s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
> + ? ? ? ? ? ? ? ? ? ? ? s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP);
> + ? ? ? ? ? ? ? }
> + ? ? ? ? ? ? ? __raw_writel(0x3FC0, S5PV310_GPK1DRV);
Related with HSMMC, Anndrew and Ben want to know which functionality
support exactly at s5p series.
E.g., Why SDCLK is required. you can find these at mmc mailing list. I
also want to know why these driver strength is required.
> + ? ? ? case 4:
> + ? ? ? ? ? ? ? /* GPK0[3:6] special-funtion 2 */
> + ? ? ? ? ? ? ? for (gpio = S5PV310_GPK0(3); gpio <= S5PV310_GPK0(6); gpio++) {
> + ? ? ? ? ? ? ? ? ? ? ? s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
> + ? ? ? ? ? ? ? ? ? ? ? s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP);
> + ? ? ? ? ? ? ? }
> + ? ? ? ? ? ? ? __raw_writel(0x3FFF, S5PV310_GPK0DRV);
> + ? ? ? default:
> + ? ? ? ? ? ? ? break;
> + ? ? ? }
> +
Only set the CDn when internal only used
> + ? ? ? s3c_gpio_setpull(S5PV310_GPK0(2), S3C_GPIO_PULL_UP);
> + ? ? ? s3c_gpio_cfgpin(S5PV310_GPK0(2), S3C_GPIO_SFN(2));
> +}
> +
> +void s5pv310_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width)
> +{
> + ? ? ? unsigned int gpio;
> +
> + ? ? ? /* Set all the necessary GPK1[0:1] pins to special-function 2 */
> + ? ? ? for (gpio = S5PV310_GPK1(0); gpio < S5PV310_GPK1(2); gpio++) {
> + ? ? ? ? ? ? ? s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
> + ? ? ? ? ? ? ? s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
> + ? ? ? }
> +
> + ? ? ? /* Data pin GPK1[3:6] to special-function 2 */
> + ? ? ? for (gpio = S5PV310_GPK1(3); gpio <= S5PV310_GPK1(6); gpio++) {
> + ? ? ? ? ? ? ? s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
> + ? ? ? ? ? ? ? s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
> + ? ? ? ? ? ? ? s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP);
> + ? ? ? }
> + ? ? ? __raw_writel(0x3FFF, S5PV310_GPK1DRV);
> +
> + ? ? ? s3c_gpio_setpull(S5PV310_GPK1(2), S3C_GPIO_PULL_UP);
> + ? ? ? s3c_gpio_cfgpin(S5PV310_GPK1(2), S3C_GPIO_SFN(2));
ditto
> +}
> +
> +void s5pv310_setup_sdhci2_cfg_gpio(struct platform_device *dev, int width)
> +{
> + ? ? ? unsigned int gpio;
> +
> + ? ? ? /* Set all the necessary GPK2[0:1] pins to special-function 2 */
> + ? ? ? for (gpio = S5PV310_GPK2(0); gpio < S5PV310_GPK2(2); gpio++) {
> + ? ? ? ? ? ? ? s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
> + ? ? ? ? ? ? ? s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
> + ? ? ? }
> +
> + ? ? ? switch (width) {
> + ? ? ? case 8:
> + ? ? ? ? ? ? ? /* Data pin GPK3[3:6] to special-function 3 */
> + ? ? ? ? ? ? ? for (gpio = S5PV310_GPK3(3); gpio <= S5PV310_GPK3(6); gpio++) {
> + ? ? ? ? ? ? ? ? ? ? ? s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(3));
> + ? ? ? ? ? ? ? ? ? ? ? s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP);
> + ? ? ? ? ? ? ? }
> + ? ? ? ? ? ? ? __raw_writel(0x3FC0, S5PV310_GPK3DRV);
> + ? ? ? case 4:
> + ? ? ? ? ? ? ? /* Data pin GPK2[3:6] to special-function 2 */
> + ? ? ? ? ? ? ? for (gpio = S5PV310_GPK2(3); gpio <= S5PV310_GPK2(6); gpio++) {
> + ? ? ? ? ? ? ? ? ? ? ? s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
> + ? ? ? ? ? ? ? ? ? ? ? s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP);
> + ? ? ? ? ? ? ? }
> + ? ? ? ? ? ? ? __raw_writel(0x3FFF, S5PV310_GPK2DRV);
> + ? ? ? default:
> + ? ? ? ? ? ? ? break;
> + ? ? ? }
> +
> + ? ? ? s3c_gpio_setpull(S5PV310_GPK2(2), S3C_GPIO_PULL_UP);
> + ? ? ? s3c_gpio_cfgpin(S5PV310_GPK2(2), S3C_GPIO_SFN(2));
ditto
> +}
> +
> +void s5pv310_setup_sdhci3_cfg_gpio(struct platform_device *dev, int width)
> +{
> + ? ? ? unsigned int gpio;
> +
> + ? ? ? /* Set all the necessary GPK3[0:1] pins to special-function 2 */
> + ? ? ? for (gpio = S5PV310_GPK3(0); gpio < S5PV310_GPK3(2); gpio++) {
> + ? ? ? ? ? ? ? s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
> + ? ? ? ? ? ? ? s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
> + ? ? ? }
> +
> + ? ? ? /* Data pin GPK3[3:6] to special-function 2 */
> + ? ? ? for (gpio = S5PV310_GPK3(3); gpio <= S5PV310_GPK3(6); gpio++) {
> + ? ? ? ? ? ? ? s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
> + ? ? ? ? ? ? ? s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP);
> + ? ? ? }
> + ? ? ? __raw_writel(0x3FFF, S5PV310_GPK3DRV);
> +
> + ? ? ? s3c_gpio_setpull(S5PV310_GPK3(2), S3C_GPIO_PULL_UP);
> + ? ? ? s3c_gpio_cfgpin(S5PV310_GPK3(2), S3C_GPIO_SFN(2));
ditto
> +}
> diff --git a/arch/arm/mach-s5pv310/setup-sdhci.c b/arch/arm/mach-s5pv310/setup-sdhci.c
> new file mode 100644
> index 0000000..f7750ca
> --- /dev/null
> +++ b/arch/arm/mach-s5pv310/setup-sdhci.c
> @@ -0,0 +1,56 @@
> +/* linux/arch/arm/mach-s5pv310/setup-sdhci.c
> + *
> + * Copyright (c) 2009-2010 Samsung Electronics Co., Ltd.
> + * ? ? ? ? ? ? http://www.samsung.com
> + *
> + * S5PV310 - Helper functions for settign up SDHCI device(s) (HSMMC)
> + *
> + * 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 <linux/kernel.h>
> +#include <linux/types.h>
> +#include <linux/interrupt.h>
> +#include <linux/platform_device.h>
> +#include <linux/io.h>
> +
> +#include <linux/mmc/card.h>
> +#include <linux/mmc/host.h>
> +
> +#include <plat/regs-sdhci.h>
> +#include <plat/sdhci.h>
> +
> +/* clock sources for the mmc bus clock, order as for the ctrl2[5..4] */
> +
> +char *s5pv310_hsmmc_clksrcs[4] = {
> + ? ? ? [2] = "sclk_mmc", ? ? ? /* mmc_bus */
> +};
> +
> +void s5pv310_setup_sdhci_cfg_card(struct platform_device *dev, void __iomem *r,
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? struct mmc_ios *ios, struct mmc_card *card)
> +{
> + ? ? ? u32 ctrl2, ctrl3;
> +
> + ? ? ? /* don't need to alter anything acording to card-type */
> +
> + ? ? ? ctrl2 = __raw_readl(r + S3C_SDHCI_CONTROL2);
> + ? ? ? ctrl2 &= S3C_SDHCI_CTRL2_SELBASECLK_MASK;
> + ? ? ? ctrl2 |= (S3C64XX_SDHCI_CTRL2_ENSTAASYNCCLR |
> + ? ? ? ? ? ? ? ? S3C64XX_SDHCI_CTRL2_ENCMDCNFMSK |
> + ? ? ? ? ? ? ? ? S3C_SDHCI_CTRL2_ENFBCLKRX |
> + ? ? ? ? ? ? ? ? S3C_SDHCI_CTRL2_DFCNT_NONE |
> + ? ? ? ? ? ? ? ? S3C_SDHCI_CTRL2_ENCLKOUTHOLD);
> +
> + ? ? ? if (ios->clock < 25 * 1000000)
> + ? ? ? ? ? ? ? ctrl3 = (S3C_SDHCI_CTRL3_FCSEL3 |
> + ? ? ? ? ? ? ? ? ? ? ? ?S3C_SDHCI_CTRL3_FCSEL2 |
> + ? ? ? ? ? ? ? ? ? ? ? ?S3C_SDHCI_CTRL3_FCSEL1 |
> + ? ? ? ? ? ? ? ? ? ? ? ?S3C_SDHCI_CTRL3_FCSEL0);
> + ? ? ? else
> + ? ? ? ? ? ? ? ctrl3 = (S3C_SDHCI_CTRL3_FCSEL1 | S3C_SDHCI_CTRL3_FCSEL0);
It's from s3c64xx code. Can you explain why these set is needed?
> +
> + ? ? ? __raw_writel(ctrl2, r + S3C_SDHCI_CONTROL2);
> + ? ? ? __raw_writel(ctrl3, r + S3C_SDHCI_CONTROL3);
> +}
> diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h b/arch/arm/plat-samsung/include/plat/sdhci.h
> index 30844c2..a804733 100644
> --- a/arch/arm/plat-samsung/include/plat/sdhci.h
> +++ b/arch/arm/plat-samsung/include/plat/sdhci.h
> @@ -110,6 +110,10 @@ extern void s5pv210_setup_sdhci0_cfg_gpio(struct platform_device *, int w);
> ?extern void s5pv210_setup_sdhci1_cfg_gpio(struct platform_device *, int w);
> ?extern void s5pv210_setup_sdhci2_cfg_gpio(struct platform_device *, int w);
> ?extern void s5pv210_setup_sdhci3_cfg_gpio(struct platform_device *, int w);
> +extern void s5pv310_setup_sdhci0_cfg_gpio(struct platform_device *, int w);
> +extern void s5pv310_setup_sdhci1_cfg_gpio(struct platform_device *, int w);
> +extern void s5pv310_setup_sdhci2_cfg_gpio(struct platform_device *, int w);
> +extern void s5pv310_setup_sdhci3_cfg_gpio(struct platform_device *, int w);
>
> ?/* S3C64XX SDHCI setup */
>
> @@ -288,4 +292,58 @@ static inline void s5pv210_default_sdhci3(void) { }
>
> ?#endif /* CONFIG_S5PV210_SETUP_SDHCI */
>
> +/* S5PV310 SDHCI setup */
> +
> +#ifdef CONFIG_S5PV310_SETUP_SDHCI
> +extern char *s5pv310_hsmmc_clksrcs[4];
> +
> +extern void s5pv310_setup_sdhci_cfg_card(struct platform_device *dev,
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?void __iomem *r,
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?struct mmc_ios *ios,
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?struct mmc_card *card);
> +
> +static inline void s5pv310_default_sdhci0(void)
> +{
> +#ifdef CONFIG_S3C_DEV_HSMMC
> + ? ? ? s3c_hsmmc0_def_platdata.clocks = s5pv310_hsmmc_clksrcs;
> + ? ? ? s3c_hsmmc0_def_platdata.cfg_gpio = s5pv310_setup_sdhci0_cfg_gpio;
> + ? ? ? s3c_hsmmc0_def_platdata.cfg_card = s5pv310_setup_sdhci_cfg_card;
> +#endif
> +}
> +
> +static inline void s5pv310_default_sdhci1(void)
> +{
> +#ifdef CONFIG_S3C_DEV_HSMMC1
> + ? ? ? s3c_hsmmc1_def_platdata.clocks = s5pv310_hsmmc_clksrcs;
> + ? ? ? s3c_hsmmc1_def_platdata.cfg_gpio = s5pv310_setup_sdhci1_cfg_gpio;
> + ? ? ? s3c_hsmmc1_def_platdata.cfg_card = s5pv310_setup_sdhci_cfg_card;
> +#endif
> +}
> +
> +static inline void s5pv310_default_sdhci2(void)
> +{
> +#ifdef CONFIG_S3C_DEV_HSMMC2
> + ? ? ? s3c_hsmmc2_def_platdata.clocks = s5pv310_hsmmc_clksrcs;
> + ? ? ? s3c_hsmmc2_def_platdata.cfg_gpio = s5pv310_setup_sdhci2_cfg_gpio;
> + ? ? ? s3c_hsmmc2_def_platdata.cfg_card = s5pv310_setup_sdhci_cfg_card;
> +#endif
> +}
> +
> +static inline void s5pv310_default_sdhci3(void)
> +{
> +#ifdef CONFIG_S3C_DEV_HSMMC3
> + ? ? ? s3c_hsmmc3_def_platdata.clocks = s5pv310_hsmmc_clksrcs;
> + ? ? ? s3c_hsmmc3_def_platdata.cfg_gpio = s5pv310_setup_sdhci3_cfg_gpio;
> + ? ? ? s3c_hsmmc3_def_platdata.cfg_card = s5pv310_setup_sdhci_cfg_card;
> +#endif
> +}
> +
> +#else
> +static inline void s5pv310_default_sdhci0(void) { }
> +static inline void s5pv310_default_sdhci1(void) { }
> +static inline void s5pv310_default_sdhci2(void) { }
> +static inline void s5pv310_default_sdhci3(void) { }
> +
> +#endif /* CONFIG_S5PV310_SETUP_SDHCI */
> +
> ?#endif /* __PLAT_S3C_SDHCI_H */
> --
> 1.6.2.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at ?http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 2/3] ARM: S5P: Add initial map for GPIO2 and GPIO3
2010-08-20 12:33 ` [PATCH 2/3] ARM: S5P: Add initial map for GPIO2 and GPIO3 Kukjin Kim
@ 2010-08-22 3:33 ` Kyungmin Park
2010-08-23 0:18 ` Kukjin Kim
0 siblings, 1 reply; 11+ messages in thread
From: Kyungmin Park @ 2010-08-22 3:33 UTC (permalink / raw)
To: linux-arm-kernel
NAK.
This approach don't make a common GPIO framework. I already send the
common GPIO framework which send the base address to GPIO framework
and handle it regradless GPIO is one or three.
http://lists.infradead.org/pipermail/linux-arm-kernel/2010-August/022513.html
With this patch, we can use the common GPIO framework and remove the
VA_GPIO dependency.
Thank you,
Kyungmin Park
On Fri, Aug 20, 2010 at 9:33 PM, Kukjin Kim <kgene.kim@samsung.com> wrote:
> From: Jongpill Lee <boyko.lee@samsung.com>
>
> This patch adds initial map for GPIO2 and GPIO3.
> S5PV310/S5PC210 has separated GPIO1, GPIO2 and GPIO3.
>
> Signed-off-by: Jongpill Lee <boyko.lee@samsung.com>
> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
> ---
> ?arch/arm/mach-s5pv310/cpu.c ? ? ? ? ? ? ?| ? 10 ++++++++++
> ?arch/arm/plat-s5p/include/plat/map-s5p.h | ? ?2 ++
> ?2 files changed, 12 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-s5pv310/cpu.c b/arch/arm/mach-s5pv310/cpu.c
> index 196c9f1..db4f55a 100644
> --- a/arch/arm/mach-s5pv310/cpu.c
> +++ b/arch/arm/mach-s5pv310/cpu.c
> @@ -45,6 +45,16 @@ static struct map_desc s5pv310_iodesc[] __initdata = {
> ? ? ? ? ? ? ? ?.pfn ? ? ? ? ? ?= __phys_to_pfn(S5PV310_PA_L2CC),
> ? ? ? ? ? ? ? ?.length ? ? ? ? = SZ_4K,
> ? ? ? ? ? ? ? ?.type ? ? ? ? ? = MT_DEVICE,
> + ? ? ? }, {
> + ? ? ? ? ? ? ? .virtual ? ? ? ?= (unsigned long)S5P_VA_GPIO2,
> + ? ? ? ? ? ? ? .pfn ? ? ? ? ? ?= __phys_to_pfn(S5PV310_PA_GPIO2),
> + ? ? ? ? ? ? ? .length ? ? ? ? = SZ_4K,
> + ? ? ? ? ? ? ? .type ? ? ? ? ? = MT_DEVICE,
> + ? ? ? }, {
> + ? ? ? ? ? ? ? .virtual ? ? ? ?= (unsigned long)S5P_VA_GPIO3,
> + ? ? ? ? ? ? ? .pfn ? ? ? ? ? ?= __phys_to_pfn(S5PV310_PA_GPIO3),
> + ? ? ? ? ? ? ? .length ? ? ? ? = SZ_256K,
> + ? ? ? ? ? ? ? .type ? ? ? ? ? = MT_DEVICE,
> ? ? ? ?},
> ?};
>
> diff --git a/arch/arm/plat-s5p/include/plat/map-s5p.h b/arch/arm/plat-s5p/include/plat/map-s5p.h
> index 54e9fb9..bc52595 100644
> --- a/arch/arm/plat-s5p/include/plat/map-s5p.h
> +++ b/arch/arm/plat-s5p/include/plat/map-s5p.h
> @@ -15,6 +15,8 @@
>
> ?#define S5P_VA_CHIPID ? ? ? ? ?S3C_ADDR(0x00700000)
> ?#define S5P_VA_GPIO ? ? ? ? ? ?S3C_ADDR(0x00500000)
> +#define S5P_VA_GPIO2 ? ? ? ? ? S3C_ADDR(0x00510000)
> +#define S5P_VA_GPIO3 ? ? ? ? ? S3C_ADDR(0x00520000)
> ?#define S5P_VA_SYSTIMER ? ? ? ? ? ? ? ?S3C_ADDR(0x01200000)
> ?#define S5P_VA_SROMC ? ? ? ? ? S3C_ADDR(0x01100000)
>
> --
> 1.6.2.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at ?http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/3] ARM: SAMSUNG: Change the 3rd HSMMC interrupt name for compatibility
2010-08-20 12:33 ` [PATCH 1/3] ARM: SAMSUNG: Change the 3rd HSMMC interrupt name for compatibility Kukjin Kim
@ 2010-08-22 3:33 ` Kyungmin Park
0 siblings, 0 replies; 11+ messages in thread
From: Kyungmin Park @ 2010-08-22 3:33 UTC (permalink / raw)
To: linux-arm-kernel
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
On Fri, Aug 20, 2010 at 9:33 PM, Kukjin Kim <kgene.kim@samsung.com> wrote:
> This patch changes the 3rd HSMMC interrupt name for compatibility
> from IRQ_MMC to IRQ_HSMMC3.
>
> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
> ---
> ?arch/arm/mach-s5pv210/include/mach/irqs.h | ? ?2 +-
> ?arch/arm/mach-s5pv310/include/mach/irqs.h | ? ?5 +++++
> ?arch/arm/plat-samsung/dev-hsmmc3.c ? ? ? ?| ? ?4 ++--
> ?3 files changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/mach-s5pv210/include/mach/irqs.h b/arch/arm/mach-s5pv210/include/mach/irqs.h
> index e1c020e..cdb8ae4 100644
> --- a/arch/arm/mach-s5pv210/include/mach/irqs.h
> +++ b/arch/arm/mach-s5pv210/include/mach/irqs.h
> @@ -109,7 +109,7 @@
>
> ?#define IRQ_IPC ? ? ? ? ? ? ? ? ? ? ? ?S5P_IRQ_VIC3(0)
> ?#define IRQ_HOSTIF ? ? ? ? ? ? S5P_IRQ_VIC3(1)
> -#define IRQ_MMC3 ? ? ? ? ? ? ? S5P_IRQ_VIC3(2)
> +#define IRQ_HSMMC3 ? ? ? ? ? ? S5P_IRQ_VIC3(2)
> ?#define IRQ_CEC ? ? ? ? ? ? ? ? ? ? ? ?S5P_IRQ_VIC3(3)
> ?#define IRQ_TSI ? ? ? ? ? ? ? ? ? ? ? ?S5P_IRQ_VIC3(4)
> ?#define IRQ_MDNIE0 ? ? ? ? ? ? S5P_IRQ_VIC3(5)
> diff --git a/arch/arm/mach-s5pv310/include/mach/irqs.h b/arch/arm/mach-s5pv310/include/mach/irqs.h
> index 4cdedda..522352f 100644
> --- a/arch/arm/mach-s5pv310/include/mach/irqs.h
> +++ b/arch/arm/mach-s5pv310/include/mach/irqs.h
> @@ -68,6 +68,11 @@
>
> ?#define IRQ_IIC ? ? ? ? ? ? ? ? ? ? ? ?COMBINER_IRQ(27, 0)
>
> +#define IRQ_HSMMC0 ? ? ? ? ? ? COMBINER_IRQ(29, 0)
> +#define IRQ_HSMMC1 ? ? ? ? ? ? COMBINER_IRQ(29, 1)
> +#define IRQ_HSMMC2 ? ? ? ? ? ? COMBINER_IRQ(29, 2)
> +#define IRQ_HSMMC3 ? ? ? ? ? ? COMBINER_IRQ(29, 3)
> +
> ?/* Set the default NR_IRQS */
>
> ?#define NR_IRQS ? ? ? ? ? ? ? ? ? ? ? ?COMBINER_IRQ(MAX_COMBINER_NR, 0)
> diff --git a/arch/arm/plat-samsung/dev-hsmmc3.c b/arch/arm/plat-samsung/dev-hsmmc3.c
> index 85aaf0f..335bc35 100644
> --- a/arch/arm/plat-samsung/dev-hsmmc3.c
> +++ b/arch/arm/plat-samsung/dev-hsmmc3.c
> @@ -33,8 +33,8 @@ static struct resource s3c_hsmmc3_resource[] = {
> ? ? ? ? ? ? ? ?.flags ?= IORESOURCE_MEM,
> ? ? ? ?},
> ? ? ? ?[1] = {
> - ? ? ? ? ? ? ? .start ?= IRQ_MMC3,
> - ? ? ? ? ? ? ? .end ? ?= IRQ_MMC3,
> + ? ? ? ? ? ? ? .start ?= IRQ_HSMMC3,
> + ? ? ? ? ? ? ? .end ? ?= IRQ_HSMMC3,
> ? ? ? ? ? ? ? ?.flags ?= IORESOURCE_IRQ,
> ? ? ? ?}
> ?};
> --
> 1.6.2.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at ?http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 2/3] ARM: S5P: Add initial map for GPIO2 and GPIO3
2010-08-22 3:33 ` Kyungmin Park
@ 2010-08-23 0:18 ` Kukjin Kim
2010-08-23 2:01 ` Kyungmin Park
0 siblings, 1 reply; 11+ messages in thread
From: Kukjin Kim @ 2010-08-23 0:18 UTC (permalink / raw)
To: linux-arm-kernel
Kyungmin Park wrote:
>
> NAK.
>
I don't know why I need your ack for this...if any opinions, just comments
is enough.
> This approach don't make a common GPIO framework. I already send the
> common GPIO framework which send the base address to GPIO framework
> and handle it regradless GPIO is one or three.
>
I don't think that your that RFC GPIO patch is common GPIO framework.
>
http://lists.infradead.org/pipermail/linux-arm-kernel/2010-August/022513.htm
l
>
> With this patch, we can use the common GPIO framework and remove the
> VA_GPIO dependency.
>
Why do you think your patch is common?
> Thank you,
> Kyungmin Park
>
> On Fri, Aug 20, 2010 at 9:33 PM, Kukjin Kim <kgene.kim@samsung.com> wrote:
> > From: Jongpill Lee <boyko.lee@samsung.com>
> >
> > This patch adds initial map for GPIO2 and GPIO3.
> > S5PV310/S5PC210 has separated GPIO1, GPIO2 and GPIO3.
> >
> > Signed-off-by: Jongpill Lee <boyko.lee@samsung.com>
> > Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
> > ---
> > ?arch/arm/mach-s5pv310/cpu.c ? ? ? ? ? ? ?| ? 10 ++++++++++
> > ?arch/arm/plat-s5p/include/plat/map-s5p.h | ? ?2 ++
> > ?2 files changed, 12 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/arm/mach-s5pv310/cpu.c b/arch/arm/mach-s5pv310/cpu.c
> > index 196c9f1..db4f55a 100644
> > --- a/arch/arm/mach-s5pv310/cpu.c
> > +++ b/arch/arm/mach-s5pv310/cpu.c
> > @@ -45,6 +45,16 @@ static struct map_desc s5pv310_iodesc[] __initdata =
{
> > ? ? ? ? ? ? ? ?.pfn ? ? ? ? ? ?= __phys_to_pfn(S5PV310_PA_L2CC),
> > ? ? ? ? ? ? ? ?.length ? ? ? ? = SZ_4K,
> > ? ? ? ? ? ? ? ?.type ? ? ? ? ? = MT_DEVICE,
> > + ? ? ? }, {
> > + ? ? ? ? ? ? ? .virtual ? ? ? ?= (unsigned long)S5P_VA_GPIO2,
> > + ? ? ? ? ? ? ? .pfn ? ? ? ? ? ?= __phys_to_pfn(S5PV310_PA_GPIO2),
> > + ? ? ? ? ? ? ? .length ? ? ? ? = SZ_4K,
> > + ? ? ? ? ? ? ? .type ? ? ? ? ? = MT_DEVICE,
> > + ? ? ? }, {
> > + ? ? ? ? ? ? ? .virtual ? ? ? ?= (unsigned long)S5P_VA_GPIO3,
> > + ? ? ? ? ? ? ? .pfn ? ? ? ? ? ?= __phys_to_pfn(S5PV310_PA_GPIO3),
> > + ? ? ? ? ? ? ? .length ? ? ? ? = SZ_256K,
> > + ? ? ? ? ? ? ? .type ? ? ? ? ? = MT_DEVICE,
> > ? ? ? ?},
> > ?};
> >
> > diff --git a/arch/arm/plat-s5p/include/plat/map-s5p.h b/arch/arm/plat-
> s5p/include/plat/map-s5p.h
> > index 54e9fb9..bc52595 100644
> > --- a/arch/arm/plat-s5p/include/plat/map-s5p.h
> > +++ b/arch/arm/plat-s5p/include/plat/map-s5p.h
> > @@ -15,6 +15,8 @@
> >
> > ?#define S5P_VA_CHIPID ? ? ? ? ?S3C_ADDR(0x00700000)
> > ?#define S5P_VA_GPIO ? ? ? ? ? ?S3C_ADDR(0x00500000)
> > +#define S5P_VA_GPIO2 ? ? ? ? ? S3C_ADDR(0x00510000)
> > +#define S5P_VA_GPIO3 ? ? ? ? ? S3C_ADDR(0x00520000)
> > ?#define S5P_VA_SYSTIMER ? ? ? ? ? ? ? ?S3C_ADDR(0x01200000)
> > ?#define S5P_VA_SROMC ? ? ? ? ? S3C_ADDR(0x01100000)
> >
> > --
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 2/3] ARM: S5P: Add initial map for GPIO2 and GPIO3
2010-08-23 0:18 ` Kukjin Kim
@ 2010-08-23 2:01 ` Kyungmin Park
2010-08-23 2:15 ` Kukjin Kim
0 siblings, 1 reply; 11+ messages in thread
From: Kyungmin Park @ 2010-08-23 2:01 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Aug 23, 2010 at 9:18 AM, Kukjin Kim <kgene.kim@samsung.com> wrote:
> Kyungmin Park wrote:
>>
>> NAK.
>>
> I don't know why I need your ack for this...if any opinions, just comments
> is enough.
Okay I said in other word, I can't agree this patch.
>
>> This approach don't make a common GPIO framework. I already send the
>> common GPIO framework which send the base address to GPIO framework
>> and handle it regradless GPIO is one or three.
>>
> I don't think that your that RFC GPIO patch is common GPIO framework.
>
>>
> http://lists.infradead.org/pipermail/linux-arm-kernel/2010-August/022513.htm
> l
>>
>> With this patch, we can use the common GPIO framework and remove the
>> VA_GPIO dependency.
>>
> Why do you think your patch is common?
In another patch, you just write the driver strength with
readl/writel. even though gpiolib already has interface,
s5p_gpio_set_drvstr
and how to you implement the gpio_to_irq at both GPIO and EINT?
The "common" means GPIO related function should use the gpiolib
functions only. No direct access.
If your patch match these criteria then I'll ack your patch.
All
>
>> Thank you,
>> Kyungmin Park
>>
>> On Fri, Aug 20, 2010 at 9:33 PM, Kukjin Kim <kgene.kim@samsung.com> wrote:
>> > From: Jongpill Lee <boyko.lee@samsung.com>
>> >
>> > This patch adds initial map for GPIO2 and GPIO3.
>> > S5PV310/S5PC210 has separated GPIO1, GPIO2 and GPIO3.
>> >
>> > Signed-off-by: Jongpill Lee <boyko.lee@samsung.com>
>> > Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
>> > ---
>> > ?arch/arm/mach-s5pv310/cpu.c ? ? ? ? ? ? ?| ? 10 ++++++++++
>> > ?arch/arm/plat-s5p/include/plat/map-s5p.h | ? ?2 ++
>> > ?2 files changed, 12 insertions(+), 0 deletions(-)
>> >
>> > diff --git a/arch/arm/mach-s5pv310/cpu.c b/arch/arm/mach-s5pv310/cpu.c
>> > index 196c9f1..db4f55a 100644
>> > --- a/arch/arm/mach-s5pv310/cpu.c
>> > +++ b/arch/arm/mach-s5pv310/cpu.c
>> > @@ -45,6 +45,16 @@ static struct map_desc s5pv310_iodesc[] __initdata =
> {
>> > ? ? ? ? ? ? ? ?.pfn ? ? ? ? ? ?= __phys_to_pfn(S5PV310_PA_L2CC),
>> > ? ? ? ? ? ? ? ?.length ? ? ? ? = SZ_4K,
>> > ? ? ? ? ? ? ? ?.type ? ? ? ? ? = MT_DEVICE,
>> > + ? ? ? }, {
>> > + ? ? ? ? ? ? ? .virtual ? ? ? ?= (unsigned long)S5P_VA_GPIO2,
>> > + ? ? ? ? ? ? ? .pfn ? ? ? ? ? ?= __phys_to_pfn(S5PV310_PA_GPIO2),
>> > + ? ? ? ? ? ? ? .length ? ? ? ? = SZ_4K,
>> > + ? ? ? ? ? ? ? .type ? ? ? ? ? = MT_DEVICE,
>> > + ? ? ? }, {
>> > + ? ? ? ? ? ? ? .virtual ? ? ? ?= (unsigned long)S5P_VA_GPIO3,
>> > + ? ? ? ? ? ? ? .pfn ? ? ? ? ? ?= __phys_to_pfn(S5PV310_PA_GPIO3),
>> > + ? ? ? ? ? ? ? .length ? ? ? ? = SZ_256K,
>> > + ? ? ? ? ? ? ? .type ? ? ? ? ? = MT_DEVICE,
>> > ? ? ? ?},
>> > ?};
>> >
>> > diff --git a/arch/arm/plat-s5p/include/plat/map-s5p.h b/arch/arm/plat-
>> s5p/include/plat/map-s5p.h
>> > index 54e9fb9..bc52595 100644
>> > --- a/arch/arm/plat-s5p/include/plat/map-s5p.h
>> > +++ b/arch/arm/plat-s5p/include/plat/map-s5p.h
>> > @@ -15,6 +15,8 @@
>> >
>> > ?#define S5P_VA_CHIPID ? ? ? ? ?S3C_ADDR(0x00700000)
>> > ?#define S5P_VA_GPIO ? ? ? ? ? ?S3C_ADDR(0x00500000)
>> > +#define S5P_VA_GPIO2 ? ? ? ? ? S3C_ADDR(0x00510000)
>> > +#define S5P_VA_GPIO3 ? ? ? ? ? S3C_ADDR(0x00520000)
>> > ?#define S5P_VA_SYSTIMER ? ? ? ? ? ? ? ?S3C_ADDR(0x01200000)
>> > ?#define S5P_VA_SROMC ? ? ? ? ? S3C_ADDR(0x01100000)
>> >
>> > --
>
>
> Thanks.
>
> Best regards,
> Kgene.
> --
> Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
> SW Solution Development Team, Samsung Electronics Co., Ltd.
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at ?http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 2/3] ARM: S5P: Add initial map for GPIO2 and GPIO3
2010-08-23 2:01 ` Kyungmin Park
@ 2010-08-23 2:15 ` Kukjin Kim
2010-08-23 2:59 ` Kyungmin Park
0 siblings, 1 reply; 11+ messages in thread
From: Kukjin Kim @ 2010-08-23 2:15 UTC (permalink / raw)
To: linux-arm-kernel
Kyungmin Park wrote:
>
> On Mon, Aug 23, 2010 at 9:18 AM, Kukjin Kim <kgene.kim@samsung.com> wrote:
> > Kyungmin Park wrote:
> >>
> >> NAK.
> >>
> > I don't know why I need your ack for this...if any opinions, just
comments
> > is enough.
>
> Okay I said in other word, I can't agree this patch.
>
> >
> >> This approach don't make a common GPIO framework. I already send the
> >> common GPIO framework which send the base address to GPIO framework
> >> and handle it regradless GPIO is one or three.
> >>
> > I don't think that your that RFC GPIO patch is common GPIO framework.
> >
> >>
> >
http://lists.infradead.org/pipermail/linux-arm-kernel/2010-August/022513.htm
> > l
> >>
> >> With this patch, we can use the common GPIO framework and remove the
> >> VA_GPIO dependency.
> >>
> > Why do you think your patch is common?
>
> In another patch, you just write the driver strength with
> readl/writel. even though gpiolib already has interface,
> s5p_gpio_set_drvstr
>
I missed gpio driver strength driver. Will fix it.
But this issue is not regarding gpio driver strength.
> and how to you implement the gpio_to_irq at both GPIO and EINT?
>
Will sort it out.
> The "common" means GPIO related function should use the gpiolib
> functions only. No direct access.
>
It means don't need to use your previous patch which is just RFC regarding
removing VA_GPIO.
> If your patch match these criteria then I'll ack your patch.
>
Hmm...
> All
> >
> >> Thank you,
> >> Kyungmin Park
> >>
> >> On Fri, Aug 20, 2010 at 9:33 PM, Kukjin Kim <kgene.kim@samsung.com>
wrote:
> >> > From: Jongpill Lee <boyko.lee@samsung.com>
> >> >
> >> > This patch adds initial map for GPIO2 and GPIO3.
> >> > S5PV310/S5PC210 has separated GPIO1, GPIO2 and GPIO3.
> >> >
> >> > Signed-off-by: Jongpill Lee <boyko.lee@samsung.com>
> >> > Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
> >> > ---
> >> > ?arch/arm/mach-s5pv310/cpu.c ? ? ? ? ? ? ?| ? 10 ++++++++++
> >> > ?arch/arm/plat-s5p/include/plat/map-s5p.h | ? ?2 ++
> >> > ?2 files changed, 12 insertions(+), 0 deletions(-)
> >> >
> >> > diff --git a/arch/arm/mach-s5pv310/cpu.c
b/arch/arm/mach-s5pv310/cpu.c
> >> > index 196c9f1..db4f55a 100644
> >> > --- a/arch/arm/mach-s5pv310/cpu.c
> >> > +++ b/arch/arm/mach-s5pv310/cpu.c
> >> > @@ -45,6 +45,16 @@ static struct map_desc s5pv310_iodesc[] __initdata
=
> > {
> >> > ? ? ? ? ? ? ? ?.pfn ? ? ? ? ? ?= __phys_to_pfn(S5PV310_PA_L2CC),
> >> > ? ? ? ? ? ? ? ?.length ? ? ? ? = SZ_4K,
> >> > ? ? ? ? ? ? ? ?.type ? ? ? ? ? = MT_DEVICE,
> >> > + ? ? ? }, {
> >> > + ? ? ? ? ? ? ? .virtual ? ? ? ?= (unsigned long)S5P_VA_GPIO2,
> >> > + ? ? ? ? ? ? ? .pfn ? ? ? ? ? ?= __phys_to_pfn(S5PV310_PA_GPIO2),
> >> > + ? ? ? ? ? ? ? .length ? ? ? ? = SZ_4K,
> >> > + ? ? ? ? ? ? ? .type ? ? ? ? ? = MT_DEVICE,
> >> > + ? ? ? }, {
> >> > + ? ? ? ? ? ? ? .virtual ? ? ? ?= (unsigned long)S5P_VA_GPIO3,
> >> > + ? ? ? ? ? ? ? .pfn ? ? ? ? ? ?= __phys_to_pfn(S5PV310_PA_GPIO3),
> >> > + ? ? ? ? ? ? ? .length ? ? ? ? = SZ_256K,
> >> > + ? ? ? ? ? ? ? .type ? ? ? ? ? = MT_DEVICE,
> >> > ? ? ? ?},
> >> > ?};
> >> >
> >> > diff --git a/arch/arm/plat-s5p/include/plat/map-s5p.h
b/arch/arm/plat-
> >> s5p/include/plat/map-s5p.h
> >> > index 54e9fb9..bc52595 100644
> >> > --- a/arch/arm/plat-s5p/include/plat/map-s5p.h
> >> > +++ b/arch/arm/plat-s5p/include/plat/map-s5p.h
> >> > @@ -15,6 +15,8 @@
> >> >
> >> > ?#define S5P_VA_CHIPID ? ? ? ? ?S3C_ADDR(0x00700000)
> >> > ?#define S5P_VA_GPIO ? ? ? ? ? ?S3C_ADDR(0x00500000)
> >> > +#define S5P_VA_GPIO2 ? ? ? ? ? S3C_ADDR(0x00510000)
> >> > +#define S5P_VA_GPIO3 ? ? ? ? ? S3C_ADDR(0x00520000)
> >> > ?#define S5P_VA_SYSTIMER ? ? ? ? ? ? ? ?S3C_ADDR(0x01200000)
> >> > ?#define S5P_VA_SROMC ? ? ? ? ? S3C_ADDR(0x01100000)
> >> >
> >> > --
> >
> >
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 2/3] ARM: S5P: Add initial map for GPIO2 and GPIO3
2010-08-23 2:15 ` Kukjin Kim
@ 2010-08-23 2:59 ` Kyungmin Park
0 siblings, 0 replies; 11+ messages in thread
From: Kyungmin Park @ 2010-08-23 2:59 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Aug 23, 2010 at 11:15 AM, Kukjin Kim <kgene.kim@samsung.com> wrote:
> Kyungmin Park wrote:
>>
>> On Mon, Aug 23, 2010 at 9:18 AM, Kukjin Kim <kgene.kim@samsung.com> wrote:
>> > Kyungmin Park wrote:
>> >>
>> >> NAK.
>> >>
>> > I don't know why I need your ack for this...if any opinions, just
> comments
>> > is enough.
>>
>> Okay I said in other word, I can't agree this patch.
>>
>> >
>> >> This approach don't make a common GPIO framework. I already send the
>> >> common GPIO framework which send the base address to GPIO framework
>> >> and handle it regradless GPIO is one or three.
>> >>
>> > I don't think that your that RFC GPIO patch is common GPIO framework.
>> >
>> >>
>> >
> http://lists.infradead.org/pipermail/linux-arm-kernel/2010-August/022513.htm
>> > l
>> >>
>> >> With this patch, we can use the common GPIO framework and remove the
>> >> VA_GPIO dependency.
>> >>
>> > Why do you think your patch is common?
>>
>> In another patch, you just write the driver strength with
>> readl/writel. even though gpiolib already has interface,
>> s5p_gpio_set_drvstr
>>
> I missed gpio driver strength driver. Will fix it.
> But this issue is not regarding gpio driver strength.
>
>> and how to you implement the gpio_to_irq at both GPIO and EINT?
>>
> Will sort it out.
>
>> The "common" means GPIO related function should use the gpiolib
>> functions only. No direct access.
>>
> It means don't need to use your previous patch which is just RFC regarding
> removing VA_GPIO.
and make it for multiple GPIOs such as s5pc210. also make it simple
for GPIOs and EINT.
It's also cover the gpio_to_irq to use the similar scheme either GPIOs or EINT.
>
>> If your patch match these criteria then I'll ack your patch.
>>
> Hmm...
>
>> All
>> >
>> >> Thank you,
>> >> Kyungmin Park
>> >>
>> >> On Fri, Aug 20, 2010 at 9:33 PM, Kukjin Kim <kgene.kim@samsung.com>
> wrote:
>> >> > From: Jongpill Lee <boyko.lee@samsung.com>
>> >> >
>> >> > This patch adds initial map for GPIO2 and GPIO3.
>> >> > S5PV310/S5PC210 has separated GPIO1, GPIO2 and GPIO3.
>> >> >
>> >> > Signed-off-by: Jongpill Lee <boyko.lee@samsung.com>
>> >> > Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
>> >> > ---
>> >> > ?arch/arm/mach-s5pv310/cpu.c ? ? ? ? ? ? ?| ? 10 ++++++++++
>> >> > ?arch/arm/plat-s5p/include/plat/map-s5p.h | ? ?2 ++
>> >> > ?2 files changed, 12 insertions(+), 0 deletions(-)
>> >> >
>> >> > diff --git a/arch/arm/mach-s5pv310/cpu.c
> b/arch/arm/mach-s5pv310/cpu.c
>> >> > index 196c9f1..db4f55a 100644
>> >> > --- a/arch/arm/mach-s5pv310/cpu.c
>> >> > +++ b/arch/arm/mach-s5pv310/cpu.c
>> >> > @@ -45,6 +45,16 @@ static struct map_desc s5pv310_iodesc[] __initdata
> =
>> > {
>> >> > ? ? ? ? ? ? ? ?.pfn ? ? ? ? ? ?= __phys_to_pfn(S5PV310_PA_L2CC),
>> >> > ? ? ? ? ? ? ? ?.length ? ? ? ? = SZ_4K,
>> >> > ? ? ? ? ? ? ? ?.type ? ? ? ? ? = MT_DEVICE,
>> >> > + ? ? ? }, {
>> >> > + ? ? ? ? ? ? ? .virtual ? ? ? ?= (unsigned long)S5P_VA_GPIO2,
>> >> > + ? ? ? ? ? ? ? .pfn ? ? ? ? ? ?= __phys_to_pfn(S5PV310_PA_GPIO2),
>> >> > + ? ? ? ? ? ? ? .length ? ? ? ? = SZ_4K,
>> >> > + ? ? ? ? ? ? ? .type ? ? ? ? ? = MT_DEVICE,
>> >> > + ? ? ? }, {
>> >> > + ? ? ? ? ? ? ? .virtual ? ? ? ?= (unsigned long)S5P_VA_GPIO3,
>> >> > + ? ? ? ? ? ? ? .pfn ? ? ? ? ? ?= __phys_to_pfn(S5PV310_PA_GPIO3),
>> >> > + ? ? ? ? ? ? ? .length ? ? ? ? = SZ_256K,
>> >> > + ? ? ? ? ? ? ? .type ? ? ? ? ? = MT_DEVICE,
>> >> > ? ? ? ?},
>> >> > ?};
>> >> >
>> >> > diff --git a/arch/arm/plat-s5p/include/plat/map-s5p.h
> b/arch/arm/plat-
>> >> s5p/include/plat/map-s5p.h
>> >> > index 54e9fb9..bc52595 100644
>> >> > --- a/arch/arm/plat-s5p/include/plat/map-s5p.h
>> >> > +++ b/arch/arm/plat-s5p/include/plat/map-s5p.h
>> >> > @@ -15,6 +15,8 @@
>> >> >
>> >> > ?#define S5P_VA_CHIPID ? ? ? ? ?S3C_ADDR(0x00700000)
>> >> > ?#define S5P_VA_GPIO ? ? ? ? ? ?S3C_ADDR(0x00500000)
>> >> > +#define S5P_VA_GPIO2 ? ? ? ? ? S3C_ADDR(0x00510000)
>> >> > +#define S5P_VA_GPIO3 ? ? ? ? ? S3C_ADDR(0x00520000)
>> >> > ?#define S5P_VA_SYSTIMER ? ? ? ? ? ? ? ?S3C_ADDR(0x01200000)
>> >> > ?#define S5P_VA_SROMC ? ? ? ? ? S3C_ADDR(0x01100000)
>> >> >
>> >> > --
>> >
>> >
>
>
> Thanks.
>
> Best regards,
> Kgene.
> --
> Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
> SW Solution Development Team, Samsung Electronics Co., Ltd.
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2010-08-23 2:59 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-20 12:33 [PATCH 0/3] ARM: S5PV310: Add support HSMMC on SMDKC210 and SMDKV310 Kukjin Kim
2010-08-20 12:33 ` [PATCH 1/3] ARM: SAMSUNG: Change the 3rd HSMMC interrupt name for compatibility Kukjin Kim
2010-08-22 3:33 ` Kyungmin Park
2010-08-20 12:33 ` [PATCH 2/3] ARM: S5P: Add initial map for GPIO2 and GPIO3 Kukjin Kim
2010-08-22 3:33 ` Kyungmin Park
2010-08-23 0:18 ` Kukjin Kim
2010-08-23 2:01 ` Kyungmin Park
2010-08-23 2:15 ` Kukjin Kim
2010-08-23 2:59 ` Kyungmin Park
2010-08-20 12:33 ` [PATCH 3/3] ARM: S5PV310: Add support HSMMC on SMDKC210 and SMDKV310 Kukjin Kim
2010-08-22 2:04 ` Kyungmin Park
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).