From patchwork Wed Dec 5 13:31:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amar X-Patchwork-Id: 13377 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id C72E24C15B0 for ; Wed, 5 Dec 2012 13:12:45 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 5A917A199DE for ; Wed, 5 Dec 2012 13:12:45 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id c10so7816885ieb.11 for ; Wed, 05 Dec 2012 05:12:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:x-auditid :from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :dlp-filter:x-mtr:x-brightmail-tracker:x-brightmail-tracker :x-cfilter-loop:x-gm-message-state; bh=Rp74VpsLu27m/cyO21MHruCbkR8xnsvHE28IC4Wfgqw=; b=EPE/lwmiVzdqmSdGDZ29VIf2zg9GhTHA/i1tNNfaqklIGIfdQE5jBAjg+EF8XvS8DM IO3tvl0hGfL0I2J3LNcWwCm3qkBlpmRUHUmXilrqE3JeMHdilJg3BXH6zPbE4jmBHsbD DNvDBSR71PI+MrsqeXu7j/3WHF4pMNHhf6JUs+vHF39JWmZJD6ZVc4WzHspI7rRT8Vhu 79PaNCGnf/OcHZ2MByAdJhjvIVT4RLAVVUXZLoYsXnwaSoT98u6T1/Dwk/u/WEs+yl0J BrFSvbK74qkoZtsw+l/hsldYmOT/XoNKdQe8AhEgrLe743OU8gGXVQ6X9EstbXG1VdSS rpLA== Received: by 10.43.46.2 with SMTP id um2mr14187949icb.18.1354713164763; Wed, 05 Dec 2012 05:12:44 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp338363igt; Wed, 5 Dec 2012 05:12:44 -0800 (PST) Received: by 10.68.239.232 with SMTP id vv8mr48672376pbc.53.1354713164112; Wed, 05 Dec 2012 05:12:44 -0800 (PST) Received: from mailout4.samsung.com (mailout4.samsung.com. [203.254.224.34]) by mx.google.com with ESMTP id f9si6496151paz.203.2012.12.05.05.12.43; Wed, 05 Dec 2012 05:12:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of amarendra.xt@samsung.com designates 203.254.224.34 as permitted sender) client-ip=203.254.224.34; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of amarendra.xt@samsung.com designates 203.254.224.34 as permitted sender) smtp.mail=amarendra.xt@samsung.com 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 <0MEK00M687CTI711@mailout4.samsung.com>; Wed, 05 Dec 2012 22:12:42 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.123]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 69.70.12699.A484FB05; Wed, 05 Dec 2012 22:12:42 +0900 (KST) X-AuditID: cbfee61b-b7f616d00000319b-00-50bf484a247b Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 09.70.12699.A484FB05; Wed, 05 Dec 2012 22:12:42 +0900 (KST) Received: from localhost.localdomain ([107.108.73.106]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MEK00BI176AKQA0@mmp1.samsung.com>; Wed, 05 Dec 2012 22:12:42 +0900 (KST) From: Amar To: u-boot@lists.denx.de, jh80.chung@samsung.com Cc: patches@linaro.org, sjg@chromium.org, mk7.kang@samsung.com, chander.kashyap@linaro.org, afleming@gmail.com Subject: [PATCH 4/4] SMDK5250: Initialise and enable dwmmc channels Date: Wed, 05 Dec 2012 19:01:37 +0530 Message-id: <1354714297-11568-5-git-send-email-amarendra.xt@samsung.com> X-Mailer: git-send-email 1.7.0.4 In-reply-to: <1354714297-11568-1-git-send-email-amarendra.xt@samsung.com> References: <1354714297-11568-1-git-send-email-amarendra.xt@samsung.com> DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrHLMWRmVeSWpSXmKPExsWyRsSkWtfLY3+AQcMOaYuH62+yWEw5/IXF gcnjzrU9bAGMUVw2Kak5mWWpRfp2CVwZt/epFkzgrzje+ZStgXETTxcjJ4eEgInEjH+PGCFs MYkL99azdTFycQgJLGWUWLRqLnsXIwdY0cptyhDxRYwSR2b0sUI47UwSUycdBitiE1CV+LXY HmSQiICBxPQn21lBwswCBRLPdouBhIUFnCV+db1iAbFZgKrPr17BDmLzCnhIdM6dzQRxg4JE 67JDYHFOAU+J5rsPwWwhoJoDXy4yQfQKSHybfIgF4jRZiU0HmEGukRC4zSbxatVCqF8kJQ6u uMEygVF4ASPDKkbR1ILkguKk9FwjveLE3OLSvHS95PzcTYzAQDz975n0DsZVDRaHGAU4GJV4 eCWM9wUIsSaWFVfmHmKU4GBWEuG96bo/QIg3JbGyKrUoP76oNCe1+BCjD9AlE5mlRJPzgVGS VxJvaGxibmpsamlkZGZqikNYSZy32SMlQEggPbEkNTs1tSC1CGYcEwenVAPjtlqlPVssc7W1 6/4VT5Zg2np9l58Y8/Fr5xfsqnj/w+cPywnmx2n7naUDtrAqVG8RXtp0/4vV3+aje5+kaq2p tembWzLd9YO1dmXv09aKfW8mCDG9mSSyyPT8IvmSn99f3WBZIf017bzqKRa/6kc/BSbP0ble UHF3r3hm5qvnjv3Pc0VrZfdmKLEUZyQaajEXFScCALUMR9txAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplkeLIzCtJLcpLzFFi42I5/e+xgK6Xx/4Ag+1P+Swerr/JYjHl8BcW ByaPO9f2sAUwRjUw2mSkJqakFimk5iXnp2TmpdsqeQfHO8ebmhkY6hpaWpgrKeQl5qbaKrn4 BOi6ZeYAzVZSKEvMKQUKBSQWFyvp22GaEBripmsB0xih6xsSBNdjZIAGEtYwZtzep1owgb/i eOdTtgbGTTxdjBwcEgImEiu3KXcxcgKZYhIX7q1n62Lk4hASWMQocWRGHyuE084kMXXSYXaQ BjYBVYlfi+1BGkQEDCSmP9nOChJmFiiQeLZbDCQsLOAs8avrFQuIzQJUfX71CnYQm1fAQ6Jz 7mwmiF0KEq3LDoHFOQU8JZrvPgSzhYBqDny5yDSBkXcBI8MqRtHUguSC4qT0XCO94sTc4tK8 dL3k/NxNjOAwfya9g3FVg8UhRgEORiUeXgnjfQFCrIllxZW5hxglOJiVRHhvuu4PEOJNSays Si3Kjy8qzUktPsToA3TVRGYp0eR8YAzmlcQbGpuYmxqbWppYmJhZ4hBWEudt9kgJEBJITyxJ zU5NLUgtghnHxMEp1cDoZHrBQaxm65nV4Q51vOlTVrIVms3ykfhRbfr9xddK76Czp7/Nn95o 8mVuuMD89vinm3MfaL+stNBeN2HxoTRXDp8jTzbp7POuinRaUr8t797OVbefTZ7wnkt0z0eu KQIp10Q1PS9Jvbx3+/bz+VOSfXOcWV8/3vps4mGx1boP7Xh0fbxrDkyZqcRSnJFoqMVcVJwI AM3GUSagAgAA X-CFilter-Loop: Reflected X-Gm-Message-State: ALoCoQmAWK/7M6zSfkUMAbHtz8qmFWkzC9LKgFzM/e1Ik0peXsS0UeK7gVM1S6v+dYkhus+q3Qwt This patch initialises and enables dwmmc channels 0 and 2 for SMDK5250. It also initialises the pinmux for the same. Signed-off-by: Amarendra Reddy --- board/samsung/smdk5250/smdk5250.c | 22 +++++++++++++++++++++- include/configs/smdk5250.h | 4 ++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/board/samsung/smdk5250/smdk5250.c b/board/samsung/smdk5250/smdk5250.c index 4c50342..9503510 100644 --- a/board/samsung/smdk5250/smdk5250.c +++ b/board/samsung/smdk5250/smdk5250.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -139,13 +140,32 @@ int board_mmc_init(bd_t *bis) { int err; + err = exynos_pinmux_config(PERIPH_ID_SDMMC2, PINMUX_FLAG_NONE); + if (err) { + debug("SDMMC2 not configured\n"); + return err; + } + + /*SD: dwmmc Channel-2 with 4 bit bus width */ + err = exynos_dwmmc_init(2, 4); + if (err) { + debug("dwmmc Channel-2 init failed\n"); + return err; + } + err = exynos_pinmux_config(PERIPH_ID_SDMMC0, PINMUX_FLAG_8BIT_MODE); if (err) { debug("SDMMC0 not configured\n"); return err; } - err = s5p_mmc_init(0, 8); + /*eMMC: dwmmc Channel-0 with 8 bit bus width */ + err = exynos_dwmmc_init(0, 8); + if (err) { + debug("dwmmc Channel-0 init failed\n"); + return err; + } + return err; } #endif diff --git a/include/configs/smdk5250.h b/include/configs/smdk5250.h index e412da8..7dc2d96 100644 --- a/include/configs/smdk5250.h +++ b/include/configs/smdk5250.h @@ -77,8 +77,8 @@ /* SD/MMC configuration */ #define CONFIG_GENERIC_MMC #define CONFIG_MMC -#define CONFIG_SDHCI -#define CONFIG_S5P_SDHCI +#define CONFIG_DWMMC +#define CONFIG_EXYNOS_DWMMC #define CONFIG_BOARD_EARLY_INIT_F