Bug 273634 - allwinner clk_ng fake divisors/multipliers
Summary: allwinner clk_ng fake divisors/multipliers
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: arm (show other bugs)
Version: Unspecified
Hardware: arm64 Any
: --- Affects Only Me
Assignee: freebsd-arm (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-08 09:36 UTC by titus m
Modified: 2023-09-08 09:36 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description titus m 2023-09-08 09:36:24 UTC
when you declare a NMM (or other type)  clock with a fake divisor/multiplier and AW_CLK_FACTOR_FIXED flag even if the number of bits/width for the clock is 0 the value is still set to the register (at the declared shift position) because the value returned by aw_clk_factor_get_value for AW_CLK_FACTOR_FIXED is not masked
when setting the clock frequency this is causing undesired results
the fix would be that aw_clk_factor_get_value to mask the value for 
AW_CLK_FACTOR_FIXED


NM_CLK(spdif_clk,
    CLK_SPDIF, "spdif", spdif_parents,          /* id, name, parents */
    0xC0,                                       /* offset */
    0, 0, 1, AW_CLK_FACTOR_FIXED,               /* n factor (fake); */
    0, 4, 0, 0,                                 /* m factor */
    0, 0,                                       /* mux */
    31,                                         /* gate */
    AW_CLK_HAS_GATE);                           /* flags */

bit 0 will be forced to 1 by the n factor and will alter the m factor


OSZAR »