From 05015061222d10a3cb87e6046940abfe42114927 Mon Sep 17 00:00:00 2001
From: Dhaval Shah <dhaval.shah@xilinx.com>
Date: Mon, 15 Jan 2018 22:34:48 -0800
Subject: [PATCH 1/3] soc: xilinx: xlnx_vcu: Depends on HAS_IOMEM for xlnx_vcu

xlnx_vcu driver uses devm_ioremap_nocache, which is included
only when HAS_IOMEM is enabled.

drivers/soc/xilinx/xlnx_vcu.o: In function `xvcu_probe':
   xlnx_vcu.c:(.text+0x116): undefined reference to `devm_ioremap_nocache'
   xlnx_vcu.c:(.text+0x1ae): undefined reference to `devm_ioremap_nocache'

Signed-off-by: Dhaval Shah <dshah@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
 drivers/soc/xilinx/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/soc/xilinx/Kconfig b/drivers/soc/xilinx/Kconfig
index 266b50ffe349e..bf657ab3a2cc9 100644
--- a/drivers/soc/xilinx/Kconfig
+++ b/drivers/soc/xilinx/Kconfig
@@ -3,6 +3,7 @@ menu "Xilinx SoC drivers"
 
 config XILINX_VCU
         tristate "Xilinx VCU logicoreIP Init"
+	depends on HAS_IOMEM
         help
           Provides the driver to enable and disable the isolation between the
           processing system and programmable logic part by using the logicoreIP

From 2a7157b137f6f4804fbd60e8734574373212105b Mon Sep 17 00:00:00 2001
From: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
Date: Mon, 15 Jan 2018 13:15:28 -0600
Subject: [PATCH 2/3] soc: xilinx: xlnx_vcu: Use bitwise & rather than logical
 && on clkoutdiv

Currently clkoutdiv is being operated on by a logical && operator rather
than a bitwise & operator. This looks incorrect as these should be bit
flag operations.

Addresses-Coverity-ID: 1463959 ("Logical vs. bitwise operator")
Fixes: cee8113a295a ("soc: xilinx: xlnx_vcu: Add Xilinx ZYNQMP VCU logicoreIP init driver")
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Acked-by: Dhaval Shah <dshah@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
 drivers/soc/xilinx/xlnx_vcu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/xilinx/xlnx_vcu.c b/drivers/soc/xilinx/xlnx_vcu.c
index c1d6f1b190b64..a840c02721355 100644
--- a/drivers/soc/xilinx/xlnx_vcu.c
+++ b/drivers/soc/xilinx/xlnx_vcu.c
@@ -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);
 	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) {
 		dev_err(xvcu->dev, "clkoutdiv value is invalid\n");
 		return -EINVAL;

From 056b54eeaebbe567076fe9e824643fc330cba4d5 Mon Sep 17 00:00:00 2001
From: Michal Simek <michal.simek@xilinx.com>
Date: Tue, 16 Jan 2018 08:36:09 +0100
Subject: [PATCH 3/3] soc: xilinx: Fix Kconfig alignment

Tabs should be used for alignment instead of spaces.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
 drivers/soc/xilinx/Kconfig | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/soc/xilinx/Kconfig b/drivers/soc/xilinx/Kconfig
index bf657ab3a2cc9..687c8f3cd9552 100644
--- a/drivers/soc/xilinx/Kconfig
+++ b/drivers/soc/xilinx/Kconfig
@@ -2,19 +2,19 @@
 menu "Xilinx SoC drivers"
 
 config XILINX_VCU
-        tristate "Xilinx VCU logicoreIP Init"
+	tristate "Xilinx VCU logicoreIP Init"
 	depends on HAS_IOMEM
-        help
-          Provides the driver to enable and disable the isolation between the
-          processing system and programmable logic part by using the logicoreIP
-          register set. This driver also configures the frequency based on the
-          clock information from the logicoreIP register set.
+	help
+	  Provides the driver to enable and disable the isolation between the
+	  processing system and programmable logic part by using the logicoreIP
+	  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
-          module will be called xlnx_vcu.
+	  To compile this driver as a module, choose M here: the
+	  module will be called xlnx_vcu.
 
 endmenu