M7350v2_en_gpl

This commit is contained in:
T
2024-09-09 08:54:06 +00:00
parent f9cc65cfda
commit 801e6d2ad8
564 changed files with 96107 additions and 535 deletions

View File

@ -357,4 +357,8 @@ config MTD_DOCPROBE_55AA
LinuxBIOS or if you need to recover a DiskOnChip Millennium on which
you have managed to wipe the first block.
config FLASH_TYPE_ETRON
bool "Etron Flash"
default n
endmenu

View File

@ -2068,7 +2068,7 @@ int msm_nand_scan(struct mtd_info *mtd)
int flash_id = 0, err = 0;
uint32_t i, mtd_writesize;
uint8_t dev_found = 0, wide_bus;
uint32_t manid, devid, devcfg;
uint32_t manid = 0, devid = 0, devcfg;
uint32_t bad_block_byte;
struct nand_flash_dev *flashdev = NULL;
struct nand_manufacturers *flashman = NULL;
@ -2107,6 +2107,16 @@ int msm_nand_scan(struct mtd_info *mtd)
((devcfg >> 4) & 0x3);
supported_flash->oobsize = (8 << ((devcfg >> 2) & 1)) *
(supported_flash->pagesize >> 9);
#if 0
#ifdef CONFIG_FLASH_TYPE_ETRON
supported_flash->oobsize = 128;
#endif
#endif
if((manid == ETRON_2G1G_MANID) && (devid == ETRON_2G1G_DEVID)) {
supported_flash->oobsize = 128;
}
} else {
supported_flash->widebus = flashdev->options &
NAND_BUSWIDTH_16 ? 1 : 0;
@ -2116,6 +2126,7 @@ int msm_nand_scan(struct mtd_info *mtd)
}
supported_flash->flash_id = flash_id;
supported_flash->density = flashdev->chipsize << 20;
//supported_flash->oobsize = 128;
}
if (dev_found) {
@ -2132,6 +2143,15 @@ int msm_nand_scan(struct mtd_info *mtd)
else
chip->bch_caps = MSM_NAND_CAP_4_BIT_BCH;
#if 0
#ifdef CONFIG_FLASH_TYPE_ETRON
chip->bch_caps = MSM_NAND_CAP_8_BIT_BCH;
#endif
#endif
if((manid == ETRON_2G1G_MANID) && (devid == ETRON_2G1G_DEVID)) {
chip->bch_caps = MSM_NAND_CAP_8_BIT_BCH;
}
pr_info("NAND Id: 0x%x Buswidth: %dBits Density: %lld MByte\n",
supported_flash->flash_id, (wide_bus) ? 16 : 8,
(mtd->size >> 20));

View File

@ -169,7 +169,14 @@ struct nand_flash_dev nand_flash_ids[] = {
* Manufacturer ID list
*/
struct nand_manufacturers nand_manuf_ids[] = {
#if 0
#ifdef CONFIG_FLASH_TYPE_ETRON
{NAND_MFR_ETRON, "Etron"},
#else
{NAND_MFR_TOSHIBA, "Toshiba"},
#endif
#endif
{NAND_MFR_ETRON, "Etron"},
{NAND_MFR_SAMSUNG, "Samsung"},
{NAND_MFR_FUJITSU, "Fujitsu"},
{NAND_MFR_NATIONAL, "National"},