OMAP3: Fix error in gpmc_init
Subject: [PATCH-OMAP3] OMAP3: Fix error in gpmc_init
From: Dirk Behme <[email protected]>
Fix error in gpmc_init() introduced with readl/writel conversion. Use base addresses + offset, not offset only. Minor clean up by removing unused code.
---
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 ;
Dear dirk.behme at googlemail.com,
Quoted 3 lines · In message <[email protected]> you wrote:
Subject: [PATCH-OMAP3] OMAP3: Fix error in
gpmc_initFrom: Dirk Behme <[email protected]>
Please get rid of these repeated entries. They are already present in your mail headers.
Quoted 1 line
Fix error in
gpmc_init()introduced with readl/writel conversion. Use base addresses + offset, not offset only. Minor clean up by removing unused code.
Line too long. There is a strict maximum line length limit for commit messages.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The most exciting phrase to hear in science, the one that heralds new
discoveries, is not "Eureka!" (I found it!) but "That's funny ..."
-- Isaac Asimov