hi On Sat, Aug 1, 2009 at 7:19 AM, Scott Wood<scottw...@freescale.com> wrote: > On Thu, Jun 25, 2009 at 05:21:45PM +0900, HeungJun Kim wrote: >> +#ifdef CONFIG_S5PC1XX >> + unsigned int *p = (unsigned int *) buf; >> + int mem_addr, i; >> + >> + mem_addr = MEM_ADDR(block, page, 0); >> + >> + pagesize >>= 2; >> + >> + for (i = 0; i < pagesize; i++) >> + *p++ = *(volatile unsigned int *)(CMD_MAP_01(mem_addr)); >> +#else /* CONFIG_S5PC1XX */ >> + >> unsigned long *base; >> >> #ifndef __HAVE_ARCH_MEMCPY32 >> @@ -85,6 +99,7 @@ static inline int onenand_read_page(ulong block, ulong >> page, >> *p++ = value; >> } >> #endif >> +#endif /* CONFIG_S5PC1XX */
It should be S5PC100, not used at S5PC110. it uses generic interface with DMA support. > > Please put each controller implementation in a separate file, with an > appropriate name. Do not make anything which is SoC-specific look > generic. No problem, One question, how to use use generic & s5pc100 read function simultaneously. Since our test board use two cpu, s5pc100 & s5pc110. but each cpu has different read function. I want to use it both with only one u-boot image. In this case we have to distinguish and use it properly. Now I add the function pointer and assign it based on cpu id. > > If onenand_read_block() is not controller-specific (looks like everything > except the read of ONENAND_REG_TECHNOLOGY is generic), move it to > onenand_boot.c. > >> @@ -114,6 +129,9 @@ int onenand_read_block(unsigned char *buf) >> >> erasesize = ONENAND_PAGES_PER_BLOCK * pagesize; >> nblocks = (CONFIG_SYS_MONITOR_LEN + erasesize - 1) >> erase_shift; >> +#ifdef CONFIG_S5PC1XX >> + nblocks = 1; >> +#endif > > Why? > It's developer's mistake, no reason to use 1 block. actually internal ROM read 16KiB data to internal RAM in case of s5pc100. Thank you, Kyungmin Park _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot