[U-Boot] [PATCH 2/2 v2] Exynos5: spl: Reduce clock init in spl

Akshay Saraswat akshay.s at samsung.com
Fri Mar 8 13:23:04 CET 2013


Hi simon,

>+ Albert, Tom who might know about this
>
>Hi Akshay,
>
>On Wed, Mar 6, 2013 at 7:36 AM, Akshay Saraswat <akshay.s at samsung.com> wrote:
>> Hi Simon,
>>
>>>Hi Akshay,
>>>
>>>On Tue, Mar 5, 2013 at 2:53 AM, Akshay Saraswat <akshay.s at samsung.com> wrote:
>>>> This patch subtracts a part of clock init from spl
>>>> and executes it after relocation. spl_clock_init
>>>> executes in spl and system_clock_init executes after
>>>> relocation in u-boot. This is done to gain some space by
>>>> removing initially not necessary code.
>>>>
>>>> Signed-off-by: Akshay Saraswat <akshay.s at samsung.com>
>>>> ---
>>>
>>>Looks good - just one question below.
>>>
>>>> Changes since v1:
>>>>         - Rebased on ToT.
>>>>
>>>>  board/samsung/smdk5250/Makefile         |   3 +-
>>>>  board/samsung/smdk5250/clock_init.c     | 429 +----------------------------
>>>>  board/samsung/smdk5250/clock_init.h     |   2 +
>>>>  board/samsung/smdk5250/lowlevel_init.S  |   4 +-
>>>>  board/samsung/smdk5250/setup.h          |   1 +
>>>>  board/samsung/smdk5250/smdk5250.c       |   4 +
>>>>  board/samsung/smdk5250/spl_clock_init.c | 469 ++++++++++++++++++++++++++++++++
>>>>  7 files changed, 482 insertions(+), 430 deletions(-)
>>>>  create mode 100644 board/samsung/smdk5250/spl_clock_init.c
>>>>
>>>> diff --git a/board/samsung/smdk5250/Makefile b/board/samsung/smdk5250/Makefile
>>>> index 47c6a5a..3ceb7e2 100644
>>>> --- a/board/samsung/smdk5250/Makefile
>>>> +++ b/board/samsung/smdk5250/Makefile
>>>> @@ -26,12 +26,13 @@ LIB = $(obj)lib$(BOARD).o
>>>>
>>>>  SOBJS  := lowlevel_init.o
>>>>
>>>> -COBJS  := clock_init.o
>>>> +COBJS  := spl_clock_init.o
>>>
>>>Shouldn't this only be included in the SPL build?
>>
>> I tried to do that but, since other files are using some of the data
>> defined in this file, we need it in u-boot as well. Please tell me if
>> it's required I'll make another file for common data.
>
>Are you saying that U-Boot proper is using the same data as SPL? I'm
>not sure, but I believe that we should not access SPL data from
>U-Boot, since they should be setting up separate things. Can you
>please be more specific about what is being shared?
>

Sorry, misunderstood the compiler errors. Actually data is not shared in spl and u-boot,
but in the Makefile if I keep all the spl related files in "ifdef CONFIG_SPL_BUILD"
lowlevel_init.s is not able to find tzpc, dmc and clock init function definitions.
And if I keep lowlevel init as well in "ifdef CONFIG_SPL_BUILD", start.o is not able to
find function definitions in lowlevel_init.s. In the next version of this patch-set, I'll fix it.

>
>>
>>>
>>>>  COBJS  += dmc_common.o dmc_init_ddr3.o
>>>>  COBJS  += tzpc_init.o
>>>>  COBJS  += smdk5250_spl.o
>>>>
>>>>  ifndef CONFIG_SPL_BUILD
>>>> +COBJS  += clock_init.o
>>>>  COBJS  += smdk5250.o
>>>>  endif
>>>>
>>>...
>
>Regards,
>Simon
>

Regards,
Akshay Saraswat


More information about the U-Boot mailing list