[U-Boot] [PATCH v2 1/3] mpc52xx: Add SPI driver.
gjb at semihalf.com
Wed Jun 10 14:50:49 CEST 2009
Detlev Zundel wrote:
>> + out8((u32)&spi->brr, 0x77); /* baud rate: IPB clock / 2048 */
> Ok, we're actually using the accessor macros, but I fail to see why a
> (u32) cast is needed here - it even actively prevents one of the
> "features" of the macros, namely type checking.
> Why exactly are they needed?
Declaration of out8() is in common.h file:
void out8(unsigned int, unsigned char);
so I think that this cast is necessary.
Without it I get warning:
mpc52xx_spi.c:38: warning: passing argument 1 of 'out8' makes integer
from pointer without a cast
More information about the U-Boot