
Hi Graeme,
2011/10/25 馬克泡 macpaul@gmail.com:
Hi Marek,
2011/10/25 Marek Vasut marek.vasut@gmail.com:
[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?