
I just tried applying this patch, moving atmel_df_pow2 into examples/standalone, and I get:
ptyser@ptyser-laptop u-boot $ make mrproper ptyser@ptyser-laptop u-boot $ make XPEDITE5370_config Configuring for XPEDITE5370 board... ptyser@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
well if you dont apply the patch properly, that's an error on your part, not mine.
I applied this patch properly, but had no idea it had a dependency as you didn't mention it in the patch. Applying "export SPI functions to standalone apps" resolved the build issue (after moving atmel_df_pow2.c to its proper location).
Still, why not make this file's compilation dependent on some define like CONFIG_ATMEL_DATAFLASH_SPI (or whatever is appropriate) when you resubmit? I have no interest in compiling it for any boards I use...
Peter