]> git.dujemihanovic.xyz Git - u-boot.git/commit
rockchip: px30: fix possibly unused grf and cru variables
authorQuentin Schulz <quentin.schulz@theobroma-systems.com>
Mon, 9 Jan 2023 10:36:40 +0000 (11:36 +0100)
committerKever Yang <kever.yang@rock-chips.com>
Mon, 16 Jan 2023 10:01:11 +0000 (18:01 +0800)
commite53856aaf430b1a854a4ca3d68173db3c6e8043b
tree737ed59a37b229e6cb40c8acdccda3682f848681
parent5a42fd025859371e20bf7a5f064172d02c566707
rockchip: px30: fix possibly unused grf and cru variables

The grf and cru are only used when no UART base is provided by the user
(defaults to UART2) or for UART1, UART3 and UART5 to be used for the
debug UART. Therefore, let's surround those variable definitions with
the proper checks.

This wasn't an issue before support for UART0 was added, because all
cases were using cru and grf. UART0 only uses pmucru so there's a need
to not define those variables anymore.

Fixes: d0af506625ff ("rockchip: px30: support debug uart on UART0")
Cc: Quentin Schulz <foss+uboot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
arch/arm/mach-rockchip/px30/px30.c