Re: [U-Boot] [PATCH v2 1/3] mpc52xx: Add SPI driver.

2009-06-10 Thread Wolfgang Denk
Dear Grzegorz Bernacki, In message <4a2fac29.2000...@semihalf.com> you wrote: > > 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 o

Re: [U-Boot] [PATCH v2 1/3] mpc52xx: Add SPI driver.

2009-06-10 Thread Grzegorz Bernacki
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 exa

Re: [U-Boot] [PATCH v2 1/3] mpc52xx: Add SPI driver.

2009-06-10 Thread Detlev Zundel
Hi Grzegorz, > Signed-off-by: Grzegorz Bernacki > --- > v2: > - use accessor macros > [...] > + out8((u32)&spi->ddr, 0x0F); /* set all SPI pins as output */ > + out8((u32)&spi->pdr, 0x00); /* set SS low */ > + /* SPI is master, SS is general purpose output */ > + out8((

[U-Boot] [PATCH v2 1/3] mpc52xx: Add SPI driver.

2009-06-09 Thread Grzegorz Bernacki
Signed-off-by: Grzegorz Bernacki --- v2: - use accessor macros drivers/spi/Makefile |1 + drivers/spi/mpc52xx_spi.c | 109 + include/mpc5xxx.h | 18 +++ 3 files changed, 128 insertions(+), 0 deletions(-) create mode 100644 dr