# HG changeset patch # User Ross Younger # Date 1258115560 0 # Node ID c4bb345a216c2270a84b4b6b6c9b25d1097afdfc # Parent d98364f1410252e86a0fce1dce777a1d43f53322 synth nand: don't provide BBT data if it's not called for diff --git a/packages/devs/nand/synth/current/ChangeLog b/packages/devs/nand/synth/current/ChangeLog --- a/packages/devs/nand/synth/current/ChangeLog +++ b/packages/devs/nand/synth/current/ChangeLog @@ -1,3 +1,7 @@ +2009-11-13 Ross Younger + + * Don't provide BBT data if it's not called for. + 2009-11-09 Ross Younger * nand_synth.c: Provide read_part_page function. diff --git a/packages/devs/nand/synth/current/src/nand_synth.c b/packages/devs/nand/synth/current/src/nand_synth.c --- a/packages/devs/nand/synth/current/src/nand_synth.c +++ b/packages/devs/nand/synth/current/src/nand_synth.c @@ -54,6 +54,7 @@ #include #include #include +#include #include #include #include @@ -183,7 +184,9 @@ static int last_block_g // The bad block table needed by the generic NAND layer. // 2 bits per block. This is separate from the bad block table // held in the image, which is what gets used by the driver. +#ifdef CYGSEM_IO_NAND_USE_BBT static unsigned char bbtable[BLOCK_COUNT / 4]; +#endif // ---------------------------------------------------------------------------- // Interaction with the I/O auxiliary and its nand.tcl script. @@ -1297,8 +1300,10 @@ static int synth_devinit(cyg_nand_device dev->blockcount_bits = log2u(BLOCK_COUNT); dev->chipsize_log = dev->page_bits + dev->block_page_bits + dev->blockcount_bits; +#ifdef CYGSEM_IO_NAND_USE_BBT dev->bbt.datasize = BLOCK_COUNT / 4; dev->bbt.data = bbtable; +#endif if (SPARE_PER_PAGE >= 64) { dev->oob = &nand_mtd_oob_64; } else if (SPARE_PER_PAGE >= 16) {