[PATCH 4/4] ARM: imx: imx5: Introduce and use UART_BASE_ADDR(n)
Stefano Babic
sbabic at denx.de
Fri May 20 10:11:19 CEST 2022
On 20.05.22 09:45, Marek Vasut wrote:
> On 5/20/22 09:30, Stefano Babic wrote:
>> Hi Marek,
>>
>> On 24.04.22 23:44, Marek Vasut wrote:
>>> Introduce helper macro UART_BASE_ADDR(n), which returns Nth UART base
>>> address. Convert all board configurations to this new macro. This is the
>>> first step toward switching CONFIG_MXC_UART_BASE to Kconfig. This is a
>>> clean up, no functional change.
>>>
>>> The new macro contains compile-time test to verify N is in suitable
>>> range. The test works such that it multiplies constant N by constant
>>> double-negation of size of a non-empty structure, i.e. it multiplies
>>> constant N by constant 1 in each successful compilation case.
>>>
>>> The non-empty structure may contain C11 _Static_assert(), make use of
>>> this and place the kernel variant of static assert in there, so that
>>> it performs the compile-time check for N in the correct range. Note
>>> that it is not possible to directly use static_assert in compound
>>> statements, hence this convoluted construct.
>>>
>>> Signed-off-by: Marek Vasut <marex at denx.de>
>>> Cc: Fabio Estevam <festevam at denx.de>
>>> Cc: Peng Fan <peng.fan at nxp.com>
>>> Cc: Stefano Babic <sbabic at denx.de>
>>> ---
>>
>> I have not found the reason, but this breaks MX51:
>
> All this UART_BASE_ADDR stuff is postponed, just drop for now.
Ok, understood - I remove them.
Best regards,
Stefano
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
More information about the U-Boot
mailing list