From: Ben Warren Date: Sun, 20 Dec 2009 22:49:35 -0800 Subject: [U-Boot] Crash nand init UPMA - NAND flash MPC832x In-Reply-To: <26870202.post@talk.nabble.com> References: <20091220172434.48360.qmail@f5mail-237-207.rediffmail.com> <20091220184041.B339E3F6FF@gemini.denx.de> <26870202.post@talk.nabble.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Koteswar, A few things: First of all, please don't top post. On Sun, Dec 20, 2009 at 9:55 PM, KoteswarK wrote: > > Hi > What are those "I/O accessor functions"? API present in > Look in include/asm-ppc/io.h. You'll find lots of wonderful accessor functions. They're always preferable to the alternative. > ./drivers/mtd/nand/fsl_upm.c file??? I am also getting crash while doing > dummy write to NAND_BASE. Code is follows.... > void UPMA_prog() > { > int i=0; > /* OP set to write to RAM array command*/ > *(int *)(MAMR) = 0x10000000; > /* Write word to RAM arrays*/ > for (i=0;i<32;i++) > { > *(int *)(MDR) = UPMATable[i]; > > udelay (100); > /* *(int *)(MAMR) = 0x10000000; > * > * *(int *)(MAMR) = 0x10000000+i;*/ > > /*dummy write*/ > *(char *)(CFG_NAND_BASE) = 0xff; > } > ............. > } > Why don't you use the upmconfig() function that's in cpu/mpc83xx/cpu.c? It doesn't use I/O accessors either, but I give it better odds of working than your code. > Rgds > Koteswar > > regards, Ben