diff mbox

[U-Boot,v11,0/4] mtd: nand: omap: optimize and clean-up of OMAP NAND driver

Message ID 1385010723-12736-1-git-send-email-pekon@ti.com
State Superseded
Delegated to: Scott Wood
Headers show

Commit Message

pekon gupta Nov. 21, 2013, 5:11 a.m. UTC
*changes in v11*
[PATCH 2/4] fixed 'unused variable' warning


*changes in v10*
[PATCH 1/4] re-generated patche using 'git format-patch -M -C' to detect renames
[PATCH 2/4] removed #ifdef while including omap_elm.h header in omap_gpmc.c
[PATCH 3/4] and [PATCH 4/4] <no update>


*changes in v9*
(Important) As this patch series was becoming bulky and had many un-related
patches, so it has been split into two parts.
Part-1: Current patch series focuses on cleaning up GPMC and ELM drivers
	maintaining existing functionality. And update ecc-scheme selection
	mechanism across all platforms.
Part-2: Next patch series will focus on optimizing data-paths of GPMC and ELM
	drivers for better performance and scalability.

This Part-1 series has following patches, maintaining earlier feedbacks.
[PATCH 1/4] [NEW] mtd: nand: omap: make am33xx/elm.c as common driver
 - move ELM driver source to drivers/mtd/nand/ to reuse driver on all platforms

[PATCH 2/4] [SPLIT] mtd: nand: omap: enable BCH ECC scheme using ELM for ... 
  v8 version of this patch is split into follwing part maintaining
  earlier feedbacks.
 - [PATCH 2/4] handles ecc-scheme selection clean-up
 - [PATCH 3/4] add CONFIG_NAND_OMAP_ECCSCHEME

[PATCH 3/4] [NEW] mtd: nand: omap: add CONFIG_NAND_OMAP_ECCSCHEME ... 
 - split from previous patch to introduce new CONFIG_xx for having common method
   of ecc-scheme selection across all platforms.
 - updated include/configs/ for SoC platforms (like OMAP3) which use omap_gpmc.c

[PATCH 4/4] [NEW] am335x: fix GPMC config for NAND and NOR SPL boot
 - clean separation of NOR Boot and NAND Boot configurations
 - configuration of GPMC registers moved to arch/am33xx from
   board/ti/am335x/board.c, so that its re-usable for other boards also.

This patch is tested on beagle-bone (white) with NAND cape, using following
(a) Patch to add beaglebone pin-mux support
	http://lists.denx.de/pipermail/u-boot/2013-September/163881.html
(b) Hack in board-file to configure GPMC for x16 device
--------------
--------------


*changes in v8*
[PATCH] mtd: nand: omap: enable BCH ECC scheme using ELM for generic platform
 - incorporated following feedbacks from Scott Wood <scottwood@freescale.com>
 - using symbolic names (enums) as values of CONFIG_NAND_OMAP_ECCSCHEME
 - updated omap_select_ecc_scheme(): perform ecc-scheme compatibility
   checks before updating nand_chip.ecc fields. This avoids
   corrupting of existing ecc-scheme in case of switching failures.
 - code clean-up (removed fall-back on omap_select_ecc_scheme() failures)


*changes in v7*
[PATCH] mtd: nand: omap: enable BCH ECC scheme using ELM for generic platform
 - omap_gpmc.c: fix: free bytes in OOB (ecclayout->oobfree[0].length)
 - omap_gpmc.c: cleanup: redundant code added in previous patch versions
 - am335x_evm.h: cleanup: redundant code added in previous patch versions
 - tricorder.h: fix: CONFIG_NAND_OMAP_ECCSCHEME

 
*changes in v6*
[PATCH] mtd: nand: omap: enable BCH ECC scheme using ELM for generic platform
 - incorporated feedbacks from Scott Wood <scottwood@freescale.com>
 - renamed CONFIG_SYS_NAND_ECCSCHEME to CONFIG_NAND_OMAP_ECCSCHEME
 - updated omap_select_ecc_scheme() to handle error conditions without
   depending on caller.
 - renamed OMAP_ECC_HAM1_CODE_HW_ROMCODE to OMAP_ECC_HAM1_CODE_HW 
   to keep it naming compatible to linux kernel
 - updated doc/README.nand and doc/README.omap3
 - moved CONFIG_NAND_OMAP_ECCSCHEME description to README.nand


*changes in v5*
This version of patch is tested on am335x-evm with x8 NAND device, and boots
SPL and u-boot from NAND
[PATCH] mtd: nand: omap: enable BCH ECC scheme using ELM for generic platform
 - re-added omap_read_page_bch(): needed proper sequence of while reading
   DATA and ECC from NAND page, so that calc_ecc generated from GPMC
   is understood by ELM.
 - added check to see if NAND OOB can accomodate ECC for entire page


*changes in v4*
[PATCH] mtd: nand: omap: enable BCH ECC scheme using ELM for generic platform
 - removed omap_read_page_bch(): chip->ecc.read_page uses default API
 	nand_read_page_hwecc() in nand_base.c
 - updated tricorder.h: added new CONFIGS for ECCSCHEME & ONFI_DETECTION
 - converted printf("ECC-SCHEME") to debug("ECC-SCHEME")


*changes in v3*
[PATCH] mtd: nand: omap: enable BCH ECC scheme using ELM for generic platform
(complete re-work)
 - ecc-scheme is selection is controller by s/w, not CONFIG_NAND_xx
 - added omap_select_ecc_scheme(), as common function to handle all
   ecc-scheme related configurations for both board_nand_init() &
   omap_nand_switch_ecc().
 - removed un-used defines from asm/arch-am33xx/omap_gpmc.h
 - updated doc/REAME.nand
 - removed un-used defines from asm/omap_gpmc.h


*changes in v2*
 - added documentation for CONFIG_NAND_OMAP_xx in doc/README.nand
 - added CONFIG_BCH along with CONFIG_NAND_OMAP_ECC_BCH8_CODE_HW_DETECTION_SW
   to include software library lib/bch.c
 - fixed board_nand_init() and omap_enable_hwecc()


*original v1*
This patch series updates BCH8_ECC schemes in mtd/nand/omap_gpmc.c driver
 - adds scalability for higher ECC schemes in future.
 - removes CONFIG_AM335x and it makes it generic for all platforms.
 - optimizes read_data paths

Pekon Gupta (4):
  mtd: nand: omap: make am33xx/elm.c as common driver for all OMAPx and
    AMxxxx platforms
  mtd: nand: omap: enable BCH ECC scheme using ELM for generic platform
  mtd: nand: omap: add CONFIG_NAND_OMAP_ECCSCHEME for selection of
    ecc-scheme
  am335x: fix GPMC config for NAND and NOR SPL boot

 arch/arm/cpu/armv7/am33xx/Makefile                 |   1 -
 arch/arm/cpu/armv7/am33xx/mem.c                    |  52 ++--
 arch/arm/include/asm/arch-am33xx/mem.h             |   5 -
 .../include/asm/{arch-am33xx/elm.h => omap_elm.h}  |   0
 arch/arm/include/asm/omap_gpmc.h                   |  16 +
 board/ti/am335x/board.c                            |  14 +-
 doc/README.nand                                    |  53 ++++
 doc/README.omap3                                   |   3 +-
 drivers/mtd/nand/Makefile                          |   1 +
 .../am33xx/elm.c => drivers/mtd/nand/omap_elm.c    |   6 +-
 drivers/mtd/nand/omap_gpmc.c                       | 321 +++++++++++++--------
 include/configs/am335x_evm.h                       |   5 +-
 include/configs/am335x_igep0033.h                  |   2 +
 include/configs/am3517_crane.h                     |   1 +
 include/configs/am3517_evm.h                       |   1 +
 include/configs/devkit8000.h                       |   1 +
 include/configs/mcx.h                              |   2 +-
 include/configs/omap3_beagle.h                     |   1 +
 include/configs/omap3_evm.h                        |   1 +
 include/configs/omap3_evm_quick_nand.h             |   1 +
 include/configs/omap3_igep00x0.h                   |   1 +
 include/configs/omap3_overo.h                      |   1 +
 include/configs/siemens-am33x-common.h             |   2 +
 include/configs/tam3517-common.h                   |   2 +-
 include/configs/tricorder.h                        |   2 +-
 25 files changed, 319 insertions(+), 176 deletions(-)
 rename arch/arm/include/asm/{arch-am33xx/elm.h => omap_elm.h} (100%)
 rename arch/arm/cpu/armv7/am33xx/elm.c => drivers/mtd/nand/omap_elm.c (97%)

Comments

Scott Wood Nov. 21, 2013, 5:26 a.m. UTC | #1
On Thu, Nov 21, 2013 at 10:41:59AM +0530, Pekon Gupta wrote:
> *changes in v11*
> [PATCH 2/4] fixed 'unused variable' warning

If this is the only thing that changed, and the fix was just to remove
the bch variable, I'll keep the v10 patches that I've already applied
locally with the fix.

-Scott
pekon gupta Nov. 21, 2013, 5:28 a.m. UTC | #2
> From: Scott Wood [mailto:scottwood@freescale.com]
> 
> On Thu, Nov 21, 2013 at 10:41:59AM +0530, Pekon Gupta wrote:
> > *changes in v11*
> > [PATCH 2/4] fixed 'unused variable' warning
> 
> If this is the only thing that changed, and the fix was just to remove
> the bch variable, I'll keep the v10 patches that I've already applied
> locally with the fix.
> 
Yes, this is the only change.. Thank you for accepting .. 

with regards, pekon
diff mbox

Patch

diff --git a/arch/arm/cpu/armv7/am33xx/mem.c b/arch/arm/cpu/armv7/am33xx/mem.c
index 56c9e7d..b166a94 100644
--- a/arch/arm/cpu/armv7/am33xx/mem.c
+++ b/arch/arm/cpu/armv7/am33xx/mem.c
@@ -64,7 +64,7 @@  void gpmc_init(void)
        u32 base = CONFIG_SYS_FLASH_BASE;
 #elif defined(CONFIG_NAND)
 /* configure GPMC for NAND */
-       const u32  gpmc_regs[GPMC_MAX_REG] = {  M_NAND_GPMC_CONFIG1,
+       const u32  gpmc_regs[GPMC_MAX_REG] = {  M_NAND_GPMC_CONFIG1 | 0x1000,
                                                M_NAND_GPMC_CONFIG2,
                                                M_NAND_GPMC_CONFIG3,
                                                M_NAND_GPMC_CONFIG4,