[U-Boot] [RFC] atmel:dataflash: remove unused mmc_mux

Andreas Bießmann andreas.devel at googlemail.com
Mon Aug 27 14:24:15 CEST 2012


The command 'dataflash_mmc_mux' is nowhere used and uses an outdated interface
since dataflash is handled via the sf command.
This is a first step towards removing the dataflash and merging it with sf
interfaces.

Signed-off-by: Andreas Bießmann <andreas.devel at googlemail.com>
---
 common/Makefile                |    1 -
 common/cmd_dataflash_mmc_mux.c |   64 ----------------------------------------
 include/at45.h                 |    5 ----
 3 files changed, 70 deletions(-)
 delete mode 100644 common/cmd_dataflash_mmc_mux.c

diff --git a/common/Makefile b/common/Makefile
index 3d62775..0500e87 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -71,7 +71,6 @@ COBJS-$(CONFIG_CMD_BOOTLDR) += cmd_bootldr.o
 COBJS-$(CONFIG_CMD_CACHE) += cmd_cache.o
 COBJS-$(CONFIG_CMD_CONSOLE) += cmd_console.o
 COBJS-$(CONFIG_CMD_CPLBINFO) += cmd_cplbinfo.o
-COBJS-$(CONFIG_DATAFLASH_MMC_SELECT) += cmd_dataflash_mmc_mux.o
 COBJS-$(CONFIG_CMD_DATE) += cmd_date.o
 ifdef CONFIG_4xx
 COBJS-$(CONFIG_CMD_SETGETDCR) += cmd_dcr.o
diff --git a/common/cmd_dataflash_mmc_mux.c b/common/cmd_dataflash_mmc_mux.c
deleted file mode 100644
index f8f1787..0000000
--- a/common/cmd_dataflash_mmc_mux.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * (C) Copyright 2000
- * Wolfgang Denk, DENX Software Engineering, wd at denx.de.
- *
- * 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
- */
-
-#include <common.h>
-#include <command.h>
-
-static int mmc_nspi (const char *);
-
-int do_dataflash_mmc_mux (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
-{
-	switch (argc) {
-	case 2:			/* on / off	*/
-		switch (mmc_nspi (argv[1])) {
-		case 0:	AT91F_SelectSPI ();
-			break;
-		case 1:	AT91F_SelectMMC ();
-			break;
-		}
-	case 1:			/* get status */
-		printf ("Mux is configured to be %s\n",
-			AT91F_GetMuxStatus () ? "MMC" : "SPI");
-		return 0;
-	default:
-		return CMD_RET_USAGE;
-	}
-	return 0;
-}
-
-static int mmc_nspi (const char *s)
-{
-	if (strcmp (s, "mmc") == 0) {
-		return 1;
-	} else if (strcmp (s, "spi") == 0) {
-		return 0;
-	}
-	return -1;
-}
-
-U_BOOT_CMD(
-	dataflash_mmc_mux, 2, 1, do_dataflash_mmc_mux,
-	"enable or disable MMC or SPI\n",
-	"[mmc, spi]\n"
-	"    - enable or disable MMC or SPI"
-);
diff --git a/include/at45.h b/include/at45.h
index e7e3711..fda87a5 100644
--- a/include/at45.h
+++ b/include/at45.h
@@ -1,11 +1,6 @@
 
 #ifndef	_AT45_H_
 #define	_AT45_H_
-#ifdef	CONFIG_DATAFLASH_MMC_SELECT
-extern	void AT91F_SelectMMC(void);
-extern	void AT91F_SelectSPI(void);
-extern	int AT91F_GetMuxStatus(void);
-#endif
 extern	void AT91F_SpiInit(void);
 extern	void AT91F_SpiEnable(int cs);
 extern	unsigned int AT91F_SpiWrite ( AT91PS_DataflashDesc pDesc );
-- 
1.7.10.4



More information about the U-Boot mailing list