linux_dsm_epyc7002/drivers/mtd/nand
Josh Wu 7dc37de7d5 mtd: atmel_nand: add Nand Flash Controller (NFC) support
Nand Flash Controller (NFC) can handle automatic transfers, sending the
commands and address cycles to the NAND Flash.

To use NFC in this driver, user needs to add NFC child node in nand flash
driver. The NFC child node includes NFC's compatible string and regiters
of the address and size of NFC command registers, NFC registers (embedded
in HSMC) and NFC SRAM.
Also user need to set up the HSMC irq, which use to check whether nfc
command is finish or not.

This driver has been tested on SAMA5D3X-EK board with JFFS2, YAFFS,
UBIFS and mtd-utils.

I put the part of the mtd_speedtest result here for your information.
>From the mtd_speedtest, we can see the NFC will reduce the %50 of cpu load
when writing nand flash. No change when reading.
In the meantime, the speed will be slow about %8.

- commands use to test:
    #insmod /mnt/mtd_speedtest.ko dev=2 &
    #top -n 30 -d 1 | grep speedtest

- test result:

Before the patch:
=================================================
mtd_speedtest: MTD device: 2
mtd_speedtest: MTD device size 41943040, eraseblock size 131072, page size 2048, count of eraseblocks 320, pages per eraseblock 64, OOB size 64
  515   495 root     R     1164   0%  93% insmod /mnt/mtd_speedtest.ko dev=2
  515   495 root     R     1164   0%  98% insmod /mnt/mtd_speedtest.ko dev=2
  515   495 root     R     1164   0%  99% insmod /mnt/mtd_speedtest.ko dev=2
mtd_speedtest: eraseblock write speed is 5768 KiB/s
mtd_speedtest: testing eraseblock read speed
  515   495 root     R     1164   0%  92% insmod /mnt/mtd_speedtest.ko dev=2
  515   495 root     R     1164   0%  91% insmod /mnt/mtd_speedtest.ko dev=2
  515   495 root     R     1164   0%  94% insmod /mnt/mtd_speedtest.ko dev=2
mtd_speedtest: eraseblock read speed is 5932 KiB/s
mtd_speedtest: testing page write speed
  515   495 root     R     1164   0%  94% insmod /mnt/mtd_speedtest.ko dev=2
  515   495 root     R     1164   0%  98% insmod /mnt/mtd_speedtest.ko dev=2
  515   495 root     R     1164   0%  98% insmod /mnt/mtd_speedtest.ko dev=2
mtd_speedtest: page write speed is 5770 KiB/s
mtd_speedtest: testing page read speed
  515   495 root     R     1164   0%  91% insmod /mnt/mtd_speedtest.ko dev=2
  515   495 root     R     1164   0%  89% insmod /mnt/mtd_speedtest.ko dev=2
  515   495 root     R     1164   0%  91% insmod /mnt/mtd_speedtest.ko dev=2
mtd_speedtest: page read speed is 5910 KiB/s

After the patch:
=================================================
mtd_speedtest: MTD device: 2
mtd_speedtest: MTD device size 41943040, eraseblock size 131072, page size 2048, count of eraseblocks 320, pages per eraseblock 64, OOB size 64
mtd_speedtest: testing eraseblock write speed
  509   495 root     D     1164   0%  49% insmod /mnt/mtd_speedtest.ko dev=2
  509   495 root     D     1164   0%  50% insmod /mnt/mtd_speedtest.ko dev=2
  509   495 root     D     1164   0%  47% insmod /mnt/mtd_speedtest.ko dev=2
mtd_speedtest: eraseblock write speed is 5370 KiB/s
mtd_speedtest: testing eraseblock read speed
  509   495 root     R     1164   0%  92% insmod /mnt/mtd_speedtest.ko dev=2
  509   495 root     R     1164   0%  91% insmod /mnt/mtd_speedtest.ko dev=2
  509   495 root     R     1164   0%  95% insmod /mnt/mtd_speedtest.ko dev=2
mtd_speedtest: eraseblock read speed is 5715 KiB/s
mtd_speedtest: testing page write speed
  509   495 root     D     1164   0%  48% insmod /mnt/mtd_speedtest.ko dev=2
  509   495 root     D     1164   0%  47% insmod /mnt/mtd_speedtest.ko dev=2
  509   495 root     D     1164   0%  50% insmod /mnt/mtd_speedtest.ko dev=2
mtd_speedtest: page write speed is 5224 KiB/s
mtd_speedtest: testing page read speed
  509   495 root     R     1164   0%  89% insmod /mnt/mtd_speedtest.ko dev=2
  509   495 root     R     1164   0%  94% insmod /mnt/mtd_speedtest.ko dev=2
  509   495 root     R     1164   0%  93% insmod /mnt/mtd_speedtest.ko dev=2
mtd_speedtest: page read speed is 5641 KiB/s

Signed-off-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2013-08-05 21:07:41 +01:00
..
bcm47xxnflash Fairly unexciting MTD merge for 3.9: 2013-03-02 16:33:54 -08:00
gpmi-nand mtd: gpmi-nand: don't use devm_pinctrl_get_select_default() in probe 2013-08-05 21:01:20 +01:00
alauda.c
ams-delta.c mtd: nand: ams-delta: remove unnecessary platform_set_drvdata() 2013-08-05 20:58:30 +01:00
atmel_nand_ecc.h
atmel_nand_nfc.h mtd: atmel_nand: add Nand Flash Controller (NFC) support 2013-08-05 21:07:41 +01:00
atmel_nand.c mtd: atmel_nand: add Nand Flash Controller (NFC) support 2013-08-05 21:07:41 +01:00
au1550nd.c mtd: remove use of __devexit 2012-11-22 12:07:03 +02:00
bf5xx_nand.c mtd: nand: bf5xx_nand: remove unnecessary platform_set_drvdata() 2013-08-05 20:58:38 +01:00
cafe_nand.c mtd: nand: subpage write support for hardware based ECC schemes 2013-04-05 13:22:59 +01:00
cmx270_nand.c mtd: kill MTD_NAND_VERIFY_WRITE 2012-09-29 15:00:46 +01:00
cs553x_nand.c mtd cs553x_nand: Initialise ecc.strength before nand_scan() 2012-12-03 16:36:34 +02:00
davinci_nand.c mtd: nand: davinci: use devm_ioremap_resource() 2013-08-05 20:49:10 +01:00
denali_dt.c mtd: denali_dt: Remove redundant use of of_match_ptr 2013-04-05 14:04:34 +01:00
denali_pci.c mtd: remove use of __devexit 2012-11-22 12:07:03 +02:00
denali.c mtd: denali: split the generic driver and PCI layer 2012-11-15 15:37:46 +02:00
denali.h mtd: denali: add a DT driver 2012-11-15 15:37:46 +02:00
diskonchip.c mtd: diskonchip: remove unused entries in Kconfig 2013-08-05 21:01:55 +01:00
docg4.c mtd: nand: docg4: remove unnecessary platform_set_drvdata() 2013-08-05 20:58:42 +01:00
fsl_elbc_nand.c mtd: remove use of __devinit 2012-11-22 12:07:03 +02:00
fsl_ifc_nand.c mtd: fsl_ifc_nand: set NAND_NO_SUBPAGE_WRITE 2013-08-05 19:09:39 +01:00
fsl_upm.c Drivers: mtd: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
fsmc_nand.c mtd: nand: fsmc_nand: remove unnecessary platform_set_drvdata() 2013-08-05 20:58:57 +01:00
gpio.c mtd: nand-gpio: Add missing "owner" field in platform_driver struct 2013-08-05 20:46:21 +01:00
jz4740_nand.c mtd: nand: jz4740_nand: remove unnecessary platform_set_drvdata() 2013-08-05 20:59:05 +01:00
Kconfig mtd: nand-gpio: Unneeded dependency on ARM removed 2013-08-05 20:46:06 +01:00
lpc32xx_mlc.c mtd: nand: lpc32xx: remove unnecessary platform_set_drvdata() 2013-08-05 20:59:06 +01:00
lpc32xx_slc.c mtd: nand: lpc32xx: remove unnecessary platform_set_drvdata() 2013-08-05 20:59:06 +01:00
Makefile mtd: remove the h1910 NAND driver 2013-04-05 13:15:17 +01:00
mpc5121_nfc.c mtd: remove use of __devexit 2012-11-22 12:07:03 +02:00
mxc_nand.c mtd: nand: mxc_nand: Remove unneeded check for platform_get_resource() 2013-08-05 21:01:17 +01:00
nand_base.c mtd: nand: detect OOB size for Toshiba 24nm raw SLC 2013-08-05 21:05:10 +01:00
nand_bbt.c mtd: nand: remove AG-AND support 2013-04-05 12:00:50 +01:00
nand_bch.c
nand_ecc.c mtd: nane: print source of error message 2013-02-04 09:27:19 +02:00
nand_ids.c mtd: nand_ids: use size macros 2013-04-05 13:22:06 +01:00
nandsim.c mtd: nandsim: remove unused ns->geom.oobshift 2013-08-05 21:06:02 +01:00
ndfc.c mtd: remove use of __devexit 2012-11-22 12:07:03 +02:00
nuc900_nand.c mtd: nand: nuc900_nand: remove unnecessary platform_set_drvdata() 2013-08-05 20:59:09 +01:00
omap2.c mtd: nand: omap2: remove unnecessary platform_set_drvdata() 2013-08-05 20:59:13 +01:00
orion_nand.c mtd: nand: orion_nand: remove unnecessary platform_set_drvdata() 2013-08-05 20:59:14 +01:00
pasemi_nand.c mtd: remove use of __devexit 2012-11-22 12:07:03 +02:00
plat_nand.c mtd: nand: plat_nand: remove unnecessary platform_set_drvdata() 2013-08-05 20:59:16 +01:00
pxa3xx_nand.c mtd: nand: pxa3xx_nand: remove unnecessary platform_set_drvdata() 2013-08-05 20:59:17 +01:00
r852.c mtd: r852: add CONFIG_PM_SLEEP to suspend/resume functions 2013-08-05 19:00:12 +01:00
r852.h
s3c2410.c mtd: nand: s3c2410: remove unnecessary platform_set_drvdata() 2013-08-05 20:59:19 +01:00
sh_flctl.c mtd: sh_flctl: Use of_match_ptr() macro 2013-04-05 13:20:14 +01:00
sharpsl.c mtd: nand: sharpsl: remove unnecessary platform_set_drvdata() 2013-08-05 20:59:21 +01:00
sm_common.c mtd: nand_ids: use size macros 2013-04-05 13:22:06 +01:00
sm_common.h
socrates_nand.c mtd: remove use of __devexit 2012-11-22 12:07:03 +02:00
tmio_nand.c mtd: kill MTD_NAND_VERIFY_WRITE 2012-09-29 15:00:46 +01:00
txx9ndfmc.c mtd: nand: txx9ndfmc: remove unnecessary platform_set_drvdata() 2013-08-05 20:59:22 +01:00
xway_nand.c mtd: lantiq: Add NAND support on Lantiq XWAY SoC. 2012-09-29 15:05:18 +01:00