Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux

Pull clk fixes from Stephen Boyd:
"Three clk driver fixes to close out the release

- Fix a divider calculation breaking boot on Broadcom bcm2835

- Fix HDMI output on Tanix TX6 mini board by reverting a patch

- Fix clk_set_rate_range() calls on at91 by considering the range
while calculating the divisor"

* tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
clk: at91: generated: consider range when calculating best rate
Revert "clk: sunxi-ng: sun6i-rtc: Add support for H6"
clk: bcm2835: fix bcm2835_clock_choose_div

+22 -15
+4
drivers/clk/at91/clk-generated.c
··· 117 117 tmp_rate = parent_rate; 118 118 else 119 119 tmp_rate = parent_rate / div; 120 + 121 + if (tmp_rate < req->min_rate || tmp_rate > req->max_rate) 122 + return; 123 + 120 124 tmp_diff = abs(req->rate - tmp_rate); 121 125 122 126 if (*best_diff < 0 || *best_diff >= tmp_diff) {
+1
drivers/clk/bcm/clk-bcm2835.c
··· 941 941 u64 temp = (u64)parent_rate << CM_DIV_FRAC_BITS; 942 942 u32 div, mindiv, maxdiv; 943 943 944 + do_div(temp, rate); 944 945 div = temp; 945 946 div &= ~unused_frac_mask; 946 947
-15
drivers/clk/sunxi-ng/ccu-sun6i-rtc.c
··· 298 298 .hw_clks = &sun6i_rtc_ccu_hw_clks, 299 299 }; 300 300 301 - static const struct clk_parent_data sun50i_h6_osc32k_fanout_parents[] = { 302 - { .hw = &osc32k_clk.common.hw }, 303 - }; 304 - 305 301 static const struct clk_parent_data sun50i_h616_osc32k_fanout_parents[] = { 306 302 { .hw = &osc32k_clk.common.hw }, 307 303 { .fw_name = "pll-32k" }, ··· 308 312 { .hw = &osc32k_clk.common.hw }, 309 313 { .hw = &ext_osc32k_gate_clk.common.hw }, 310 314 { .hw = &osc24M_32k_clk.common.hw } 311 - }; 312 - 313 - static const struct sun6i_rtc_match_data sun50i_h6_rtc_ccu_data = { 314 - .have_ext_osc32k = true, 315 - .have_iosc_calibration = true, 316 - .osc32k_fanout_parents = sun50i_h6_osc32k_fanout_parents, 317 - .osc32k_fanout_nparents = ARRAY_SIZE(sun50i_h6_osc32k_fanout_parents), 318 315 }; 319 316 320 317 static const struct sun6i_rtc_match_data sun50i_h616_rtc_ccu_data = { ··· 324 335 }; 325 336 326 337 static const struct of_device_id sun6i_rtc_ccu_match[] = { 327 - { 328 - .compatible = "allwinner,sun50i-h6-rtc", 329 - .data = &sun50i_h6_rtc_ccu_data, 330 - }, 331 338 { 332 339 .compatible = "allwinner,sun50i-h616-rtc", 333 340 .data = &sun50i_h616_rtc_ccu_data,
+17
drivers/rtc/rtc-sun6i.c
··· 370 370 CLK_OF_DECLARE_DRIVER(sun50i_h5_rtc_clk, "allwinner,sun50i-h5-rtc", 371 371 sun8i_h3_rtc_clk_init); 372 372 373 + static const struct sun6i_rtc_clk_data sun50i_h6_rtc_data = { 374 + .rc_osc_rate = 16000000, 375 + .fixed_prescaler = 32, 376 + .has_prescaler = 1, 377 + .has_out_clk = 1, 378 + .export_iosc = 1, 379 + .has_losc_en = 1, 380 + .has_auto_swt = 1, 381 + }; 382 + 383 + static void __init sun50i_h6_rtc_clk_init(struct device_node *node) 384 + { 385 + sun6i_rtc_clk_init(node, &sun50i_h6_rtc_data); 386 + } 387 + CLK_OF_DECLARE_DRIVER(sun50i_h6_rtc_clk, "allwinner,sun50i-h6-rtc", 388 + sun50i_h6_rtc_clk_init); 389 + 373 390 /* 374 391 * The R40 user manual is self-conflicting on whether the prescaler is 375 392 * fixed or configurable. The clock diagram shows it as fixed, but there