tty: serial: amba: Use linux/{bits,bitfield}.h macros
authorThéo Lebrun <theo.lebrun@bootlin.com>
Thu, 7 Dec 2023 17:56:06 +0000 (18:56 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Dec 2023 13:24:12 +0000 (14:24 +0100)
commit1f78c56007ba61b7b8c3f7dbb6787b6af116d3f0
tree105b5b54061883da62d35fe66c162ec58c4c1607
parenta5f18286083fe450d6080abc8d4341c630f682dd
tty: serial: amba: Use linux/{bits,bitfield}.h macros

The driver uses bit shifts and hexadecimal expressions to declare
constants. Replace that with the BIT(), GENMASK() & FIELD_PREP_CONST()
macros to clarify intent.

include/linux/amba/serial.h gets included from arch/arm/include/debug/pl01x.S.
Avoid includes and macro tricks for the four defines that are involved:
UART01x_DR, UART01x_FR, UART01x_FR_TXFF and UART01x_FR_BUSY.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
Link: https://lore.kernel.org/r/20231207-mbly-uart-v6-1-e384afa5e78c@bootlin.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/amba/serial.h