From patchwork Mon Jul 6 21:14:54 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 34336 Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n66LMQkg017440 for ; Mon, 6 Jul 2009 21:22:27 GMT Received: from dlep35.itg.ti.com ([157.170.170.118]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id n66LJehr028555; Mon, 6 Jul 2009 16:19:45 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep35.itg.ti.com (8.13.7/8.13.7) with ESMTP id n66LJeJC014676; Mon, 6 Jul 2009 16:19:40 -0500 (CDT) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 2FC4280689; Mon, 6 Jul 2009 16:19:01 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp51.itg.ti.com (dflp51.itg.ti.com [128.247.22.94]) by linux.omap.com (Postfix) with ESMTP id 6A7B880650 for ; Mon, 6 Jul 2009 16:18:13 -0500 (CDT) Received: from medina.ext.ti.com (localhost [127.0.0.1]) by dflp51.itg.ti.com (8.13.7/8.13.7) with ESMTP id n66LIC72014723 for ; Mon, 6 Jul 2009 16:18:13 -0500 (CDT) Received: from mail192-va3-R.bigfish.com (mail-va3.bigfish.com [216.32.180.114]) by medina.ext.ti.com (8.13.7/8.13.7) with ESMTP id n66LI7YJ000314 for ; Mon, 6 Jul 2009 16:18:12 -0500 Received: from mail192-va3 (localhost.localdomain [127.0.0.1]) by mail192-va3-R.bigfish.com (Postfix) with ESMTP id 8286C14680F6 for ; Mon, 6 Jul 2009 21:18:07 +0000 (UTC) X-SpamScore: 0 X-BigFish: vps0(zzzz1202hzzz2dh62h) X-Spam-TCS-SCL: 1:0 X-FB-SS: 5, X-MS-Exchange-Organization-Antispam-Report: OrigIP: 209.85.216.201; Service: EHS Received: by mail192-va3 (MessageSwitch) id 1246915074861576_11423; Mon, 6 Jul 2009 21:17:54 +0000 (UCT) Received: from mail-px0-f201.google.com (mail-px0-f201.google.com [209.85.216.201]) by mail192-va3.bigfish.com (Postfix) with ESMTP id AA9B514C0050 for ; Mon, 6 Jul 2009 21:17:54 +0000 (UTC) Received: by mail-px0-f201.google.com with SMTP id 39so1158123pxi.4 for ; Mon, 06 Jul 2009 14:17:54 -0700 (PDT) Received: by 10.114.59.9 with SMTP id h9mr8127726waa.88.1246915074485; Mon, 06 Jul 2009 14:17:54 -0700 (PDT) Received: from localhost ([216.254.16.51]) by mx.google.com with ESMTPS id v9sm11951520wah.1.2009.07.06.14.17.53 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 06 Jul 2009 14:17:53 -0700 (PDT) From: Kevin Hilman To: linux-arm-kernel@lists.arm.linux.org.uk Date: Mon, 6 Jul 2009 14:14:54 -0700 Message-Id: <1246914900-9034-21-git-send-email-khilman@deeprootsystems.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1246914900-9034-20-git-send-email-khilman@deeprootsystems.com> References: <1246914900-9034-1-git-send-email-khilman@deeprootsystems.com> <1246914900-9034-2-git-send-email-khilman@deeprootsystems.com> <1246914900-9034-3-git-send-email-khilman@deeprootsystems.com> <1246914900-9034-4-git-send-email-khilman@deeprootsystems.com> <1246914900-9034-5-git-send-email-khilman@deeprootsystems.com> <1246914900-9034-6-git-send-email-khilman@deeprootsystems.com> <1246914900-9034-7-git-send-email-khilman@deeprootsystems.com> <1246914900-9034-8-git-send-email-khilman@deeprootsystems.com> <1246914900-9034-9-git-send-email-khilman@deeprootsystems.com> <1246914900-9034-10-git-send-email-khilman@deeprootsystems.com> <1246914900-9034-11-git-send-email-khilman@deeprootsystems.com> <1246914900-9034-12-git-send-email-khilman@deeprootsystems.com> <1246914900-9034-13-git-send-email-khilman@deeprootsystems.com> <1246914900-9034-14-git-send-email-khilman@deeprootsystems.com> <1246914900-9034-15-git-send-email-khilman@deeprootsystems.com> <1246914900-9034-16-git-send-email-khilman@deeprootsystems.com> <1246914900-9034-17-git-send-email-khilman@deeprootsystems.com> <1246914900-9034-18-git-send-email-khilman@deeprootsystems.com> <1246914900-9034-19-git-send-email-khilman@deeprootsystems.com> <1246914900-9034-20-git-send-email-khilman@deeprootsystems.com> Cc: davinci-linux-open-source@linux.davincidsp.com Subject: [PATCH 20/26] davinci: MMC/SD Support for dm365 EVM X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.4 Precedence: list List-Id: davinci-linux-open-source.linux.davincidsp.com List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: davinci-linux-open-source-bounces@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com From: Sandeep Paulraj Patch adds support for MMC/SD in the DM365 EVM. Pinmux for MMC/SD slot 1 on the DM365 EVM is also configured. Signed-off-by: Sandeep Paulraj Signed-off-by: Kevin Hilman --- arch/arm/mach-davinci/board-dm365-evm.c | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c index 9dda399..e62d1ab 100644 --- a/arch/arm/mach-davinci/board-dm365-evm.c +++ b/arch/arm/mach-davinci/board-dm365-evm.c @@ -33,6 +33,7 @@ #include #include #include +#include #define DM365_EVM_PHY_MASK (0x2) #define DM365_EVM_MDIO_FREQUENCY (2200000) /* PHY bus frequency */ @@ -57,6 +58,13 @@ static struct davinci_i2c_platform_data i2c_pdata = { .bus_delay = 0 /* usec */, }; +static struct davinci_mmc_config dm365evm_mmc_config = { + .wires = 4, + .max_freq = 50000000, + .caps = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED, + .version = MMC_CTLR_VERSION_2, +}; + static void dm365evm_emac_configure(void) { /* @@ -93,6 +101,21 @@ static void dm365evm_emac_configure(void) davinci_cfg_reg(DM365_INT_EMAC_MISCPULSE); } +static void dm365evm_mmc_configure(void) +{ + /* + * MMC/SD pins are multiplexed with GPIO and EMIF + * Further details are available at the DM365 ARM + * Subsystem Users Guide(sprufg5.pdf) pages 118, 128 - 131 + */ + davinci_cfg_reg(DM365_SD1_CLK); + davinci_cfg_reg(DM365_SD1_CMD); + davinci_cfg_reg(DM365_SD1_DATA3); + davinci_cfg_reg(DM365_SD1_DATA2); + davinci_cfg_reg(DM365_SD1_DATA1); + davinci_cfg_reg(DM365_SD1_DATA0); +} + static void __init evm_init_i2c(void) { davinci_init_i2c(&i2c_pdata); @@ -116,6 +139,10 @@ static __init void dm365_evm_init(void) davinci_serial_init(&uart_config); dm365evm_emac_configure(); + dm365evm_mmc_configure(); + + davinci_setup_mmc(0, &dm365evm_mmc_config); + davinci_setup_mmc(1, &dm365evm_mmc_config); soc_info->emac_pdata->phy_mask = DM365_EVM_PHY_MASK; soc_info->emac_pdata->mdio_max_freq = DM365_EVM_MDIO_FREQUENCY;