diff options
Diffstat (limited to 'drivers/mtd/onenand/onenand_base.c')
-rw-r--r-- | drivers/mtd/onenand/onenand_base.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c index 9827ab779c08..26caf2590dae 100644 --- a/drivers/mtd/onenand/onenand_base.c +++ b/drivers/mtd/onenand/onenand_base.c | |||
@@ -3763,6 +3763,12 @@ static int onenand_probe(struct mtd_info *mtd) | |||
3763 | /* Restore system configuration 1 */ | 3763 | /* Restore system configuration 1 */ |
3764 | this->write_word(syscfg, this->base + ONENAND_REG_SYS_CFG1); | 3764 | this->write_word(syscfg, this->base + ONENAND_REG_SYS_CFG1); |
3765 | 3765 | ||
3766 | /* Workaround */ | ||
3767 | if (syscfg & ONENAND_SYS_CFG1_SYNC_WRITE) { | ||
3768 | bram_maf_id = this->read_word(this->base + ONENAND_REG_MANUFACTURER_ID); | ||
3769 | bram_dev_id = this->read_word(this->base + ONENAND_REG_DEVICE_ID); | ||
3770 | } | ||
3771 | |||
3766 | /* Check manufacturer ID */ | 3772 | /* Check manufacturer ID */ |
3767 | if (onenand_check_maf(bram_maf_id)) | 3773 | if (onenand_check_maf(bram_maf_id)) |
3768 | return -ENXIO; | 3774 | return -ENXIO; |
@@ -3782,6 +3788,9 @@ static int onenand_probe(struct mtd_info *mtd) | |||
3782 | this->device_id = dev_id; | 3788 | this->device_id = dev_id; |
3783 | this->version_id = ver_id; | 3789 | this->version_id = ver_id; |
3784 | 3790 | ||
3791 | /* Check OneNAND features */ | ||
3792 | onenand_check_features(mtd); | ||
3793 | |||
3785 | density = onenand_get_density(dev_id); | 3794 | density = onenand_get_density(dev_id); |
3786 | if (FLEXONENAND(this)) { | 3795 | if (FLEXONENAND(this)) { |
3787 | this->dies = ONENAND_IS_DDP(this) ? 2 : 1; | 3796 | this->dies = ONENAND_IS_DDP(this) ? 2 : 1; |
@@ -3833,9 +3842,6 @@ static int onenand_probe(struct mtd_info *mtd) | |||
3833 | else | 3842 | else |
3834 | mtd->size = this->chipsize; | 3843 | mtd->size = this->chipsize; |
3835 | 3844 | ||
3836 | /* Check OneNAND features */ | ||
3837 | onenand_check_features(mtd); | ||
3838 | |||
3839 | /* | 3845 | /* |
3840 | * We emulate the 4KiB page and 256KiB erase block size | 3846 | * We emulate the 4KiB page and 256KiB erase block size |
3841 | * But oobsize is still 64 bytes. | 3847 | * But oobsize is still 64 bytes. |