[PATCH 1/4] ARM: imx: Add bmode support for iMX7
Marek Vasut
marex at denx.de
Wed Aug 5 18:09:14 CEST 2020
On 8/5/20 4:54 PM, Stefano Babic wrote:
[...]
>>>> #define is_imx8qxp() (is_cpu_type(MXC_CPU_IMX8QXP))
>>>>
>>>> #ifdef CONFIG_MX6
>>>> -#define IMX6_SRC_GPR10_BMODE BIT(28)
>>>> +#define IMX6_SRC_GPR10_BMODE BIT(28)
>>>>
>>>> #define IMX6_BMODE_MASK GENMASK(7, 0)
>>>> #define IMX6_BMODE_SHIFT 4
>>>> @@ -126,6 +126,10 @@ void gpr_init(void);
>>>>
>>>> #endif /* CONFIG_MX6 */
>>>>
>>>> +#ifdef CONFIG_MX7
>>>> +#define IMX7_SRC_GPR10_BMODE BIT(28)
>>>> +#endif
>>>> +
>>>
>>> It is questionable why we need two different defines, that also have
>>> exactly the same definition. Do we really need to differentiate and to
>>> use #ifdef ?
>>
>> Yes, because this file is also used by iMXes which are not 6/7 .
>
> Yes, but does it disturb ? There should be a define SRC_GPR10_BMODE that
> is not used at all if we build for mx3/mx5. I just prefer to reduce the
> number of #ifdef, when they are not strictly required.
Its putting macros into the preprocessor which don't need to be there.
Otherwise, it is inline with the style in the rest of the file.
More information about the U-Boot
mailing list