[U-Boot] [PATCH v2] atmel_df_pow2: standalone to convert dataflashes to pow2
Peter Tyser
ptyser at xes-inc.com
Wed Jul 22 06:52:51 CEST 2009
> > > --- 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:
ptyser at ptyser-laptop u-boot $ make mrproper
ptyser at ptyser-laptop u-boot $ make XPEDITE5370_config
Configuring for XPEDITE5370 board...
ptyser at 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:
ptyser at 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
More information about the U-Boot
mailing list