diff options
| author | Marek Vasut <[email protected]> | 2022-04-24 23:44:04 +0200 |
|---|---|---|
| committer | Stefano Babic <[email protected]> | 2022-05-20 09:03:01 +0200 |
| commit | be23774ed1e31bd74132b97a2feb2c7864b2ea43 (patch) | |
| tree | 49d0ecbfc220f97994c469f986eabf6471c026f7 /include | |
| parent | 52b6b480db314d623eba536f390c0dc879900262 (diff) | |
ARM: imx: imx27: Introduce and use UART_BASE_ADDR(n)
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 <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: Stefano Babic <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/configs/imx27lite-common.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/configs/imx27lite-common.h b/include/configs/imx27lite-common.h index bb53a33a542..6790053bb8d 100644 --- a/include/configs/imx27lite-common.h +++ b/include/configs/imx27lite-common.h @@ -70,7 +70,7 @@ /* * Serial Driver info */ -#define CONFIG_MXC_UART_BASE UART1_BASE +#define CONFIG_MXC_UART_BASE UART_BASE_ADDR(1) /* * Flash & Environment |
