aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/nand/bf5xx_nand.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/mtd/nand/bf5xx_nand.c b/drivers/mtd/nand/bf5xx_nand.c
index 6fbeefa3a766..79947bea4d57 100644
--- a/drivers/mtd/nand/bf5xx_nand.c
+++ b/drivers/mtd/nand/bf5xx_nand.c
@@ -110,15 +110,6 @@ static const unsigned short bfin_nfc_pin_req[] =
110 0}; 110 0};
111 111
112#ifdef CONFIG_MTD_NAND_BF5XX_BOOTROM_ECC 112#ifdef CONFIG_MTD_NAND_BF5XX_BOOTROM_ECC
113static uint8_t bbt_pattern[] = { 0xff };
114
115static struct nand_bbt_descr bootrom_bbt = {
116 .options = 0,
117 .offs = 63,
118 .len = 1,
119 .pattern = bbt_pattern,
120};
121
122static struct nand_ecclayout bootrom_ecclayout = { 113static struct nand_ecclayout bootrom_ecclayout = {
123 .eccbytes = 24, 114 .eccbytes = 24,
124 .eccpos = { 115 .eccpos = {
@@ -809,7 +800,6 @@ static int __devinit bf5xx_nand_probe(struct platform_device *pdev)
809 /* setup hardware ECC data struct */ 800 /* setup hardware ECC data struct */
810 if (hardware_ecc) { 801 if (hardware_ecc) {
811#ifdef CONFIG_MTD_NAND_BF5XX_BOOTROM_ECC 802#ifdef CONFIG_MTD_NAND_BF5XX_BOOTROM_ECC
812 chip->badblock_pattern = &bootrom_bbt;
813 chip->ecc.layout = &bootrom_ecclayout; 803 chip->ecc.layout = &bootrom_ecclayout;
814#endif 804#endif
815 chip->read_buf = bf5xx_nand_dma_read_buf; 805 chip->read_buf = bf5xx_nand_dma_read_buf;
@@ -830,6 +820,10 @@ static int __devinit bf5xx_nand_probe(struct platform_device *pdev)
830 goto out_err_nand_scan; 820 goto out_err_nand_scan;
831 } 821 }
832 822
823#ifdef CONFIG_MTD_NAND_BF5XX_BOOTROM_ECC
824 chip->badblockpos = 63;
825#endif
826
833 /* add NAND partition */ 827 /* add NAND partition */
834 bf5xx_nand_add_partition(info); 828 bf5xx_nand_add_partition(info);
835 829