
Hi Marek,
2011/10/24 Marek Vasut marek.vasut@gmail.com
Hi,
can you possibly implement those as inline functions ? It'd be also great if you could convert the other macros to inline functions.
Thanks!
I've found there are some different data type warning occur when I'm translating inline function since all the driver originately call write and read marco.
Most of them is easy to deal with sicne the address is usually a 32-bit address "unsigned int *". However, the driver/serial/ns16550.c used readb/writeb but the "address" passed in ns16550.c is byte-wised (unsigned char *).
Well please fix. You can send a cleanup series?
And there are also address casted in (ulong) in ns16550.c. serial_out(UART_LCR_BKSE | UART_LCRVAL, (ulong)&com_port->lcr); I'm not sure to fix this way would affect ns16550 in other architecutre?. #define serial_out(x, y) writeb(x, (unsigned int *)y)
This is definitelly wrong. I'd like to see others comment on this one.
And there are also problems when translating readb from macro to inline function.
Why?
Some driver cannot be compiled with a return value inside the readb. I think I can post the fix of writeb for NDS32 architecture and see if you give some comments then I do for other architecture later.
Hi Wolfgang, Could you please pickup these 2 patches since it was independent to r/w inline functions? I'm not sure if the merge windows has been closed. Or should I pick these 2 patches into nds32 repo?
nds32: Use getenv_ulong() in place of getenv(), strtoul http://patchwork.ozlabs.org/patch/121312/
nds32: cache: define ARCH_DMA_MINALIGN for DMA buffer alignment http://patchwork.ozlabs.org/patch/121313/
Thanks!