Hi Graeme,

2011/10/25 馬克泡 <[email protected]>:
> Hi Marek,
>
> 2011/10/25 Marek Vasut <[email protected]>:
>
> [snip]
>
> Please check ns16550.c, current code has another such kind of casting
> #ifdef CONFIG_SYS_NS16550_PORT_MAPPED
> #define serial_out(x, y)        outb(x, (ulong)y)
> #define serial_in(y)            inb((ulong)y)
> [...]
> #else
> #define serial_out(x, y)        writeb(x, y)
> #define serial_in(y)            readb(y)
> #endif
>

I'm going to change writeb/readb series functions from macro into
inline functions.
However, I've found data type casting problem in NS16550.
Only here the serial_out with CONFIG_SYS_NS16550_PORT_MAPPED is used
for board "eNET".
Is this a necessary for this machine  to access 8-bytes data?

Since inline functions are type sensitive,
I've suggest to replace the macro for other machines like writeb(x, (uint)y)
but Marek think this is not good enough.
Could you give some comments?

-- 
Best regards,
Macpaul Lin
_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to