]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
Xilinx: ARM: mmc: Move MMC driver to drivers/mmc
authorJoe Hershberger <joe.hershberger@ni.com>
Tue, 5 Jun 2012 23:49:42 +0000 (18:49 -0500)
committerJohn Linn <john.linn@xilinx.com>
Wed, 6 Jun 2012 18:02:25 +0000 (11:02 -0700)
Move the mmc driver to a common drivers location so it can be used by
any zynq-based board that wants to use it.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
arch/arm/include/asm/arch-zynq/mmc.h [new file with mode: 0644]
board/xilinx/zynq_common/Makefile
board/xilinx/zynq_common/board.c
drivers/mmc/Makefile
drivers/mmc/zynq_mmc.c [moved from board/xilinx/zynq_common/mmc.c with 99% similarity]
drivers/mmc/zynq_mmc.h [moved from board/xilinx/zynq_common/sd_hardware.h with 100% similarity]
include/configs/zynq_ep107.h
include/configs/zynq_zc702.h
include/configs/zynq_zc770.h
include/configs/zynq_zed.h

diff --git a/arch/arm/include/asm/arch-zynq/mmc.h b/arch/arm/include/asm/arch-zynq/mmc.h
new file mode 100644 (file)
index 0000000..8a70ae3
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * Copyright 2012 Joe Hershberger <joe.hershberger@ni.com>
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * 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, or (at your option) any later version.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+extern int zynq_mmc_init(bd_t *bd);
index 96683a7f3185bd3a83881d8298dbbadcff314788..d884920b05df66a09b5a18b3e96da48de2d16df2 100644 (file)
@@ -36,7 +36,6 @@ COBJS-$(CONFIG_CMD_NET) += xemacps_g.o xemacps_control.o \
                xemacps.o xgmac.o
 COBJS-$(CONFIG_CMD_SPI) += xilinx_qspi.o xilinx_qspips.o
 COBJS-$(CONFIG_CMD_NAND) += xilinx_nandps.o
-COBJS-$(CONFIG_CMD_MMC) += mmc.o
 
 COBJS  := $(sort $(COBJS-y))
 
index f5b65b312781f02aada9ab3d78f477cae187612f..c7d688b6882d4edc14c77ca6b505b524acd5e6c5 100644 (file)
@@ -3,6 +3,7 @@
  */
 
 #include <common.h>
+#include <asm/arch/mmc.h>
 #include <asm/arch/xparameters.h>
 #include <netdev.h>
 #include <zynqpl.h>
@@ -673,6 +674,13 @@ int board_eth_init(bd_t *bis)
 }
 #endif
 
+#ifdef CONFIG_CMD_MMC
+int board_mmc_init(bd_t *bd)
+{
+       return zynq_mmc_init(bd);
+}
+#endif
+
 int dram_init(void)
 {
        gd->ram_size = PHYS_SDRAM_1_SIZE;
index 3496f0aa0feea3bf649f3904d8ac52690fbcb3db..4881f0fd6d9ddad78cfb3efc2a6ae7b90e5d06d7 100644 (file)
@@ -36,6 +36,7 @@ COBJS-$(CONFIG_OMAP3_MMC) += omap3_mmc.o
 COBJS-$(CONFIG_OMAP_HSMMC) += omap_hsmmc.o
 COBJS-$(CONFIG_PXA_MMC) += pxa_mmc.o
 COBJS-$(CONFIG_S5P_MMC) += s5p_mmc.o
+COBJS-$(CONFIG_ZYNQ_MMC) += zynq_mmc.o
 
 COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
similarity index 99%
rename from board/xilinx/zynq_common/mmc.c
rename to drivers/mmc/zynq_mmc.c
index 5d4bd769a295c6ade8acf68b9ceaf1ad9f42ac2f..f97aa70efebfd430752fa04f479ba6d28930a499 100755 (executable)
@@ -1,10 +1,11 @@
 #include <common.h>
+#include <asm/arch/mmc.h>
 #include <asm/arch/xparameters.h>
 #include <asm/errno.h>
 #include <malloc.h>
 #include <mmc.h>
 
-#include "sd_hardware.h"
+#include "zynq_mmc.h"
 
 #define SD_BASEADDR XPSS_SDIO0_BASEADDR
 
@@ -368,7 +369,7 @@ static int pele_sdh_init(struct mmc *mmc)
        return 0;
 }
 
-int board_mmc_init(bd_t *bd)
+int zynq_mmc_init(bd_t *bd)
 {
        struct mmc *mmc;
 
index e4aa9b64b79e30e569164c53144451e8319c5de2..11c568396374d2ce7c4415cc06b6fa330ffe23e2 100644 (file)
 
 #ifdef CONFIG_MMC
 #define CONFIG_GENERIC_MMC
+#define CONFIG_ZYNQ_MMC
 #define CONFIG_CMD_MMC
 #define CONFIG_CMD_FAT
 #define CONFIG_CMD_EXT2
index b75b7392241f2897bfe42b151c268e5698caa54b..45002bca8107fbf637f5470733541d028bcc237a 100644 (file)
@@ -81,6 +81,7 @@
 
 #ifdef CONFIG_MMC
 #define CONFIG_GENERIC_MMC
+#define CONFIG_ZYNQ_MMC
 #define CONFIG_CMD_MMC
 #define CONFIG_CMD_FAT
 #define CONFIG_CMD_EXT2
index 997b8916e943be89a3962c5deff37ce7f805a78b..602dccccf657a55ea8e4f5414c267447b8621d8e 100644 (file)
 
 #ifdef CONFIG_MMC
 #define CONFIG_GENERIC_MMC
+#define CONFIG_ZYNQ_MMC
 #define CONFIG_CMD_MMC
 #define CONFIG_CMD_FAT
 #define CONFIG_CMD_EXT2
index 2fe050f946ad24aea72a7575b61ee42cae0dbd92..ea060a413e77f6a3d8de815bdd54ef743c932d95 100644 (file)
 
 #ifdef CONFIG_MMC
 #define CONFIG_GENERIC_MMC
+#define CONFIG_ZYNQ_MMC
 #define CONFIG_CMD_MMC
 #define CONFIG_CMD_FAT
 #define CONFIG_CMD_EXT2