
Hi,
I was just rebasing and tweaking my board-support patch to send out again and I noticed that the latest U-Boot master branch does not build when the config option "CONFIG_CMD_SPI" is enabled: In file included from exports.c:41 [...]/include/_exports.h: In function 'jumptable_init': [...]/include/_exports.h:27: error: 'spi_init' undeclared (first use in this function) [...]/include/_exports.h:27: error: (Each undeclared identifier is reported only once [...]/include/_exports.h:27: error: for each function it appears in.) [...]/include/_exports.h:28: error: 'spi_setup_slave' undeclared (first use in this function) [...]/include/_exports.h:29: error: 'spi_free_slave' undeclared (first use in this function) [...]/include/_exports.h:30: error: 'spi_claim_bus' undeclared (first use in this function) [...]/include/_exports.h:31: error: 'spi_release_bus' undeclared (first use in this function) [...]/include/_exports.h:32: error: 'spi_xfer' undeclared (first use in this function)
From what I can tell, the only way to "fix" the exports.h header would
be to copy-paste much of "include/spi.h" (including the structure and most of the constants) into "include/exports.h".
Basically, if those SPI functions should be usable from outside code then the structure definition and the flags to be passed in all need to be available to the outside code as well.
Locally I just reverted the patch, but I'm not sure what the desired long-term fix should be, since it seems silly to have to duplicate spi.h in exports.h
Cheers, Kyle Moffett
-- Kyle Moffett eXMeritus Software Integrated Intelligence The Boeing Company
(703) 764-0925 (703) 812-1146 [FAX] Kyle.D.Moffett@boeing.com