> > > --- a/examples/standalone/Makefile > > > +++ b/examples/standalone/Makefile > > > @@ -86,6 +86,10 @@ ELF = hello_world > > > SREC = hello_world.srec > > > BIN = hello_world.bin > > > > > > +ELF += atmel_df_pow2 > > > +SREC += atmel_df_pow2.srec > > > +BIN += atmel_df_pow2.bin > > > > These new files aren't going to compile for a lot of boards as is, some > > conditional compilation will be necessary. > > you'll have to be a little more specific. this driver only uses common spi > functions, so no, there shouldnt be any build failures.
The majority of boards don't have SPI functionality. I just tried applying this patch, moving atmel_df_pow2 into examples/standalone, and I get: pty...@ptyser-laptop u-boot $ make mrproper pty...@ptyser-laptop u-boot $ make XPEDITE5370_config Configuring for XPEDITE5370 board... pty...@ptyser-laptop u-boot $ make -s atmel_df_pow2.c:16: warning: 'struct spi_slave' declared inside parameter list atmel_df_pow2.c:16: warning: its scope is only this definition or declaration, which is probably not what you want atmel_df_pow2.c: In function 'flash_cmd': atmel_df_pow2.c:19: warning: implicit declaration of function 'spi_xfer' atmel_df_pow2.c:19: error: 'SPI_XFER_BEGIN' undeclared (first use in this function) ... and so on ... Adding #include <spi.h> gets rid of some warnings, but there's still a number of undefined references: pty...@ptyser-laptop u-boot $ make -s atmel_df_pow2.o: In function `atmel_df_pow2': /home/ptyser/u-boot/examples/standalone/atmel_df_pow2.c:129: undefined reference to `spi_init' /home/ptyser/u-boot/examples/standalone/atmel_df_pow2.c:163: undefined reference to `spi_setup_slave' /home/ptyser/u-boot/examples/standalone/atmel_df_pow2.c:169: undefined reference to `spi_claim_bus' ... and so on ... I imagine the majority of boards will have the same issues. Peter _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot