From patchwork Thu Jan 3 07:31:00 2013
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Piotr Wilczek
X-Patchwork-Id: 209189
X-Patchwork-Delegate: promsoft@gmail.com
Return-Path:
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@bilbo.ozlabs.org
Received: from theia.denx.de (theia.denx.de [85.214.87.163])
by ozlabs.org (Postfix) with ESMTP id 467932C0040
for ;
Thu, 3 Jan 2013 18:31:47 +1100 (EST)
Received: from localhost (localhost [127.0.0.1])
by theia.denx.de (Postfix) with ESMTP id 2C7544A04C;
Thu, 3 Jan 2013 08:31:43 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at theia.denx.de
Received: from theia.denx.de ([127.0.0.1])
by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id DLuFYOVJkd93; Thu, 3 Jan 2013 08:31:42 +0100 (CET)
Received: from theia.denx.de (localhost [127.0.0.1])
by theia.denx.de (Postfix) with ESMTP id 8ABB24A08B;
Thu, 3 Jan 2013 08:31:39 +0100 (CET)
Received: from localhost (localhost [127.0.0.1])
by theia.denx.de (Postfix) with ESMTP id E4F544A049
for ; Thu, 3 Jan 2013 08:31:35 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at theia.denx.de
Received: from theia.denx.de ([127.0.0.1])
by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id CRdHkAKjF5mi for ;
Thu, 3 Jan 2013 08:31:33 +0100 (CET)
X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5
NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested)
Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34])
by theia.denx.de (Postfix) with ESMTP id D44914A032
for ; Thu, 3 Jan 2013 08:31:31 +0100 (CET)
Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27])
by mailout4.samsung.com
(Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit
(built Nov
17 2011)) with ESMTP id <0MG100EKEGW5VBO0@mailout4.samsung.com> for
u-boot@lists.denx.de; Thu, 03 Jan 2013 16:31:24 +0900 (KST)
X-AuditID: cbfee61b-b7f616d00000319b-0f-50e533cce23c
Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA)
with SMTP id 07.71.12699.CC335E05;
Thu, 03 Jan 2013 16:31:24 +0900 (KST)
Received: from mcdsrvbld02.digital.local ([106.116.37.23])
by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01
(7.0.4.24.0) 64bit (built Nov 17 2011))
with ESMTPA id <0MG10052LGVX6R10@mmp2.samsung.com> for
u-boot@lists.denx.de; Thu, 03 Jan 2013 16:31:24 +0900 (KST)
From: Piotr Wilczek
To: u-boot@lists.denx.de
Date: Thu, 03 Jan 2013 08:31:00 +0100
Message-id: <1357198260-7412-2-git-send-email-p.wilczek@samsung.com>
X-Mailer: git-send-email 1.7.10
In-reply-to: <1357198260-7412-1-git-send-email-p.wilczek@samsung.com>
References: <1357198260-7412-1-git-send-email-p.wilczek@samsung.com>
X-Brightmail-Tracker:
H4sIAAAAAAAAA+NgFnrCJMWRmVeSWpSXmKPExsVy+t9jQd0zxk8DDLat4LF4u7eT3YHR4+yd
HYwBjFFcNimpOZllqUX6dglcGS+fzmMsmC9Y8b3hPHMD43S+LkZODgkBE4nJ7dsZIWwxiQv3
1rN1MXJxCAlMZ5SYtHIVM4SzmEliydpFrCBVbALaEsvfvAHrEBGQkPjVf5URpIhZ4BqjRMuM
C2AJYQFXiXf/pjCB2CwCqhIrVh0Cs3kFXCSetexgg1gnL/H0fh+YzQlU/2XDYbAaIaCaeZde
sU5g5F3AyLCKUTS1ILmgOCk910ivODG3uDQvXS85P3cTI9jvz6R3MK5qsDjEKMDBqMTDy1j/
JECINbGsuDL3EKMEB7OSCO/1HKAQb0piZVVqUX58UWlOavEhRmkOFiVxXsZTQCmB9MSS1OzU
1ILUIpgsEwenVANjy/2yxoMPciZGRtleK1sqYM4515VboXtzaH1OzbspnpfSzRYnK5x/wOul
r7LRIfiX0UNJB5GJYuf+hPrfCPhZ8n2JGqu22Zor/y0fWnKdv6F25qqN7hGVDSb2cyp85K/V
OqrsM7l3jTnpsXdrzSYDrQsMnMsjWDu3B5xUfrIvRmDrqWuHTPuUWIozEg21mIuKEwGO/eqC
9wEAAA==
Cc: Kyungmin Park ,
Piotr Wilczek
Subject: [U-Boot] [PATCH] arm:exynos4:pinmux: Modify the gpio function for
mmc
X-BeenThere: u-boot@lists.denx.de
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: U-Boot discussion
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
MIME-Version: 1.0
Sender: u-boot-bounces@lists.denx.de
Errors-To: u-boot-bounces@lists.denx.de
This patch add pinmux settings for Exynos4 for mmc0 and mmc2
Signed-off-by: Piotr Wilczek
Signed-off-by: Kyungmin Park
CC: Minkyu Kang
CC: Albert ARIBAUD
---
arch/arm/cpu/armv7/exynos/pinmux.c | 45 ++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c b/arch/arm/cpu/armv7/exynos/pinmux.c
index 20a4b84..ee58dac 100644
--- a/arch/arm/cpu/armv7/exynos/pinmux.c
+++ b/arch/arm/cpu/armv7/exynos/pinmux.c
@@ -370,6 +370,43 @@ static void exynos4_i2c_config(int peripheral, int flags)
}
}
+static int exynos4_mmc_config(int peripheral, int flags)
+{
+ struct exynos4_gpio_part2 *gpio2 =
+ (struct exynos4_gpio_part2 *)samsung_get_base_gpio_part2();
+ struct s5p_gpio_bank *bank, *bank_ext;
+ int i;
+
+ switch (peripheral) {
+ case PERIPH_ID_SDMMC0:
+ bank = &gpio2->k0;
+ bank_ext = &gpio2->k1;
+ break;
+ case PERIPH_ID_SDMMC2:
+ bank = &gpio2->k2;
+ bank_ext = &gpio2->k3;
+ break;
+ default:
+ return -1;
+ }
+ for (i = 0; i < 7; i++) {
+ if (i == 2)
+ continue;
+ s5p_gpio_cfg_pin(bank, i, GPIO_FUNC(0x2));
+ s5p_gpio_set_pull(bank, i, GPIO_PULL_NONE);
+ s5p_gpio_set_drv(bank, i, GPIO_DRV_4X);
+ }
+ if (flags & PINMUX_FLAG_8BIT_MODE) {
+ for (i = 3; i < 7; i++) {
+ s5p_gpio_cfg_pin(bank_ext, i, GPIO_FUNC(0x3));
+ s5p_gpio_set_pull(bank_ext, i, GPIO_PULL_NONE);
+ s5p_gpio_set_drv(bank_ext, i, GPIO_DRV_4X);
+ }
+ }
+
+ return 0;
+}
+
static int exynos4_pinmux_config(int peripheral, int flags)
{
switch (peripheral) {
@@ -383,6 +420,14 @@ static int exynos4_pinmux_config(int peripheral, int flags)
case PERIPH_ID_I2C7:
exynos4_i2c_config(peripheral, flags);
break;
+ case PERIPH_ID_SDMMC0:
+ case PERIPH_ID_SDMMC2:
+ return exynos4_mmc_config(peripheral, flags);
+ case PERIPH_ID_SDMMC1:
+ case PERIPH_ID_SDMMC3:
+ case PERIPH_ID_SDMMC4:
+ printf("SDMMC device %d not implemented\n", peripheral);
+ return -1;
default:
debug("%s: invalid peripheral %d", __func__, peripheral);
return -1;