[U-Boot-Users] [PATCH] Move conditional compilation of MPC8XXX SPI driver to Makefile
Haavard Skinnemoen
haavard.skinnemoen at atmel.com
Tue May 27 09:34:32 CEST 2008
Ben Warren <biggerbadderben at gmail.com> wrote:
> > ...but that would leave the "#ifded CONFIG_HARD_SPI" part still in
> > place. Or am I missing something?
> >
> 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
> 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.
This only makes a difference if a board config defines
CONFIG_MPC8XXX_SPI without defining CONFIG_HARD_SPI, which is arguably
a bug. I think it's better to get a compile error when this happens
than having the CONFIG_MPC8XXX_SPI define be silently ignored (which
most likely won't be detected until runtime.)
So I think the patch is fine as it is, for whatever that's worth.
Haavard
More information about the U-Boot
mailing list