imx: mx7ulp: Add clock framework and functions
authorPeng Fan <peng.fan@nxp.com>
Wed, 22 Feb 2017 08:21:42 +0000 (16:21 +0800)
committerYe Li <ye.li@nxp.com>
Wed, 5 Apr 2017 09:23:51 +0000 (17:23 +0800)
commit626c8a6df5bea994aa821bb3a318a99634a4fbcc
tree3ad21d95e2767e0ef106ccf50d1f15c0d9a45f3e
parente605114f27c7642e1ef6b0faa8eebab50812df5e
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>
arch/arm/cpu/armv7/mx7ulp/Makefile
arch/arm/cpu/armv7/mx7ulp/clock.c [new file with mode: 0644]
arch/arm/cpu/armv7/mx7ulp/pcc.c [new file with mode: 0644]
arch/arm/cpu/armv7/mx7ulp/scg.c [new file with mode: 0644]
arch/arm/include/asm/arch-mx7ulp/clock.h [new file with mode: 0644]
arch/arm/include/asm/arch-mx7ulp/pcc.h [new file with mode: 0644]
arch/arm/include/asm/arch-mx7ulp/scg.h [new file with mode: 0644]