OMAP3: Fix error in gpmc_init
PATCH v2 1/1 OMAP3: Fix error in gpmc_init
Fix error in gpmc_init() introduced with readl/writel conversion. Use base addresses + offset, not offset only. Minor clean up by removing unused code.
---
Changes in v2:
- Correct patch header style.
v2 of this patch makes previous version v1 obsolete.
Jean-Christophe: Would be nice if you could handle this patch with priority as it prevents BeagleBoard from starting. Thanks!
cpu/arm_cortexa8/omap3/mem.c | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-)
cpu/arm_cortexa8/omap3/mem.c +3 -6
@@ -233,18 +233,15 @@ void enable_gpmc_config(u32 *gpmc_configvoid gpmc_init (void ) {/* putting a blanket check on GPMC based on ZeBu for now */ -u32 mux =0 , mwidth;u32 *gpmc_config =NULL ;u32 *gpmc_base = (u32 *)GPMC_BASE ; +u32 *gpmc_cs_base = (u32 *)GPMC_CONFIG_CS0_BASE ;u32 base =0 ;u32 size =0 ;u32 f_off =CONFIG_SYS_MONITOR_LEN ;u32 f_sec =0 ;u32 config =0 ; - mux =BIT9 ; - mwidth =get_gpmc0_width (); -/* global settings */ writel (0 , gpmc_base +OFFS (GPMC_IRQENABLE ));/* isr's sources masked */ writel (0 , gpmc_base +OFFS (GPMC_TIMEOUT_CONTROL ));/* timeout disable */
@@ -256,7 +253,7 @@ void gpmc_init(void)/* Disable the GPMC0 config set by ROM code * It conflicts with our MPDB (both at 0x08000000) */ -writel (0 ,GPMC_CONFIG_CS0 +GPMC_CONFIG7 ); +writel (0 , gpmc_cs_base +OFFS (GPMC_CONFIG7 ));sdelay (1000 );#if defined(CONFIG_CMD_NAND )/* CS 0 */
@@ -280,7 +277,7 @@ void gpmc_init(void)#if defined(CONFIG_CMD_ONENAND ) gpmc_config = gpmc_onenand; - onenand_cs_base = (u32 *)(GPMC_CONFIG_CS0 + + onenand_cs_base = (u32 *)(GPMC_CONFIG_CS0_BASE + (GPMC_CS *GPMC_CONFIG_WIDTH )); base =PISMO1_ONEN_BASE ; size =PISMO1_ONEN_SIZE ;
PATCH v2 1/1 OMAP3: Fix error in gpmc_init
Quoted 11 lines · dirk.behme at googlemail.com
Fix error in
gpmc_init()introduced with readl/writel conversion. Use base addresses + offset, not offset only. Minor clean up by removing unused code.Signed-off-by Dirk Behme <[email protected]>---
Changes in v2:
- Correct patch header style.
Quoted 7 lines
v2 of this patch makes previous version v1 obsolete.
Jean-Christophe: Would be nice if you could handle this patch with priority as it prevents BeagleBoard from starting. Thanks!
cpu/arm_cortexa8/omap3/mem.c | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-)
Applied to u-boot-arm/omap3
Best Regards,
J.