zynqmp: pm: Buffer the PLL mode that is set using IOCTL API
authorJolly Shah <jollys@xilinx.com>
Wed, 2 Jan 2019 20:46:46 +0000 (12:46 -0800)
committerJolly Shah <jollys@xilinx.com>
Fri, 4 Jan 2019 19:41:38 +0000 (11:41 -0800)
commit8975f317e7608c832192b71531901602dc625484
tree37d9a42c4eab7a9d070d097bfb1fdb96de647eb1
parentcf1769b5922f725486ff1776d685eb5b68081ee7
zynqmp: pm: Buffer the PLL mode that is set using IOCTL API

When linux calls pm_ioctl_set_pll_frac_mode() it doesn't expect the
fractional mode to be changed in hardware. Furthermore, even before this
patch setting the mode which is done by writing into register takes
no effect until the PLL reset is deasserted, i.e. until linux "enables"
the PLL. To adjust the code to system-level PLL EEMI API and avoid
unnecessary IPIs that would otherwise be issued, we buffer the mode
value set via IOCTL until the PLL mode really needs to be set.

Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Will Wong <WILLW@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
plat/xilinx/zynqmp/pm_service/pm_api_clock.c
plat/xilinx/zynqmp/pm_service/pm_api_clock.h
plat/xilinx/zynqmp/pm_service/pm_api_ioctl.c