summaryrefslogtreecommitdiffstats
path: root/drivers/clk/meson
diff options
context:
space:
mode:
authorJerome Brunet <jbrunet@baylibre.com>2019-12-16 10:59:26 +0100
committerJerome Brunet <jbrunet@baylibre.com>2019-12-16 10:59:26 +0100
commitc97fcd8546c0c2a9e8e0512f501b1ca9aa25efdc (patch)
tree462c23eae7f93f4e82347cfa497e39f1894cc478 /drivers/clk/meson
parent3bf258e159cd8e7bcc431bfd1e7dabd5ad95babc (diff)
parentd8488a41800d9f5c80bc0d17b9cc2c91b4841464 (diff)
downloadlinux-c97fcd8546c0c2a9e8e0512f501b1ca9aa25efdc.tar.bz2
Merge branch 'v5.5/fixes' into v5.6/drivers
Diffstat (limited to 'drivers/clk/meson')
-rw-r--r--drivers/clk/meson/clk-pll.c9
-rw-r--r--drivers/clk/meson/g12a.c1
2 files changed, 10 insertions, 0 deletions
diff --git a/drivers/clk/meson/clk-pll.c b/drivers/clk/meson/clk-pll.c
index ddb1e5634739..3a5853ca98c6 100644
--- a/drivers/clk/meson/clk-pll.c
+++ b/drivers/clk/meson/clk-pll.c
@@ -77,6 +77,15 @@ static unsigned long meson_clk_pll_recalc_rate(struct clk_hw *hw,
unsigned int m, n, frac;
n = meson_parm_read(clk->map, &pll->n);
+
+ /*
+ * On some HW, N is set to zero on init. This value is invalid as
+ * it would result in a division by zero. The rate can't be
+ * calculated in this case
+ */
+ if (n == 0)
+ return 0;
+
m = meson_parm_read(clk->map, &pll->m);
frac = MESON_PARM_APPLICABLE(&pll->frac) ?
diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c
index b3af61cc6fb9..d2760a021301 100644
--- a/drivers/clk/meson/g12a.c
+++ b/drivers/clk/meson/g12a.c
@@ -4692,6 +4692,7 @@ static struct clk_regmap *const g12a_clk_regmaps[] = {
&g12a_bt656,
&g12a_usb1_to_ddr,
&g12a_mmc_pclk,
+ &g12a_uart2,
&g12a_vpu_intr,
&g12a_gic,
&g12a_sd_emmc_a_clk0,