Opened 2 years ago

Closed 2 years ago

#20902 closed defect (fixed)

mtk nand driver failed to build in trunk.

Reported by: stephan.oelze@… Owned by: developers
Priority: normal Milestone:
Component: kernel Version: Trunk
Keywords: Cc: stephan.oelze@…


tried to build mtk nanddriver which is included in this patch (3.18)


build process fails with:

# configuration written to .config
make[5]: Leaving directory `/hdd/openwrt/ramips/build_dir/target-mipsel_1004kc+dsp_musl-1.1.11/linux-ramips_mt7621/linux-3.18.23'
make[5]: Entering directory `/hdd/openwrt/ramips/build_dir/target-mipsel_1004kc+dsp_musl-1.1.11/linux-ramips_mt7621/linux-3.18.23'
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CALL    scripts/
  CHK     include/generated/compile.h
  CC      drivers/mtd/nand/mtk_nand.o
drivers/mtd/nand/mtk_nand.c:113:25: error: 'NAND_MAX_OOBSIZE' undeclared here (not in a function)
 static u8 local_oob_buf[NAND_MAX_OOBSIZE];
drivers/mtd/nand/mtk_nand.c: In function 'mtk_nand_erase_hw':
drivers/mtd/nand/mtk_nand.c:1425:6: error: 'struct nand_chip' has no member named 'erase_cmd'
  chip->erase_cmd(mtd, page);
drivers/mtd/nand/mtk_nand.c: At top level:
drivers/mtd/nand/mtk_nand.c:113:11: warning: 'local_oob_buf' defined but not used [-Wunused-variable]
 static u8 local_oob_buf[NAND_MAX_OOBSIZE];
drivers/mtd/nand/mtk_nand.c:1392:1: warning: 'mtk_nand_read_page' defined but not used [-Wunused-function]
 mtk_nand_read_page(struct mtd_info *mtd, struct nand_chip *chip, u8 * buf, int page)
drivers/mtd/nand/mtk_nand.c:1431:1: warning: 'mtk_nand_erase' defined but not used [-Wunused-function]
 mtk_nand_erase(struct mtd_info *mtd, int page)
drivers/mtd/nand/mtk_nand.c: In function 'mtk_nand_write_oob_hw':
drivers/mtd/nand/mtk_nand.c:1647:1: warning: control reaches end of non-void function [-Wreturn-type]
make[8]: *** [drivers/mtd/nand/mtk_nand.o] Error 1
make[7]: *** [drivers/mtd/nand] Error 2
make[6]: *** [drivers/mtd] Error 2
make[5]: *** [drivers] Error 2
make[5]: Leaving directory `/hdd/openwrt/ramips/build_dir/target-mipsel_1004kc+dsp_musl-1.1.11/linux-ramips_mt7621/linux-3.18.23'
make[4]: *** [/hdd/openwrt/ramips/build_dir/target-mipsel_1004kc+dsp_musl-1.1.11/linux-ramips_mt7621/linux-3.18.23/.image] Error 2
make[4]: Leaving directory `/hdd/openwrt/ramips/target/linux/ramips'
make[3]: *** [install] Error 2
make[3]: Leaving directory `/hdd/openwrt/ramips/target/linux'
make[2]: *** [target/linux/install] Error 2
make[2]: Leaving directory `/hdd/openwrt/ramips'
make[1]: *** [/hdd/openwrt/ramips/staging_dir/target-mipsel_1004kc+dsp_musl-1.1.11/stamp/.target_install] Error 2
make[1]: Leaving directory `/hdd/openwrt/ramips'
make: *** [world] Fehler 2

Attachments (0)

Change History (2)

comment:1 Changed 2 years ago by anonymous

found this:

can confirm that this patch is working for nandflash used in ubiquiti Edgerouter X.
Nantype is : Spansion S34ML02G200TF100

and its regognized by dmesg:

root@OpenWrt:/# dmesg | grep nand
[    4.800000] nand: device found, Manufacturer ID: 0x01, Chip ID: 0xda
[    4.820000] nand: AMD/Spansion NAND 256MiB 3,3V 8-bit
[    4.830000] nand: 256MiB, SLC, page size: 2048, OOB size: 64
[    5.580000] mtk_nand: UnCorrectable at PageAddr=640
[    5.590000] mtk_nand: UnCorrectable at PageAddr=640
[    5.600000] mtk_nand: UnCorrectable at PageAddr=640
[    5.610000] mtk_nand: UnCorrectable at PageAddr=640
[    5.630000] mtk_nand: UnCorrectable at PageAddr=640
[    5.640000] mtk_nand: UnCorrectable at PageAddr=640
[    5.650000] mtk_nand: UnCorrectable at PageAddr=640
[    5.660000] mtk_nand: UnCorrectable at PageAddr=640
[    5.680000] [mtk_nand] probe successfully!
[    5.690000] mtk_nand: UnCorrectable at PageAddr=131008
[    5.700000] mtk_nand: UnCorrectable at PageAddr=131008
[    5.710000] mtk_nand: UnCorrectable at PageAddr=131008
[    5.720000] mtk_nand: UnCorrectable at PageAddr=131008
[    5.740000] mtk_nand: UnCorrectable at PageAddr=130944
[    5.750000] mtk_nand: UnCorrectable at PageAddr=130944
[    5.760000] mtk_nand: UnCorrectable at PageAddr=130944
[    5.770000] mtk_nand: UnCorrectable at PageAddr=130944
[    5.790000] mtk_nand: UnCorrectable at PageAddr=130880
[    5.800000] mtk_nand: UnCorrectable at PageAddr=130880
[    5.810000] mtk_nand: UnCorrectable at PageAddr=130880
[    5.820000] mtk_nand: UnCorrectable at PageAddr=130880
[    5.830000] mtk_nand: UnCorrectable at PageAddr=130816
[    5.840000] mtk_nand: UnCorrectable at PageAddr=130816
[    5.850000] mtk_nand: UnCorrectable at PageAddr=130816
[    5.860000] mtk_nand: UnCorrectable at PageAddr=130816

comment:2 Changed 2 years ago by nbd

  • Resolution set to fixed
  • Status changed from new to closed

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.