Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 03d2bfc8 authored by Olof Johansson's avatar Olof Johansson Committed by Chris Ball
Browse files

mmc: add sdhci-tegra driver for Tegra SoCs



SDHCI driver for Tegra. This driver plugs in as a new variant of
sdhci-pltfm, using the platform data structure passed in to specify the
GPIOs to use for card detect, write protect and card power enablement.

Original driver (of which only the header file is left):
Signed-off-by: default avatarYvonne Yip <y@palm.com>

The rest, which has been rewritten by now:
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
Reviewed-by: default avatarWolfram Sang <w.sang@pengutronix.de>
Acked-by: default avatarMike Rapoport <mike@compulab.co.il>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 30652aa3
Loading
Loading
Loading
Loading
+29 −0
Original line number Diff line number Diff line
/*
 * include/asm-arm/arch-tegra/include/mach/sdhci.h
 *
 * Copyright (C) 2009 Palm, Inc.
 * Author: Yvonne Yip <y@palm.com>
 *
 * This software is licensed under the terms of the GNU General Public
 * License version 2, as published by the Free Software Foundation, and
 * may be copied, distributed, and modified under those terms.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 */
#ifndef __ASM_ARM_ARCH_TEGRA_SDHCI_H
#define __ASM_ARM_ARCH_TEGRA_SDHCI_H

#include <linux/mmc/host.h>

struct tegra_sdhci_platform_data {
	int cd_gpio;
	int wp_gpio;
	int power_gpio;
	int is_8bit;
};

#endif
+10 −0
Original line number Diff line number Diff line
@@ -151,6 +151,16 @@ config MMC_SDHCI_DOVE

	  If unsure, say N.

config MMC_SDHCI_TEGRA
	tristate "SDHCI platform support for the Tegra SD/MMC Controller"
	depends on MMC_SDHCI_PLTFM && ARCH_TEGRA
	select MMC_SDHCI_IO_ACCESSORS
	help
	  This selects the Tegra SD/MMC controller. If you have a Tegra
	  platform with SD or MMC devices, say Y or M here.

	  If unsure, say N.

config MMC_SDHCI_S3C
	tristate "SDHCI support on Samsung S3C SoC"
	depends on MMC_SDHCI && PLAT_SAMSUNG
+1 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ 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

obj-$(CONFIG_MMC_SDHCI_OF)	+= sdhci-of.o
sdhci-of-y				:= sdhci-of-core.o
+3 −0
Original line number Diff line number Diff line
@@ -172,6 +172,9 @@ static const struct platform_device_id sdhci_pltfm_ids[] = {
#endif
#ifdef CONFIG_MMC_SDHCI_DOVE
	{ "sdhci-dove", (kernel_ulong_t)&sdhci_dove_pdata },
#endif
#ifdef CONFIG_MMC_SDHCI_TEGRA
	{ "sdhci-tegra", (kernel_ulong_t)&sdhci_tegra_pdata },
#endif
	{ },
};
+1 −0
Original line number Diff line number Diff line
@@ -23,5 +23,6 @@ struct sdhci_pltfm_host {
extern struct sdhci_pltfm_data sdhci_cns3xxx_pdata;
extern struct sdhci_pltfm_data sdhci_esdhc_imx_pdata;
extern struct sdhci_pltfm_data sdhci_dove_pdata;
extern struct sdhci_pltfm_data sdhci_tegra_pdata;

#endif /* _DRIVERS_MMC_SDHCI_PLTFM_H */
Loading