From: Doug Anderson Date: Tue, 11 Jun 2013 15:24:05 +0000 (-0700) Subject: clk: samsung: Fix pll36xx_recalc_rate to handle kdiv properly X-Git-Tag: v3.10-rc7~30^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=071ff9a36cb08b5a2b099fcdb45b63a61618f928;p=pandora-kernel.git clk: samsung: Fix pll36xx_recalc_rate to handle kdiv properly The KDIV value is often listed as unsigned but it needs to be treated as a 16-bit signed value when using it in calculations. Fix our rate recalculation to do this correctly. Before doing this, I tried setting EPLL on exynos5250 to: rate, m, p, s, k = 80000000, 107, 2, 4, 43691 This rate is exactly from the table in the exynos5250 user manual. I read this back as 80750003 with: cat /sys/kernel/debug/clk/fin_pll/fout_epll/clk_rate After this patch, it reads back as 80000003 Signed-off-by: Doug Anderson Acked-by: Kukjin Kim Reviewed-by: Vikas Sajjan Signed-off-by: Mike Turquette --- Reading git-diff-tree failed