Stefan Roese <[EMAIL PROTECTED]> wrote:
> I could do it this way, sure. But how about this version:
> 
> static void __flash_write8(u8 value, void *addr)
> {
>       __raw_writeb(value, addr);
> }
> ...
> 
> #ifdef CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS
> void flash_write8(u8 value, void *addr)__attribute__((weak, 
> alias("__flash_write8")));
> ...
> #else
> #define flash_read8   __flash_read8
> ...
> #endif
> 
> We would still have the original accessor functions this way. And the
> resulting source code looks a little "better" to me (less #ifdef's).

Hmm...1 #ifdef vs. 1 #ifdef...I'd say that's pretty much the same ;-)

But sure, your way works too.

Haavard
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to