summaryrefslogtreecommitdiff
path: root/firmware/drivers/nand_id.c
diff options
context:
space:
mode:
authorRob Purchase <shotofadds@rockbox.org>2009-03-02 23:36:12 +0000
committerRob Purchase <shotofadds@rockbox.org>2009-03-02 23:36:12 +0000
commit9f6e117e8283ce683efe546b32139dd723c724d1 (patch)
tree4439fd3dc5836038159aae4569e893b006e1a276 /firmware/drivers/nand_id.c
parent3fe6152a1a6095e41426709d4a2eb3780529d518 (diff)
downloadrockbox-9f6e117e8283ce683efe546b32139dd723c724d1.tar.gz
rockbox-9f6e117e8283ce683efe546b32139dd723c724d1.zip
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
Diffstat (limited to 'firmware/drivers/nand_id.c')
-rw-r--r--firmware/drivers/nand_id.c30
1 files changed, 19 insertions, 11 deletions
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
31 31
32static const struct nand_info samsung[] = 32static const struct nand_info samsung[] =
33{ 33{
34/* { id1, id2, pages_per_block, blocks_per_bank, page_size, spare_size, col_cycles, row_cycles } */ 34/*
35 35 id1, id2
36 /* K9F4G08UOM */ 36 pages/block, blocks, page_size, spare_size, col_cycles, row_cycles, planes
37 {0xDC, 0x10, 64, 4096, 2048, 64, 2, 3 }, 37*/
38 /* K9K8G08UOM */ 38 {0xDC, 0x10, /* K9F4G08UOM */
39 {0xD3, 0x51, 64, 8192, 2048, 64, 2, 3 }, 39 64, 4096, 2048, 64, 2, 3, 1 },
40 /* K9LAG08UOM */ 40
41 {0xD5, 0x55, 128, 8192, 2048, 64, 2, 3 }, 41 {0xD3, 0x51, /* K9K8G08UOM */
42 /* K9LBG08UOM, K9HBG08U1M, K9MCG08U5M */ 42 64, 8192, 2048, 64, 2, 3, 1 },
43 {0xD7, 0x55, 128, 8192, 4096, 128, 2, 3 }, 43
44 {0xD5, 0x14, /* K9GAG08UOM */
45 128, 4096, 4096, 128, 2, 3, 2 },
46
47 {0xD5, 0x55, /* K9LAG08UOM, K9HBG08U1M, K9MCG08U5M */
48 128, 8192, 2048, 64, 2, 3, 4 },
49
50 {0xD7, 0x55, /* K9LBG08UOM */
51 128, 8192, 4096, 128, 2, 3, 4 },
44}; 52};
45 53
46#define NI(id, x) {id, (struct nand_info*)x, (sizeof(x)/sizeof(struct nand_info))} 54#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[] =
49 NI(0xEC, samsung), 57 NI(0xEC, samsung),
50}; 58};
51 59
52// -------------------------------------------------------------------------------------------------- 60// -----------------------------------------------------------------------------
53 61
54struct nand_info* nand_identify(unsigned char data[5]) 62struct nand_info* nand_identify(unsigned char data[5])
55 { 63 {