From patchwork Mon May 23 21:49:42 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew McClintock X-Patchwork-Id: 97093 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 4764BB6F71 for ; Tue, 24 May 2011 07:50:05 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 144D128150; Mon, 23 May 2011 23:50:03 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CSnWY0KUf79T; Mon, 23 May 2011 23:50:02 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id ABAD628137; Mon, 23 May 2011 23:49:59 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9DED628137 for ; Mon, 23 May 2011 23:49:56 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id p3CMToCOiRVr for ; Mon, 23 May 2011 23:49:53 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from DB3EHSOBE004.bigfish.com (db3ehsobe004.messaging.microsoft.com [213.199.154.142]) by theia.denx.de (Postfix) with ESMTPS id 128472812F for ; Mon, 23 May 2011 23:49:51 +0200 (CEST) Received: from mail79-db3-R.bigfish.com (10.3.81.247) by DB3EHSOBE004.bigfish.com (10.3.84.24) with Microsoft SMTP Server id 14.1.225.22; Mon, 23 May 2011 21:49:49 +0000 Received: from mail79-db3 (localhost.localdomain [127.0.0.1]) by mail79-db3-R.bigfish.com (Postfix) with ESMTP id 293E014584EC for ; Mon, 23 May 2011 21:49:49 +0000 (UTC) X-SpamScore: 3 X-BigFish: VS3(zzzz1202h1082kzz8275bhz2dh2a8h668h839h61h) X-Spam-TCS-SCL: 0:0 X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPVD:NLI; H:mail.freescale.net; RD:none; EFVD:NLI Received: from mail79-db3 (localhost.localdomain [127.0.0.1]) by mail79-db3 (MessageSwitch) id 1306187388323086_23690; Mon, 23 May 2011 21:49:48 +0000 (UTC) Received: from DB3EHSMHS001.bigfish.com (unknown [10.3.81.244]) by mail79-db3.bigfish.com (Postfix) with ESMTP id 4C046102804B for ; Mon, 23 May 2011 21:49:48 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by DB3EHSMHS001.bigfish.com (10.3.87.101) with Microsoft SMTP Server (TLS) id 14.1.225.22; Mon, 23 May 2011 21:49:46 +0000 Received: from az33smr01.freescale.net (10.64.34.199) by 039-SN1MMR1-001.039d.mgd.msft.net (10.84.1.13) with Microsoft SMTP Server id 14.1.270.2; Mon, 23 May 2011 16:49:44 -0500 Received: from right.am.freescale.net (right.am.freescale.net [10.82.193.13]) by az33smr01.freescale.net (8.13.1/8.13.0) with ESMTP id p4NLnhvx028187 for ; Mon, 23 May 2011 16:49:43 -0500 (CDT) Received: from right.am.freescale.net (localhost.localdomain [127.0.0.1]) by right.am.freescale.net (8.14.4/8.14.4) with ESMTP id p4NLnhCc026533; Mon, 23 May 2011 16:49:43 -0500 Received: (from mattsm@localhost) by right.am.freescale.net (8.14.4/8.14.4/Submit) id p4NLngNI026531; Mon, 23 May 2011 16:49:42 -0500 From: Matthew McClintock To: Date: Mon, 23 May 2011 16:49:42 -0500 Message-ID: <1306187382-26507-1-git-send-email-msm@freescale.com> X-Mailer: git-send-email 1.5.6.5 In-Reply-To: References: MIME-Version: 1.0 X-OriginatorOrg: freescale.net Cc: Matthew McClintock Subject: [U-Boot] [PATCH v2 1/3] disk/part.c: Make features optional X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 --- v2: Fix patch to apply to current tree Note: This includes the fixes for MMC only. USB/SATA/etc need to do something similiar 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 176646d..fe8c77b 100644 --- a/common/cmd_mmc.c +++ b/common/cmd_mmc.c @@ -180,7 +180,9 @@ int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) mmc_dev = mmc_get_dev(curr_device); 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 21aedba..f2d236c 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -1007,7 +1007,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