Skip to contentSkip to conversation

mmc: add support MMCIF for SuperH

PATCH New [email protected] 1 participant 1 message May 26, 2010 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH 10/203 mmc: add support MMCIF for SuperH

From: Yusuke Goda <[email protected]>

MMCIF is the MMC Host Interface in SuperH.

---

 drivers/mmc/host/Kconfig     |    8 
 drivers/mmc/host/Makefile    |    1 
 drivers/mmc/host/sh_mmcif.c  |  965 +++++++++++++++++++++++++++++++++
 include/linux/mmc/sh_mmcif.h |   39 +
 4 files changed, 1013 insertions(+)
drivers/mmc/host/Kconfig renamed from drivers/mmc/host/Kconfig~mmc-add-support-mmcif-for-superh +8 -0
diff -puN drivers/mmc/host/Kconfig~mmc-add-support-mmcif-for-superh drivers/mmc/host/Kconfig
@@ -412,3 +412,11 @@ config SDH_BFIN_MISSING_CMD_PULLUP_WORKA
 	depends on SDH_BFIN
 	help
 	  If you say yes here SD-Cards may work on the EZkit.
+
+config MMC_SH_MMCIF
+	tristate "SuperH Internal MMCIF support"
+	depends on MMC_BLOCK && (SUPERH || ARCH_SHMOBILE)
+	help
+	  This selects the MMC Host Interface controler (MMCIF).
+
+	  This driver supports MMCIF in sh7724/sh7757/sh7372.
drivers/mmc/host/Makefile renamed from drivers/mmc/host/Makefile~mmc-add-support-mmcif-for-superh +1 -0
diff -puN drivers/mmc/host/Makefile~mmc-add-support-mmcif-for-superh drivers/mmc/host/Makefile
@@ -34,6 +34,7 @@ obj-$(CONFIG_MMC_TMIO)		+= tmio_mmc.o
 obj-$(CONFIG_MMC_CB710)	+= cb710-mmc.o
 obj-$(CONFIG_MMC_VIA_SDMMC)	+= via-sdmmc.o
 obj-$(CONFIG_SDH_BFIN)		+= bfin_sdh.o
+obj-$(CONFIG_MMC_SH_MMCIF)	+= sh_mmcif.o
 
 obj-$(CONFIG_MMC_SDHCI_OF)	+= sdhci-of.o
 sdhci-of-y				:= sdhci-of-core.o
drivers/mmc/host/sh_mmcif.c new file +965 -0

965 lines not on this page · raw message

include/linux/mmc/sh_mmcif.h new file +39 -0
diff -puN /dev/null include/linux/mmc/sh_mmcif.h
@@ -0,0 +1,39 @@
+/*
+ * include/linux/mmc/sh_mmcif.h
+ *
+ * platform data for eMMC driver
+ *
+ * Copyright (C) 2010 Renesas Solutions Corp.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License.
+ *
+ */
+
+#ifndef __SH_MMCIF_H__
+#define __SH_MMCIF_H__
+
+/*
+ * MMCIF : CE_CLK_CTRL [19:16]
+ * 1000 : Peripheral clock / 512
+ * 0111 : Peripheral clock / 256
+ * 0110 : Peripheral clock / 128
+ * 0101 : Peripheral clock / 64
+ * 0100 : Peripheral clock / 32
+ * 0011 : Peripheral clock / 16
+ * 0010 : Peripheral clock / 8
+ * 0001 : Peripheral clock / 4
+ * 0000 : Peripheral clock / 2
+ * 1111 : Peripheral clock (sup_pclk set '1')
+ */
+
+struct sh_mmcif_plat_data {
+	void (*set_pwr)(struct platform_device *pdev, int state);
+	void (*down_pwr)(struct platform_device *pdev);
+	u8	sup_pclk;	/* 1 :SH7757, 0: SH7724/SH7372 */
+	unsigned long caps;
+	u32	ocr;
+};
+
+#endif /* __SH_MMCIF_H__ */

_