导航

    全志在线开发者论坛

    • 注册
    • 登录
    • 搜索
    • 版块
    • 话题
    • 在线文档
    • 社区主页

    host ECC nand flash怎么支持

    T Series
    1
    3
    61
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • H
      huali LV 3 最后由 编辑

      MX35LF2G14AC host ecc, lichee/brandy-2.0/u-boot-2018/drivers/mtd/awnand/spinand/physic/id.c
      MX35LF2G14AC的ECC参数怎么写?
      {
      .Model = "MX35LF2G14AC",
      .NandID = {0xc2, 0x20, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff},
      .DieCntPerChip = 1,
      .SectCntPerPage = 4,
      .PageCntPerBlk = 64,
      .BlkCntPerDie = 2048,
      .OobSizePerPage = 64,
      .OperationOpt = SPINAND_QUAD_READ | SPINAND_QUAD_PROGRAM |
      SPINAND_DUAL_READ,
      .MaxEraseTimes = 65000,
      //.EccFlag = HAS_EXT_ECC_STATUS,
      .EccType = BIT4_LIMIT5_TO_8_ERR9_TO_15,
      //.EccProtectedType = SIZE16_OFF4_LEN4_OFF8,
      .EccProtectedType = SIZE512_OFF16_LEN4_OFF32,
      .BadBlockFlag = BAD_BLK_FLAG_FIRST_2_PAGE,
      },

      1 条回复 最后回复 回复 引用 分享 0
      • H
        huali LV 3 最后由 编辑

        改成
        {
        .Model = "MX35LF2G14AC",
        .NandID = {0xc2, 0x20, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff},
        .DieCntPerChip = 1,
        .SectCntPerPage = 4,
        .PageCntPerBlk = 64,
        .BlkCntPerDie = 2048,
        .OobSizePerPage = 64,
        .OperationOpt = SPINAND_QUAD_READ | SPINAND_QUAD_PROGRAM |
        SPINAND_DUAL_READ,
        .MaxEraseTimes = 65000,
        .EccFlag = HAS_EXT_ECC_SE01, // 需要外部ECC支持
        .EccType = BIT4_LIMIT5_TO_7_ERR8_LIMIT_12, // 4位ECC能力
        .EccProtectedType = SIZE16_OFF4_LEN8_OFF4, // 数据保护布局
        .BadBlockFlag = BAD_BLK_FLAG_FIRST__PAGE,
        },

        报错:

        need erase flash: 18
        [06.447]mtdparts: mtdparts=nand:1024k@0(boot0)ro,3072k@1048576(uboot)ro,1024k@4194304(secure_storage)ro,-(sys)

        device nand0 <nand>, # parts = 4
        #: name size offset mask_flags
        0: boot0 0x00100000 0x00000000 1
        1: uboot 0x00300000 0x00100000 1
        2: secure_storage 0x00100000 0x00400000 1
        3: sys 0x0fb00000 0x00500000 0

        active partition: nand0,0 - (boot0) 0x00100000 @ 0x00000000

        defaults:
        mtdids : nand0=nand
        mtdparts: mtdparts=nand:1024k@0(boot0)ro,3072k@1048576(uboot)ro,1024k@4194304(secure_storage)ro,-(sys)
        [06.497]MTD info (4)
        [06.499]pagesize: 0x1000
        [06.502]blksize: 0x40000
        [06.504]num offset bytes name
        [06.507]0 0x00000000 0x00100000 boot0
        [06.511]1 0x00100000 0x00300000 uboot
        [06.515]2 0x00400000 0x00100000 secure_storage
        [06.519]3 0x00500000 0x0fb00000 sys
        [06.522]ubi attach the last part of mtd device: NO.3
        [06.671]ubi0: attaching mtd4
        [13.933]ubi0 error: check_corruption: PEB 280 contains corrupted VID header, and the data does not contain all 0xFF
        [13.943]ubi0 error: check_corruption: this may be a non-UBI PEB or a severe VID header corruption which requires manual inspection
        [13.954]Volume identifier header dump:
        [13.958] magic 55424923
        [13.960] version 1
        [13.962] vol_type 0
        [13.964] copy_flag 0
        [13.966] compat 0
        [13.968] vol_id 0
        [13.970] lnum 1
        [13.972] data_size 4096
        [13.974] used_ebs 0
        [13.976] data_pad 0
        [13.978] sqnum 0
        [13.980] hdr_crc 7f585319
        [13.982]Volume identifier header hexdump:
        [13.986]hexdump of PEB 280 offset 4096, length 258048[14.222]ubi0 error: check_corruption: PEB 289 contains corrupted VID header, and the data does not contain all 0xFF
        [14.232]ubi0 error: check_corruption: this may be a non-UBI PEB or a severe VID header corruption which requires manual inspection
        [14.244]Volume identifier header dump:
        [14.247] magic 55424923
        [14.250] version 1
        [14.252] vol_type 0
        [14.254] copy_flag 0
        [14.256] compat 0
        [14.257] vol_id 0
        [14.259] lnum 1
        [14.261] data_size 4096
        [14.263] used_ebs 0
        [14.265] data_pad 0
        [14.267] sqnum 0
        [14.269] hdr_crc 7f585319
        [14.272]Volume identifier header hexdump:
        [14.275]hexdump of PEB 289 offset 4096, length 258048[14.305]ubi0 error: check_corruption: PEB 290 contains corrupted VID header, and the data does not contain all 0xFF
        [14.315]ubi0 error: check_corruption: this may be a non-UBI PEB or a severe VID header corruption which requires manual inspection
        [14.326]Volume identifier header dump:
        [14.330] magic 55424923
        [14.332] version 1
        [14.334] vol_type 0
        [14.336] copy_flag 0
        [14.338] compat 0
        [14.340] vol_id 0
        [14.342] lnum 1
        [14.344] data_size 4096
        [14.346] used_ebs 0
        [14.348] data_pad 0
        [14.349] sqnum 0
        [14.351] hdr_crc 7f585319
        [14.354]Volume identifier header hexdump:
        [14.358]hexdump of PEB 290 offset 4096, length 258048[14.387]ubi0 error: check_corruption: PEB 291 contains corrupted VID header, and the data does not contain all 0xFF
        [14.397]ubi0 error: check_corruption: this may be a non-UBI PEB or a severe VID header corruption which requires manual inspection
        [14.408]Volume identifier header dump:
        [14.412] magic 55424923
        [14.414] version 1
        [14.416] vol_type 0
        [14.418] copy_flag 0
        [14.420] compat 0
        [14.422] vol_id 0
        [14.424] lnum 1
        [14.426] data_size 4096
        [14.428] used_ebs 0
        [14.430] data_pad 0
        [14.432] sqnum 0
        [14.434] hdr_crc 7f585319
        [14.436]Volume identifier header hexdump:
        [14.440]hexdump of PEB 291 offset 4096, length 258048[14.469]ubi0 error: check_corruption: PEB 292 contains corrupted VID header, and the data does not contain all 0xFF
        [14.479]ubi0 error: check_corruption: this may be a non-UBI PEB or a severe VID header corruption which requires manual inspection
        [14.491]Volume identifier header dump:
        [14.494] magic 55424923
        [14.496] version 1
        [14.498] vol_type 0
        [14.500] copy_flag 0
        [14.502] compat 0
        [14.504] vol_id 0
        [14.506] lnum 1
        [14.508] data_size 4096
        [14.510] used_ebs 0
        [14.512] data_pad 0
        [14.514] sqnum 0
        [14.516] hdr_crc 7f585319
        [14.518]Volume identifier header hexdump:
        [14.522]hexdump of PEB 292 offset 4096, length 258048[14.551]ubi0 error: check_corruption: PEB 293 contains corrupted VID header, and the data does not contain all 0xFF
        [14.561]ubi0 error: check_corruption: this may be a non-UBI PEB or a severe VID header corruption which requires manual inspection
        [14.573]Volume identifier header dump:
        [14.576] magic 55424923
        [14.579] version 1
        [14.581] vol_type 0
        [14.583] copy_flag 0
        [14.584] compat 0
        [14.586] vol_id 0
        [14.588] lnum 1
        [14.590] data_size 4096
        [14.592] used_ebs 0
        [14.594] data_pad 0
        [14.596] sqnum 0
        [14.598] hdr_crc 7f585319
        [14.601]Volume identifier header hexdump:
        [14.604]hexdump of PEB 293 offset 4096, length 258048[33.020]ubi0: scanning is finished
        [33.023]ubi0 error: late_analysis: 6 PEBs are corrupted and preserved
        [33.029]Corrupted PEBs are:[33.031] 293[33.033] 292[33.034] 291[33.035] 290[33.036] 289[33.037] 280[33.038]
        [33.039]ubi0 error: ubi_read_volume_table: the layout volume was not found
        [33.045]ubi0 error: ubi_attach_mtd_dev: failed to attach mtd4, error -22
        [33.052]UBI error: cannot attach mtd4
        [33.055]UBI error: cannot initialize UBI, error -22
        UBI init error 22
        Please check, if the correct MTD partition is used (size big enough?)
        [33.067]ubi part sys err !
        [33.070]erase blk 0 to blk 32
        [33.086]erase blk 40 to blk 2048
        [33.258]blk 432 is bad, skip to erase

        1 条回复 最后回复 回复 引用 分享 0
        • H
          huali LV 3 最后由 编辑

          @huali 在 host ECC nand flash怎么支持 中说:

          .EccType = BIT4_LIMIT5_TO_8_ERR9_TO_15,
          .EccProtectedType = SIZE512_OFF16_LEN4_OFF32,
          .BadBlockFlag = BAD_BLK_FLAG_FIRST_2_PAGE,
          .EccFlag、.EccType 、.EccProtectedType、.BadBlockFlag 该怎么写,谁有文档

          1 条回复 最后回复 回复 引用 分享 0
          • 1 / 1
          • First post
            Last post

          Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

          行为准则 | 用户协议 | 隐私权政策