arm: Xilinx ZynqMP SoC fixes for v4.16

- Fix Kconfig dependency
 - Fix vcu clkoutdiv calculation
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iEYEABECAAYFAlpq6dUACgkQykllyylKDCG0tQCeJO5TnYxDMIyIV2tohgzXarKr
 9vQAniw+AZSnraoxrWR5z9Qhhub1WjzN
 =J1i9
 -----END PGP SIGNATURE-----

Merge tag 'zynqmp-soc-fixes-for-4.16' of https://github.com/Xilinx/linux-xlnx into next/drivers

Pull "arm: Xilinx ZynqMP SoC fixes for v4.16" from Michal Simek:

- Fix Kconfig dependency
- Fix vcu clkoutdiv calculation

* tag 'zynqmp-soc-fixes-for-4.16' of https://github.com/Xilinx/linux-xlnx:
  soc: xilinx: Fix Kconfig alignment
  soc: xilinx: xlnx_vcu: Use bitwise & rather than logical && on clkoutdiv
  soc: xilinx: xlnx_vcu: Depends on HAS_IOMEM for xlnx_vcu
This commit is contained in:
Arnd Bergmann 2018-01-26 17:33:36 +01:00
commit 9db16401d2
2 changed files with 12 additions and 11 deletions

View File

@ -2,18 +2,19 @@
menu "Xilinx SoC drivers" menu "Xilinx SoC drivers"
config XILINX_VCU config XILINX_VCU
tristate "Xilinx VCU logicoreIP Init" tristate "Xilinx VCU logicoreIP Init"
help depends on HAS_IOMEM
Provides the driver to enable and disable the isolation between the help
processing system and programmable logic part by using the logicoreIP Provides the driver to enable and disable the isolation between the
register set. This driver also configures the frequency based on the processing system and programmable logic part by using the logicoreIP
clock information from the logicoreIP register set. register set. This driver also configures the frequency based on the
clock information from the logicoreIP register set.
If you say yes here you get support for the logicoreIP. If you say yes here you get support for the logicoreIP.
If unsure, say N. If unsure, say N.
To compile this driver as a module, choose M here: the To compile this driver as a module, choose M here: the
module will be called xlnx_vcu. module will be called xlnx_vcu.
endmenu endmenu

View File

@ -334,7 +334,7 @@ static int xvcu_set_vcu_pll_info(struct xvcu_device *xvcu)
*/ */
vcu_pll_ctrl = xvcu_read(xvcu->vcu_slcr_ba, VCU_PLL_CTRL); vcu_pll_ctrl = xvcu_read(xvcu->vcu_slcr_ba, VCU_PLL_CTRL);
clkoutdiv = vcu_pll_ctrl >> VCU_PLL_CTRL_CLKOUTDIV_SHIFT; clkoutdiv = vcu_pll_ctrl >> VCU_PLL_CTRL_CLKOUTDIV_SHIFT;
clkoutdiv = clkoutdiv && VCU_PLL_CTRL_CLKOUTDIV_MASK; clkoutdiv = clkoutdiv & VCU_PLL_CTRL_CLKOUTDIV_MASK;
if (clkoutdiv != 1) { if (clkoutdiv != 1) {
dev_err(xvcu->dev, "clkoutdiv value is invalid\n"); dev_err(xvcu->dev, "clkoutdiv value is invalid\n");
return -EINVAL; return -EINVAL;