
On Wed, Jun 06, 2012 at 09:44:59AM -0700, Stephen Warren wrote:
On 06/05/2012 03:20 PM, Allen Martin wrote:
Add SPL options to tegra20 config files and enable SPL build for seaboard in boards.cfg
diff --git a/include/configs/seaboard.h b/include/configs/seaboard.h
+/* include overrides for SPL build */ +#ifdef CONFIG_SPL_BUILD +#include "tegra2-spl.h" +#endif
Perhaps we should add that to include/configs/tegra2-common-post.h, which I think all Tegra config headers now include at the end.
Ok.
diff --git a/include/configs/tegra2-common.h b/include/configs/tegra2-common.h
+/* Defines for SPL */ +#define CONFIG_SPL +#define CONFIG_SPL_NAND_SIMPLE +#define CONFIG_SPL_TEXT_BASE 0x00008000 +#define CONFIG_SPL_MAX_SIZE 0x00078000 +#define CONFIG_SYS_SPL_MALLOC_START 0x00080000 +#define CONFIG_SYS_SPL_MALLOC_SIZE 0x00010000 +#define CONFIG_SPL_STACK 0x0009fffc
+#define CONFIG_SPL_LIBCOMMON_SUPPORT +#define CONFIG_SPL_LIBGENERIC_SUPPORT +#define CONFIG_SPL_SERIAL_SUPPORT
+#define CONFIG_SPL_POWER_SUPPORT
I'm not sure what that's for?
Hm, I put it in for the PMU driver, but maybe that's not actually needed in the SPL. I'll take a look.
+#define CONFIG_SPL_GPIO_SUPPORT
I believe only Seaboard needs that, not all boards. It'd be nice if we could just ignore the crufy SPI/GPIO switch on Seaboard too and punt this. Does anyone actually boot Seaboard using SPI? I use NAND and Tom uses eMMC...
Well I use SPI on my Springbank, but maybe I'm in the minority :^)
diff --git a/include/configs/tegra2-spl.h b/include/configs/tegra2-spl.h
- published by the Free Software Foundation; either version 2 of
- the License, or (at your option) any later version.
Being a new file, this should be GPLv2 not GPLv2+.
Ok.
+/* remove devicetree support */ +#ifdef CONFIG_OF_CONTROL +#undef CONFIG_OF_CONTROL +#endif
I don't /think/ #undef complains if the define isn't defined?
I've seen compilers that do, so I was just trying to play it safe.
Perhaps this (and the others) are better approached by not defining all these if building SPL though - what if a particular board's SPL actually wanted any of these?
That's what I had in v1 of the patch series, but it ends up adding a lot of #ifdefs sprinkled through each board config file. I'd like to keep the SPL as small and minimal as possible such that it doesn't need a lot of board specific configuration, just unavoidable things like UART.
-Allen