Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[MTD] [NAND] at91_nand.c: CMDLINE_PARTS support

This patch allows you to specify at91_nand partitions on the
kernel command line using the mtdparts variable, if
CONFIG_MTD_CMDLINE_PARTS is set.

Signed-off-by: Frank Mandarino <fmandarino@endrelia.com>
Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>

authored by

Andrew Victor and committed by
David Woodhouse
693ef66d 1a12f46a

+10
+10
drivers/mtd/nand/at91_nand.c
··· 82 82 at91_set_gpio_value(host->board->enable_pin, 1); 83 83 } 84 84 85 + #ifdef CONFIG_MTD_PARTITIONS 86 + const char *part_probes[] = { "cmdlinepart", NULL }; 87 + #endif 88 + 85 89 /* 86 90 * Probe for the NAND device. 87 91 */ ··· 155 151 #ifdef CONFIG_MTD_PARTITIONS 156 152 if (host->board->partition_info) 157 153 partitions = host->board->partition_info(mtd->size, &num_partitions); 154 + #ifdef CONFIG_MTD_CMDLINE_PARTS 155 + else { 156 + mtd->name = "at91_nand"; 157 + num_partitions = parse_mtd_partitions(mtd, part_probes, &partitions, 0); 158 + } 159 + #endif 158 160 159 161 if ((!partitions) || (num_partitions == 0)) { 160 162 printk(KERN_ERR "at91_nand: No parititions defined, or unsupported device.\n");