[U-Boot] [PATCH v2 00/15] nand: device model bringup on am335x evm and am437x gpevm

Grygorii Strashko grygorii.strashko at ti.com
Tue Jan 31 22:37:02 CET 2017


This patch seires adds nand uclass driver and enables omap_gpmc to
adopt driver model. This has been tested on AM335x GP EVM and
AM437x GP EVM.

As preparation for introducing nand uclass driver the new API
get_nand_dev_by_index() was added to avoid direct acces to nand_info array and
u-boot core files were updated to use it.

Patches can be found at:
git at git.ti.com:~gragst/ti-u-boot/gragsts-ti-u-boot.git dm-nand-v2

Test case1:
 mmc rescan
 fatload mmc 0 ${loadaddr} MLO1
 nand erase.part <part>
 nand write ${loadaddr} <part>
 nand read 0x84000000 0 ${filesize}
 cmp ${loadaddr} 0x84000000 ${filesize}

Test case2:
 nand read $loadaddr NAND.kernel
 nand read $fdtaddr NAND.u-boot-spl-os
 run args_mmc
 bootz ${loadaddr} - ${fdtaddr}

Changes in v2:
 - series rebased on top of u-boot master
 - added more patches to convert u-boot core files to use get_nand_dev_by_index()
 - nand uclass driver was simplified thanks to commits
   17cb4b8 mtd: nand: Add+use mtd_to/from_nand and nand_get/set_controller_data
   b616d9b nand: Embed mtd_info in struct nand_chip

link on v1:
 http://lists.denx.de/pipermail/u-boot/2016-April/250197.html

Grygorii Strashko (8):
  cmd: bootm: fix build when CONFIG_CMD_IMLS_NAND
  common: env_nand: use get_nand_dev_by_index()
  dfu: dfu_nand: use get_nand_dev_by_index()
  cmd: bootm: use get_nand_dev_by_index()
  cmd: jffs2: use get_nand_dev_by_index()
  common: use get_nand_dev_by_index()
  fs: use get_nand_dev_by_index()
  cmd: nand: remove direct access to struct mtd_info->priv

Mugunthan V N (7):
  cmd: nand: abstract global variable usage for dm conversion
  drivers: nand: implement a NAND uclass
  drivers: nand: omap_gpmc: convert driver to adopt driver model
  am43xx_evm: nand: do not define DM_NAND for spl
  defconfig: am43xx_evm: enable NAND driver model
  am335x_evm: nand: do not define DM_NAND for spl
  defconfig: am335x_evm: enable NAND driver model

 cmd/bootm.c                    |   6 +-
 cmd/jffs2.c                    |   7 +-
 cmd/nand.c                     |  69 ++++++++------
 common/env_nand.c              |  33 ++++---
 common/fb_nand.c               |   2 +-
 common/splash_source.c         |   5 +-
 configs/am335x_evm_defconfig   |   1 +
 configs/am43xx_evm_defconfig   |   1 +
 drivers/dfu/dfu_nand.c         |  12 +--
 drivers/mtd/nand/Kconfig       |  10 ++
 drivers/mtd/nand/Makefile      |   2 +
 drivers/mtd/nand/nand-uclass.c |  38 ++++++++
 drivers/mtd/nand/nand.c        |  40 ++++++--
 drivers/mtd/nand/omap_gpmc.c   | 212 ++++++++++++++++++++++++++++++++++++++++-
 fs/jffs2/jffs2_1pass.c         |   9 +-
 fs/jffs2/jffs2_nand_1pass.c    |   6 +-
 fs/yaffs2/yaffs_uboot_glue.c   |   8 +-
 include/configs/am335x_evm.h   |   1 +
 include/configs/am43xx_evm.h   |   1 +
 include/dm/uclass-id.h         |   1 +
 include/nand.h                 |   9 ++
 21 files changed, 397 insertions(+), 76 deletions(-)
 create mode 100644 drivers/mtd/nand/nand-uclass.c

-- 
2.10.1.dirty



More information about the U-Boot mailing list