public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/3] disk/part.c: Make features optional
@ 2011-05-23 18:29 Matthew McClintock
  2011-05-23 18:29 ` [U-Boot] [PATCH 2/3] common/cmd_nand.c: add ifdef protection for do_bootm Matthew McClintock
  2011-05-23 21:21 ` [U-Boot] [PATCH 1/3] disk/part.c: Make features optional Kumar Gala
  0 siblings, 2 replies; 19+ messages in thread
From: Matthew McClintock @ 2011-05-23 18:29 UTC (permalink / raw)
  To: u-boot

If we don't want to build support for any partition types we can now
add #undef CONFIG_PARTITIONS in a board config file to keep this from
being compiled in. Otherwise boards assume this is compiled in by
default

Signed-off-by: Matthew McClintock <msm@freescale.com>
---
 common/cmd_mmc.c          |    2 ++
 disk/Makefile             |    2 +-
 drivers/mmc/mmc.c         |    2 ++
 include/config_defaults.h |    1 +
 4 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c
index 6166749..8e65720 100644
--- a/common/cmd_mmc.c
+++ b/common/cmd_mmc.c
@@ -168,7 +168,9 @@ int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 			mmc_dev = mmc_get_dev(dev);
 			if (mmc_dev != NULL &&
 			    mmc_dev->type != DEV_TYPE_UNKNOWN) {
+#ifdef CONFIG_PARTITIONS
 				print_part(mmc_dev);
+#endif
 				return 0;
 			}
 
diff --git a/disk/Makefile b/disk/Makefile
index 17266a2..5affe34 100644
--- a/disk/Makefile
+++ b/disk/Makefile
@@ -27,7 +27,7 @@ include $(TOPDIR)/config.mk
 
 LIB	= $(obj)libdisk.o
 
-COBJS-y += part.o
+COBJS-$(CONFIG_PARTITIONS) 	+= part.o
 COBJS-$(CONFIG_MAC_PARTITION)   += part_mac.o
 COBJS-$(CONFIG_DOS_PARTITION)   += part_dos.o
 COBJS-$(CONFIG_ISO_PARTITION)   += part_iso.o
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 7e69faf..ea5cdcb 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -1012,7 +1012,9 @@ int mmc_startup(struct mmc *mmc)
 			(mmc->cid[1] >> 8) & 0xff, mmc->cid[1] & 0xff);
 	sprintf(mmc->block_dev.revision, "%d.%d", mmc->cid[2] >> 28,
 			(mmc->cid[2] >> 24) & 0xf);
+#ifdef CONFIG_PARTITIONS
 	init_part(&mmc->block_dev);
+#endif
 
 	return 0;
 }
diff --git a/include/config_defaults.h b/include/config_defaults.h
index 0337163..d023c63 100644
--- a/include/config_defaults.h
+++ b/include/config_defaults.h
@@ -16,5 +16,6 @@
 
 #define CONFIG_GZIP 1
 #define CONFIG_ZLIB 1
+#define CONFIG_PARTITIONS 1
 
 #endif
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2011-07-26 12:28 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-23 18:29 [U-Boot] [PATCH 1/3] disk/part.c: Make features optional Matthew McClintock
2011-05-23 18:29 ` [U-Boot] [PATCH 2/3] common/cmd_nand.c: add ifdef protection for do_bootm Matthew McClintock
2011-05-23 18:29   ` [U-Boot] [PATCH 3/3] common/cmd_ximg.c: add ifdef protection for gzip uncompression Matthew McClintock
2011-05-24  3:10     ` Mike Frysinger
2011-05-24 15:48       ` [U-Boot] [PATCH v2 " Matthew McClintock
2011-07-26 12:28         ` Wolfgang Denk
2011-05-24  3:12   ` [U-Boot] [PATCH 2/3] common/cmd_nand.c: add ifdef protection for do_bootm Mike Frysinger
2011-05-24 15:47     ` [U-Boot] [PATCH v2 " Matthew McClintock
2011-06-01 15:10       ` Mike Frysinger
2011-06-01 15:55         ` McClintock Matthew-B29882
2011-06-01 16:59           ` Mike Frysinger
2011-06-01 17:58             ` McClintock Matthew-B29882
2011-06-01 17:56         ` Scott Wood
2011-06-01 19:21         ` Wolfgang Denk
2011-06-02 14:56           ` Mike Frysinger
2011-05-23 21:21 ` [U-Boot] [PATCH 1/3] disk/part.c: Make features optional Kumar Gala
2011-05-23 21:49   ` [U-Boot] [PATCH v2 " Matthew McClintock
2011-05-24  3:08     ` Mike Frysinger
2011-05-24 15:31       ` [U-Boot] [PATCH v3 " Matthew McClintock

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox