[U-Boot] [PATCH v2 09/22] omap4: add spl support for OMAP4 SDP

Aneesh V
2011-05-16T14:29:49Z

Hi wolfgang,

On Monday 16 May 2011 12:03 AM, Wolfgang Denk wrote:
> Dear Aneesh V,
>
> In message<1305472900-4004-10-git-send-email-aneesh@ti.com> you wrote:
>> Adapted from: nand_spl/board/samsung/smdk6400/Makefile
>>
>> - Add the SPL makefile for OMAP4430 SDP
>> - Add the necessary CONFIG flags in the board config file
>>
>> Signed-off-by: Aneesh V<aneesh@ti.com>
>> ---
>> V2:
>> * Changed CONFIG_SYS_SPL_TEXT_BASE to 0x40304350 from
>> 0x40304360. This exact address is needed for EMU
>> devices.
>> * Removed un-necessary compiler options from CFLAGS and AFLAGS.
>> These are already set by .mk files in U-Boot
>> * Reorganize the make files to re-use common rules between
>> boards
>> ---
>> board/ti/sdp4430/config.mk | 3 +-
>> include/configs/omap4_sdp4430.h | 19 +++++
>> spl/board/ti/omap4.mk | 77 ++++++++++++++++++++
>> spl/board/ti/rules-omap.mk | 74 +++++++++++++++++++
>> .../config.mk => spl/board/ti/sdp4430/Makefile | 21 +++---
>> 5 files changed, 183 insertions(+), 11 deletions(-)
>> create mode 100644 spl/board/ti/omap4.mk
>> create mode 100644 spl/board/ti/rules-omap.mk
>
> We do you introduce these files? Please omit them, and use a plain
> Makefile instead.

I introduced them because 'spl/board/ti/sdp4430/Makefile' and 'spl/board
/ti/panda/Makefile' were exactly same and wanted to re-use the make
rules.

I indeed wanted to abstract it out even further in future so that the
make rules can be shared between OMAP3 and OMAP4 too. This way the
changes needed to support a new board will be lesser and maintenance
will be easier while adding new features.

For instance, if I have to add NAND support today I just need to update
omap4.mk instead of updating the Makefile of both panda and SDP.

This re-use will be evident when you see a later patch that
replicates the same Makefile for panda.

>
>> diff --git a/board/ti/sdp4430/config.mk b/board/ti/sdp4430/config.mk
>> index 33901a7..c62965d 100644
>> --- a/board/ti/sdp4430/config.mk
>> +++ b/board/ti/sdp4430/config.mk
>> @@ -28,4 +28,5 @@
>> # Linux-Kernel is expected to be at 8000'8000, entry 8000'8000
>> # (mem base + reserved)
>>
>> -CONFIG_SYS_TEXT_BASE = 0x80e80000
>> +# 1MB into the SDRAM to allow for SPL's bss at the beginning of SDRAM
>> +CONFIG_SYS_TEXT_BASE = 0x80100000
>
> NAK. Please define in board config header, and get rid of the
> config.mk file.

ok.

best regards,
Aneesh