imx: mx7ulp: Add clock framework and functions
Add a clock framework to support SCG1/PCC2/PCC3 for A7 to support get/set clock source, divider, clock rate and parent source. Users need to include pcc.h to use the APIs to for peripherals clock. Each peripheral clock is defined in enum pcc_clk type. SCG relevants APIs are defined in scg.h which supports clock rate get, PLL/PFD enablement and settings, and all SCG clock initialization. User need use enum scg_clk to access each clock source. In clock.c, we initialize necessary clocks at u-boot s_init and implement the clock functions used by driver modules to operate clocks dynamically. Signed-off-by:Peng Fan <peng.fan@nxp.com> Signed-off-by:
Ye Li <ye.li@nxp.com> Cc: Stefano Babic <sbabic@denx.de>
Showing
- arch/arm/cpu/armv7/mx7ulp/Makefile 1 addition, 1 deletionarch/arm/cpu/armv7/mx7ulp/Makefile
- arch/arm/cpu/armv7/mx7ulp/clock.c 315 additions, 0 deletionsarch/arm/cpu/armv7/mx7ulp/clock.c
- arch/arm/cpu/armv7/mx7ulp/pcc.c 286 additions, 0 deletionsarch/arm/cpu/armv7/mx7ulp/pcc.c
- arch/arm/cpu/armv7/mx7ulp/scg.c 1086 additions, 0 deletionsarch/arm/cpu/armv7/mx7ulp/scg.c
- arch/arm/include/asm/arch-mx7ulp/clock.h 38 additions, 0 deletionsarch/arm/include/asm/arch-mx7ulp/clock.h
- arch/arm/include/asm/arch-mx7ulp/pcc.h 373 additions, 0 deletionsarch/arm/include/asm/arch-mx7ulp/pcc.h
- arch/arm/include/asm/arch-mx7ulp/scg.h 342 additions, 0 deletionsarch/arm/include/asm/arch-mx7ulp/scg.h
Loading
Please register or sign in to comment