diff options
author | Patrick Turley <patrick.turley@freescale.com> | 2010-03-17 13:33:08 -0500 |
---|---|---|
committer | Patrick Turley <patrick.turley@freescale.com> | 2010-03-19 00:09:41 -0500 |
commit | 7c01e87a19807f920265894793d3a1eb0ebee05b (patch) | |
tree | f16d6a47c399b463c2e7d52d4a66d30d7136c6f8 | |
parent | 9307cd09f9870a6982e681167d98d797f5098b3a (diff) |
ENGR00121689 i.MX28 GPMI driver doesn't compile correctly under some conditions
Changed the driver to ignore CONFIG_MTD_CONCAT, and work correctly with
CONFIG_MTD_PARTITIONS. Also turned on the GPMI driver and UBIFS in the
default config.
Signed-off-by: Patrick Turley <patrick.turley@freescale.com>
-rw-r--r-- | arch/arm/configs/imx28evk_defconfig | 105 | ||||
-rw-r--r-- | drivers/mtd/nand/gpmi1/gpmi-base.c | 6 | ||||
-rw-r--r-- | drivers/mtd/nand/gpmi1/gpmi.h | 2 |
3 files changed, 106 insertions, 7 deletions
diff --git a/arch/arm/configs/imx28evk_defconfig b/arch/arm/configs/imx28evk_defconfig index e54ab4add818..800c95659fc7 100644 --- a/arch/arm/configs/imx28evk_defconfig +++ b/arch/arm/configs/imx28evk_defconfig @@ -1,7 +1,6 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.31 -# Thu Mar 18 16:41:39 2010 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y @@ -458,7 +457,100 @@ CONFIG_FIRMWARE_IN_KERNEL=y CONFIG_EXTRA_FIRMWARE="" # CONFIG_SYS_HYPERVISOR is not set # CONFIG_CONNECTOR is not set -# CONFIG_MTD is not set +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +# CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_TESTS is not set +# CONFIG_MTD_REDBOOT_PARTS is not set +# CONFIG_MTD_CMDLINE_PARTS is not set +# CONFIG_MTD_AFS_PARTS is not set +# CONFIG_MTD_AR7_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +# CONFIG_MTD_BLKDEVS is not set +# CONFIG_MTD_BLOCK is not set +# CONFIG_MTD_BLOCK_RO is not set +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set +# CONFIG_SSFDC is not set +# CONFIG_MTD_OOPS is not set + +# +# RAM/ROM/Flash chip drivers +# +# CONFIG_MTD_CFI is not set +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PLATRAM is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set +CONFIG_MTD_NAND=y +# CONFIG_MTD_NAND_VERIFY_WRITE is not set +# CONFIG_MTD_NAND_ECC_SMC is not set +# CONFIG_MTD_NAND_MUSEUM_IDS is not set +# CONFIG_MTD_NAND_GPIO is not set +CONFIG_MTD_NAND_IDS=y +# CONFIG_MTD_NAND_DISKONCHIP is not set +# CONFIG_MTD_NAND_NANDSIM is not set +CONFIG_MTD_NAND_GPMI1=y +# CONFIG_MTD_NAND_PLATFORM is not set +# CONFIG_MTD_ALAUDA is not set +# CONFIG_MTD_ONENAND is not set + +# +# LPDDR flash memory drivers +# +# CONFIG_MTD_LPDDR is not set + +# +# UBI - Unsorted block images +# +CONFIG_MTD_UBI=y +CONFIG_MTD_UBI_WL_THRESHOLD=4096 +CONFIG_MTD_UBI_BEB_RESERVE=1 +# CONFIG_MTD_UBI_GLUEBI is not set + +# +# UBI debugging options +# +# CONFIG_MTD_UBI_DEBUG is not set +# CONFIG_MTD_UBI_BLOCK is not set # CONFIG_PARPORT is not set CONFIG_BLK_DEV=y # CONFIG_BLK_DEV_COW_COMMON is not set @@ -1489,6 +1581,13 @@ CONFIG_HFSPLUS_FS=m # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set +# CONFIG_JFFS2_FS is not set +CONFIG_UBIFS_FS=y +# CONFIG_UBIFS_FS_XATTR is not set +# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set +CONFIG_UBIFS_FS_LZO=y +CONFIG_UBIFS_FS_ZLIB=y +# CONFIG_UBIFS_FS_DEBUG is not set CONFIG_CRAMFS=m # CONFIG_SQUASHFS is not set CONFIG_VXFS_FS=m @@ -1745,7 +1844,7 @@ CONFIG_BINARY_PRINTF=y CONFIG_BITREVERSE=y CONFIG_GENERIC_FIND_LAST_BIT=y CONFIG_CRC_CCITT=m -# CONFIG_CRC16 is not set +CONFIG_CRC16=y # CONFIG_CRC_T10DIF is not set CONFIG_CRC_ITU_T=m CONFIG_CRC32=y diff --git a/drivers/mtd/nand/gpmi1/gpmi-base.c b/drivers/mtd/nand/gpmi1/gpmi-base.c index ea1bb9f52ec2..7c91b44678da 100644 --- a/drivers/mtd/nand/gpmi1/gpmi-base.c +++ b/drivers/mtd/nand/gpmi1/gpmi-base.c @@ -2231,11 +2231,11 @@ static int gpmi_scan_middle(struct gpmi_nand_data *g) */ static int gpmi_register_with_mtd(struct gpmi_nand_data *g) { + struct mtd_info *mtd = &g->mtd; #if defined(CONFIG_MTD_PARTITIONS) int r; unsigned i; struct gpmi_platform_data *gpd = g->gpd; - struct mtd_info *mtd = &g->mtd; struct nand_chip *nand = &g->nand; struct mtd_partition partitions[2]; struct mtd_info *search_mtd; @@ -2379,7 +2379,7 @@ static int gpmi_register_with_mtd(struct gpmi_nand_data *g) pr_info("MTD partitioning and/or concatenation are disabled.\n" "Registering the entire GPMI medium...\n"); - add_mtd_device(g->mtd); + add_mtd_device(mtd); #else @@ -2524,9 +2524,9 @@ static int gpmi_register_with_mtd(struct gpmi_nand_data *g) */ static void gpmi_unregister_with_mtd(struct gpmi_nand_data *g) { + struct mtd_info *mtd = &g->mtd; #if defined(CONFIG_MTD_PARTITIONS) struct gpmi_platform_data *gpd = g->gpd; - struct mtd_info *mtd = &g->mtd; #endif /* diff --git a/drivers/mtd/nand/gpmi1/gpmi.h b/drivers/mtd/nand/gpmi1/gpmi.h index c49268ce9442..45db15c3b7ba 100644 --- a/drivers/mtd/nand/gpmi1/gpmi.h +++ b/drivers/mtd/nand/gpmi1/gpmi.h @@ -288,7 +288,7 @@ struct gpmi_nand_data { struct nand_device_info device_info; -#if defined(CONFIG_MTD_PARTITIONS) && defined(CONFIG_MTD_CONCAT) +#if defined(CONFIG_MTD_PARTITIONS) struct mtd_info *general_use_mtd; struct mtd_partition *partitions; unsigned partition_count; |