[U-Boot-Users] [PATCH] Move conditional compilation of MPC8XXX SPI driver to Makefile
Ben Warren
biggerbadderben at gmail.com
Mon May 26 18:40:30 CEST 2008
Wolfgang Denk wrote:
> In message <483AD1FC.7040805 at gmail.com> you wrote:
>
>> If CONFIG_MPC8XXX_SPI is defined but CONFIG_HARD_SPI is not, compilation
>> will fail, since CONFIG_HARD_SPI activates the common SPI code on
>>
>
> How would I configure a system to use CONFIG_SOFT_SPI on a MPC8XXX
> system?
>
>
That's actually pretty easy:
1. #define CONFIG_SOFT_SPI in board config
2. define bit-bang parameters in board code
3. Call spi_init() from board code
The CONFIG_HARD_SPI define doesn't actually do anything
hardware-related. The only place it's used is in lib_ppc/board.c to
initialize a SPI controller, but the code could equally-well start a
soft SPI controller. I would have used CONFIG_SPI, but that was already
taken by SPI EEPROM stuff. Maybe it's time to refactor a bit more...
>> PowerPC. I guess I figured Kconfig would eventually manage the
>> dependencies of these options, but I will put the #ifdef back in if you
>> want.
>>
>
> At the moment it seems logical to me to leave this test as it was.
>
> Best regards,
>
> Wolfgang Denk
>
>
regards,
Ben
More information about the U-Boot
mailing list