[U-Boot] [PATCH v2 0/4] arm: vf610: add NAND flash support

Stefan Agner stefan at agner.ch
Thu Aug 14 18:30:32 CEST 2014


This patch set adds NAND Flash Controller (NFC) support for
Freescale Vybrid ARM SoCs (vf610).

The driver is based on Bill Pringlemeirs prelineary patch sent
in January 2014 to the MTD mailing list:
http://lists.infradead.org/pipermail/linux-arm-kernel/2014-January/226623.html

Changes in v2:
- Renamed the driver from fsl_nfc to vf610_nfc
- Use writel/readl in register access functions
- Optimized some register accesses by read/write value only once in code
- Use CONFIG_SYS_NAND_SELF_INIT and fix board_nand_init implementation
- Removed uncommented code/fixed comments
- Add CONFIG_USE_ARCH_MEMCPY for improved NAND performance
- Use hweight32 for improved count_written_bits performance
- Implement page_read/page_write rather than reuse MTD stacks version

Due to the duplicated initialization (missing SELF_INIT), page size was
actually set to 0 which lead count_written_bits to not count the amount of
written bits at all.

Performance numbers:
V1 => optimized count_written_bits
Read empty pages: 0.8MiB/s => 1.4MiB/s
V1 => optimized memcpy => optimized page_read/page_write
Read full pages: 3.6MiB/s => 7MiB/s => 10.3MiB/s

Stefan Agner (4):
  arm: vf610: add NFC pin mux
  arm: vf610: add NFC clock support
  mtd: nand: add Freescale NFC driver
  arm: vf610: add NAND support for vf610twr

 arch/arm/include/asm/arch-vf610/crm_regs.h    |  14 +
 arch/arm/include/asm/arch-vf610/imx-regs.h    |   1 +
 arch/arm/include/asm/arch-vf610/iomux-vf610.h |  34 ++
 arch/arm/include/asm/imx-common/iomux-v3.h    |   4 +
 board/freescale/vf610twr/vf610twr.c           |  47 +-
 configs/vf610twr_defconfig                    |   2 +-
 configs/vf610twr_nand_defconfig               |   3 +
 drivers/mtd/nand/Makefile                     |   1 +
 drivers/mtd/nand/vf610_nfc.c                  | 706 ++++++++++++++++++++++++++
 include/configs/vf610twr.h                    |  46 +-
 10 files changed, 853 insertions(+), 5 deletions(-)
 create mode 100644 configs/vf610twr_nand_defconfig
 create mode 100644 drivers/mtd/nand/vf610_nfc.c

-- 
2.0.4



More information about the U-Boot mailing list