Update the Telechips NAND driver to use the nand_identify() function introduced in r18052.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18063 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
8189246cbc
commit
3352b265e6
2 changed files with 16 additions and 45 deletions
|
@ -975,6 +975,7 @@ target/arm/pnx0101/pcm-pnx0101.c
|
|||
|
||||
#ifdef LOGIK_DAX
|
||||
#ifndef SIMULATOR
|
||||
drivers/nand_id.c
|
||||
target/arm/ata-nand-telechips.c
|
||||
target/arm/tcc77x/adc-tcc77x.c
|
||||
target/arm/tcc77x/kernel-tcc77x.c
|
||||
|
@ -994,6 +995,7 @@ target/arm/tcc77x/pcm-tcc77x.c
|
|||
|
||||
#ifdef SANSA_M200
|
||||
#ifndef SIMULATOR
|
||||
drivers/nand_id.c
|
||||
target/arm/ata-nand-telechips.c
|
||||
target/arm/tcc77x/adc-tcc77x.c
|
||||
target/arm/tcc77x/kernel-tcc77x.c
|
||||
|
@ -1013,6 +1015,7 @@ target/arm/tcc77x/pcm-tcc77x.c
|
|||
|
||||
#ifdef SANSA_C100
|
||||
#ifndef SIMULATOR
|
||||
drivers/nand_id.c
|
||||
target/arm/ata-nand-telechips.c
|
||||
target/arm/tcc77x/adc-tcc77x.c
|
||||
target/arm/tcc77x/kernel-tcc77x.c
|
||||
|
@ -1032,6 +1035,7 @@ target/arm/tcc77x/pcm-tcc77x.c
|
|||
|
||||
#ifdef IAUDIO_7
|
||||
#ifndef SIMULATOR
|
||||
drivers/nand_id.c
|
||||
target/arm/ata-nand-telechips.c
|
||||
target/arm/tcc77x/adc-tcc77x.c
|
||||
target/arm/tcc77x/system-tcc77x.c
|
||||
|
@ -1042,6 +1046,7 @@ target/arm/tcc77x/iaudio7/power-iaudio7.c
|
|||
|
||||
#ifdef COWON_D2
|
||||
#ifndef SIMULATOR
|
||||
drivers/nand_id.c
|
||||
drivers/pcf50606.c
|
||||
target/arm/lcd-as-memframe.S
|
||||
target/arm/ata-nand-telechips.c
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include <string.h>
|
||||
#include "led.h"
|
||||
#include "panic.h"
|
||||
#include "nand_id.h"
|
||||
|
||||
/* The NAND driver is currently work-in-progress and as such contains
|
||||
some dead code and debug stuff, such as the next few lines. */
|
||||
|
@ -378,57 +379,22 @@ static void nand_get_chip_info(void)
|
|||
|
||||
manuf_id = id_buf[0];
|
||||
|
||||
switch (manuf_id)
|
||||
{
|
||||
case 0xEC: /* SAMSUNG */
|
||||
/* Identify the chip geometry */
|
||||
struct nand_info* nand_data = nand_identify(id_buf);
|
||||
|
||||
switch(id_buf[1]) /* Chip Id */
|
||||
{
|
||||
case 0xD3: /* K9K8G08UOM */
|
||||
|
||||
page_size = 2048;
|
||||
spare_size = 64;
|
||||
pages_per_block = 64;
|
||||
blocks_per_bank = 8192;
|
||||
col_cycles = 2;
|
||||
row_cycles = 3;
|
||||
|
||||
found = true;
|
||||
break;
|
||||
|
||||
case 0xD5: /* K9LAG08UOM */
|
||||
|
||||
page_size = 2048;
|
||||
spare_size = 64;
|
||||
pages_per_block = 128;
|
||||
blocks_per_bank = 8192;
|
||||
col_cycles = 2;
|
||||
row_cycles = 3;
|
||||
|
||||
found = true;
|
||||
break;
|
||||
|
||||
case 0xD7: /* K9LBG08UOM */
|
||||
|
||||
page_size = 4096;
|
||||
spare_size = 128;
|
||||
pages_per_block = 128;
|
||||
blocks_per_bank = 8192;
|
||||
col_cycles = 2;
|
||||
row_cycles = 3;
|
||||
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (!found)
|
||||
if (nand_data == NULL)
|
||||
{
|
||||
panicf("Unknown NAND: 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x",
|
||||
id_buf[0],id_buf[1],id_buf[2],id_buf[3],id_buf[4]);
|
||||
}
|
||||
|
||||
page_size = nand_data->page_size;
|
||||
spare_size = nand_data->spare_size;
|
||||
pages_per_block = nand_data->pages_per_block;
|
||||
blocks_per_bank = nand_data->blocks_per_bank;
|
||||
col_cycles = nand_data->col_cycles;
|
||||
row_cycles = nand_data->row_cycles;
|
||||
|
||||
pages_per_bank = blocks_per_bank * pages_per_block;
|
||||
segments_per_bank = blocks_per_bank / BLOCKS_PER_SEGMENT;
|
||||
bytes_per_segment = page_size * pages_per_block * BLOCKS_PER_SEGMENT;
|
||||
|
|
Loading…
Reference in a new issue