Page MenuHomeFreeBSD

clk/broadcom: Add BCM2835 CPRMAN clock tables and wire up build
Needs ReviewPublic

Authored by 3293789706_qq.com on Thu, Mar 19, 3:22 PM.
Tags
None
Referenced Files
F151916655: D55942.diff
Sat, Apr 11, 12:41 PM
Unknown Object (File)
Fri, Apr 10, 6:26 AM
Unknown Object (File)
Wed, Apr 8, 9:56 AM
Unknown Object (File)
Tue, Apr 7, 11:38 PM
Unknown Object (File)
Mon, Apr 6, 5:40 PM
Unknown Object (File)
Sun, Apr 5, 7:05 PM
Unknown Object (File)
Wed, Mar 25, 4:09 AM
Unknown Object (File)
Tue, Mar 24, 5:28 PM
Subscribers

Details

Reviewers
andrew
obiwac
Summary

Add the BCM2835-specific clock data (bcm2835_cprman_clocks.c) and the
chip driver (bcm2835_cprman_drv.c), and register all new source files
in the arm32 and arm64 build systems.

bcm2835_cprman_clocks.c defines:

  • bcm2835_periph_clks[]: GP0/GP1/GP2, PWM, PCM peripheral clocks
  • bcm2835_plls[]: PLLA, PLLC, PLLD with A2W register offsets, NaN filter coefficients, and XOSC enable bits
  • bcm2835_pll_channels[]: all per-PLL output dividers (dsi0, ccp2, core, per for PLLA; core0/1/2, per for PLLC; dsi0/1, core, per for PLLD)
  • bcm2835_stub_clks[]: 0 Hz placeholders for gnd, testdebug0/1, pllh_aux

All tables are exported as bcm2835_cprman_clk_data.

bcm2835_cprman_drv.c is reduced to probe/attach only; attach assigns
sc->clk_data = &bcm2835_cprman_clk_data and delegates to the shared
bcm_cprman_attach(). The parent clock name is corrected from
"hdmi_aux" to "pllh_aux" and the driver init order is changed from
BUS_PASS_ORDER_MIDDLE to BUS_PASS_ORDER_LATE so that all simplebus
children (including the OSC fixed-clock node) are attached first.

files.bcm283x and files.arm64 are updated to include all six new
source files under the CPRMAN clock controller section.

Signed-off-by: perdixky <3293789706@qq.com>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 71521
Build 68404: arc lint + arc unit