summaryrefslogtreecommitdiffstats
path: root/drivers/cdrom
diff options
context:
space:
mode:
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>2017-04-01 15:02:24 +0200
committerJerome Brunet <jbrunet@baylibre.com>2017-04-07 17:45:21 +0200
commit88e4ac68ea9a09e105c86070ebfa01ca482ca4c2 (patch)
treeb593c7e8f91f8fd14ec7e36039cf817d20fb5129 /drivers/cdrom
parentclk: meson: gxbb: add cts_i958 clock (diff)
downloadlinux-88e4ac68ea9a09e105c86070ebfa01ca482ca4c2.tar.xz
linux-88e4ac68ea9a09e105c86070ebfa01ca482ca4c2.zip
clk: meson: mpll: fix division by zero in rate_from_params
According to the public datasheet all register bits in HHI_MPLL_CNTL7, HHI_MPLL_CNTL8 and HHI_MPLL_CNTL9 default to zero. On all GX SoCs these seem to be initialized by the bootloader to some default value. However, on my Meson8 board they are not initialized, leading to a division by zero in rate_from_params as the math is: (parent_rate * SDM_DEN) / ((SDM_DEN * 0) + 0) According to the datasheet, the minimum n2 value is 4. The rate provided by the clock when n2 is less than this minimum is unpredictable. In such case, we report an error. Although the rate_from_params function was only introduced recently the original bug has been there for much longer. It was only exposed recently when the MPLL clocks were added to the Meson8b clock driver. Fixes: 1c50da4f27 ("clk: meson: add mpll support") Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Diffstat (limited to 'drivers/cdrom')
0 files changed, 0 insertions, 0 deletions