Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c37866c authored by Ben Dooks's avatar Ben Dooks
Browse files

[ARM] S3C2443: Fix HCLK rate



Fix the calculation of HCLK on the S3C2443, it should not
have been passed through S3C2443_CLKDIV0_HALF_HCLK.

Re-work of original patch from Wei Shuai <cpuwolf@gmail.com>

Signed-off-by: default avatarBen Dooks <ben-linux@fluff.org>
parent 5fed4a37
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1033,8 +1033,7 @@ void __init s3c2443_init_clocks(int xtal)

	fclk = pll / s3c2443_fclk_div(clkdiv0);
	hclk = s3c2443_prediv_getrate(&clk_prediv);
	hclk = hclk / s3c2443_get_hdiv(clkdiv0);
	hclk = hclk / ((clkdiv0 & S3C2443_CLKDIV0_HALF_HCLK) ? 2 : 1);
	hclk /= s3c2443_get_hdiv(clkdiv0);
 	pclk = hclk / ((clkdiv0 & S3C2443_CLKDIV0_HALF_PCLK) ? 2 : 1);

	s3c24xx_setup_clocks(xtal, fclk, hclk, pclk);