[U-Boot] [PATCH] arm: imx: imx-common: init: move arch init common setup

Peng Fan b51431 at freescale.com
Thu Aug 27 10:15:34 CEST 2015


On Thu, Aug 27, 2015 at 10:00:57AM +0100, Peter Robinson wrote:
>On Thu, Aug 27, 2015 at 2:39 AM, Peng Fan <b51431 at freescale.com> wrote:
>> Hi Adrian,
>>
>> Since this is only for mx6, why move the code to imx-common?
>> "
>>> ifeq ($(SOC),$(filter $(SOC),mx6))
>>>-obj-y         += cache.o
>>>+obj-y         += cache.o init.o
>> "
>>
>> Also many pieces of code are only for imx6, imx7 do not need them for now, such as
>> the ldo ramp part.
>>
>> I think basic imx7 support do not need such a big change, if we do need to
>> consolidate code for common usage, we can do this when we need to add more
>> stuff.
>
>Personally I think it's better off being done from the outset else it
>never gets done and we end up in the situation we were for imx6.

I agree that we'd better remove duplicated code and consolidate code for common
usage to make it cleaner and easy to maintian.

But from the current patch,
clear_ldo_ramp
set_ldo_voltage
set_ahb_rate
clear_mmdc_ch_mask
init_bandgap
set_preclk_from_osc
are all imx6 specific, imx7 do not have the implementation for these functions for now.

The goal of arch_cpu_init is for different SoC usage from my understanding,
I think it should be there for different SoCs.
The following functions can be consolidated for common usage.
boot_mode_apply
init_src
init_aips

The Makefile part shows only for imx6 "ifeq ($(SOC),$(filter $(SOC),mx6))",
from this patch. Then why move most code mainly imx6 specific to imx-common?

If we do need such a patch for now, init_aips and boot_mode_apply and init_src
may can be consolidated for common usage for imx6/7.
But anyway I prefer a small cleanup patch to do this after basic imx7 upstreamed.

Regards,
Peng.
>
>Peter

-- 


More information about the U-Boot mailing list