clk: bcm2835: Do not use prediv with bcm2711's PLLs
authorNicolas Saenz Julienne <nsaenzjulienne@suse.de>
Thu, 30 Jul 2020 18:26:19 +0000 (20:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Aug 2020 11:15:13 +0000 (13:15 +0200)
commit8d4e102a6e426c84aa511c6f813745edbf85e45e
treebacbc75be1b6806b861c6a3ef0e1fa0a74f467e3
parentded14d6ee4c04a07d8cc5002f45205b11592a5eb
clk: bcm2835: Do not use prediv with bcm2711's PLLs

[ Upstream commit f34e4651ce66a754f41203284acf09b28b9dd955 ]

Contrary to previous SoCs, bcm2711 doesn't have a prescaler in the PLL
feedback loop. Bypass it by zeroing fb_prediv_mask when running on
bcm2711.

Note that, since the prediv configuration bits were re-purposed, this
was triggering miscalculations on all clocks hanging from the VPU clock,
notably the aux UART, making its output unintelligible.

Fixes: 42de9ad400af ("clk: bcm2835: Add BCM2711_CLOCK_EMMC2 support")
Reported-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200730182619.23246-1-nsaenzjulienne@suse.de
Tested-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/bcm/clk-bcm2835.c