mtd: nand: remove AG-AND support
We have only one AG-AND driver and it was not touched since 2005. It looks like AG-AND was not really make it to mass-production and can be considered a dead technology. Along with the AG-AND support, this patch removes the BBT_AUTO_REFRESH feature, because the only user of this feature is AG-AND. And even though it is implemented as a generic feature, I prefer to remove it because NAND flashes do not really need it in this form. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Acked-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:

committed by
David Woodhouse

parent
02f57fe448
commit
14c6578683
@@ -1240,15 +1240,6 @@ int nand_update_bbt(struct mtd_info *mtd, loff_t offs)
|
||||
*/
|
||||
static uint8_t scan_ff_pattern[] = { 0xff, 0xff };
|
||||
|
||||
static uint8_t scan_agand_pattern[] = { 0x1C, 0x71, 0xC7, 0x1C, 0x71, 0xC7 };
|
||||
|
||||
static struct nand_bbt_descr agand_flashbased = {
|
||||
.options = NAND_BBT_SCANEMPTY | NAND_BBT_SCANALLPAGES,
|
||||
.offs = 0x20,
|
||||
.len = 6,
|
||||
.pattern = scan_agand_pattern
|
||||
};
|
||||
|
||||
/* Generic flash bbt descriptors */
|
||||
static uint8_t bbt_pattern[] = {'B', 'b', 't', '0' };
|
||||
static uint8_t mirror_pattern[] = {'1', 't', 'b', 'B' };
|
||||
@@ -1333,22 +1324,6 @@ int nand_default_bbt(struct mtd_info *mtd)
|
||||
{
|
||||
struct nand_chip *this = mtd->priv;
|
||||
|
||||
/*
|
||||
* Default for AG-AND. We must use a flash based bad block table as the
|
||||
* devices have factory marked _good_ blocks. Erasing those blocks
|
||||
* leads to loss of the good / bad information, so we _must_ store this
|
||||
* information in a good / bad table during startup.
|
||||
*/
|
||||
if (this->options & NAND_IS_AND) {
|
||||
/* Use the default pattern descriptors */
|
||||
if (!this->bbt_td) {
|
||||
this->bbt_td = &bbt_main_descr;
|
||||
this->bbt_md = &bbt_mirror_descr;
|
||||
}
|
||||
this->bbt_options |= NAND_BBT_USE_FLASH;
|
||||
return nand_scan_bbt(mtd, &agand_flashbased);
|
||||
}
|
||||
|
||||
/* Is a flash based bad block table requested? */
|
||||
if (this->bbt_options & NAND_BBT_USE_FLASH) {
|
||||
/* Use the default pattern descriptors */
|
||||
|
Reference in New Issue
Block a user