[U-Boot] [PATCH v2 0/6] board/ti/xxx: Add NAND and NOR support for new TI boards

2014-07-22 Thread Pekon Gupta
CONFIG_NAND_xx from generic files to individual files. Pekon Gupta (6): board/ti/am335x: update configs for parallel NAND board/ti/am335x: add support for beaglebone NAND cape board/ti/am335x: add support for beaglebone NOR Cape board/ti/am43xx: add support for parallel NAND board/ti

[U-Boot] [PATCH v2 2/6] board/ti/am335x: add support for beaglebone NAND cape

2014-07-22 Thread Pekon Gupta
/include/configs/am335x_evm.h +#define CONFIG_SYS_NAND_BUSWIDTH_16BIT Signed-off-by: Pekon Gupta pe...@ti.com --- board/ti/am335x/mux.c | 58 +-- 1 file changed, 38 insertions(+), 20 deletions(-) diff --git a/board/ti/am335x/mux.c b/board/ti/am335x

[U-Boot] [PATCH v2 1/6] board/ti/am335x: update configs for parallel NAND

2014-07-22 Thread Pekon Gupta
This patch - consolidate CONFIG_SYS_NAND_xx and CONFIG_SPL_NAND_xx from various configuration files into single file. - update MTD Partition table to match AM335x_EVM DT in linux-kernel - segregate CONFIGs based on different boot modes (like SPL and U-Boot) Signed-off-by: Pekon Gupta pe

[U-Boot] [PATCH v2 4/6] board/ti/am43xx: add support for parallel NAND

2014-07-22 Thread Pekon Gupta
=256KB - pagesize=4KB - oobsize=224 bytes For above NAND device, ROM code expects the boot-loader to be flashed in BCH16 ECC scheme for NAND boot, So by default BCH16 ECC is enabled for AM43xx EVMs. Signed-off-by: Pekon Gupta pe...@ti.com --- board/ti/am43xx/board.c | 1 + board/ti/am43xx

[U-Boot] [PATCH v2 3/6] board/ti/am335x: add support for beaglebone NOR Cape

2014-07-22 Thread Pekon Gupta
http://elinux.org/CircuitCo:BeagleBone_Memory_Expansion Signed-off-by: Pekon Gupta pe...@ti.com --- board/ti/am335x/mux.c| 95 doc/README.cfi | 13 ++ include/configs/am335x_evm.h | 2 + 3 files changed, 50 insertions(+), 60

[U-Boot] [PATCH v2 6/6] board/ti/dra7xx: add support for parallel NOR

2014-07-22 Thread Pekon Gupta
Lokesh Vutla lokeshvu...@ti.com Signed-off-by: Pekon Gupta pe...@ti.com --- arch/arm/include/asm/arch-omap5/mem.h | 12 +-- board/ti/dra7xx/mux_data.h| 36 +++-- include/configs/dra7xx_evm.h | 38

[U-Boot] [PATCH v2 5/6] board/ti/dra7xx: add support for parallel NAND

2014-07-22 Thread Pekon Gupta
Lokesh Vutla lokeshvu...@ti.com [1] http://processors.wiki.ti.com/index.php/Linux_Core_NAND_User%27s_Guide#Board_specific_configurations Signed-off-by: Pekon Gupta pe...@ti.com --- board/ti/dra7xx/mux_data.h | 28 + include

[U-Boot] [PATCH v1 0/3] ARM: omap: clean GPMC macros

2014-07-18 Thread Pekon Gupta
This patch cleans redundant and unused macros from various board-configs and architecture specific header files. Tested using: MAKEALL -s omap 3 -s omap4 -s omap5 -s am33xx with $ARCH=arm $CROSS_COMPILE=arm-linux-gnueabihf- Pekon Gupta (3): ARM: omap: fix GPMC address-map

[U-Boot] [PATCH v1 3/3] ARM: omap: move board specific NAND configs out from ti_armv7_common.h

2014-07-18 Thread Pekon Gupta
: CONFIG_SYS_NAND_U_BOOT_OFFS: refer doc/README.nand CONFIG_CMD_SPL_NAND_OFS: refer doc/README.falcon CONFIG_SYS_NAND_SPL_KERNEL_OFFS: refer doc/README.falcon CONFIG_CMD_SPL_WRITE_SIZE: refer doc/README.falcon This patch also updates documentation for few of above NAND configs. Signed-off-by: Pekon Gupta pe

[U-Boot] [PATCH v1 1/3] ARM: omap: fix GPMC address-map size for NAND and NOR devices

2014-07-18 Thread Pekon Gupta
to CPU address-space, so its address-map size depends on actual addressable region in NOR FLASH device. So this patch uses CONFIG_SYS_FLASH_SIZE to derive GPMC chip-select address-map size configuration. Signed-off-by: Pekon Gupta pe...@ti.com --- arch/arm/cpu/armv7/omap-common/mem-common.c | 10

[U-Boot] [PATCH v1 2/3] ARM: omap: clean redundant PISMO_xx macros used in OMAP3

2014-07-18 Thread Pekon Gupta
| | +-+---+ Signed-off-by: Pekon Gupta pe...@ti.com --- arch/arm/cpu/armv7/omap-common/mem-common.c | 4 ++-- arch/arm/include/asm/arch-am33xx/mem.h | 7 --- arch/arm/include/asm/arch-omap3/cpu.h | 1 - arch/arm/include/asm/arch-omap3/mem.h | 13 - include

[U-Boot] [PATCH v1 0/7] TI: armv7: add parallel NAND support

2014-07-04 Thread Pekon Gupta
-s oamp4 -s omap5 works fine except for am335x_boneblack_vboot build breaks for am335x_boneblack_vboot for un-related reasons u-boot/scripts/dtc-version.sh: line 17: dtc: command not found Pekon Gupta (7): TI: armv7: move board specific NAND configs out

[U-Boot] [PATCH v1 3/7] arm: lib: continue board_init_r even if valid flash device is not detected

2014-07-04 Thread Pekon Gupta
Most platforms have fall-back boot sources, if their primary boot fails. This patch allows board_init to continue scanning through other secondary boot sources like NAND, MMC, etc if valid FLASH device is not detected. Signed-off-by: Pekon Gupta pe...@ti.com --- arch/arm/lib/board.c | 7

[U-Boot] [PATCH v1 1/7] TI: armv7: move board specific NAND configs out from ti_armv7_common.h and ti_am335x_common.h

2014-07-04 Thread Pekon Gupta
doc/README.falcon CONFIG_CMD_SPL_WRITE_SIZE: refer doc/README.falcon This patch also updates documentation for few of above NAND configs. Signed-off-by: Pekon Gupta pe...@ti.com --- doc/README.nand| 12 include/configs/am335x_evm.h | 7 +++ include

[U-Boot] [PATCH v1 2/7] board/ti/am335x: add support for beaglebone NAND cape

2014-07-04 Thread Pekon Gupta
-- ) [1] http://beagleboardtoys.info/index.php?title=BeagleBone_Memory_Expansion [2] http://beagleboardtoys.info/index.php?title=BeagleBone_4Gb_16-Bit_NAND_Module Signed-off-by: Pekon Gupta pe...@ti.com --- board/ti/am335x/mux.c | 58 +-- 1

[U-Boot] [PATCH v1 5/7] board/ti/am335x: update configs for parallel NAND

2014-07-04 Thread Pekon Gupta
This patch - consolidate CONFIG_SYS_NAND_xx and CONFIG_SPL_NAND_xx from various configuration files into single file. - update MTD Partition table to match AM335x_EVM DT in linux-kernel - segregate CONFIGs based on different boot modes (like SPL and U-Boot) Signed-off-by: Pekon Gupta pe

[U-Boot] [PATCH v1 4/7] board/ti/am335x: add support for beaglebone NOR Cape

2014-07-04 Thread Pekon Gupta
/Beagleboardtoys:BeagleBone_128Mb_16-Bit_NOR_Module Signed-off-by: Pekon Gupta pe...@ti.com --- board/ti/am335x/mux.c | 95 +++ 1 file changed, 35 insertions(+), 60 deletions(-) diff --git a/board/ti/am335x/mux.c b/board/ti/am335x/mux.c index 439da4b

[U-Boot] [PATCH v1 6/7] board/ti/am43xx: add support for parallel NAND

2014-07-04 Thread Pekon Gupta
=256KB - pagesize=4KB - oobsize=224 bytes For above NAND device, ROM code expects the boot-loader to be flashed in BCH16 ECC scheme for NAND boot, So by default BCH16 ECC is enabled for AM43xx EVMs. Signed-off-by: Pekon Gupta pe...@ti.com --- board/ti/am43xx/board.c | 1 + board/ti/am43xx

[U-Boot] [PATCH v1 7/7] board/ti/dra7xx: add support for parallel NAND

2014-07-04 Thread Pekon Gupta
) = HIGH Signed-off-by: Pekon Gupta pe...@ti.com --- board/ti/dra7xx/mux_data.h | 30 +++ boards.cfg | 2 +- include/configs/dra7xx_evm.h | 58 +++- 3 files changed, 88 insertions(+), 2 deletions(-) diff --git a/board/ti

[U-Boot] [PATCH v4 1/3] mtd: nand: omap_gpmc: use macro for register definitions

2014-06-02 Thread Pekon Gupta
GPMC can support simultaneous processing of 8 512Byte data chunks, in parallel Signed-off-by: Pekon Gupta pe...@ti.com --- include/linux/mtd/omap_gpmc.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/mtd/omap_gpmc.h b/include/linux/mtd/omap_gpmc.h index

[U-Boot] [PATCH v4 0/3] mtd: nand: omap: add support for BCH16_ECC

2014-06-02 Thread Pekon Gupta
to accomodate ECC. This patch series is applicable over an above following series: http://lists.denx.de/pipermail/u-boot/2013-September/161859.html Pekon Gupta (3): mtd: nand: omap_gpmc: use macro for register definitions mtd: nand: omap: add support for BCH16_ECC - NAND driver updates am335x

[U-Boot] [PATCH v4 3/3] am335x: update README for BCH16

2014-06-02 Thread Pekon Gupta
updates documentation with explanation on how to select ECC schemes. Signed-off-by: Pekon Gupta pe...@ti.com --- doc/README.nand | 42 ++ 1 file changed, 42 insertions(+) diff --git a/doc/README.nand b/doc/README.nand index 2bc5b39..70cf768 100644

[U-Boot] [PATCH v4 2/3] mtd: nand: omap: add support for BCH16_ECC - NAND driver updates

2014-06-02 Thread Pekon Gupta
which have enough OOB to satisfy following equation: OOBsize per page = 26 * (page-size / 512) Signed-off-by: Pekon Gupta pe...@ti.com --- drivers/mtd/nand/omap_gpmc.c | 79 ++- include/linux/mtd/omap_gpmc.h | 8 + 2 files changed, 86 insertions(+), 1

[U-Boot] [PATCH v1 0/3] ARM: omap: add support for GPMC and ELM controllers on OMAP4 and OMAP5 platforms

2014-05-08 Thread Pekon Gupta
- Remove redundant code Pekon Gupta (3): ARM: omap4: add platform specific info for GPMC and ELM controllers ARM: omap5: add platform specific info for GPMC and ELM controllers ARM: omap: merge GPMC initialization code for all platform arch/arm/cpu/armv7/am33xx/Makefile | 1

[U-Boot] [PATCH v1 1/3] ARM: omap4: add platform specific info for GPMC and ELM controllers

2014-05-08 Thread Pekon Gupta
and ELM Platform specific information added into arch-xx/../mem.h - Generic configs for GPMC and ELM initialization. - Hardware parameters or constrains specific to GPMC and ELM IP like; number of max number of chip-selects available Signed-off-by: Pekon Gupta pe...@ti.com --- arch/arm

[U-Boot] [PATCH v1 3/3] ARM: omap: merge GPMC initialization code for all platform

2014-05-08 Thread Pekon Gupta
by board-profile decide config for which set of macros need to be used for initialization CONFIG_NAND:initialize GPMC for NAND device CONFIG_NOR: initialize GPMC for NOR device CONFIG_ONENAND: initialize GPMC for ONENAND device Signed-off-by: Pekon Gupta pe...@ti.com --- arch/arm/cpu/armv7

[U-Boot] [PATCH v1 2/3] ARM: omap5: add platform specific info for GPMC and ELM controllers

2014-05-08 Thread Pekon Gupta
and ELM Platform specific information added into arch-xx/../mem.h - Generic configs for GPMC and ELM initialization. - Hardware parameters or constrains specific to GPMC and ELM IP like; number of max number of chip-selects available Signed-off-by: Pekon Gupta pe...@ti.com --- arch/arm

[U-Boot] [PATCH v5 0/5] enable support for x16 NAND devices

2014-05-05 Thread Pekon Gupta
on 16-bit devices Pekon Gupta (2): mtd: nand: omap: add CONFIG_SYS_NAND_BUSWIDTH_16BIT to indicate NAND device bus-width omap3: remove remnant macros GPMC_NAND_ECC_LP_x8_LAYOUT and GPMC_NAND_ECC_LP_x16_LAYOUT arch/arm/cpu/armv7/omap3/mem.c| 12 arch/arm/include/asm

[U-Boot] [PATCH v5 1/5] mtd: nand: don't use read_buf for 8-bit ONFI transfers

2014-05-05 Thread Pekon Gupta
Dec 5 22:22:04 2013 +0100 mtd: nand: don't use {read,write}_buf for 8-bit transfers Now, I think that all barriers to probing ONFI on x16 devices are removed, so remove the check from nand_flash_detect_onfi(). Signed-off-by: Pekon Gupta pe...@ti.com --- drivers/mtd/nand/nand_base.c

[U-Boot] [PATCH v5 3/5] mtd: nand: fix GET/SET_FEATURES address on 16-bit devices

2014-05-05 Thread Pekon Gupta
commit e34fcb07a6d57411de6e15a47724fbe92c5caa42 Author: David Mosberger dav...@egauge.net (preserving authorship) mtd: nand: fix GET/SET_FEATURES address on 16-bit devices Signed-off-by: Pekon Gupta pe...@ti.com --- include/linux/mtd/nand.h | 11 ++- 1 file changed, 10 insertions

[U-Boot] [PATCH v5 2/5] mtd: nand: force NAND_CMD_READID onto 8-bit bus

2014-05-05 Thread Pekon Gupta
not be translated to 0x00, 0x10, or 0x20). This fixes the column address for a few drivers which imitate the nand_base defaults. Signed-off-by: Pekon Gupta pe...@ti.com --- drivers/mtd/nand/am335x_spl_bch.c | 2 +- drivers/mtd/nand/atmel_nand.c | 2 +- drivers/mtd/nand/nand_base.c | 6

[U-Boot] [PATCH v5 4/5] mtd: nand: omap: add CONFIG_SYS_NAND_BUSWIDTH_16BIT to indicate NAND device bus-width

2014-05-05 Thread Pekon Gupta
CONFIG_SYS_NAND_BUSWIDTH_16BIT to board config hich indicates that connected NAND device has x16 bus-width. And then based on this config GPMC driver itself initializes itself based on NAND bus-width. This keeps board developers free from knowing GPMC controller specific internals. Signed-off-by: Pekon Gupta pe

[U-Boot] [PATCH v5 5/5] omap3: remove remnant macros GPMC_NAND_ECC_LP_x8_LAYOUT and GPMC_NAND_ECC_LP_x16_LAYOUT

2014-05-05 Thread Pekon Gupta
OMAP3 used GPMC_NAND_ECC_LP_x8_LAYOUT and GPMC_NAND_ECC_LP_x16_LAYOUT macros to configure GPMC controller for x7 or x8 bit device connected to its interface. Now this information is encoded in CONFIG_SYS_NAND_DEVICE_WIDTH macro, so above macros can be completely removed. Signed-off-by: Pekon

[U-Boot] [PATCH v4 2/5] mtd: nand: force NAND_CMD_READID onto 8-bit bus

2014-04-28 Thread Pekon Gupta
not be translated to 0x00, 0x10, or 0x20). This fixes the column address for a few drivers which imitate the nand_base defaults. Signed-off-by: Pekon Gupta pe...@ti.com --- drivers/mtd/nand/am335x_spl_bch.c | 2 +- drivers/mtd/nand/atmel_nand.c | 2 +- drivers/mtd/nand/nand_base.c | 6

[U-Boot] [PATCH v4 0/5] enable support for x16 NAND devices

2014-04-28 Thread Pekon Gupta
GET/SET_FEATURES address on 16-bit devices Pekon Gupta (2): mtd: nand: omap: add CONFIG_SYS_NAND_DEVICE_WIDTH to determine NAND device bus-width omap3: remove remnant macros GPMC_NAND_ECC_LP_x8_LAYOUT and GPMC_NAND_ECC_LP_x16_LAYOUT arch/arm/cpu/armv7/omap3/mem.c | 12

[U-Boot] [PATCH v4 3/5] mtd: nand: fix GET/SET_FEATURES address on 16-bit devices

2014-04-28 Thread Pekon Gupta
commit e34fcb07a6d57411de6e15a47724fbe92c5caa42 Author: David Mosberger dav...@egauge.net (preserving authorship) mtd: nand: fix GET/SET_FEATURES address on 16-bit devices Signed-off-by: Pekon Gupta pe...@ti.com --- include/linux/mtd/nand.h | 11 ++- 1 file changed, 10 insertions

[U-Boot] [PATCH v4 4/5] mtd: nand: omap: add CONFIG_SYS_NAND_DEVICE_WIDTH to determine NAND device bus-width

2014-04-28 Thread Pekon Gupta
. Signed-off-by: Pekon Gupta pe...@ti.com --- doc/README.nand| 9 + drivers/mtd/nand/omap_gpmc.c | 13 + include/configs/am335x_evm.h | 1 + include/configs/am335x_igep0033.h | 1 + include/configs/am3517_crane.h | 1

[U-Boot] [PATCH v4 1/5] mtd: nand: don't use read_buf for 8-bit ONFI transfers

2014-04-28 Thread Pekon Gupta
Dec 5 22:22:04 2013 +0100 mtd: nand: don't use {read,write}_buf for 8-bit transfers Now, I think that all barriers to probing ONFI on x16 devices are removed, so remove the check from nand_flash_detect_onfi(). Signed-off-by: Pekon Gupta pe...@ti.com --- drivers/mtd/nand/nand_base.c

[U-Boot] [PATCH v4 5/5] omap3: remove remnant macros GPMC_NAND_ECC_LP_x8_LAYOUT and GPMC_NAND_ECC_LP_x16_LAYOUT

2014-04-28 Thread Pekon Gupta
OMAP3 used GPMC_NAND_ECC_LP_x8_LAYOUT and GPMC_NAND_ECC_LP_x16_LAYOUT macros to configure GPMC controller for x7 or x8 bit device connected to its interface. Now this information is encoded in CONFIG_SYS_NAND_DEVICE_WIDTH macro, so above macros can be completely removed. Signed-off-by: Pekon

[U-Boot] [PATCH v3 0/2] mtd: nand: omap: add support for BCH16_ECC

2014-04-23 Thread Pekon Gupta
, hence this scheme is usable only for NAND devices having 4K or above page-size, as their OOB/spare area has enough space to accomodate ECC. This patch series is applicable over an above following series: http://lists.denx.de/pipermail/u-boot/2013-September/161859.html Pekon Gupta (2): mtd: nand

[U-Boot] [PATCH v3 2/2] am335x: update README for BCH16

2014-04-23 Thread Pekon Gupta
updates documentation with explanation on how to select ECC schemes. Signed-off-by: Pekon Gupta pe...@ti.com --- doc/README.nand | 42 ++ 1 file changed, 42 insertions(+) diff --git a/doc/README.nand b/doc/README.nand index 90d857e..a5d20bc 100644

[U-Boot] [PATCH v3 1/2] mtd: nand: omap: add support for BCH16_ECC - NAND driver updates

2014-04-23 Thread Pekon Gupta
which have enough OOB to satisfy following equation: OOBsize per page = 26 * (page-size / 512) Signed-off-by: Pekon Gupta pe...@ti.com --- drivers/mtd/nand/omap_gpmc.c | 78 ++- include/linux/mtd/omap_gpmc.h | 8 + 2 files changed, 85 insertions(+), 1

[U-Boot] [PATCH v2 1/7] mtd: nand: omap_elm: remove #include omap_gpmc.h

2014-04-11 Thread Pekon Gupta
There is no dependency of omap_elm.c on omap_gpmc.h Signed-off-by: Pekon Gupta pe...@ti.com Reviewed-by: Stefan Roese s...@denx.de --- drivers/mtd/nand/omap_elm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/mtd/nand/omap_elm.c b/drivers/mtd/nand/omap_elm.c index 47b1f1b..4c65f3b

[U-Boot] [PATCH v2 0/7] mtd: nand: omap: clean up of omap_elm and omap_gpmc driver

2014-04-11 Thread Pekon Gupta
-schemes - minor code fixes and clean-ups This series can be as-it-is applied on u-boot 'v2014.04-rc3'. *Testing Procedure* Boot tested on am335x_evm (MLO - U-boot - kernel with filesystem flashed from U-boot) using OMAP_ECC_BCH8_CODE_HW and OMAP_ECC_BCH8_CODE_HW_DETECTION_SW ecc-schemes Pekon Gupta

[U-Boot] [PATCH v2 2/7] mtd: nand: omap_elm: use bch_type instead of nibble count to differentiate between BCH4/BCH8/BCH16

2014-04-11 Thread Pekon Gupta
| +--++ Current implementation of omap_elm driver uses ECC syndrom length (in 'nibbles') to differentiate between BCH4/BCH8/BCH16. This patch replaces it with 'bch_type' Signed-off-by: Pekon Gupta pe...@ti.com Reviewed-by: Stefan Roese s...@denx.de --- drivers/mtd/nand

[U-Boot] [PATCH v2 3/7] mtd: nand: omap_elm: use macros for register definitions

2014-04-11 Thread Pekon Gupta
This patch adds macros for following parameters of ELM Hardware engine - ELM_MAX_CHANNELS: ELM can process 8 data streams simultaneously - ELM_MAX_ERRORS: ELM can detect upto 16 ECC error when using BCH16 scheme Signed-off-by: Pekon Gupta pe...@ti.com Reviewed-by: Stefan Roese s...@denx.de

[U-Boot] [PATCH v2 4/7] mtd: nand: omap_gpmc: remove unused members of 'struct nand_bch_priv'

2014-04-11 Thread Pekon Gupta
This patch prepares to refactor 'struct nand_bch_priv' - 'struct omap_nand_info' And thus performs following clean-ups: - remove nand_bch_priv.type: use nand_bch_priv.ecc_scheme instead - remove nand_bch_priv.mode: unused Signed-off-by: Pekon Gupta pe...@ti.com --- drivers/mtd/nand

[U-Boot] [PATCH v2 6/7] mtd: nand: omap_gpmc: minor cleanup of omap_correct_data_bch

2014-04-11 Thread Pekon Gupta
This patch tries to avoid some local pointer dereferences, by using common local variables in omap_correct_data_bch() Signed-off-by: Pekon Gupta pe...@ti.com --- drivers/mtd/nand/omap_gpmc.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/mtd/nand

[U-Boot] [PATCH v2 7/7] mtd: nand: omap: fix error-codes returned from omap-elm driver

2014-04-11 Thread Pekon Gupta
This patch omap-elm.c: replaces -ve integer value returned during errorneous condition, with proper error-codes. omap-gpmc.c: updates omap-gpmc driver to pass error-codes returned from omap-elm driver to upper layers Signed-off-by: Pekon Gupta pe...@ti.com --- drivers

[U-Boot] [PATCH v1 1/6] mtd: nand: omap_elm: remove #include omap_gpmc.h

2014-04-10 Thread Pekon Gupta
There is no dependency of omap_elm.c on omap_gpmc.h Signed-off-by: Pekon Gupta pe...@ti.com --- drivers/mtd/nand/omap_elm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/mtd/nand/omap_elm.c b/drivers/mtd/nand/omap_elm.c index 47b1f1b..4c65f3b 100644 --- a/drivers/mtd/nand/omap_elm.c

[U-Boot] [PATCH v1 0/6] mtd: nand: omap: clean up of omap_elm and omap_gpmc driver

2014-04-10 Thread Pekon Gupta
tested on am335x_evm (MLO - U-boot - kernel with filesystem flashed from U-boot) using OMAP_ECC_BCH8_CODE_HW and OMAP_ECC_BCH8_CODE_HW_DETECTION_SW ecc-schemes Pekon Gupta (6): mtd: nand: omap_elm: remove #include omap_gpmc.h mtd: nand: omap_elm: use bch_type instead of nibble count

[U-Boot] [PATCH v1 2/6] mtd: nand: omap_elm: use bch_type instead of nibble count to differentiate between BCH4/BCH8/BCH16

2014-04-10 Thread Pekon Gupta
| +--++ Current implementation of omap_elm driver uses ECC syndrom length (in 'nibbles') to differentiate between BCH4/BCH8/BCH16. This patch replaces it with 'bch_type' Signed-off-by: Pekon Gupta pe...@ti.com --- drivers/mtd/nand/omap_elm.c | 20 drivers

[U-Boot] [PATCH v1 4/6] mtd: nand: omap_gpmc: remove unused members of 'struct nand_bch_priv'

2014-04-10 Thread Pekon Gupta
This patch prepares to refactor 'struct nand_bch_priv' - 'struct omap_nand_info' And thus performs following clean-ups: - remove nand_bch_priv.type: use nand_bch_priv.ecc_scheme instead - remove nand_bch_priv.mode: unused Signed-off-by: Pekon Gupta pe...@ti.com --- drivers/mtd/nand

[U-Boot] [PATCH v1 6/6] mtd: nand: omap_gpmc: minor cleanup of omap_correct_data_bch

2014-04-10 Thread Pekon Gupta
This patch tries to avoid some local pointer dereferences, by using common local variables in omap_correct_data_bch() Signed-off-by: Pekon Gupta pe...@ti.com --- drivers/mtd/nand/omap_gpmc.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/mtd/nand

[U-Boot] [PATCH v1 5/6] mtd: nand: omap_gpmc: rename struct nand_bch_priv to struct omap_nand_info

2014-04-10 Thread Pekon Gupta
This patch renames 'struct nand_bch_priv' which currently holds private data only for BCH ECC schemes, into 'struct omap_nand_info' so that same can be used for all ECC schemes Signed-off-by: Pekon Gupta pe...@ti.com --- drivers/mtd/nand/omap_gpmc.c | 58

[U-Boot] [PATCH v1 3/6] mtd: nand: omap_elm: use macros for register definitions

2014-04-10 Thread Pekon Gupta
This patch adds macros for following parameters of ELM Hardware engine - ELM_MAX_CHANNELS: ELM can process 8 data streams simultaneously - ELM_MAX_ERRORS: ELM can detect upto 16 ECC error when using BCH16 scheme Signed-off-by: Pekon Gupta pe...@ti.com --- include/linux/mtd/omap_elm.h | 9

[U-Boot] [PATCH] omap3: igep00x0: fix NAND_BOOT for igep_0020 and igep_0030

2014-04-03 Thread Pekon Gupta
. Signed-off-by: Pekon Gupta pe...@ti.com --- include/configs/omap3_igep00x0.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/configs/omap3_igep00x0.h b/include/configs/omap3_igep00x0.h index 8b8583a..4e87d6b 100644 --- a/include/configs/omap3_igep00x0.h +++ b/include/configs

[U-Boot] [PATCH v3 0/3] enable support for x16 NAND devices

2014-04-03 Thread Pekon Gupta
page. [PATCH 2/4]: enable NAND_BUSWIDTH_AUTO feature in omap_nand.c [PATCH 3/4]: cleaning of GPMC configs for NAND and NOR Brian Norris (1): mtd: nand: don't use read_buf for 8-bit ONFI transfers Pekon Gupta (2): mtd: nand: omap: add CONFIG_SYS_NAND_DEVICE_WIDTH to determine NAND device

[U-Boot] [PATCH v3 3/3] omap3: remove remnant macros GPMC_NAND_ECC_LP_x8_LAYOUT and GPMC_NAND_ECC_LP_x16_LAYOUT

2014-04-03 Thread Pekon Gupta
OMAP3 used GPMC_NAND_ECC_LP_x8_LAYOUT and GPMC_NAND_ECC_LP_x16_LAYOUT macros to configure GPMC controller for x7 or x8 bit device connected to its interface. Now this information is encoded in CONFIG_SYS_NAND_DEVICE_WIDTH macro, so above macros can be completely removed. Signed-off-by: Pekon

[U-Boot] [PATCH v3 1/3] mtd: nand: don't use read_buf for 8-bit ONFI transfers

2014-04-03 Thread Pekon Gupta
Dec 5 22:22:04 2013 +0100 mtd: nand: don't use {read,write}_buf for 8-bit transfers Now, I think that all barriers to probing ONFI on x16 devices are removed, so remove the check from nand_flash_detect_onfi(). Signed-off-by: Pekon Gupta pe...@ti.com --- drivers/mtd/nand/nand_base.c

[U-Boot] [PATCH v3 2/3] mtd: nand: omap: add CONFIG_SYS_NAND_DEVICE_WIDTH to determine NAND device bus-width

2014-04-03 Thread Pekon Gupta
. Signed-off-by: Pekon Gupta pe...@ti.com --- doc/README.nand| 9 + drivers/mtd/nand/omap_gpmc.c | 13 + include/configs/am335x_evm.h | 1 + include/configs/am335x_igep0033.h | 1 + include/configs/am3517_crane.h | 1

[U-Boot] [PATCH] am33xx: add support for beaglebone NAND cape

2014-04-03 Thread Pekon Gupta
-- ) [1] http://beagleboardtoys.info/index.php?title=BeagleBone_Memory_Expansion [2] http://beagleboardtoys.info/index.php?title=BeagleBone_4Gb_16-Bit_NAND_Module Signed-off-by: Pekon Gupta pe...@ti.com --- board/ti/am335x/mux.c | 75 +-- 1

[U-Boot] [PATCH v3 1/3] mtd: nand: omap: fix ecclayout to be in sync with u-boot NAND driver

2014-02-16 Thread Pekon Gupta
Signed-off-by: Pekon Gupta pe...@ti.com --- drivers/mtd/nand/omap2.c | 31 +++ 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index ef4190a..34ef941 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd

[U-Boot] [PATCH v3 0/3] mtd: nand: omap: fix ecc-layout

2014-02-16 Thread Pekon Gupta
configurations to match above ecc-layout are documented at https://processors.wiki.ti.com/index.php/Linux_Core_NAND_User%27s_Guide Pekon Gupta (3): mtd: nand: omap: fix ecclayout to be in sync with u-boot NAND driver mtd: nand: omap: fix ecclayout-oobfree-offset mtd: nand: omap: fix ecclayout

[U-Boot] [PATCH v3 3/3] mtd: nand: omap: fix ecclayout-oobfree-length

2014-02-16 Thread Pekon Gupta
This patch excludes reserved-marker byte-position from oobfree-length calculation. Thus all bytes from oobfree-offset till end of OOB are free. CC: sta...@vger.kernel.org # 3.13.x+ Signed-off-by: Pekon Gupta pe...@ti.com --- drivers/mtd/nand/omap2.c | 5 ++--- 1 file changed, 2 insertions(+), 3

[U-Boot] [PATCH v3 2/3] mtd: nand: omap: fix ecclayout-oobfree-offset

2014-02-16 Thread Pekon Gupta
eballe...@gmail.com Tested-by: Stefan Roese s...@denx.de Signed-off-by: Pekon Gupta pe...@ti.com --- drivers/mtd/nand/omap2.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index 34ef941..58685ab

[U-Boot] [PATCH v2 3/3] mtd: nand: omap: fix ecclayout to be in sync with u-boot NAND driver

2014-02-14 Thread Pekon Gupta
above ecc-layout are documented at https://processors.wiki.ti.com/index.php/Linux_Core_NAND_User%27s_Guide Reported-by: Enric Balletbo Serra eballe...@iseebcn.com Tested-by: Enric Balletbo i Serra eballe...@gmail.com Tested-by: Stefan Roese s...@denx.de Signed-off-by: Pekon Gupta pe...@ti.com

[U-Boot] [PATCH v2 2/3] mtd: nand: omap: fix ecclayout-oobfree-length

2014-02-14 Thread Pekon Gupta
oobfree-length calculation. Signed-off-by: Pekon Gupta pe...@ti.com --- drivers/mtd/nand/omap2.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index 874fd9d..433e58a 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers

[U-Boot] [PATCH v2 0/3] mtd: nand: omap: fix ecc-layout

2014-02-14 Thread Pekon Gupta
kernel reboot [1] u-boot configurations to match above ecc-layout are documented at https://processors.wiki.ti.com/index.php/Linux_Core_NAND_User%27s_Guide Pekon Gupta (3): mtd: nand: omap: fix ecclayout-oobfree-offset mtd: nand: omap: fix ecclayout-oobfree-length mtd: nand: omap: fix

[U-Boot] [PATCH v2 1/3] mtd: nand: omap: fix ecclayout-oobfree-offset

2014-02-14 Thread Pekon Gupta
Roese s...@denx.de Signed-off-by: Pekon Gupta pe...@ti.com --- drivers/mtd/nand/omap2.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index ef4190a..874fd9d 100644 --- a/drivers/mtd/nand/omap2.c

[U-Boot] [PATCH v1 0/2] mtd: nand: omap: booting from NAND using u-boot

2013-12-13 Thread Pekon Gupta
Kernel flash_erase /dev/mtdpart-of-u-boot 0 0 Kernel nandwrite -s 0 /dev/mtdpart-of-u-boot u-boot.img Kernel reboot Signed-off-by: Pekon Gupta pe...@ti.com --- drivers/mtd/nand/omap2.c | 33 + 1 file changed, 25 insertions(+), 8 deletions(-) Pekon Gupta

[U-Boot] [PATCH v1 2/2] mtd: nand: omap: fix ecclayout to be in sync with u-boot NAND driver

2013-12-13 Thread Pekon Gupta
0 Kernel nandwrite -s 0 /dev/mtdpart-of-u-boot u-boot.img Kernel reboot Signed-off-by: Pekon Gupta pe...@ti.com --- drivers/mtd/nand/omap2.c | 33 + 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand

[U-Boot] [PATCH v1 1/2] mtd: nand: omap: fix ecclayout-oobfree-offset

2013-12-13 Thread Pekon Gupta
This patch updates starting offset for free bytes in OOB which can be used by file-systems to store their metadata (like clean-marker in case of JFFS2). Signed-off-by: Pekon Gupta pe...@ti.com --- drivers/mtd/nand/omap2.c | 17 - 1 file changed, 4 insertions(+), 13 deletions

[U-Boot] [PATCH] mtd: nand: omap: fix ecc-layout for HAM1 ecc-scheme

2013-12-05 Thread Pekon Gupta
Figure 25-19. ECC Locations in NAND Spare Areas Reported-by: Stefan Roese s...@denx.de Signed-off-by: Pekon Gupta pe...@ti.com --- drivers/mtd/nand/omap_gpmc.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/omap_gpmc.c b/drivers/mtd/nand/omap_gpmc.c index

[U-Boot] [PATCH] mtd: nand: omap: add CONFIG_SPL_NAND_DEVICE_WIDTH to determine NAND device bus-width

2013-12-05 Thread Pekon Gupta
, CONFIG_SPL_NAND_DEVICE_WIDTH is useful. (3) Non-ONFI compliant devices need some mechanism to specify device bus-width to driver. Signed-off-by: Pekon Gupta pe...@ti.com --- doc/README.nand| 9 + drivers/mtd/nand/omap_gpmc.c | 14 ++ include

[U-Boot] [PATCH v1 3/5] mtd: nand: omap: merge duplicate GPMC data from different arch-xx headers into common omap_gpmc.h

2013-11-22 Thread Pekon Gupta
different arch-xx specific header files into single header file include/asm/arch/omap_gpmc.h Build tested using: ./MAKEALL -s am33xx -s omap3 -s omap4 -s omap5 Signed-off-by: Pekon Gupta pe...@ti.com --- arch/arm/include/asm/arch-am33xx/cpu.h | 51 -- arch/arm/include/asm

[U-Boot] [PATCH v1 5/5] mtd: nand: omap: move omap_elm.h from arch/arm/include/asm to drivers/mtd/nand

2013-11-22 Thread Pekon Gupta
omap_elm.h is a generic header used by OMAP ELM driver for all TI platfoms. Hence this file should be present in generic folder instead of architecture specific include folder. Build tested using: ./MAKEALL -s am33xx -s omap3 -s omap4 -s omap5 Signed-off-by: Pekon Gupta pe...@ti.com --- drivers

[U-Boot] [PATCH v1 0/5] mtd: nand: omap: clean omap_gpmc.h headers

2013-11-22 Thread Pekon Gupta
. But it should be applied above previous series given below, otherwise there would be minor conflict seen in file arch/arm/include/asm/omap_gpmc.h http://lists.denx.de/pipermail/u-boot/2013-November/167445.html Pekon Gupta (5): mtd: nand: omap: remove redundant platform

[U-Boot] [PATCH v1 0/5] mtd: nand: omap: clean omap_gpmc.h headers

2013-11-22 Thread Pekon Gupta
. But it should be applied above previous series given below, otherwise there would be minor conflict seen in file arch/arm/include/asm/omap_gpmc.h http://lists.denx.de/pipermail/u-boot/2013-November/167445.html Pekon Gupta (5): mtd: nand: omap: remove redundant platform specific header

[U-Boot] [PATCH v1 4/5] mtd: nand: omap: move omap_gpmc.h from arch/arm/include/asm to drivers/mtd/nand

2013-11-22 Thread Pekon Gupta
omap_gpmc.h is a generic header used by OMAP NAND driver for all TI platfoms. Hence this file should be present in generic folder instead of architecture specific include folder. Build tested using: ./MAKEALL -s am33xx -s omap3 -s omap4 -s omap5 Signed-off-by: Pekon Gupta pe...@ti.com --- arch

[U-Boot] [PATCH v1 2/5] mtd: nand: omap: remove unused #defines from common omap_gpmc.h

2013-11-22 Thread Pekon Gupta
omap3 -s omap4 -s omap5 Signed-off-by: Pekon Gupta pe...@ti.com --- arch/arm/include/asm/omap_gpmc.h | 47 -- include/configs/am335x_evm.h | 1 - include/configs/am335x_igep0033.h | 1 - include/configs/am3517_crane.h | 1 - include

[U-Boot] [PATCH v1 5/5] mtd: nand: omap: move omap_elm.h from arch/arm/include/asm to drivers/mtd/nand

2013-11-22 Thread Pekon Gupta
omap_elm.h is a generic header used by OMAP ELM driver for all TI platfoms. Hence this file should be present in generic folder instead of architecture specific include folder. Build tested using: ./MAKEALL -s am33xx -s omap3 -s omap4 -s omap5 Signed-off-by: Pekon Gupta pe...@ti.com --- drivers

[U-Boot] [PATCH v1 1/5] mtd: nand: omap: remove redundant platform specific header: arch-xx/omap_gpmc.h

2013-11-22 Thread Pekon Gupta
) are redundant. Build tested using: ./MAKEALL -s am33xx -s omap3 -s omap4 -s omap5 Signed-off-by: Pekon Gupta pe...@ti.com --- arch/arm/include/asm/arch-am33xx/omap_gpmc.h | 48 arch/arm/include/asm/arch-omap3/mem.h| 10 ++ arch/arm/include/asm/arch-omap3

[U-Boot] [PATCH v1 1/5] mtd: nand: omap: remove redundant platform specific header: arch-xx/omap_gpmc.h

2013-11-22 Thread Pekon Gupta
) are redundant. Build tested using: ./MAKEALL -s am33xx -s omap3 -s omap4 -s omap5 Signed-off-by: Pekon Gupta pe...@ti.com --- arch/arm/include/asm/arch-am33xx/omap_gpmc.h | 48 arch/arm/include/asm/arch-omap3/mem.h| 10 ++ arch/arm/include/asm/arch-omap3

[U-Boot] [PATCH v1 2/5] mtd: nand: omap: remove unused #defines from common omap_gpmc.h

2013-11-22 Thread Pekon Gupta
omap3 -s omap4 -s omap5 Signed-off-by: Pekon Gupta pe...@ti.com --- arch/arm/include/asm/omap_gpmc.h | 47 -- include/configs/am335x_evm.h | 1 - include/configs/am335x_igep0033.h | 1 - include/configs/am3517_crane.h | 1 - include

[U-Boot] [PATCH v1 4/5] mtd: nand: omap: move omap_gpmc.h from arch/arm/include/asm to drivers/mtd/nand

2013-11-22 Thread Pekon Gupta
omap_gpmc.h is a generic header used by OMAP NAND driver for all TI platfoms. Hence this file should be present in generic folder instead of architecture specific include folder. Build tested using: ./MAKEALL -s am33xx -s omap3 -s omap4 -s omap5 Signed-off-by: Pekon Gupta pe...@ti.com --- arch

[U-Boot] [PATCH v1 3/5] mtd: nand: omap: merge duplicate GPMC data from different arch-xx headers into common omap_gpmc.h

2013-11-22 Thread Pekon Gupta
different arch-xx specific header files into single header file include/asm/arch/omap_gpmc.h Build tested using: ./MAKEALL -s am33xx -s omap3 -s omap4 -s omap5 Signed-off-by: Pekon Gupta pe...@ti.com --- arch/arm/include/asm/arch-am33xx/cpu.h | 51 -- arch/arm/include/asm

[U-Boot] [PATCH v11 1/4] mtd: nand: omap: make am33xx/elm.c as common driver for all OMAPx and AMxxxx platforms

2013-11-20 Thread Pekon Gupta
configs using AM33xx SoC platform. Signed-off-by: Pekon Gupta pe...@ti.com --- arch/arm/cpu/armv7/am33xx/Makefile| 1 - .../arm/include/asm/{arch-am33xx/elm.h = omap_elm.h} | 0 doc/README.nand | 19 +++ drivers/mtd/nand

[U-Boot] [PATCH v11 3/4] mtd: nand: omap: add CONFIG_NAND_OMAP_ECCSCHEME for selection of ecc-scheme

2013-11-20 Thread Pekon Gupta
on presence of ELM hardware engine on SoC. (Refer doc/README.nand) Signed-off-by: Pekon Gupta pe...@ti.com --- doc/README.nand| 23 +++ doc/README.omap3 | 3 +-- drivers/mtd/nand/omap_gpmc.c | 13 - include

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

2013-11-20 Thread Pekon Gupta
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

[U-Boot] [PATCH v11 4/4] am335x: fix GPMC config for NAND and NOR SPL boot

2013-11-20 Thread Pekon Gupta
and NAND boot. This patch: - combines NOR and NAND configs spread in board files to common gpmc_init() - configures GPMC based on boot-mode selected for SPL boot. Signed-off-by: Pekon Gupta pe...@ti.com --- arch/arm/cpu/armv7/am33xx/mem.c| 52 +++--- arch/arm/include

[U-Boot] [PATCH v11 2/4] mtd: nand: omap: enable BCH ECC scheme using ELM for generic platform

2013-11-20 Thread Pekon Gupta
doc/README.omap3 Signed-off-by: Pekon Gupta pe...@ti.com --- arch/arm/include/asm/omap_gpmc.h | 16 ++ doc/README.nand | 11 ++ drivers/mtd/nand/omap_gpmc.c | 326 --- 3 files changed, 228 insertions(+), 125 deletions(-) diff --git

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

2013-11-18 Thread Pekon Gupta
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 AM platforms mtd: nand: omap: enable BCH ECC scheme using

[U-Boot] [PATCH v10 1/4] mtd: nand: omap: make am33xx/elm.c as common driver for all OMAPx and AMxxxx platforms

2013-11-18 Thread Pekon Gupta
configs using AM33xx SoC platform. Signed-off-by: Pekon Gupta pe...@ti.com --- arch/arm/cpu/armv7/am33xx/Makefile| 1 - .../arm/include/asm/{arch-am33xx/elm.h = omap_elm.h} | 0 doc/README.nand | 19 +++ drivers/mtd/nand

[U-Boot] [PATCH v10 3/4] mtd: nand: omap: add CONFIG_NAND_OMAP_ECCSCHEME for selection of ecc-scheme

2013-11-18 Thread Pekon Gupta
on presence of ELM hardware engine on SoC. (Refer doc/README.nand) Signed-off-by: Pekon Gupta pe...@ti.com --- doc/README.nand| 23 +++ doc/README.omap3 | 3 +-- drivers/mtd/nand/omap_gpmc.c | 13 - include

[U-Boot] [PATCH v10 2/4] mtd: nand: omap: enable BCH ECC scheme using ELM for generic platform

2013-11-18 Thread Pekon Gupta
doc/README.omap3 Signed-off-by: Pekon Gupta pe...@ti.com --- arch/arm/include/asm/omap_gpmc.h | 16 ++ doc/README.nand | 11 ++ drivers/mtd/nand/omap_gpmc.c | 328 --- 3 files changed, 230 insertions(+), 125 deletions(-) diff --git

[U-Boot] [PATCH v10 4/4] am335x: fix GPMC config for NAND and NOR SPL boot

2013-11-18 Thread Pekon Gupta
and NAND boot. This patch: - combines NOR and NAND configs spread in board files to common gpmc_init() - configures GPMC based on boot-mode selected for SPL boot. Signed-off-by: Pekon Gupta pe...@ti.com --- arch/arm/cpu/armv7/am33xx/mem.c| 52 +++--- arch/arm/include

[U-Boot] [PATCH v9 2/4] mtd: nand: omap: optimize chip-ecc.calculate() for H/W ECC schemes

2013-11-18 Thread Pekon Gupta
() - removes omap_ecc_disable() and instead uses it as inline. Signed-off-by: Pekon Gupta pe...@ti.com --- drivers/mtd/nand/omap_gpmc.c | 226 --- 1 file changed, 63 insertions(+), 163 deletions(-) diff --git a/drivers/mtd/nand/omap_gpmc.c b/drivers/mtd/nand

[U-Boot] [PATCH v9 0/4] mtd: nand: omap: optimize OMAP NAND driver

2013-11-18 Thread Pekon Gupta
/160218.html Pekon Gupta (4): mtd: nand: omap: optimize chip-ecc.hwctl() for H/W ECC schemes mtd: nand: omap: optimize chip-ecc.calculate() for H/W ECC schemes mtd: nand: omap: optimized chip-ecc.correct() for H/W ECC schemes board/ti/am335x/README: update for NAND boot arch/arm/include

[U-Boot] [PATCH v9 3/4] mtd: nand: omap: optimized chip-ecc.correct() for H/W ECC schemes

2013-11-18 Thread Pekon Gupta
by merging following omap_rotate_ecc_bch() + omap_fix_errors_bch() = omap_correct_data_bch() - fixing logic for bit-flip correction based on error_loc[count] Signed-off-by: Pekon Gupta pe...@ti.com --- drivers/mtd/nand/omap_gpmc.c | 161 +++ 1 file changed

  1   2   >