Skip to contentSkip to conversation

clk: meson: fix pll settings calculation with arm32

PATCH In review Jerome Brunet 2 participants 2 messages Feb 3, 2019 – Feb 4, 2019

Subsystems (3)
lore
Share & tools
lore

Jerome Brunet

author maintainer
#0 lore raw

PATCH 1/1 clk: meson: fix pll settings calculation with arm32

fix undefined reference to `__aeabi_uldivmod' when dividing u64 on arm32.

Fixes 496c0462b46f ("clk: meson: pll: update driver for the g12a")

---

Neil,

Feel free to squash this with the offending change. If you prefer, I can submit a v7.

Cheers
Jerome

 drivers/clk/meson/clk-pll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/meson/clk-pll.c +1 -1
index 7946d21a4ff4..41e16dd7272a 100644
@@ -151,7 +151,7 @@ static unsigned int meson_clk_get_pll_range_m(unsigned long rate,
 	if (__pll_round_closest_mult(pll))
 		return DIV_ROUND_CLOSEST_ULL(val, parent_rate);
 
-	return val / parent_rate;
+	return div_u64(val,  parent_rate);
 }
 
 static int meson_clk_get_pll_range_index(unsigned long rate,
Signature · 1 line
2.20.1
#1 lore raw
Quoted 24 lines · Jerome Brunet

fix undefined reference to `__aeabi_uldivmod' when dividing u64 on arm32.

Fixes 496c0462b46f ("clk: meson: pll: update driver for the g12a")

---

Neil,

Feel free to squash this with the offending change. If you prefer, I can submit a v7.

Cheers
Jerome

 drivers/clk/meson/clk-pll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/meson/clk-pll.c +0 -0
index 7946d21a4ff4..41e16dd7272a 100644

drivers/clk/meson/clk-pll.c static unsigned int meson_clk_get_pll_range_m(unsigned long rate, · line 157

Quoted 8 lines
drivers/clk/meson/clk-pll.c +1 -1
@@ -151,7 +151,7 @@ static unsigned int meson_clk_get_pll_range_m(unsigned long rate,
 	if (__pll_round_closest_mult(pll))
 		return DIV_ROUND_CLOSEST_ULL(val, parent_rate);
 
-	return val / parent_rate;
+	return div_u64(val,  parent_rate);
 }
 
 static int meson_clk_get_pll_range_index(unsigned long rate,

Thanks for the fix,

I squashed it on "clk: meson: pll: update driver for the g12a"

Neil