RE: [PATCH] ti816x: add support for nand on ti8168 evm
If there are no review comments on this patch, can this be merged? Thanks and Regards, Parth -Original Message- From: Saxena, Parth Sent: Monday, September 19, 2011 6:54 PM To: linux-omap@vger.kernel.org Cc: linux-...@lists.infradead.org; t...@atomide.com; Saxena, Parth; Basheer, Mansoor Ahamed Subject: [PATCH] ti816x: add support for nand on ti8168 evm Add partition table for NAND device on TI8168 EVM and initialise the NAND module. Signed-off-by: Saxena, Parth parth.sax...@ti.com Signed-off-by: Basheer, Mansoor Ahamed mansoor.aha...@ti.com --- This patch is tested on top of linux-omap/master and Hemant's patches submitted recently. http://www.mail-archive.com/linux-omap@vger.kernel.org/msg53457.html http://www.mail-archive.com/linux-omap@vger.kernel.org/msg54296.html arch/arm/mach-omap2/board-ti8168evm.c | 39 + 1 files changed, 39 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/board-ti8168evm.c b/arch/arm/mach- omap2/board-ti8168evm.c index e516a04..87953bb 100644 --- a/arch/arm/mach-omap2/board-ti8168evm.c +++ b/arch/arm/mach-omap2/board-ti8168evm.c @@ -14,6 +14,7 @@ */ #include linux/kernel.h #include linux/init.h +#include linux/mtd/nand.h #include mach/hardware.h #include asm/mach-types.h @@ -23,6 +24,42 @@ #include plat/irqs.h #include plat/board.h #include plat/common.h +#include plat/gpmc.h +#include plat/nand.h + +#include board-flash.h + +#define NAND_BLOCK_SIZE SZ_128K + +static struct mtd_partition ti816x_nand_partitions[] = { +/* All the partition sizes are listed in terms of NAND block size */ + { + .name = U-Boot, + .offset = 0,/* Offset = 0x0 */ + .size = 18 * NAND_BLOCK_SIZE, + .mask_flags = MTD_WRITEABLE,/* force read-only */ + }, + { + .name = U-Boot Env, + .offset = MTDPART_OFS_APPEND, /* Offset = 0x24 */ + .size = 2 * NAND_BLOCK_SIZE, + }, + { + .name = Kernel, + .offset = MTDPART_OFS_APPEND, /* Offset = 0x28 */ + .size = 34 * NAND_BLOCK_SIZE, + }, + { + .name = File System, + .offset = MTDPART_OFS_APPEND, /* Offset = 0x6C */ + .size = 1601 * NAND_BLOCK_SIZE, + }, + { + .name = Reserved, + .offset = MTDPART_OFS_APPEND, /* Offset = 0xCEE */ + .size = MTDPART_SIZ_FULL, + }, +}; static struct omap_board_config_kernel ti8168_evm_config[] __initdata = { }; @@ -35,6 +72,8 @@ static void __init ti8168_init_early(void) static void __init ti8168_evm_init(void) { + board_nand_init(ti816x_nand_partitions, + ARRAY_SIZE(ti816x_nand_partitions), 0, NAND_BUSWIDTH_16); omap_serial_init(); omap_board_config = ti8168_evm_config; omap_board_config_size = ARRAY_SIZE(ti8168_evm_config); -- 1.6.2.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH] ti816x: add support for nand on ti8168 evm
-Original Message- From: Artem Bityutskiy [mailto:dedeki...@gmail.com] Sent: Monday, September 19, 2011 10:26 AM To: Saxena, Parth Cc: linux-...@lists.infradead.org; Basheer, Mansoor Ahamed; linux- o...@vger.kernel.org Subject: Re: [PATCH] ti816x: add support for nand on ti8168 evm On Thu, 2011-09-08 at 18:33 +0530, Saxena, Parth wrote: Add partition table for NAND device on TI8168 EVM and initialise the NAND module. Signed-off-by: Saxena, Parth parth.sax...@ti.com Signed-off-by: Basheer, Mansoor Ahamed mansoor.aha...@ti.com --- This patch is tested on top of linux-omap/master and Hemant's patches submitted recently. http://www.mail-archive.com/linux-omap@vger.kernel.org/msg53457.html http://www.mail-archive.com/linux-omap@vger.kernel.org/msg54296.html arch/arm/mach-omap2/board-ti8168evm.c | 39 + 1 files changed, 39 insertions(+), 0 deletions(-) Please, send this patch to Tony, I think it should go in via the omap tree, not via the MTD tree. [Saxena, Parth] Artem, I will re-post this patch to linux-omap list and Tony. Can I add your name in the 'Acked-by' section? -- Best Regards, Artem Bityutskiy -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] ti816x: add support for nand on ti8168 evm
Add partition table for NAND device on TI8168 EVM and initialise the NAND module. Signed-off-by: Saxena, Parth parth.sax...@ti.com Signed-off-by: Basheer, Mansoor Ahamed mansoor.aha...@ti.com --- This patch is tested on top of linux-omap/master and Hemant's patches submitted recently. http://www.mail-archive.com/linux-omap@vger.kernel.org/msg53457.html http://www.mail-archive.com/linux-omap@vger.kernel.org/msg54296.html arch/arm/mach-omap2/board-ti8168evm.c | 39 + 1 files changed, 39 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/board-ti8168evm.c b/arch/arm/mach-omap2/board-ti8168evm.c index e516a04..87953bb 100644 --- a/arch/arm/mach-omap2/board-ti8168evm.c +++ b/arch/arm/mach-omap2/board-ti8168evm.c @@ -14,6 +14,7 @@ */ #include linux/kernel.h #include linux/init.h +#include linux/mtd/nand.h #include mach/hardware.h #include asm/mach-types.h @@ -23,6 +24,42 @@ #include plat/irqs.h #include plat/board.h #include plat/common.h +#include plat/gpmc.h +#include plat/nand.h + +#include board-flash.h + +#define NAND_BLOCK_SIZESZ_128K + +static struct mtd_partition ti816x_nand_partitions[] = { +/* All the partition sizes are listed in terms of NAND block size */ + { + .name = U-Boot, + .offset = 0,/* Offset = 0x0 */ + .size = 18 * NAND_BLOCK_SIZE, + .mask_flags = MTD_WRITEABLE,/* force read-only */ + }, + { + .name = U-Boot Env, + .offset = MTDPART_OFS_APPEND, /* Offset = 0x24 */ + .size = 2 * NAND_BLOCK_SIZE, + }, + { + .name = Kernel, + .offset = MTDPART_OFS_APPEND, /* Offset = 0x28 */ + .size = 34 * NAND_BLOCK_SIZE, + }, + { + .name = File System, + .offset = MTDPART_OFS_APPEND, /* Offset = 0x6C */ + .size = 1601 * NAND_BLOCK_SIZE, + }, + { + .name = Reserved, + .offset = MTDPART_OFS_APPEND, /* Offset = 0xCEE */ + .size = MTDPART_SIZ_FULL, + }, +}; static struct omap_board_config_kernel ti8168_evm_config[] __initdata = { }; @@ -35,6 +72,8 @@ static void __init ti8168_init_early(void) static void __init ti8168_evm_init(void) { + board_nand_init(ti816x_nand_partitions, + ARRAY_SIZE(ti816x_nand_partitions), 0, NAND_BUSWIDTH_16); omap_serial_init(); omap_board_config = ti8168_evm_config; omap_board_config_size = ARRAY_SIZE(ti8168_evm_config); -- 1.6.2.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH] ti816x: add support for nand on ti8168 evm
If there are no review comments on this patch, can this be merged? Thanks and Regards, Parth -Original Message- From: Saxena, Parth Sent: Thursday, September 08, 2011 6:33 PM To: linux-...@lists.infradead.org Cc: linux-omap@vger.kernel.org; Saxena, Parth; Basheer, Mansoor Ahamed Subject: [PATCH] ti816x: add support for nand on ti8168 evm Add partition table for NAND device on TI8168 EVM and initialise the NAND module. Signed-off-by: Saxena, Parth parth.sax...@ti.com Signed-off-by: Basheer, Mansoor Ahamed mansoor.aha...@ti.com --- This patch is tested on top of linux-omap/master and Hemant's patches submitted recently. http://www.mail-archive.com/linux-omap@vger.kernel.org/msg53457.html http://www.mail-archive.com/linux-omap@vger.kernel.org/msg54296.html arch/arm/mach-omap2/board-ti8168evm.c | 39 + 1 files changed, 39 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/board-ti8168evm.c b/arch/arm/mach- omap2/board-ti8168evm.c index e516a04..87953bb 100644 --- a/arch/arm/mach-omap2/board-ti8168evm.c +++ b/arch/arm/mach-omap2/board-ti8168evm.c @@ -14,6 +14,7 @@ */ #include linux/kernel.h #include linux/init.h +#include linux/mtd/nand.h #include mach/hardware.h #include asm/mach-types.h @@ -23,6 +24,42 @@ #include plat/irqs.h #include plat/board.h #include plat/common.h +#include plat/gpmc.h +#include plat/nand.h + +#include board-flash.h + +#define NAND_BLOCK_SIZE SZ_128K + +static struct mtd_partition ti816x_nand_partitions[] = { +/* All the partition sizes are listed in terms of NAND block size */ + { + .name = U-Boot, + .offset = 0,/* Offset = 0x0 */ + .size = 18 * NAND_BLOCK_SIZE, + .mask_flags = MTD_WRITEABLE,/* force read-only */ + }, + { + .name = U-Boot Env, + .offset = MTDPART_OFS_APPEND, /* Offset = 0x24 */ + .size = 2 * NAND_BLOCK_SIZE, + }, + { + .name = Kernel, + .offset = MTDPART_OFS_APPEND, /* Offset = 0x28 */ + .size = 34 * NAND_BLOCK_SIZE, + }, + { + .name = File System, + .offset = MTDPART_OFS_APPEND, /* Offset = 0x6C */ + .size = 1601 * NAND_BLOCK_SIZE, + }, + { + .name = Reserved, + .offset = MTDPART_OFS_APPEND, /* Offset = 0xCEE */ + .size = MTDPART_SIZ_FULL, + }, +}; static struct omap_board_config_kernel ti8168_evm_config[] __initdata = { }; @@ -35,6 +72,8 @@ static void __init ti8168_init_early(void) static void __init ti8168_evm_init(void) { + board_nand_init(ti816x_nand_partitions, + ARRAY_SIZE(ti816x_nand_partitions), 0, NAND_BUSWIDTH_16); omap_serial_init(); omap_board_config = ti8168_evm_config; omap_board_config_size = ARRAY_SIZE(ti8168_evm_config); -- 1.6.2.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] ti816x: add support for nand on ti8168 evm
Add partition table for NAND device on TI8168 EVM and initialise the NAND module. Signed-off-by: Saxena, Parth parth.sax...@ti.com Signed-off-by: Basheer, Mansoor Ahamed mansoor.aha...@ti.com --- This patch is tested on top of linux-omap/master and Hemant's patches submitted recently. http://www.mail-archive.com/linux-omap@vger.kernel.org/msg53457.html http://www.mail-archive.com/linux-omap@vger.kernel.org/msg54296.html arch/arm/mach-omap2/board-ti8168evm.c | 39 + 1 files changed, 39 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/board-ti8168evm.c b/arch/arm/mach-omap2/board-ti8168evm.c index e516a04..87953bb 100644 --- a/arch/arm/mach-omap2/board-ti8168evm.c +++ b/arch/arm/mach-omap2/board-ti8168evm.c @@ -14,6 +14,7 @@ */ #include linux/kernel.h #include linux/init.h +#include linux/mtd/nand.h #include mach/hardware.h #include asm/mach-types.h @@ -23,6 +24,42 @@ #include plat/irqs.h #include plat/board.h #include plat/common.h +#include plat/gpmc.h +#include plat/nand.h + +#include board-flash.h + +#define NAND_BLOCK_SIZESZ_128K + +static struct mtd_partition ti816x_nand_partitions[] = { +/* All the partition sizes are listed in terms of NAND block size */ + { + .name = U-Boot, + .offset = 0,/* Offset = 0x0 */ + .size = 18 * NAND_BLOCK_SIZE, + .mask_flags = MTD_WRITEABLE,/* force read-only */ + }, + { + .name = U-Boot Env, + .offset = MTDPART_OFS_APPEND, /* Offset = 0x24 */ + .size = 2 * NAND_BLOCK_SIZE, + }, + { + .name = Kernel, + .offset = MTDPART_OFS_APPEND, /* Offset = 0x28 */ + .size = 34 * NAND_BLOCK_SIZE, + }, + { + .name = File System, + .offset = MTDPART_OFS_APPEND, /* Offset = 0x6C */ + .size = 1601 * NAND_BLOCK_SIZE, + }, + { + .name = Reserved, + .offset = MTDPART_OFS_APPEND, /* Offset = 0xCEE */ + .size = MTDPART_SIZ_FULL, + }, +}; static struct omap_board_config_kernel ti8168_evm_config[] __initdata = { }; @@ -35,6 +72,8 @@ static void __init ti8168_init_early(void) static void __init ti8168_evm_init(void) { + board_nand_init(ti816x_nand_partitions, + ARRAY_SIZE(ti816x_nand_partitions), 0, NAND_BUSWIDTH_16); omap_serial_init(); omap_board_config = ti8168_evm_config; omap_board_config_size = ARRAY_SIZE(ti8168_evm_config); -- 1.6.2.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [RFC] mtd: nand: Fix bad block identification issue
-Original Message- From: Artem Bityutskiy [mailto:dedeki...@gmail.com] Sent: Thursday, April 28, 2011 11:01 PM To: Saxena, Parth; Brian Norris Cc: linux-...@lists.infradead.org; Basheer, Mansoor Ahamed; linux- o...@vger.kernel.org Subject: Re: [RFC] mtd: nand: Fix bad block identification issue On Wed, 2011-04-27 at 17:39 +0530, Saxena, Parth wrote: This patch solves the above issue for omap by initialising badblockbits. We are working further on this to find a generic fix to the problem in nand_base.c. But it looks like the generic solution is to return the line which was accidentally removed, how about this patch From: Artem Bityutskiy artem.bityuts...@nokia.com Date: Thu, 28 Apr 2011 20:26:59 +0300 Subject: [PATCH] mtd: return badblockbits back In commit c7b28e25cb9beb943aead770ff14551b55fa8c79 the initialization of the backblockbits was accidentally removed. This patch returns it back, because otherwise some NAND drivers are broken. This problem was reported by Saxena, Parth parth.sax...@ti.com here: http://lists.infradead.org/pipermail/linux-mtd/2011-April/035221.html Reported-by: Saxena, Parth parth.sax...@ti.com Signed-off-by: Artem Bityutskiy artem.bityuts...@nokia.com Cc: sta...@kernel.org [2.6.36+] --- drivers/mtd/nand/nand_base.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 15510f2..5a7f817 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -3106,6 +3106,8 @@ ident_done: chip-chip_shift += 32 - 1; } + chip-badblockbits = 8; + /* Set the bad block position */ if (mtd-writesize 512 || (busw NAND_BUSWIDTH_16)) chip-badblockpos = NAND_LARGE_BADBLOCK_POS; [Saxena, Parth] Tested-By: Saxena, Parth parth.sax...@ti.com Acked By: Saxena, Parth parth.sax...@ti.com -- 1.7.2.3 -- Best Regards, Artem Bityutskiy (Артём Битюцкий) -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[RFC] mtd: nand: Fix bad block identification issue
Commit e0b58d0 (mtd: nand: add -badblockbits for minimum number of set bits in bad block byte) by Maxim Levitsky added badblockbits to nand_chip to specify minimum number of set bits in bad block byte. The patch initialized badblockbits to 8 in nand_base.c, but later the initialization line got removed by commit c7b28e2(mtd: nand: refactor BB marker detection). After this all NAND drivers with NAND_SKIP_BBTSCAN are forced to initialize it to 8. Otherwise bad block identification will fail. As a result, mounting of empty jffs2 file system on omap3evm (having bad blocks) failed giving the following error message - mount: mounting /dev/mtdblock4 on /tmp failed: Input/output error This patch solves the above issue for omap by initialising badblockbits. We are working further on this to find a generic fix to the problem in nand_base.c. Signed-off-by: Saxena, Parth parth.sax...@ti.com Signed-off-by: Basheer, Mansoor Ahamed mansoor.aha...@ti.com --- drivers/mtd/nand/omap2.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index 454f90c..350c77f 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c @@ -1005,6 +1005,8 @@ static int __devinit omap_nand_probe(struct platform_device *pdev) info-nand.options = pdata-devsize; info-nand.options |= NAND_SKIP_BBTSCAN; + info-nand.badblockbits = 8; + /* NAND write protect off */ gpmc_cs_configure(info-gpmc_cs, GPMC_CONFIG_WP, 0); -- 1.6.2.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html