From patchwork Mon Mar 14 14:25:57 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 561 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:43:43 -0000 Delivered-To: patches@linaro.org Received: by 10.224.45.75 with SMTP id d11cs61924qaf; Mon, 14 Mar 2011 09:42:54 -0700 (PDT) Received: by 10.204.81.224 with SMTP id y32mr10687065bkk.152.1300120907852; Mon, 14 Mar 2011 09:41:47 -0700 (PDT) Received: from pig2.dooz.org (pig2.dooz.org [88.191.118.219]) by mx.google.com with ESMTPS id 5si8642203fav.207.2011.03.14.09.41.47 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 14 Mar 2011 09:41:47 -0700 (PDT) Received-SPF: neutral (google.com: 88.191.118.219 is neither permitted nor denied by domain of lool@dooz.org) client-ip=88.191.118.219; Authentication-Results: mx.google.com; spf=neutral (google.com: 88.191.118.219 is neither permitted nor denied by domain of lool@dooz.org) smtp.mail=lool@dooz.org Received: from bee.dooz.org (serris.dooz.org [88.166.229.232]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "bee.dooz.org", Issuer "CA Cert Signing Authority" (verified OK)) by pig2.dooz.org (Postfix) with ESMTPS id C3816C06D5 for ; Mon, 14 Mar 2011 16:41:50 +0000 (UTC) Received: by bee.dooz.org (Postfix, from userid 1000) id D47F0FB5B; Mon, 14 Mar 2011 17:41:42 +0100 (CET) Resent-From: =?iso-8859-1?Q?Lo=EFc?= Minier Resent-Date: Mon, 14 Mar 2011 17:41:42 +0100 Resent-Message-ID: <20110314164142.GL18358@bee.dooz.org> Resent-To: patches@linaro.org X-Original-To: lool@dooz.org Received: from mombin.canonical.com (mombin.canonical.com [91.189.95.16]) by pig.zood.org (Postfix) with ESMTP id 323754C0D0 for ; Mon, 14 Mar 2011 15:24:16 +0100 (CET) Received: from localhost ([127.0.0.1] helo=mombin.canonical.com) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1Pz8gu-0004r4-Hw; Mon, 14 Mar 2011 14:24:12 +0000 Received: from mail-pv0-f170.google.com ([74.125.83.170]) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1Pz8gt-0004oC-DH for linaro-dev@lists.linaro.org; Mon, 14 Mar 2011 14:24:11 +0000 Received: by mail-pv0-f170.google.com with SMTP id 16so1238289pvg.1 for ; Mon, 14 Mar 2011 07:24:11 -0700 (PDT) Received: by 10.142.2.3 with SMTP id 3mr1259331wfb.172.1300112650917; Mon, 14 Mar 2011 07:24:10 -0700 (PDT) Received: from localhost.localdomain ([114.216.146.145]) by mx.google.com with ESMTPS id x11sm3671251wfd.1.2011.03.14.07.23.54 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 14 Mar 2011 07:24:10 -0700 (PDT) From: Shawn Guo To: devicetree-discuss@lists.ozlabs.org, linaro-dev@lists.linaro.org Subject: [PATCH 5/7] mmc: support sdhci-esdhc-imx as an OF device Date: Mon, 14 Mar 2011 22:25:57 +0800 Message-Id: <1300112759-3495-6-git-send-email-shawn.guo@linaro.org> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1300112759-3495-1-git-send-email-shawn.guo@linaro.org> References: <1300112759-3495-1-git-send-email-shawn.guo@linaro.org> Cc: nicolas.pitre@linaro.org X-BeenThere: linaro-dev@lists.linaro.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Linaro Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linaro-dev-bounces@lists.linaro.org Errors-To: linaro-dev-bounces@lists.linaro.org Signed-off-by: Shawn Guo --- drivers/mmc/host/Kconfig | 7 ++++--- drivers/mmc/host/Makefile | 3 ++- drivers/mmc/host/sdhci-of-core.c | 3 +++ drivers/mmc/host/sdhci-of.h | 1 + 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index afe8c6f..9746ec1 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -133,12 +133,13 @@ config MMC_SDHCI_CNS3XXX If unsure, say N. config MMC_SDHCI_ESDHC_IMX - bool "SDHCI platform support for the Freescale eSDHC i.MX controller" - depends on MMC_SDHCI_PLTFM && (ARCH_MX25 || ARCH_MX35 || ARCH_MX5) + bool "SDHCI support for the Freescale eSDHC i.MX controller" + depends on ARCH_MX25 || ARCH_MX35 || ARCH_MX5 + depends on MMC_SDHCI_PLTFM || MMC_SDHCI_OF select MMC_SDHCI_IO_ACCESSORS help This selects the Freescale eSDHC controller support on the platform - bus, found on platforms like mx35/51. + or OF bus, found on platforms like mx35/51. If unsure, say N. diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile index e834fb2..cca8dfd 100644 --- a/drivers/mmc/host/Makefile +++ b/drivers/mmc/host/Makefile @@ -39,7 +39,6 @@ obj-$(CONFIG_MMC_USHC) += ushc.o obj-$(CONFIG_MMC_SDHCI_PLTFM) += sdhci-platform.o sdhci-platform-y := sdhci-pltfm.o sdhci-platform-$(CONFIG_MMC_SDHCI_CNS3XXX) += sdhci-cns3xxx.o -sdhci-platform-$(CONFIG_MMC_SDHCI_ESDHC_IMX) += sdhci-esdhc-imx.o sdhci-platform-$(CONFIG_MMC_SDHCI_DOVE) += sdhci-dove.o sdhci-platform-$(CONFIG_MMC_SDHCI_TEGRA) += sdhci-tegra.o @@ -48,6 +47,8 @@ sdhci-of-y := sdhci-of-core.o sdhci-of-$(CONFIG_MMC_SDHCI_OF_ESDHC) += sdhci-of-esdhc.o sdhci-of-$(CONFIG_MMC_SDHCI_OF_HLWD) += sdhci-of-hlwd.o +obj-$(CONFIG_MMC_SDHCI_ESDHC_IMX) += sdhci-esdhc-imx.o + ifeq ($(CONFIG_CB710_DEBUG),y) CFLAGS-cb710-mmc += -DDEBUG endif diff --git a/drivers/mmc/host/sdhci-of-core.c b/drivers/mmc/host/sdhci-of-core.c index 0b32ad7..d803fa5 100644 --- a/drivers/mmc/host/sdhci-of-core.c +++ b/drivers/mmc/host/sdhci-of-core.c @@ -32,6 +32,9 @@ #include "sdhci.h" static const struct of_device_id sdhci_of_match[] = { +#ifdef CONFIG_MMC_SDHCI_ESDHC_IMX + { .compatible = "fsl,imx-esdhc", .data = &sdhci_esdhc_imx_data, }, +#endif #ifdef CONFIG_MMC_SDHCI_OF_ESDHC { .compatible = "fsl,mpc8379-esdhc", .data = &sdhci_esdhc_data, }, { .compatible = "fsl,mpc8536-esdhc", .data = &sdhci_esdhc_data, }, diff --git a/drivers/mmc/host/sdhci-of.h b/drivers/mmc/host/sdhci-of.h index e88fe2e..90fb2eb 100644 --- a/drivers/mmc/host/sdhci-of.h +++ b/drivers/mmc/host/sdhci-of.h @@ -31,6 +31,7 @@ extern void sdhci_be32bs_writel(struct sdhci_host *host, u32 val, int reg); extern void sdhci_be32bs_writew(struct sdhci_host *host, u16 val, int reg); extern void sdhci_be32bs_writeb(struct sdhci_host *host, u8 val, int reg); +extern struct sdhci_data sdhci_esdhc_imx_data; extern struct sdhci_data sdhci_esdhc_data; extern struct sdhci_data sdhci_hlwd_data;