[U-Boot] [PATCH 6/6] S5PC100: Add onenand_ipl for SMDKC100 support

Kyungmin Park kmpark at infradead.org
Tue Jul 21 03:03:09 CEST 2009


On Tue, Jul 21, 2009 at 6:18 AM, Wolfgang Denk<wd at denx.de> wrote:
> Dear Kyungmin Park,
>
> In message <9c9fda240907192016i32c7312dh490629f2f2bb31be at mail.gmail.com> you wrote:
>>
>> >>  /* read a page with ECC */
>> >>  static inline int onenand_read_page(ulong block, ulong page,
>> >>                               u_char * buf> , int pagesize)
>> >>  {
>> >> +#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;
>> >
>> > I don't like to see such board specific code in global files.
>>
>> I think it's not board specific code. S3C64XX and S5PC1XX series have
>> own OneNAND controller and to access the OneNAND, it should use the
>> this controller.
>
> OK, so it is SoC specific code in a common file - that's just
> marginally better.
>
>> If you don't like the ifdef. we can separate the function but I'm not
>> sure it's really required.
>
> It would be great if we can get rid of the #ifdef.

As you know, OneNAND IPL has size limitation, 1KiB. So it's difficult
to co-exist two different function.

Thank you,
Kyungmin Park


More information about the U-Boot mailing list