Skip to content
Snippets Groups Projects
Commit d558107c authored by Stefan Roese's avatar Stefan Roese Committed by Wolfgang Denk
Browse files

mtd: Introduce CONFIG_MTD_DEVICE to select compilation of mtdcore.o


This new define enables mtdcore.c compilation and with this we can
select the MTD device infrastructure needed for the reworked mtdparts
command.

We now have the 2 MTD infrastructure defines, CONFIG_MTD_DEVICE and
CONFIG_MTD_PARTITIONS. CONFIG_MTD_DEVICE is needed (as explained above)
for the "mtdparts" command and CONFIG_MTD_PARTITIONS is needed for UBI.

Signed-off-by: default avatarStefan Roese <sr@denx.de>
Cc: Scott Wood <scottwood@freescale.com>
parent 942556a9
No related branches found
No related tags found
No related merge requests found
......@@ -1846,6 +1846,17 @@ The following options need to be configured:
These options enable and control the auto-update feature;
for a more detailed description refer to doc/README.update.
- MTD Support (mtdparts command, UBI support)
CONFIG_MTD_DEVICE
Adds the MTD device infrastructure from the Linux kernel.
Needed for mtdparts command support.
CONFIG_MTD_PARTITIONS
Adds the MTD partitioning infrastructure from the Linux
kernel. Needed for UBI support.
Legacy uImage format:
Arg Where When
......
......@@ -25,7 +25,8 @@ include $(TOPDIR)/config.mk
LIB := $(obj)libmtd.a
COBJS-$(CONFIG_MTD_PARTITIONS) += mtdcore.o mtdpart.o
COBJS-$(CONFIG_MTD_DEVICE) += mtdcore.o
COBJS-$(CONFIG_MTD_PARTITIONS) += mtdpart.o
COBJS-$(CONFIG_MTD_CONCAT) += mtdconcat.o
COBJS-$(CONFIG_HAS_DATAFLASH) += at45.o
COBJS-$(CONFIG_FLASH_CFI_DRIVER) += cfi_flash.o
......
......@@ -57,7 +57,7 @@ static void nand_init_chip(struct mtd_info *mtd, struct nand_chip *nand,
else
mtd->name += gd->reloc_off;
#ifdef CONFIG_MTD_PARTITIONS
#ifdef CONFIG_MTD_DEVICE
/*
* Add MTD device so that we can reference it later
* via the mtdcore infrastructure (e.g. ubi).
......
......@@ -43,7 +43,7 @@ void onenand_init(void)
puts("OneNAND: ");
print_size(onenand_mtd.size, "\n");
#ifdef CONFIG_MTD_PARTITIONS
#ifdef CONFIG_MTD_DEVICE
/*
* Add MTD device so that we can reference it later
* via the mtdcore infrastructure (e.g. ubi).
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment