Commit 80ebf20f authored by Enrico Scholz's avatar Enrico Scholz Committed by David Woodhouse

[MTD] [NAND] pxa3xx_nand: allow to disable builtin flash-type table

This patch adds a MTD_NAND_PXA3xx_BUILTIN configuration variables which
allows to disable usage of builtin flash-type table.  Not enabling this
option saves some space in the generated driver.
Signed-off-by: default avatarEnrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent c8ac3f81
...@@ -334,6 +334,13 @@ config MTD_NAND_PXA3xx ...@@ -334,6 +334,13 @@ config MTD_NAND_PXA3xx
This enables the driver for the NAND flash device found on This enables the driver for the NAND flash device found on
PXA3xx processors PXA3xx processors
config MTD_NAND_PXA3xx_BUILTIN
bool "Use builtin definitions for some NAND chips (deprecated)"
depends on MTD_NAND_PXA3xx
help
This enables builtin definitions for some NAND chips. This
is deprecated in favor of platform specific data.
config MTD_NAND_CM_X270 config MTD_NAND_CM_X270
tristate "Support for NAND Flash on CM-X270 modules" tristate "Support for NAND Flash on CM-X270 modules"
depends on MTD_NAND && MACH_ARMCORE depends on MTD_NAND && MACH_ARMCORE
......
...@@ -164,6 +164,7 @@ static int use_dma = 1; ...@@ -164,6 +164,7 @@ static int use_dma = 1;
module_param(use_dma, bool, 0444); module_param(use_dma, bool, 0444);
MODULE_PARM_DESC(use_dma, "enable DMA for data transfering to/from NAND HW"); MODULE_PARM_DESC(use_dma, "enable DMA for data transfering to/from NAND HW");
#ifdef CONFIG_MTD_NAND_PXA3xx_BUILTIN
static struct pxa3xx_nand_cmdset smallpage_cmdset = { static struct pxa3xx_nand_cmdset smallpage_cmdset = {
.read1 = 0x0000, .read1 = 0x0000,
.read2 = 0x0050, .read2 = 0x0050,
...@@ -275,6 +276,7 @@ static struct pxa3xx_nand_flash *builtin_flash_types[] = { ...@@ -275,6 +276,7 @@ static struct pxa3xx_nand_flash *builtin_flash_types[] = {
&micron1GbX16, &micron1GbX16,
&stm2GbX16, &stm2GbX16,
}; };
#endif /* CONFIG_MTD_NAND_PXA3xx_BUILTIN */
#define NDTR0_tCH(c) (min((c), 7) << 19) #define NDTR0_tCH(c) (min((c), 7) << 19)
#define NDTR0_tCS(c) (min((c), 7) << 16) #define NDTR0_tCS(c) (min((c), 7) << 16)
...@@ -931,6 +933,7 @@ static int pxa3xx_nand_detect_flash(struct pxa3xx_nand_info *info, ...@@ -931,6 +933,7 @@ static int pxa3xx_nand_detect_flash(struct pxa3xx_nand_info *info,
return 0; return 0;
} }
#ifdef CONFIG_MTD_NAND_PXA3xx_BUILTIN
for (i = 0; i < ARRAY_SIZE(builtin_flash_types); i++) { for (i = 0; i < ARRAY_SIZE(builtin_flash_types); i++) {
f = builtin_flash_types[i]; f = builtin_flash_types[i];
...@@ -944,6 +947,7 @@ static int pxa3xx_nand_detect_flash(struct pxa3xx_nand_info *info, ...@@ -944,6 +947,7 @@ static int pxa3xx_nand_detect_flash(struct pxa3xx_nand_info *info,
if (id == f->chip_id) if (id == f->chip_id)
return 0; return 0;
} }
#endif
return -ENODEV; return -ENODEV;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment