[U-Boot] [PATCH 03/14] x86: spl: Add weak arch_cpu_init_dm()

Simon Glass sjg at chromium.org
Mon Feb 6 15:35:37 UTC 2017


On 3 February 2017 at 21:59, Bin Meng <bmeng.cn at gmail.com> wrote:
> Hi Simon,
>
> On Tue, Jan 24, 2017 at 3:50 AM, Simon Glass <sjg at chromium.org> wrote:
>> Hi Bin,
>>
>> On 18 January 2017 at 04:32, Bin Meng <bmeng.cn at gmail.com> wrote:
>>> arch_cpu_init_dm() might not be implemented by every platform.
>>> Implement a weak version for SPL.
>>>
>>> Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
>>> ---
>>>
>>>  arch/x86/lib/spl.c | 5 +++++
>>>  1 file changed, 5 insertions(+)
>>>
>>> diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c
>>> index 7403d15..8c5b90f 100644
>>> --- a/arch/x86/lib/spl.c
>>> +++ b/arch/x86/lib/spl.c
>>> @@ -15,6 +15,11 @@
>>>
>>>  DECLARE_GLOBAL_DATA_PTR;
>>>
>>> +__weak int arch_cpu_init_dm(void)
>>> +{
>>> +       return 0;
>>> +}
>>
>> There is already one of these in board_f.c - do we need another?
>>
>
> board_f.c is not built for SPL.

I'm not a big fan of weak functions, but OK.

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list