From 9f6e117e8283ce683efe546b32139dd723c724d1 Mon Sep 17 00:00:00 2001 From: Rob Purchase Date: Mon, 2 Mar 2009 23:36:12 +0000 Subject: TCC NAND: The BLOCKS_PER_SEGMENT define was actually the number of planes mentioned in the Samsung NAND datasheet. Add this to the nand_id struct, so that it can be runtime detected (required for some D2s to boot). Use the struct directly instead of making a local copy, and format the nand_info table to 80 columns. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20186 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/nand_id.c | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) (limited to 'firmware/drivers') diff --git a/firmware/drivers/nand_id.c b/firmware/drivers/nand_id.c index dfb96c8820..f2b9861c7c 100644 --- a/firmware/drivers/nand_id.c +++ b/firmware/drivers/nand_id.c @@ -31,16 +31,24 @@ struct nand_manufacturer static const struct nand_info samsung[] = { -/* { id1, id2, pages_per_block, blocks_per_bank, page_size, spare_size, col_cycles, row_cycles } */ - - /* K9F4G08UOM */ - {0xDC, 0x10, 64, 4096, 2048, 64, 2, 3 }, - /* K9K8G08UOM */ - {0xD3, 0x51, 64, 8192, 2048, 64, 2, 3 }, - /* K9LAG08UOM */ - {0xD5, 0x55, 128, 8192, 2048, 64, 2, 3 }, - /* K9LBG08UOM, K9HBG08U1M, K9MCG08U5M */ - {0xD7, 0x55, 128, 8192, 4096, 128, 2, 3 }, +/* + id1, id2 + pages/block, blocks, page_size, spare_size, col_cycles, row_cycles, planes +*/ + {0xDC, 0x10, /* K9F4G08UOM */ + 64, 4096, 2048, 64, 2, 3, 1 }, + + {0xD3, 0x51, /* K9K8G08UOM */ + 64, 8192, 2048, 64, 2, 3, 1 }, + + {0xD5, 0x14, /* K9GAG08UOM */ + 128, 4096, 4096, 128, 2, 3, 2 }, + + {0xD5, 0x55, /* K9LAG08UOM, K9HBG08U1M, K9MCG08U5M */ + 128, 8192, 2048, 64, 2, 3, 4 }, + + {0xD7, 0x55, /* K9LBG08UOM */ + 128, 8192, 4096, 128, 2, 3, 4 }, }; #define NI(id, x) {id, (struct nand_info*)x, (sizeof(x)/sizeof(struct nand_info))} @@ -49,7 +57,7 @@ static const struct nand_manufacturer all[] = NI(0xEC, samsung), }; -// -------------------------------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- struct nand_info* nand_identify(unsigned char data[5]) { -- cgit v1.2.3