ARM: omap: clean GPMC macros
cover ARM: omap: clean GPMC macros
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 size for NAND and NOR devices
ARM: omap: clean redundant PISMO_xx macros used in OMAP3
ARM: omap: move board specific NAND configs out from ti_armv7_common.h
arch/arm/cpu/armv7/omap-common/mem-common.c | 14 ++++++++++---- 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 ------------- doc/README.nand | 12 ++++++++++++ include/configs/am335x_evm.h | 6 ++++++ include/configs/am3517_crane.h | 7 +------ include/configs/am3517_evm.h | 7 +------ include/configs/cm_t335.h | 5 +++++ include/configs/cm_t35.h | 3 --- include/configs/devkit8000.h | 2 -- include/configs/dig297.h | 4 ---- include/configs/mcx.h | 4 ---- include/configs/nokia_rx51.h | 2 -- include/configs/omap3_beagle.h | 13 +++++++------ include/configs/omap3_evm_common.h | 7 ++----- include/configs/omap3_igep00x0.h | 10 +++++++--- include/configs/omap3_logic.h | 8 ++------ include/configs/omap3_overo.h | 12 +++++++----- include/configs/omap3_pandora.h | 7 +------ include/configs/omap3_zoom1.h | 13 +++++++------ include/configs/pengwyn.h | 6 ++++++ include/configs/tam3517-common.h | 4 ---- include/configs/tao3530.h | 7 +------ include/configs/ti_armv7_common.h | 8 -------- include/configs/tricorder.h | 2 -- 26 files changed, 75 insertions(+), 109 deletions(-)
Signature · 1 line
1.8.5.1.163.gd7aced9
PATCH 1/3 ARM: omap: fix GPMC address-map size for NAND and NOR devices
Fixes commit a0a37183bd75e74608bc78c8d0e2a34454f95a91
ARM: omap: merge GPMC initialization code for all platform
1) NAND device are not directly memory-mapped to CPU address-space, they are indirectly accessed via following GPMC registers:
- GPMC_NAND_COMMAND_x
- GPMC_NAND_ADDRESS_x
- GPMC_NAND_DATA_x
Therefore from CPU's point of view, NAND address-map can be limited to just above register addresses. But GPMC chip-select address-map can be configured in granularity of 16MB only.
So this patch uses GPMC_SIZE_16M for all NAND devices.
2) NOR device are directly memory-mapped 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.
--- arch/arm/cpu/armv7/omap-common/mem-common.c | 10 ++++++++-- include/configs/am335x_evm.h | 1 + 2 files changed, 9 insertions(+), 2 deletions(-)
arch/arm/cpu/armv7/omap-common/mem-common.c +8 -2
@@ -87,8 +87,13 @@ void gpmc_init(void)STNOR_GPMC_CONFIG6 ,STNOR_GPMC_CONFIG7 }; -u32 size =GPMC_SIZE_16M ;u32 base =CONFIG_SYS_FLASH_BASE ; +u32 size = (CONFIG_SYS_FLASH_SIZE >0x08000000 ) ?GPMC_SIZE_256M : +/* > 64MB */ ((CONFIG_SYS_FLASH_SIZE >0x04000000 ) ?GPMC_SIZE_128M : +/* > 32MB */ ((CONFIG_SYS_FLASH_SIZE >0x02000000 ) ?GPMC_SIZE_64M : +/* > 16MB */ ((CONFIG_SYS_FLASH_SIZE >0x01000000 ) ?GPMC_SIZE_32M : +/* min 16MB */ GPMC_SIZE_16M ))); +#elif defined(CONFIG_NAND )/* configure GPMC for NAND */ const u32 gpmc_regs[GPMC_MAX_REG] = { M_NAND_GPMC_CONFIG1,
@@ -99,8 +104,9 @@ void gpmc_init(void)M_NAND_GPMC_CONFIG6 ,0 }; -u32 size =GPMC_SIZE_256M ;u32 base =CONFIG_SYS_NAND_BASE ; +u32 size =GPMC_SIZE_16M ; +#elif defined(CONFIG_CMD_ONENAND )const u32 gpmc_regs[GPMC_MAX_REG ] = {ONENAND_GPMC_CONFIG1 , ONENAND_GPMC_CONFIG2,
include/configs/am335x_evm.h +1 -0
@@ -453,6 +453,7 @@#define CONFIG_SYS_MAX_FLASH_BANKS 1#define CONFIG_SYS_FLASH_BASE (0x08000000)#define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT +#define CONFIG_SYS_FLASH_SIZE 0x01000000#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE/* Reduce SPL size by removing unlikey targets */ #ifdef CONFIG_NOR_BOOT
Signature · 1 line
1.8.5.1.163.gd7aced9
PATCH 2/3 ARM: omap: clean redundant PISMO_xx macros used in OMAP3
In reply to Pekon GuptaPISMO_xx macros were used to define 'Platform Independent Storage MOdule' related GPMC configurations. This patch
- Replaces these OMAP3 specific macros with generic CONFIG_xx macros as provided by current u-boot infrastructure.
- Removes unused redundant macros, which are no longer required after merging of common platform code in following commit
commit a0a37183bd75e74608bc78c8d0e2a34454f95a91
ARM: omap: merge GPMC initialization code for all platform
+-----------------+-----------------------------------------------------------+ | Macro | Reason for removal | +-----------------+-----------------------------------------------------------+ | PISMO1_NOR_BASE | duplicate of CONFIG_SYS_FLASH_BASE | +-----------------+-----------------------------------------------------------+ | PISMO1_NAND_BASE| duplicate of CONFIG_SYS_NAND_BASE | +-----------------+-----------------------------------------------------------+ | PISMO1_ONEN_BASE| duplicate of CONFIG_SYS_ONENAND_BASE | +-----------------+-----------------------------------------------------------+ | PISMO1_NAND_SIZE| GPMC accesses NAND device via I/O mapped registers so | | | configuring GPMC chip-select for smallest allowable | | | segment (GPMC_SIZE_16M) is enough. | +-----------------+-----------------------------------------------------------+ | PISMO1_ONEN_SIZE| OneNAND uses a fixed GPMC chip-select address-space of | | | 128MB (GPMC_SIZE_128M) | +-----------------+-----------------------------------------------------------+ +-----------------+-----------------------------------------------------------+ | PISMO1_NOR | Unused Macros | | PISMO1_NAND | | | PISMO2_CS0 | | | PISMO2_CS1 | | | PISMO1_ONENAND | | | PISMO2_NAND_CS0 | | | PISMO2_NAND_CS1 | | | PISMO1_NOR_BASE | | | PISMO1_NAND_BASE| | | PISMO2_CS0_BASE | | +-----------------+-----------------------------------------------------------+
--- 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/configs/am3517_crane.h | 7 +------ include/configs/am3517_evm.h | 7 +------ include/configs/cm_t35.h | 3 --- include/configs/devkit8000.h | 2 -- include/configs/dig297.h | 4 ---- include/configs/mcx.h | 4 ---- include/configs/nokia_rx51.h | 2 -- include/configs/omap3_beagle.h | 7 +------ include/configs/omap3_evm_common.h | 7 ++----- include/configs/omap3_igep00x0.h | 3 --- include/configs/omap3_logic.h | 8 ++------ include/configs/omap3_overo.h | 6 +----- include/configs/omap3_pandora.h | 7 +------ include/configs/omap3_zoom1.h | 7 +------ include/configs/tam3517-common.h | 4 ---- include/configs/tao3530.h | 7 +------ include/configs/tricorder.h | 2 -- 21 files changed, 13 insertions(+), 99 deletions(-)
arch/arm/cpu/armv7/omap-common/mem-common.c +2 -2
@@ -116,8 +116,8 @@ void gpmc_init(void)ONENAND_GPMC_CONFIG6 ,0 }; -u32 base =PISMO1_ONEN_BASE ; -u32 size =PISMO1_ONEN_SIZE ; +u32 size =GPMC_SIZE_128M ; +u32 base =CONFIG_SYS_ONENAND_BASE ;#else const u32 gpmc_regs[GPMC_MAX_REG ] = {0 ,0 ,0 ,0 ,0 ,0 ,0 };u32 size =0 ;
arch/arm/include/asm/arch-am33xx/mem.h +0 -7
@@ -59,13 +59,6 @@/* max number of GPMC regs */ #define GPMC_MAX_REG 7 -#define PISMO1_NOR 1 -#define PISMO1_NAND 2 -#define PISMO2_CS0 3 -#define PISMO2_CS1 4 -#define PISMO1_ONENAND 5#define DBG_MPDB 6 -#define PISMO2_NAND_CS0 7 -#define PISMO2_NAND_CS1 8#endif /* endif _MEM_H_ */
arch/arm/include/asm/arch-omap3/cpu.h +0 -1
@@ -98,7 +98,6 @@ struct ctrl_id {#define DEBUG_BASE 0x08000000/* debug board */ #define NAND_BASE 0x30000000/* NAND addr */ /* (actual size small port) */ -#define PISMO2_BASE 0x18000000/* PISMO2 CS1/2 */ #define ONENAND_MAP 0x20000000/* OneNand addr */ /* (actual size small port) */ /* SMS */
arch/arm/include/asm/arch-omap3/mem.h +0 -13
@@ -427,20 +427,7 @@ enum {/* max number of GPMC regs */ #define GPMC_MAX_REG 7 -#define PISMO1_NOR 1 -#define PISMO1_NAND 2 -#define PISMO2_CS0 3 -#define PISMO2_CS1 4 -#define PISMO1_ONENAND 5#define DBG_MPDB 6 -#define PISMO2_NAND_CS0 7 -#define PISMO2_NAND_CS1 8 - -/* make it readable for the gpmc_init */ -#define PISMO1_NOR_BASE FLASH_BASE -#define PISMO1_NAND_BASE NAND_BASE -#define PISMO2_CS0_BASE PISMO2_MAP1 -#define PISMO1_ONEN_BASE ONENAND_MAP#define DBG_MPDB_BASE DEBUG_BASE#ifndef __ASSEMBLY__
include/configs/am3517_crane.h +1 -6
@@ -252,17 +252,12 @@*/ /* **** PISMO SUPPORT *** */ - -/* Configure the PISMO */ -#define PISMO1_NAND_SIZE GPMC_SIZE_128M -#define PISMO1_ONEN_SIZE GPMC_SIZE_128M -#define CONFIG_SYS_MAX_FLASH_SECT 520/* max number of sectors */ /* on one chip */ #define CONFIG_SYS_MAX_FLASH_BANKS 2/* max number of flash banks */ #define CONFIG_SYS_MONITOR_LEN (256 << 10)/* Reserve 2 sectors */ -#define CONFIG_SYS_FLASH_BASE PISMO1_NAND_BASE +#define CONFIG_SYS_FLASH_BASE NAND_BASE/* Monitor at start of flash */ #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
include/configs/am3517_evm.h +1 -6
@@ -259,18 +259,13 @@*/ /* **** PISMO SUPPORT *** */ - -/* Configure the PISMO */ -#define PISMO1_NAND_SIZE GPMC_SIZE_128M -#define PISMO1_ONEN_SIZE GPMC_SIZE_128M -#define CONFIG_SYS_MAX_FLASH_SECT 520/* max number of sectors */ /* on one chip */ #define CONFIG_SYS_MAX_FLASH_BANKS 2/* max number of flash banks */ #define CONFIG_SYS_MONITOR_LEN (256 << 10)/* Reserve 2 sectors */ #if defined(CONFIG_CMD_NAND ) -#define CONFIG_SYS_FLASH_BASE PISMO1_NAND_BASE +#define CONFIG_SYS_FLASH_BASE NAND_BASE#endif /* Monitor at start of flash */
include/configs/cm_t35.h +0 -3
@@ -258,9 +258,6 @@*/ /* **** PISMO SUPPORT *** */ -/* Configure the PISMO */ -#define PISMO1_NAND_SIZE GPMC_SIZE_128M -/* Monitor at start of flash */ #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE#define CONFIG_SYS_MONITOR_LEN (256 << 10)/* Reserve 2 sectors */
include/configs/devkit8000.h +0 -2
@@ -262,8 +262,6 @@#define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1/* NAND and environment organization */ -#define PISMO1_NAND_SIZE GPMC_SIZE_128M -#define CONFIG_SYS_MONITOR_LEN (256 << 10)/* Reserve 2 sectors */ #define CONFIG_ENV_IS_IN_NAND 1
include/configs/dig297.h +0 -4
@@ -251,10 +251,6 @@*/ /* **** PISMO SUPPORT *** */ - -/* Configure the PISMO */ -#define PISMO1_NAND_SIZE GPMC_SIZE_128M -#define CONFIG_SYS_MONITOR_LEN (256 << 10)/* Reserve 2 sectors */ #define CONFIG_SYS_FLASH_BASE boot_flash_base
include/configs/mcx.h +0 -4
@@ -316,10 +316,6 @@*/ /* **** PISMO SUPPORT *** */ - -/* Configure the PISMO */ -#define PISMO1_NAND_SIZE GPMC_SIZE_128M -#define CONFIG_NAND_OMAP_GPMC #define CONFIG_ENV_IS_IN_NAND #define SMNAND_ENV_OFFSET 0x180000/* environment starts here */
include/configs/nokia_rx51.h +0 -2
@@ -220,8 +220,6 @@#ifdef ONENAND_SUPPORT -#define PISMO1_NAND_SIZE GPMC_SIZE_128M -#define PISMO1_ONEN_SIZE GPMC_SIZE_128M#define CONFIG_SYS_ONENAND_BASE ONENAND_MAP#define CONFIG_MTD_DEVICE #define CONFIG_MTD_PARTITIONS
include/configs/omap3_beagle.h +1 -6
@@ -266,13 +266,8 @@*/ /* **** PISMO SUPPORT *** */ - -/* Configure the PISMO */ -#define PISMO1_NAND_SIZE GPMC_SIZE_128M -#define PISMO1_ONEN_SIZE GPMC_SIZE_128M -#if defined(CONFIG_CMD_NAND ) -#define CONFIG_SYS_FLASH_BASE PISMO1_NAND_BASE +#define CONFIG_SYS_FLASH_BASE NAND_BASE#endif /* Monitor at start of flash */
include/configs/omap3_evm_common.h +2 -5
@@ -95,9 +95,6 @@/* * PISMO support */ -#define PISMO1_NAND_SIZE GPMC_SIZE_128M -#define PISMO1_ONEN_SIZE GPMC_SIZE_128M -/* Monitor at start of flash - Reserve 2 sectors */ #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
@@ -205,12 +202,12 @@* NAND / OneNAND */ #if defined(CONFIG_CMD_NAND ) -#define CONFIG_SYS_FLASH_BASE PISMO1_NAND_BASE +#define CONFIG_SYS_FLASH_BASE NAND_BASE#define CONFIG_NAND_OMAP_GPMC #define CONFIG_ENV_OFFSET SMNAND_ENV_OFFSET#elif defined(CONFIG_CMD_ONENAND ) -#define CONFIG_SYS_FLASH_BASE PISMO1_ONEN_BASE +#define CONFIG_SYS_FLASH_BASE ONENAND_MAP#define CONFIG_SYS_ONENAND_BASE ONENAND_MAP#endif
include/configs/omap3_igep00x0.h +0 -3
@@ -146,8 +146,6 @@*/ #ifdef CONFIG_BOOT_ONENAND -#define PISMO1_ONEN_SIZE GPMC_SIZE_128M/* Configure the PISMO */ -#define CONFIG_SYS_ONENAND_BASE ONENAND_MAP#define ONENAND_ENV_OFFSET 0x260000/* environment starts here */
@@ -158,7 +156,6 @@#endif #ifdef CONFIG_NAND -#define PISMO1_NAND_SIZE GPMC_SIZE_128M/* Configure the PISMO */ #define CONFIG_ENV_OFFSET 0x260000/* environment starts here */ #define CONFIG_ENV_IS_IN_NAND 1#define CONFIG_ENV_SIZE (512 << 10)/* Total Size Environment */
include/configs/omap3_logic.h +2 -6
@@ -277,16 +277,12 @@*/ /* **** PISMO SUPPORT *** */ - -/* Configure the PISMO */ -#define PISMO1_NAND_SIZE GPMC_SIZE_128M -#define CONFIG_SYS_MONITOR_LEN (256 << 10)/* Reserve 2 sectors */ #if defined(CONFIG_CMD_NAND ) -#define CONFIG_SYS_FLASH_BASE PISMO1_NAND_BASE +#define CONFIG_SYS_FLASH_BASE NAND_BASE#elif defined(CONFIG_CMD_ONENAND ) -#define CONFIG_SYS_FLASH_BASE PISMO1_ONEN_BASE +#define CONFIG_SYS_FLASH_BASE ONENAND_MAP#endif /* Monitor at start of flash */
include/configs/omap3_overo.h +1 -5
@@ -173,12 +173,8 @@ 0x01F00000) /* 31MB *//* FLASH and environment organization */ -/* Configure the PISMO */ -#define PISMO1_NAND_SIZE GPMC_SIZE_128M -#define PISMO1_ONEN_SIZE GPMC_SIZE_128M -#if defined(CONFIG_NAND ) -#define CONFIG_SYS_FLASH_BASE PISMO1_NAND_BASE +#define CONFIG_SYS_FLASH_BASE NAND_BASE#endif /* Monitor at start of flash */
include/configs/omap3_pandora.h +1 -6
@@ -220,15 +220,10 @@*/ /* **** PISMO SUPPORT *** */ - -/* Configure the PISMO */ -#define PISMO1_NAND_SIZE GPMC_SIZE_128M -#define PISMO1_ONEN_SIZE GPMC_SIZE_128M -#define CONFIG_SYS_MONITOR_LEN (256 << 10)/* Reserve 2 sectors */ #if defined(CONFIG_CMD_NAND ) -#define CONFIG_SYS_FLASH_BASE PISMO1_NAND_BASE +#define CONFIG_SYS_FLASH_BASE NAND_BASE#endif /* Monitor at start of flash */
include/configs/omap3_zoom1.h +1 -6
@@ -165,13 +165,8 @@*/ /* **** PISMO SUPPORT *** */ - -/* Configure the PISMO */ -#define PISMO1_NAND_SIZE GPMC_SIZE_128M -#define PISMO1_ONEN_SIZE GPMC_SIZE_128M -#if defined(CONFIG_CMD_NAND ) -#define CONFIG_SYS_FLASH_BASE PISMO1_NAND_BASE +#define CONFIG_SYS_FLASH_BASE NAND_BASE#endif /* Monitor at start of flash */
include/configs/tam3517-common.h +0 -4
@@ -181,10 +181,6 @@*/ /* **** PISMO SUPPORT *** */ - -/* Configure the PISMO */ -#define PISMO1_NAND_SIZE GPMC_SIZE_128M -#define CONFIG_NAND #define CONFIG_NAND_OMAP_GPMC #define CONFIG_ENV_IS_IN_NAND
include/configs/tao3530.h +1 -6
@@ -253,13 +253,8 @@*/ /* **** PISMO SUPPORT *** */ - -/* Configure the PISMO */ -#define PISMO1_NAND_SIZE GPMC_SIZE_128M -#define PISMO1_ONEN_SIZE GPMC_SIZE_128M -#define CONFIG_SYS_MONITOR_LEN (256 << 10)/* Reserve 2 sectors */ -#define CONFIG_SYS_FLASH_BASE PISMO1_NAND_BASE +#define CONFIG_SYS_FLASH_BASE NAND_BASE/* Monitor@start of flash */ #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
include/configs/tricorder.h +0 -2
@@ -315,8 +315,6 @@#define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1/* NAND and environment organization */ -#define PISMO1_NAND_SIZE GPMC_SIZE_128M -#define CONFIG_SYS_MONITOR_LEN (256 << 10)/* Reserve 2 sectors */ #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
Signature · 1 line
1.8.5.1.163.gd7aced9
PATCH 3/3 ARM: omap: move board specific NAND configs out from ti_armv7_common.h
In reply to Pekon GuptaThis patch moves some board specific NAND configs:
- FROM: generic config file 'ti_armv7_common.h'
- TO: individual board config files using these configs.
So that each board can independently set the value as per its design.
Following configs are affected in this patch:
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.
--- doc/README.nand | 12 ++++++++++++ include/configs/am335x_evm.h | 5 +++++ include/configs/cm_t335.h | 5 +++++ include/configs/omap3_beagle.h | 6 ++++++ include/configs/omap3_igep00x0.h | 7 +++++++ include/configs/omap3_overo.h | 6 ++++++ include/configs/omap3_zoom1.h | 6 ++++++ include/configs/pengwyn.h | 6 ++++++ include/configs/ti_armv7_common.h | 8 -------- 9 files changed, 53 insertions(+), 8 deletions(-)
doc/README.nand +12 -0
@@ -89,6 +89,10 @@ Commands: Configuration Options: + CONFIG_SYS_NAND_U_BOOT_OFFS + NAND Offset from where SPL will read u-boot image. This is the starting + address of u-boot MTD partition in NAND. + CONFIG_CMD_NAND Enables NAND support and commmands.
@@ -226,6 +230,14 @@ Platform specific options detection. However ECC calculation on such plaforms would still be done by GPMC controller. + CONFIG_SPL_NAND_AM33XX_BCH + Enables SPL-NAND driver (am335x_spl_bch.c) which supports ELM based + hardware ECC correction. This is useful for platforms which have ELM + hardware engine and use NAND boot mode. + Some legacy platforms like OMAP3xx do not have in-built ELM h/w engine, + so those platforms should use CONFIG_SPL_NAND_SIMPLE for enabling + SPL-NAND driver with software ECC correction support. + CONFIG_NAND_OMAP_ECCSCHEME On OMAP platforms, this CONFIG specifies NAND ECC scheme. It can take following values:
include/configs/am335x_evm.h +5 -0
@@ -254,6 +254,11 @@#define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000 +#ifdef CONFIG_SPL_OS_BOOT +#define CONFIG_CMD_SPL_NAND_OFS 0x00080000/* os parameters */ +#define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x00200000/* kernel offset */ +#define CONFIG_CMD_SPL_WRITE_SIZE 0x2000 +#endif #endif #endif
include/configs/cm_t335.h +5 -0
@@ -150,6 +150,11 @@#define CONFIG_ENV_OFFSET 0x300000/* environment starts here */ #define CONFIG_SYS_ENV_SECT_SIZE (128 << 10)/* 128 KiB */ #define CONFIG_SYS_NAND_ONFI_DETECTION +#ifdef CONFIG_SPL_OS_BOOT +#define CONFIG_CMD_SPL_NAND_OFS 0x400000/* un-assigned: (using dtb) */ +#define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x500000 +#define CONFIG_CMD_SPL_WRITE_SIZE 0x2000 +#endif /* GPIO pin + bank to pin ID mapping */ #define GPIO_PIN (_bank, _pin) ((_bank << 5) + _pin)
include/configs/omap3_beagle.h +6 -0
@@ -304,5 +304,11 @@#define CONFIG_SYS_NAND_ECCBYTES 3#define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_HAM1_CODE_HW#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000 +/* NAND: SPL falcon mode configs */ +#ifdef CONFIG_SPL_OS_BOOT +#define CONFIG_CMD_SPL_NAND_OFS 0x240000 +#define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x280000 +#define CONFIG_CMD_SPL_WRITE_SIZE 0x2000 +#endif #endif /* __CONFIG_H */
include/configs/omap3_igep00x0.h +7 -0
@@ -196,6 +196,13 @@#define CONFIG_SYS_NAND_ECCSIZE 512#define CONFIG_SYS_NAND_ECCBYTES 3#define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_HAM1_CODE_HW +#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000 +/* NAND: SPL falcon mode configs */ +#ifdef CONFIG_SPL_OS_BOOT +#define CONFIG_CMD_SPL_NAND_OFS 0x240000 +#define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x280000 +#define CONFIG_CMD_SPL_WRITE_SIZE 0x2000 +#endif #endif #endif /* __IGEP00X0_H */
include/configs/omap3_overo.h +6 -0
@@ -216,5 +216,11 @@#define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_HAM1_CODE_HW#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000 +/* NAND: SPL falcon mode configs */ +#ifdef CONFIG_SPL_OS_BOOT +#define CONFIG_CMD_SPL_NAND_OFS 0x240000 +#define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x280000 +#define CONFIG_CMD_SPL_WRITE_SIZE 0x2000 +#endif #endif /* __CONFIG_H */
include/configs/omap3_zoom1.h +6 -0
@@ -70,6 +70,12 @@ "4m(kernel),-(fs)"#if defined(CONFIG_CMD_NAND ) +/* NAND: SPL falcon mode configs */ +#ifdef CONFIG_SPL_OS_BOOT +#define CONFIG_CMD_SPL_NAND_OFS 0x240000 +#define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x280000 +#define CONFIG_CMD_SPL_WRITE_SIZE 0x2000 +#endif #define CONFIG_CMD_NAND_LOCK_UNLOCK /* Enable lock/unlock support */ #endif
include/configs/pengwyn.h +6 -0
@@ -159,6 +159,12 @@#define CONFIG_ENV_IS_IN_NAND #define CONFIG_ENV_OFFSET 0x260000/* environment starts here */ #define CONFIG_SYS_ENV_SECT_SIZE (128 << 10)/* 128 KiB */ +/* NAND: SPL falcon mode configs */ +#ifdef CONFIG_SPL_OS_BOOT +#define CONFIG_CMD_SPL_NAND_OFS 0x240000/* un-assigned */ +#define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x280000 +#define CONFIG_CMD_SPL_WRITE_SIZE 0x2000 +#endif /* * USB configuration. We enable MUSB support, both for host and for
include/configs/ti_armv7_common.h +0 -8
@@ -243,13 +243,6 @@#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR 0x80/* address 0x10000 */ #define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS 0x80/* 64KiB */ -/* NAND */ -#ifdef CONFIG_NAND -#define CONFIG_CMD_SPL_NAND_OFS 0x240000/* end of u-boot */ -#define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x280000 -#define CONFIG_CMD_SPL_WRITE_SIZE 0x2000 -#endif -/* spl export command */ #define CONFIG_CMD_SPL #endif
@@ -275,7 +268,6 @@#define CONFIG_SPL_NAND_ECC #define CONFIG_SPL_MTD_SUPPORT #define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE -#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000#endif #endif /* !CONFIG_NOR_BOOT */
Signature · 1 line
1.8.5.1.163.gd7aced9
Gupta
cover ARM: omap: clean GPMC macros
In reply to Pekon GuptaQuoted 5 lines
From: Pekon Gupta <[email protected]>
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
Quoted 7 lines
with $ARCH=arm && $CROSS_COMPILE=arm-linux-gnueabihf-Pekon Gupta (3):
ARM: omap: fix GPMC address-map size for NAND and NOR devices
ARM: omap: clean redundantPISMO_xxmacros used in OMAP3
ARM: omap: move board specific NAND configs out fromti_armv7_common.h
[PATCH 3/3] in this series is updated version of below patch
http://lists.denx.de/pipermail/u-boot/2014-July/183719.html
with regards, pekon
PATCH 1/3 ARM: omap: fix GPMC address-map size for NAND and NOR devices
In reply to Pekon GuptaQuoted 13 lines · pekon gupta
Fixes commit
a0a37183bd75e74608bc78c8d0e2a34454f95a91
ARM: omap: merge GPMC initialization code for all platform1) NAND device are not directly memory-mapped to CPU address-space, they are indirectly accessed via following GPMC registers:
-GPMC_NAND_COMMAND_x
-GPMC_NAND_ADDRESS_x
-GPMC_NAND_DATA_x
Therefore from CPU's point of view, NAND address-map can be limited to just above register addresses. But GPMC chip-select address-map can be configured in granularity of 16MB only.
So this patch usesGPMC_SIZE_16Mfor all NAND devices.
Quoted 6 lines
2) NOR device are directly memory-mapped 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_SIZEto derive GPMC chip-select address-map size configuration.Signed-off-by Pekon Gupta <[email protected]>
Applied to u-boot-ti/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140725/77adb476/attachment.pgp>
PATCH 2/3 ARM: omap: clean redundant PISMO_xx macros used in OMAP3
In reply to Pekon GuptaQuoted 38 lines · pekon gupta
PISMO_xxmacros were used to define 'Platform Independent Storage MOdule' related GPMC configurations. This patch
- Replaces these OMAP3 specific macros with genericCONFIG_xxmacros as provided by current u-boot infrastructure.
- Removes unused redundant macros, which are no longer required after merging of common platform code in following commit
commita0a37183bd75e74608bc78c8d0e2a34454f95a91
ARM: omap: merge GPMC initialization code for all platform+-----------------+-----------------------------------------------------------+ | Macro | Reason for removal | +-----------------+-----------------------------------------------------------+ | PISMO1_NOR_BASE | duplicate of CONFIG_SYS_FLASH_BASE | +-----------------+-----------------------------------------------------------+ | PISMO1_NAND_BASE| duplicate of CONFIG_SYS_NAND_BASE | +-----------------+-----------------------------------------------------------+ | PISMO1_ONEN_BASE| duplicate of CONFIG_SYS_ONENAND_BASE | +-----------------+-----------------------------------------------------------+ | PISMO1_NAND_SIZE| GPMC accesses NAND device via I/O mapped registers so | | | configuring GPMC chip-select for smallest allowable | | | segment (GPMC_SIZE_16M) is enough. | +-----------------+-----------------------------------------------------------+ | PISMO1_ONEN_SIZE| OneNAND uses a fixed GPMC chip-select address-space of | | | 128MB (GPMC_SIZE_128M) | +-----------------+-----------------------------------------------------------+ +-----------------+-----------------------------------------------------------+ | PISMO1_NOR | Unused Macros | | PISMO1_NAND | | | PISMO2_CS0 | | | PISMO2_CS1 | | | PISMO1_ONENAND | | | PISMO2_NAND_CS0 | | | PISMO2_NAND_CS1 | | | PISMO1_NOR_BASE | | | PISMO1_NAND_BASE| | | PISMO2_CS0_BASE | | +-----------------+-----------------------------------------------------------+
Quoted 1 line
Signed-off-by Pekon Gupta <[email protected]>
Applied to u-boot-ti/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140725/fb49b681/attachment.pgp>
PATCH 3/3 ARM: omap: move board specific NAND configs out from ti_armv7_common.h
In reply to Pekon GuptaQuoted 11 lines · pekon gupta
This patch moves some board specific NAND configs:
- FROM: generic config file 'ti_armv7_common.h'
- TO: individual board config files using these configs.
So that each board can independently set the value as per its design.Following configs are affected in this patch:
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>
Quoted 3 lines
This patch also updates documentation for few of above NAND configs.
Signed-off-by Pekon Gupta <[email protected]>
Applied to u-boot-ti/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140725/1217725e/attachment.pgp>