[U-Boot] [PATCH 03/13] imx-common: use simpler runtime cpu dection macros

Benoît Thébaudeau benoit.thebaudeau.dev at gmail.com
Fri May 20 22:39:26 CEST 2016


Hi Peng,

On Fri, May 20, 2016 at 10:41 AM, Peng Fan <van.freenix at gmail.com> wrote:
> On Fri, May 20, 2016 at 01:02:10AM +0200, Benoît Thébaudeau wrote:
>>On Wed, May 18, 2016 at 9:53 AM, Peng Fan <van.freenix at gmail.com> wrote:
>>> Use simpler runtime cpu dection macros.
>>>
>>> Signed-off-by: Peng Fan <van.freenix at gmail.com>
>>> Cc: Stefano Babic <sbabic at denx.de>
>>> Cc: Ulises Cardenas <Ulises.Cardenas at freescale.com>
>>> Cc: Bhuvanchandra DV <bhuvanchandra.dv at toradex.com>
>>> Cc: "Benoît Thébaudeau" <benoit.thebaudeau.dev at gmail.com>
>>> ---
>>>  arch/arm/imx-common/hab.c      | 43 +++++++++++++-----------------------------
>>>  arch/arm/imx-common/init.c     |  5 ++---
>>>  arch/arm/imx-common/iomux-v3.c |  2 +-
>>>  arch/arm/imx-common/sata.c     |  2 +-
>>>  arch/arm/imx-common/timer.c    | 11 +++--------
>>>  5 files changed, 20 insertions(+), 43 deletions(-)
>>>
>>> diff --git a/arch/arm/imx-common/hab.c b/arch/arm/imx-common/hab.c
>>> index 8bbcc22..a980688 100644
>>> --- a/arch/arm/imx-common/hab.c
>>> +++ b/arch/arm/imx-common/hab.c
>>> @@ -17,60 +17,45 @@
>>>
>>>  #define hab_rvt_report_event_p                                 \
>>>  (                                                              \
>>> -       ((is_cpu_type(MXC_CPU_MX6Q) ||                          \
>>> -         is_cpu_type(MXC_CPU_MX6D)) &&                         \
>>> -         (soc_rev() >= CHIP_REV_1_5)) ?                        \
>>> +       (is_mx6dq() && (soc_rev() >= CHIP_REV_1_5)) ?           \
>>>         ((hab_rvt_report_event_t *)HAB_RVT_REPORT_EVENT_NEW) :  \
>>> -       (is_cpu_type(MXC_CPU_MX6DL) &&                          \
>>> -        (soc_rev() >= CHIP_REV_1_2)) ?                         \
>>> +       (is_mx6sdl() && (soc_rev() >= CHIP_REV_1_2)) ?          \
>>
>>This change silently introduces the possibility of MXC_CPU_MX6SOLO. Is
>>this on purpose? If so, then it means that there was something
>
> Yeah. on purpose.
>
>>unrelated to this patch that was wrong in this code for
>>MXC_CPU_MX6SOLO, so this should be fixed in a separate patch before
>>this one. If not, then an is_mx6dl() macro should be introduced.
>
> 6solo and 6dl works the same. I do not plan to add a is_mx6dl here.
> I can refine the commit log to note this in V2.

Then you can indeed either mention this in the commit message, or add
a patch fixing 6solo support before this one.

Best regards,
Benoît


More information about the U-Boot mailing list