]> rtime.felk.cvut.cz Git - zynq/linux.git/log
zynq/linux.git
7 years agonet: phy: xilinx_phy: Fix compilation warning in the driver
Kedareswara rao Appana [Mon, 18 Jul 2016 07:23:35 +0000 (12:53 +0530)]
net: phy: xilinx_phy: Fix compilation warning in the driver

This commit be01da72b1b8 ("phy: Centralize setting driver module owner")
Centralizes setting driver module owner into the phy core code.

This patch removes the module owner field from the driver as
phy core doing the same.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodrm: xilinx: crtc: Use ERR_PTR() to remove a compile warning
Hyun Kwon [Fri, 15 Jul 2016 17:22:05 +0000 (10:22 -0700)]
drm: xilinx: crtc: Use ERR_PTR() to remove a compile warning

Reported-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodrm: xilinx: Add const assignment to fix compile warnings
Hyun Kwon [Fri, 15 Jul 2016 17:22:04 +0000 (10:22 -0700)]
drm: xilinx: Add const assignment to fix compile warnings

The const was missing for encoder slave functions and drm_mode_fb_cmd2.

Reported-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agopowerpc: Revert Xilinx changes
Michal Simek [Fri, 15 Jul 2016 12:59:28 +0000 (14:59 +0200)]
powerpc: Revert Xilinx changes

powerpc is not tested anymore that's why remove all differences from
the tree.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agouio: apm: Fix warnings
Shubhrajyoti Datta [Mon, 18 Jul 2016 08:33:03 +0000 (14:03 +0530)]
uio: apm: Fix warnings

Fix the below warnings

drivers/uio/uio_xilinx_apm.c: In function 'xapm_probe':
drivers/uio/uio_xilinx_apm.c:283:24: warning: passing argument 1 of 'clk_disable_unprepare' from incompatible pointer type
  clk_disable_unprepare(&xapm->param.clk);
                        ^
In file included from drivers/uio/uio_xilinx_apm.c:26:0:
include/linux/clk.h:482:20: note: expected 'struct clk *' but argument is of type 'struct clk **'
 static inline void clk_disable_unprepare(struct clk *clk)
                    ^
drivers/uio/uio_xilinx_apm.c: In function 'xapm_remove':
drivers/uio/uio_xilinx_apm.c:298:24: warning: passing argument 1 of 'clk_disable_unprepare' from incompatible pointer type
  clk_disable_unprepare(&xapm->param.clk);
                        ^
In file included from drivers/uio/uio_xilinx_apm.c:26:0:
include/linux/clk.h:482:20: note: expected 'struct clk *' but argument is of type 'struct clk **'
 static inline void clk_disable_unprepare(struct clk *clk)

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoMerge tag 'v4.6' into master
Michal Simek [Thu, 21 Jul 2016 14:49:27 +0000 (16:49 +0200)]
Merge tag 'v4.6' into master

Fix issues in spi-nor driver.

Fix xilinx_phy compilation:
net: phy: xilinx_phy: Fix compilation errors in the driver

This commit e5a03bfd873c ("phy: Add an mdio_device structure")
modifies the phydev strcture fields.

This patch updates for the same in the driver

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Apply revert of:
"kbuild: Add option to turn incompatible pointer check into error"
(sha1: ea8daa7b97842aab8507b5b5b1e3226cf2d514a6).
because some drivers are causing compilation warnings.
Apply this patch when compilations warnings are fixed.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodmaengine: xilinx: Fix compilation error
Michal Simek [Mon, 18 Jul 2016 10:36:26 +0000 (12:36 +0200)]
dmaengine: xilinx: Fix compilation error

Remove has_sg checking which was removed by:
"dmaengine: xilinx: zynqmp_dma: Sync driver with mainline"
(sha1: 4cd70c71159ab9cc3555217bf2c1fba12cd23261)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoARM64: zynqmp: Disable MALI
Hyun Kwon [Fri, 15 Jul 2016 00:47:23 +0000 (17:47 -0700)]
ARM64: zynqmp: Disable MALI

The MALI driver will be included through PetaLinux / Yocto as
a off-tree module. Thus, the driver should be disabled in the branch
as default to avoid conflict.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoreset: Updated the Kconfig file for zynqmp reset-controller
Nava kishore Manne [Fri, 15 Jul 2016 06:12:26 +0000 (11:42 +0530)]
reset: Updated the Kconfig file for zynqmp reset-controller

The zynqmp reset controller needs Power Management API's to complete
the actual task. So this patch updates the Kconfig file with required PM
dependencies to avoid the compilation errors.

Signed-off-by: Nava kishore Manne <navam@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoARM64: zynqmp: drm: Add DMA index
Hyun Kwon [Fri, 15 Jul 2016 00:42:44 +0000 (17:42 -0700)]
ARM64: zynqmp: drm: Add DMA index

Each plane can be associated with multiple DMA channels. So add
index for each DMA channel.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoDocumentation: devicetree: bindings: drm: xilinx: Add DMA channel index
Hyun Kwon [Fri, 15 Jul 2016 00:42:43 +0000 (17:42 -0700)]
Documentation: devicetree: bindings: drm: xilinx: Add DMA channel index

Each plane can have multiple channels, so add the index for each DMA
channel.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodrm: xilinx: plane: Add multi-plane support
Hyun Kwon [Fri, 15 Jul 2016 00:42:42 +0000 (17:42 -0700)]
drm: xilinx: plane: Add multi-plane support

Each plane can have up to 4 planes such as planr YUV formats.
So add sub-plane to each plane, and connect each with individualy
dma channel.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodrm: xilinx: drv: Support semi-planar YUV format
Hyun Kwon [Fri, 15 Jul 2016 00:42:41 +0000 (17:42 -0700)]
drm: xilinx: drv: Support semi-planar YUV format

Support semi-planar YUV format, NV16.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodrm: xilinx: dp_sub: Add a semi-planar YUV format
Hyun Kwon [Fri, 15 Jul 2016 00:42:40 +0000 (17:42 -0700)]
drm: xilinx: dp_sub: Add a semi-planar YUV format

Add a semiplar YUV format, and correct some format namings.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodma: xilinx: dpdma: Support multi-channel operations
Hyun Kwon [Fri, 15 Jul 2016 00:42:39 +0000 (17:42 -0700)]
dma: xilinx: dpdma: Support multi-channel operations

In case of mult-planar formats, multiple video channels should
be operated in sync. For this, introduce the video group, which
guarantees all relevant channels are triggered / pasued at
the same time.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodmaengine: xilinx: Remove zynqmp_dmatest driver
Kedareswara rao Appana [Thu, 14 Jul 2016 15:46:21 +0000 (21:16 +0530)]
dmaengine: xilinx: Remove zynqmp_dmatest driver

The zynqmp_dmatest is replicate of dmatest client
except to test scatter gather mode.
Now the support for scatter gather mode also got
added to dmatest client so no need of this driver.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
7 years agodmaengine: dmatest: Add support for scatter-gather DMA mode
Kedareswara rao Appana [Thu, 14 Jul 2016 15:46:20 +0000 (21:16 +0530)]
dmaengine: dmatest: Add support for scatter-gather DMA mode

This patch updates the dmatest client to
Support scatter-gather dma mode.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
7 years agodmaengine: zynqmp_dma: Fix static checker warning
Kedareswara rao Appana [Thu, 14 Jul 2016 15:46:19 +0000 (21:16 +0530)]
dmaengine: zynqmp_dma: Fix static checker warning

This patch fixes the below static checker warning
drivers/dma/xilinx/zynqmp_dma.c:973 zynqmp_dma_chan_probe()
        warn: was && intended here instead of ||?

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
7 years agoDocumentation: DT: Sync device tree DT binding doc with mainline
Kedareswara rao Appana [Thu, 14 Jul 2016 15:46:18 +0000 (21:16 +0530)]
Documentation: DT: Sync device tree DT binding doc with mainline

This patch syncs the device-tree binding doc with the
Mainline tree changes.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
7 years agodmaengine: xilinx: zynqmp_dma: Sync driver with mainline
Kedareswara rao Appana [Thu, 14 Jul 2016 15:46:17 +0000 (21:16 +0530)]
dmaengine: xilinx: zynqmp_dma: Sync driver with mainline

This patch sync the zynqmp driver with the mainline changes.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodma: xilinx: Update test clients depends config option
Kedareswara rao Appana [Wed, 13 Jul 2016 09:20:34 +0000 (14:50 +0530)]
dma: xilinx: Update test clients depends config option

Updated the test client config option with the
latest driver config.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
7 years agoDocumentation: DT: dma: Delete binding doc for AXI CDMA
Kedareswara rao Appana [Wed, 13 Jul 2016 09:20:33 +0000 (14:50 +0530)]
Documentation: DT: dma: Delete binding doc for AXI CDMA

The AXI CDMA support is added to the existing AXI VDMA
driver. Device tree binding information also updated
in the VDMA binding doc.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
7 years agodmaengine: xilinx: Fix race condition in axi dma cyclic dma mode
Kedareswara rao Appana [Wed, 13 Jul 2016 09:20:32 +0000 (14:50 +0530)]
dmaengine: xilinx: Fix race condition in axi dma cyclic dma mode

In cyclic DMA mode need to link the tail bd segment
with the head bd segment to process bd's in cyclic.

Current driver is doing this only for tx channel
needs to update the same for rx channel case also.

This patch fixes the same.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
7 years agodmaengine: xilinx: Use different channel names for each dma
Kedareswara rao Appana [Wed, 13 Jul 2016 09:20:31 +0000 (14:50 +0530)]
dmaengine: xilinx: Use different channel names for each dma

Current driver assumes that child node channel name is either
"xlnx,axi-vdma-mm2s-channel" or "xlnx,axi-vdma-s2mm-channel"
which is confusing the users of AXI DMA and CDMA.
This patch fixes this issue by using different channel
names for the AXI DMA and AXI CDMA child nodes.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
7 years agodmaengine: xilinx: Rename driver and config
Kedareswara rao Appana [Wed, 13 Jul 2016 09:20:30 +0000 (14:50 +0530)]
dmaengine: xilinx: Rename driver and config

In the existing vdma driver support for
AXI DMA and CDMA got added so the driver is no
longer VDMA specific.

This patch renames the driver and DT binding doc to xilinx_dma
and updates the Kconfig description for all the DMAS.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
7 years agoDocumentation: DT: dma: Delete binding doc for AXI DMA
Kedareswara rao Appana [Wed, 13 Jul 2016 09:20:29 +0000 (14:50 +0530)]
Documentation: DT: dma: Delete binding doc for AXI DMA

The AXI DMA support is added to the existing AXI VDMA
driver. Device tree binding information also updated
in the VDMA binding doc.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
7 years agodmaengine: vdma: Add support for mulit-channel dma mode
Kedareswara rao Appana [Wed, 13 Jul 2016 09:20:28 +0000 (14:50 +0530)]
dmaengine: vdma: Add support for mulit-channel dma mode

This patch adds support for AXI DMA multi-channel dma mode
Multichannel mode enables DMA to connect to multiple masters
and slaves on the streaming side.

In Multichannel mode AXI DMA supports 2D transfers.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
7 years agoDocumentation: DT: vdma: Update binding doc for multi-channel dma mode
Kedareswara rao Appana [Wed, 13 Jul 2016 09:20:27 +0000 (14:50 +0530)]
Documentation: DT: vdma: Update binding doc for multi-channel dma mode

This patch updates the device-tree binding doc for
AXI DMA multi channel dma mode.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
7 years agodmaengine: vdma: Add 64 bit addressing support for the axi cdma
Kedareswara rao Appana [Wed, 13 Jul 2016 09:20:26 +0000 (14:50 +0530)]
dmaengine: vdma: Add 64 bit addressing support for the axi cdma

The AXI CDMA is a soft ip, which can be programmed to support
32 bit addressing or greater than 32 bit addressing.

When the AXI CDMA ip is configured for 32 bit address space
in simple dma mode the source/destination buffer address is
specified by a single register(18h for Source buffer address and
20h for Destination buffer address). When configured in SG mode
the current descriptor and tail descriptor are specified by a
Single register(08h for curdesc 10h for tail desc).

When the  AXI CDMA core is configured for an address space greater
than 32 then each buffer address or descriptor address is specified by
a combination of two registers.

The first register specifies the LSB 32 bits of address,
while the next register specifies the MSB 32 bits of address.

For example, 08h will specify the LSB 32 bits while 0Ch will
specify the MSB 32 bits of the first start address.
So we need to program two registers at a time.

This patch adds the 64 bit addressing support to the axicdma
IP in the driver.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
7 years agodmaengine: vdma: Add 64 bit addressing support for the axi dma
Kedareswara rao Appana [Wed, 13 Jul 2016 09:20:25 +0000 (14:50 +0530)]
dmaengine: vdma: Add 64 bit addressing support for the axi dma

The AXI DMA is a soft ip, which can be programmed to support
32 bit addressing or greater than 32 bit addressing.

When the AXI DMA ip is configured for 32 bit address space
in simple dma mode the buffer address is specified by a single register
(18h for MM2S channel and 48h for S2MM channel). When configured in SG mode
The current descriptor and tail descriptor are specified by a single
Register(08h for curdesc 10h for tail desc for MM2S channel and 38h for
Curdesc and 40h for tail desc for S2MM).

When the  AXI DMA core is configured for an address space greater
than 32 then each buffer address or descriptor address is specified by
a combination of two registers.

The first register specifies the LSB 32 bits of address,
while the next register specifies the MSB 32 bits of address.

For example, 48h will specify the LSB 32 bits while 4Ch will
specify the MSB 32 bits of the first start address.
So we need to program two registers at a time.

This patch adds the 64 bit addressing support for the axidma
IP in the driver.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
7 years agodmaengine: xilinx-vdma: add some sanity checks
Arnd Bergmann [Wed, 13 Jul 2016 09:20:24 +0000 (14:50 +0530)]
dmaengine: xilinx-vdma: add some sanity checks

The newly added xilinx_dma_prep_dma_cyclic function sometimes causes
a gcc warning about the use of the segment function in case
we never run into the inner loop of the function:

dma/xilinx/xilinx_vdma.c: In function 'xilinx_dma_prep_dma_cyclic':
dma/xilinx/xilinx_vdma.c:1808:23: error: 'segment' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   segment->hw.control |= XILINX_DMA_BD_SOP;

This can only happen if the period len is zero (which would cause other
problems earlier), or if the buffer is shorter than a period. Neither
of them should ever happen, but by adding an explicit check for these two
cases, we can abort in a more controlled way, and the compiler is
able to see that we never use uninitialized data.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
7 years agodmaengine: vdma: Fix compilation warning in cyclic dma mode
Kedareswara rao Appana [Wed, 13 Jul 2016 09:20:23 +0000 (14:50 +0530)]
dmaengine: vdma: Fix compilation warning in cyclic dma mode

This patch fixes the below compilation warining.
drivers/dma/xilinx/xilinx_vdma.c: In function 'xilinx_dma_prep_dma_cyclic':
drivers/dma/xilinx/xilinx_vdma.c:1808:23: warning: 'segment' may be used
uninitialized in this function [-Wmaybe-uninitialized]
   segment->hw.control |= XILINX_DMA_BD_SOP;

The start of packet (SOP) should be set to the first segment in the desc
chain not for the last segment of the desc chain.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
7 years agodmaengine: vdma: Use dma_pool_zalloc
Kedareswara rao Appana [Wed, 13 Jul 2016 09:20:22 +0000 (14:50 +0530)]
dmaengine: vdma: Use dma_pool_zalloc

dma_pool_zalloc combines dma_pool_alloc and memset 0
this patch updates the driver to use dma_pool_zalloc.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
7 years agodmaengine: vdma: Add support for cyclic dma mode
Kedareswara rao Appana [Wed, 13 Jul 2016 09:20:21 +0000 (14:50 +0530)]
dmaengine: vdma: Add support for cyclic dma mode

This patch adds support for AXI DMA cyclic dma mode.
In cyclic mode, DMA fetches and processes the same
BDs without interruption. The DMA continues to fetch and process
until it is stopped or reset.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
7 years agodmaengine: vdma: don't crash when bad channel is requested
Kedareswara rao Appana [Wed, 13 Jul 2016 09:20:20 +0000 (14:50 +0530)]
dmaengine: vdma: don't crash when bad channel is requested

When client request a non existing channel from of_dma_xilinx_xlate
we get a NULL pointer dereferencing. This patch fix this problem.

Signed-off-by: Franck Jullien <franck.jullien@odyssee-systemes.fr>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
7 years agodmaengine: vdma: Add clock support
Kedareswara rao Appana [Wed, 13 Jul 2016 09:20:19 +0000 (14:50 +0530)]
dmaengine: vdma: Add clock support

Added basic clock support for axi dma's.
The clocks are requested at probe and released at remove.

Reviewed-by: Shubhrajyoti Datta <shubhraj@xilinx.com>
Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
7 years agoDocumentation: DT: vdma: Add clock support for dmas
Kedareswara rao Appana [Fri, 13 May 2016 07:03:30 +0000 (12:33 +0530)]
Documentation: DT: vdma: Add clock support for dmas

This patch updates the binding doc with clock description
for AXI DMA's.

Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
7 years agodmaengine: vdma: Add config structure to differentiate dmas
Kedareswara rao Appana [Wed, 13 Jul 2016 09:20:17 +0000 (14:50 +0530)]
dmaengine: vdma: Add config structure to differentiate dmas

This patch adds config structure in the driver to differentiate
AXI DMA's and to add more features(clock support etc..) to these DMA's.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
7 years agodmaengine: vdma: Add Support for Xilinx AXI Central Direct Memory Access Engine
Kedareswara rao Appana [Wed, 13 Jul 2016 09:20:16 +0000 (14:50 +0530)]
dmaengine: vdma: Add Support for Xilinx AXI Central Direct Memory Access Engine

This patch adds support for the AXI Central Direct Memory Access
(AXI CDMA) core to the existing vdma driver, AXI CDMA is a
soft Xilinx IP core that provides high-bandwidth
Direct Memory Access(DMA) between a memory-mapped
source address and a memory-mapped destination address.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
7 years agoDocumentation: DT: vdma: update binding doc for AXI CDMA
Kedareswara rao Appana [Wed, 13 Jul 2016 09:20:15 +0000 (14:50 +0530)]
Documentation: DT: vdma: update binding doc for AXI CDMA

This patch updates the device-tree binding doc for
adding support for AXI CDMA.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
7 years agodmaengine: vdma: Add Support for Xilinx AXI Direct Memory Access Engine
Kedareswara rao Appana [Wed, 13 Jul 2016 09:20:14 +0000 (14:50 +0530)]
dmaengine: vdma: Add Support for Xilinx AXI Direct Memory Access Engine

This patch adds support for the AXI Direct Memory Access (AXI DMA)
core in the existing vdma driver, AXI DMA Core is a
soft Xilinx IP core that provides high-bandwidth
direct memory access between memory and AXI4-Stream
type target peripherals.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
7 years agoDocumentation: DT: vdma: update binding doc for AXI DMA
Kedareswara rao Appana [Wed, 13 Jul 2016 09:20:13 +0000 (14:50 +0530)]
Documentation: DT: vdma: update binding doc for AXI DMA

This patch updates the device-tree binding doc for
adding support for AXI DMA.
Also this patch differentiates required properties b/w
DMA and VDMA.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
7 years agodmaengine: vdma: Rename xilinx_vdma_ prefix to xilinx_dma
Kedareswara rao Appana [Wed, 13 Jul 2016 09:20:12 +0000 (14:50 +0530)]
dmaengine: vdma: Rename xilinx_vdma_ prefix to xilinx_dma

This patch renames the xilinx_vdma_ prefix to xilinx_dma
for the API's and masks that will be shared b/w three DMA
IP cores.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
7 years agodmaengine: vdma: Use dma_pool_zalloc
Julia Lawall [Fri, 29 Apr 2016 20:09:09 +0000 (22:09 +0200)]
dmaengine: vdma: Use dma_pool_zalloc

Dma_pool_zalloc combines dma_pool_alloc and memset 0.  The semantic patch
that makes this transformation is as follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression d,e;
statement S;
@@

        d =
-            dma_pool_alloc
+            dma_pool_zalloc
             (...);
        if (!d) S
-       memset(d, 0, sizeof(*d));
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
7 years agodma: xilinx: Delete AXI DMA driver
Kedareswara rao Appana [Wed, 13 Jul 2016 09:20:10 +0000 (14:50 +0530)]
dma: xilinx: Delete AXI DMA driver

This patch deletes the AXI DMA linux driver as the support
for the same will be added to the existing vdma driver.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
7 years agodma: xilinx: Delete AXI CDMA driver
Kedareswara rao Appana [Wed, 13 Jul 2016 09:20:09 +0000 (14:50 +0530)]
dma: xilinx: Delete AXI CDMA driver

This patch deletes the CDMA linux driver as the support
for the same will be added to the existing vdma driver.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
7 years agoDocumentation: DT: Sync device tree DT binding doc with mainline
Kedareswara rao Appana [Wed, 13 Jul 2016 09:20:08 +0000 (14:50 +0530)]
Documentation: DT: Sync device tree DT binding doc with mainline

This patch syncs the device-tree binding doc with the mainline
tree changes.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
7 years agodma: xilinx: vdma: Sync driver with mainline
Kedareswara rao Appana [Wed, 13 Jul 2016 09:20:07 +0000 (14:50 +0530)]
dma: xilinx: vdma: Sync driver with mainline

This patch sync the driver with mainline changes
---> 64-bit addressing support changes
---> Code clenaup

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
7 years agouio: apm: Add clock support
Shubhrajyoti Datta [Wed, 13 Jul 2016 11:16:07 +0000 (16:46 +0530)]
uio: apm: Add clock support

Adding clock support to the APM module.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agouio: apm: Add device tree bindings
Shubhrajyoti Datta [Wed, 13 Jul 2016 11:16:06 +0000 (16:46 +0530)]
uio: apm: Add device tree bindings

Add the device tree binding documentation.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agostaging: apf: Fix address calculation for SG-DMA transfers
Michael Gill [Tue, 12 Jul 2016 18:37:19 +0000 (11:37 -0700)]
staging: apf: Fix address calculation for SG-DMA transfers

If a buffer allocated with the use of sds_alloc is used in an
SG-DMA transfer such that only the end of the buffer is
transferred, the address calculation needed to skip the beginning
of the buffer was incorrect.  This patch fixes that issue.

Signed-off-by: Michael Gill <gill@xilinx.com>
7 years agostaging: apf: Fixed spurious failed allocations with sds_alloc
Michael Gill [Tue, 12 Jul 2016 18:37:09 +0000 (11:37 -0700)]
staging: apf: Fixed spurious failed allocations with sds_alloc

Added additional flags passed in to dma_alloc_* to reduce the
likelihood of unnecessary failed allocations.

Signed-off-by: Michael Gill <gill@xilinx.com>
7 years agostaging: apf: Fixed failing buffer allocation in driver
Michael Gill [Tue, 12 Jul 2016 18:37:02 +0000 (11:37 -0700)]
staging: apf: Fixed failing buffer allocation in driver

kmalloc was failing due to allocate large memory requests.
This patch moves to an alternative method of allocating sds_alloc
backing buffers.

Signed-off-by: Michael Gill <gill@xilinx.com>
7 years agodma: xilinx: axidma: Fix race condition in the cyclic dma mode
Kedareswara rao Appana [Thu, 7 Jul 2016 09:30:48 +0000 (15:00 +0530)]
dma: xilinx: axidma: Fix race condition in the cyclic dma mode

This patch fixes below race conditions in the cyclic dma mode.
---> In cyclic dma mode we need to configure tail bd pointer
to a value which is not part of bd chain.
---> Link the tail bd segment with the head bd segment
in cyclic dma mode.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
7 years agodma: xilinx: zynqmp_dma: Fix race condition in the driver
Kedareswara rao Appana [Wed, 6 Jul 2016 13:04:24 +0000 (18:34 +0530)]
dma: xilinx: zynqmp_dma: Fix race condition in the driver

In the driver software descriptor pools are allocated only when
SG is enabled in the driver. but we are freeing the desc polls in
Simple dma mode case also which is causing kernel crash when running
The dmatest client multiple times this patch fixes this issue.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Reviewed-by: Punnaiah Choudary Kalluri<punnaia@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodrm: xilinx: connector: Do not static-assign an encoder to a connector
Hyun Kwon [Tue, 5 Jul 2016 16:46:33 +0000 (09:46 -0700)]
drm: xilinx: connector: Do not static-assign an encoder to a connector

The DRM core associates an encoder to a connector, and it's not allowed
to assign an encoder statically anymore.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoARM64: zynqmp: zc1751-xm015-dc1: Add phy handles to DisplayPort
Hyun Kwon [Fri, 1 Jul 2016 23:45:24 +0000 (16:45 -0700)]
ARM64: zynqmp: zc1751-xm015-dc1: Add phy handles to DisplayPort

Add the phy handles to the DisplayPort DT node.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodrm: xilinx: dp: Set the phy pointer to NULL when it's an error value
Hyun Kwon [Fri, 1 Jul 2016 23:45:23 +0000 (16:45 -0700)]
drm: xilinx: dp: Set the phy pointer to NULL when it's an error value

The phy pointer should be NULL, otherwise phy_exit() results in fault.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agomtd: spi-nor: Added support for n25q00a.
P L Sai Krishna [Fri, 1 Jul 2016 12:48:21 +0000 (18:18 +0530)]
mtd: spi-nor: Added support for n25q00a.

This patch adds support for Micron n25q00a part by
adding in spi_nor_ids table.
This part is different from n25q00 in Memory Type Byte.
Memory Type for n25q00 - BAh
Memory Type for n25q00a - BBh

Signed-off-by: P L Sai Krishna <lakshmis@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agostaging: mali: r5p1-01rel0: Don't include mali_read_phys() for zynq/zynqmp
Hyun Kwon [Thu, 30 Jun 2016 01:06:08 +0000 (18:06 -0700)]
staging: mali: r5p1-01rel0: Don't include mali_read_phys() for zynq/zynqmp

mali_read_phys() is not used with CONFIG_ARCH_ZYNQ and CONFIG_ARCH_ZYNQMP.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agostaging: mali: r5p1-01rel0: Remove unused trace macros
Hyun Kwon [Thu, 30 Jun 2016 01:06:07 +0000 (18:06 -0700)]
staging: mali: r5p1-01rel0: Remove unused trace macros

TRACE_SYSTEM_STRING is not need in each trace file anymore.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agonet: marvell: Add separate config ANEG function for Marvell 88E1111
Harini Katakam [Mon, 27 Jun 2016 07:39:59 +0000 (13:09 +0530)]
net: marvell: Add separate config ANEG function for Marvell 88E1111

Marvell 88E1111 currently uses the generic marvell config ANEG function.
This function has a sequence accessing Page 5 and Register 31,
both of which are not defined or reserved for this PHY.
Hence this patch adds a new config ANEG function for Marvell 88E1111
without these erroneous accesses.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agotty: xuartps: disable clocks when not used
Shubhrajyoti Datta [Fri, 27 May 2016 09:35:19 +0000 (15:05 +0530)]
tty: xuartps: disable clocks when not used

Currently the clocks are enabled at probe and disabled
at remove. Instead enable the clocks when used.

Signed-off-by: Shubhrajyoti Datta <shubhraj@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: apf: Fix crash in APF DMA associated with IP change
Michael Gill [Thu, 23 Jun 2016 16:55:24 +0000 (09:55 -0700)]
staging: apf: Fix crash in APF DMA associated with IP change

The SG-DMA IP changed slightly, causing the APF DMA to occasionally
fail to correctly write 64-bit addresses to IP registers.  This
change corrects that problem.

Signed-off-by: Michael Gill <gill@xilinx.com>
Tested-by: Christian Kohn <christian.kohn@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoRevert "ARM64: Add i/d-cache disable options"
Michal Simek [Tue, 21 Jun 2016 14:24:12 +0000 (16:24 +0200)]
Revert "ARM64: Add i/d-cache disable options"

This reverts commit e9a5ea6f5924c59c0bdbd43658163917f0bd494f.

There is no reason to use this patch anymore.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoMerge tag 'v4.5' into master
Michal Simek [Tue, 21 Jun 2016 14:18:29 +0000 (16:18 +0200)]
Merge tag 'v4.5' into master

Linux 4.5

Problem on ZynqMP with xilinx_drm probe because of various media
changes.

- arm32 - Fix IPI changes
- dp83867/xilinx_emacps - Fix address passing based on
"phy: phy_{read|write}_mmd_indirect: get addr from phydev"
(sha1: 053e7e169229adebbc27fc176c5369398e9f5eba)
- xilinx_emacps: Fix IRQ allocation
"mdio: Move allocation of interrupts into core"
(sha1: e7f4dc3536a40097f95103ddf98dd55b3a980f5b)
- Various media fixes
- arasan_nfc/pl35x_nand - Fix ppdata handling
"mtd: nand: drop unnecessary partition parser data"
(sha1: a61ae81a1907af1987ad4c77300508327bc48b23)

mtd: nand: arasan: Use the mtd instance embedded in struct nand_chip

struct nand_chip now embeds an mtd device. Make use of this mtd
instance.

Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
mtd: nand: arasan: Make use of nand_set/get_controller_data() helpers

New helpers have been added to avoid directly accessing chip->field. Use
them where appropriate.

Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
mtd: nand: arasan: Use nand_set_flash_node function

Using the new function for passing the partition data to the
mtd layer.

This patch is based on the below change in nand base
"mtd: nand: drop unnecessary partition parser data"
(sha1:a61ae81a1907af1987ad4c77300508327bc48b23)

Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
mtd: nand: pl35x: Use the mtd instance embedded in struct nand_chip

struct nand_chip now embeds an mtd device. Make use of this mtd
instance.

Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
mtd: nand: pl35x: Use nand_set_flash_node function

Using the new function for passing the partition data to the
mtd layer.

This patch is based on the below change in nand base
"mtd: nand: drop unnecessary partition parser data"
(sha1:a61ae81a1907af1987ad4c77300508327bc48b23)

Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
mtd: nand: pl35x: Remove obsolete code

Remove the obsolete code related to mtd_partition, which is of
no use now.

Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
mtd: nand: pl35x: Make use of nand_set/get_controller_data() helpers

New helpers have been added to avoid directly accessing chip->field. Use
them where appropriate

Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agophy: zynqmp: Reset the de-emphasis and swing control for DP
Hyun Kwon [Fri, 17 Jun 2016 23:37:09 +0000 (16:37 -0700)]
phy: zynqmp: Reset the de-emphasis and swing control for DP

When the PHY lane is initialized for DP, the de-emphasis / swing control
should be reset in order to override the values from DP with values
programmed in the register.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
CC: Anurag Kumar Vulisha <anuragku@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agophy: zynqmp: Correct swing and preemphasis values
Hyun Kwon [Fri, 17 Jun 2016 23:37:08 +0000 (16:37 -0700)]
phy: zynqmp: Correct swing and preemphasis values

Correct swing and preemphasis values per the workaround documentation.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
CC: Anurag Kumar Vulisha <anuragku@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodrm: xilinx: dp: Reduce the bit rate if the link training fails
Hyun Kwon [Fri, 17 Jun 2016 23:37:07 +0000 (16:37 -0700)]
drm: xilinx: dp: Reduce the bit rate if the link training fails

Per DP 1.2 spec, when the linke training fails and there's
more low link rate available to try, it needs to retry
the link training with lower link rate. Since the link rate
depends on the current mode, move the training sequence to
mode set, and update other configuration such as init wait value
accordingly.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodrm: xilinx: dp: Set maximum swing / preemphsis level to 2 for ZynqMP
Hyun Kwon [Fri, 17 Jun 2016 23:37:06 +0000 (16:37 -0700)]
drm: xilinx: dp: Set maximum swing / preemphsis level to 2 for ZynqMP

The DP spec defines that the level 3 is optional to support for both
voltage swing and preemphasis. Thus, set the maximum voltage swing
and preemphasis level to 2 for ZynqMP DP subsystem.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodrm: xilinx: dp: Program the precursor value
Hyun Kwon [Fri, 17 Jun 2016 23:37:05 +0000 (16:37 -0700)]
drm: xilinx: dp: Program the precursor value

Per the HW documentation, the precursor register (0x24c & 0x250) should
be programmed to 0x2.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoARM64: zynqmp: Enable EDAC drivers
Michal Simek [Tue, 21 Jun 2016 12:15:57 +0000 (14:15 +0200)]
ARM64: zynqmp: Enable EDAC drivers

Enable EDAC for OCM and L1/L2 caches.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoARM64: zynqmp: Add cortexa53 edac node
Naga Sureshkumar Relli [Mon, 20 Jun 2016 10:18:30 +0000 (15:48 +0530)]
ARM64: zynqmp: Add cortexa53 edac node

This patch adds edac node for arm cortexa53 to report
errors on L1 and L2 caches.

Signed-off-by: Naga Sureshkumar Relli <nagasure@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoedac: Add documentation for cortexa53 edac sysfs
Naga Sureshkumar Relli [Mon, 20 Jun 2016 10:04:14 +0000 (15:34 +0530)]
edac: Add documentation for cortexa53 edac sysfs

This patch adds the documentation for the sysfs entries
created for cortexa53 arm edac

Signed-off-by: Naga Sureshkumar Relli <nagasure@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoedac: Add sysfs entries for cortex arm64
Naga Sureshkumar Relli [Mon, 20 Jun 2016 10:03:57 +0000 (15:33 +0530)]
edac: Add sysfs entries for cortex arm64

This patch adds sysfs entries for error injection on L1 and L2
caches of arm cortexa53.

created following sysfs entries
/sys/devices/system/edac/cpu_cache/inject_L1_Cache_Error
/sys/devices/system/edac/cpu_cache/inject_L2_Cache_Error

Signed-off-by: Naga Sureshkumar Relli <nagasure@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoedac: Update device tree bindings for cortex_arm64
Naga Sureshkumar Relli [Fri, 17 Jun 2016 13:42:32 +0000 (19:12 +0530)]
edac: Update device tree bindings for cortex_arm64

This patch adds device tree bindings document for cortex arm64

Signed-off-by: Naga Sureshkumar Relli <nagasure@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoEDAC: Add ARM64 EDAC
Brijesh Singh [Wed, 28 Oct 2015 16:13:49 +0000 (11:13 -0500)]
EDAC: Add ARM64 EDAC

Add support for Cortex A57 and A53 EDAC driver.

Note: This is v4 from mainline which hasn't been merged to mainline
because of some problems regarding CPU clusters, ACPI, etc.
But for our usecase this should be fine.

Signed-off-by: Brijesh Singh <brijeshkumar.singh@amd.com>
CC: robh+dt@kernel.org
CC: pawel.moll@arm.com
CC: mark.rutland@arm.com
CC: ijc+devicetree@hellion.org.uk
CC: galak@codeaurora.org
CC: dougthompson@xmission.com
CC: bp@alien8.de
CC: mchehab@osg.samsung.com
CC: devicetree@vger.kernel.org
CC: guohanjun@huawei.com
CC: andre.przywara@arm.com
CC: arnd@arndb.de
CC: sboyd@codeaurora.org
CC: linux-kernel@vger.kernel.org
CC: linux-edac@vger.kernel.org
Signed-off-by: Naga Sureshkumar Relli <nagasure@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoxcsi2rxss: Add support for Xilinx CSI-2 Receiver Subsystem
Vishal Sagar [Wed, 15 Jun 2016 10:10:26 +0000 (15:40 +0530)]
xcsi2rxss: Add support for Xilinx CSI-2 Receiver Subsystem

This patch adds V4L2 driver and controls for Xilinx CSI2 Receiver Subsystem.

Signed-off-by: Vishal Sagar <vsagar@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Reviewed-by: Radhey Shyam Pandey <radheys@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoxcsi2rxss: Add DT documentation for Xilinx MIPI CSI-2 Receiver Subsystem driver
Vishal Sagar [Wed, 15 Jun 2016 10:10:25 +0000 (15:40 +0530)]
xcsi2rxss: Add DT documentation for Xilinx MIPI CSI-2 Receiver Subsystem driver

This patch adds documentation for the Xilinx CSI-2 Receiver Subsystem driver

Signed-off-by: Vishal Sagar <vsagar@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agogpio: xilinx: Always use own xlate function
Iban Rodriguez [Mon, 13 Jun 2016 10:53:39 +0000 (12:53 +0200)]
gpio: xilinx: Always use own xlate function

General kernel function of_gpio_simple_xlate is not valid for
dual gpio devices as it always returns the gpio in the first
channel. Use own xlate function always and not only when gpio irq
is present.

Signed-off-by: Iban Rodriguez <irodriguez@cemitec.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoreset: reset-zynqmp: Adding support for Xilinx zynqmp reset controller.
Nava kishore Manne [Tue, 14 Jun 2016 06:49:46 +0000 (12:19 +0530)]
reset: reset-zynqmp: Adding support for Xilinx zynqmp reset controller.

Add a reset controller driver for Xilinx Zynq UltraScale+ MPSoC.
The zynqmp reset-controller has the ability to reset lines
connected to different blocks and peripheral in the Soc.

Signed-off-by: Nava kishore Manne <navam@xilinx.com>
Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agodocs: dts: Added documentation for Xilinx zynqmp Reset Controller bindings.
Nava kishore Manne [Tue, 14 Jun 2016 06:49:45 +0000 (12:19 +0530)]
docs: dts: Added documentation for Xilinx zynqmp Reset Controller bindings.

Signed-off-by: Nava kishore Manne <navam@xilinx.com>
Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agozynqmp:PM:Added ZYNQMP_PM_RESET_START and ZYNQMP_PM_RESET_END to the PM reset IDs.
Nava kishore Manne [Tue, 14 Jun 2016 06:49:44 +0000 (12:19 +0530)]
zynqmp:PM:Added ZYNQMP_PM_RESET_START and ZYNQMP_PM_RESET_END to the PM reset IDs.

This patch adds ZYNQMP_PM_RESET_START and ZYNQMP_PM_RESET_END to the
PM reset IDs to identify the starting and ending reset ID numbers.

Signed-off-by: Nava kishore Manne <navam@xilinx.com>
Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agostaging: apf: Adding try-wait support for APF DMA xilinx-v2016.2
Michael Gill [Wed, 8 Jun 2016 22:15:34 +0000 (15:15 -0700)]
staging: apf: Adding try-wait support for APF DMA

This patch adds a non-blocking poll of the scatter-gather APF DMA
done state.  This is used to implement 'try-wait', which is a new
feature introduced into user space runtimes for SDSoC.

Signed-off-by: Michael Gill <gill@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agostaging: apf: Enable malloc on MPSoC in APF DMA
Michael Gill [Wed, 8 Jun 2016 22:15:27 +0000 (15:15 -0700)]
staging: apf: Enable malloc on MPSoC in APF DMA

This patch enables use of 64-bit DMA IP, and removes the barrier
blocking the use of malloc-allocated memory in SDSoC programs on
MPSoC.

Signed-off-by: Michael Gill <gill@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agozynqmp: pm: Don't issue SMC calls before driver is initialized
Soren Brinkmann [Tue, 7 Jun 2016 20:17:43 +0000 (13:17 -0700)]
zynqmp: pm: Don't issue SMC calls before driver is initialized

Don't issue any SMC calls to the FW before the driver is properly
initialized and discovered a valid FW.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoRevert "Documentation: r5_remoteproc: update reg example"
Wendy Liang [Sun, 5 Jun 2016 07:45:45 +0000 (00:45 -0700)]
Revert "Documentation: r5_remoteproc: update reg example"

This reverts commit 278aa45c1b441b3162cc745039a0f8a917a1edcf.
As in arm64, the size cell is still "1".

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoremoteproc: remove memset from rp_find_vq
Wendy Liang [Mon, 6 Jun 2016 04:59:40 +0000 (21:59 -0700)]
remoteproc: remove memset from rp_find_vq

As the vring memory is already memset to 0 in rproc_alloc_vring()
through dma_alloc_coherent(). It is duplicated to memset vring
to 0 again.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agodrm: xilinx: crtc: Add crtc set config helper xilinx-v2016.1-trd
Preetesh Parekh [Fri, 3 Jun 2016 02:21:46 +0000 (19:21 -0700)]
drm: xilinx: crtc: Add crtc set config helper

The goal is to be able to synchronize resolution changes between the
drm device and emulated fbdev device if both devices are used by an
application e.g. in Qt we use both graphics and video layer whereas
the former is controlled by fbdev and the latter by drm. This patch
propagates resolution changes from the drm device to fbdev. Before
setting the new mode, a copy of the old mode is saved locally and
restored upon last close.

work in progres:
If hot-plug events happen while the application is running, the mode
pre-application start will be restored instead of the mode set by the
last hot-plug event. For example if we switch monitors from 1080p to
4k while the application is running, last close will restore the
fbconsole to 1080p on the 4k monitor.  The framebuffer for the fbdev
emulation is allocated when the driver is initialized, thus hotplug
between monitors with different resolutions
(ex, 2560x1440->1920x1080) wouldn’t work correctly as of now.

Signed-off-by: Preetesh Parekh <preetesh.parekh@xilinx.com>
Tested-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agostaging: apf: Fixed DMA-BUF used of buffers spanning partial pages
Michael Gill [Fri, 3 Jun 2016 01:21:20 +0000 (18:21 -0700)]
staging: apf: Fixed DMA-BUF used of buffers spanning partial pages

The DRM infrastructure when using the xilinx driver has a
potential to return a buffer mapped to a memory region spanning a
partial page, such as in the case of a 1920x1080 resolution
buffer.  When this happens, the scatterlist returned from the DRM
API describes a region rounded up to a whole page.  This patch
trims the returned scatterlist, thus making it usable by a DMA.

Signed-off-by: Michael Gill <gill@xilinx.com>
Signed-off-by: Christian Kohn <christian.kohn@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agostaging: apf: Fix length for non-aligned(4K) DMA-BUF SG
Michael Gill [Fri, 3 Jun 2016 01:21:19 +0000 (18:21 -0700)]
staging: apf: Fix length for non-aligned(4K) DMA-BUF SG

Iterate through DMA-BUF SG list and set length equal to
buffer size.

Signed-off-by: Michael Gill <gill@xilinx.com>
Signed-off-by: Christian Kohn <christian.kohn@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoirqchip: irq-xilinx-intc: Fix race condition in the irq flow handlers
Kedareswara rao Appana [Wed, 1 Jun 2016 12:42:17 +0000 (18:12 +0530)]
irqchip: irq-xilinx-intc: Fix race condition in the irq flow handlers

This commit bd0b9ac405e1 ("genirq: Remove irq argument from irq flow handlers")
Modified the number of arguments of the irq flow handlers.

With the current driver we are seeing a kernel crash
because of the above commit.

Crash log:
Unable to handle kernel NULL pointer dereference at virtual address 0000002c
pgd = c0004000
[0000002c] *pgd=00000000
Internal error: Oops - BUG: 17 [#1] PREEMPT SMP ARM
Modules linked in: axi_timer
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.4.0-xilinx #5
Hardware name: Xilinx Zynq Platform
task: c0923870 ti: c091e000 task.ti: c091e000
PC is at intc_handler+0x18/0x8c
LR is at 0x1
pc : [<c01e91cc>]    lr : [<00000001>]    psr: 60010193
sp : c091fee0  ip : 00000002  fp : 00000001
r10: 00000000  r9 : 00000008  r8 : 00000001
r7 : ef002600  r6 : c091a464  r5 : 00000010  r4 : 00000000
r3 : 00000000  r2 : 00000000  r1 : ef003c40  r0 : 00000000
Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment none
Control: 18c5387d  Table: 2f16c04a  DAC: 00000051
Process swapper/0 (pid: 0, stack limit = 0xc091e210)
Stack: (0xc091fee0 to 0xc0920000)
fee0: 00000000 00000000 c091a464 ef002600 00000001 c00576ec 00000000 c00579a8
ff00: f8f00100 c0920f7c c091ff30 c092ec00 f8f01100 c00093ac c0383918 60010013
ff20: ffffffff c091ff64 638ff226 c0013014 00000000 00000008 c091d000 ef7d7000
ff40: ef7d6618 00000001 7725eac9 00000008 638ff226 00000008 00000000 00000001
ff60: 00000008 c091ff80 c03838f4 c0383918 60010013 ffffffff 00000051 c03838e8
ff80: 3b993807 00000000 7725eac9 00000008 c091e000 ef7d6618 c091e000 c094d0e0
ffa0: c0919364 c091ffb8 c06aba30 00000000 00000000 c0050538 c0920400 c067ebdc
ffc0: ffffffff ffffffff 00000000 c067e66c 00000000 c06aba30 00000000 c0954b94
ffe0: c0920480 c06aba2c c0924984 0000406a 413fc090 0000807c 00000000 00000000
[<c01e91cc>] (intc_handler) from [<c00576ec>] (generic_handle_irq+0x18/0x28)
[<c00576ec>] (generic_handle_irq) from [<c00579a8>] (__handle_domain_irq+0x88/0xb0)
[<c00579a8>] (__handle_domain_irq) from [<c00093ac>] (gic_handle_irq+0x50/0x90)
[<c00093ac>] (gic_handle_irq) from [<c0013014>] (__irq_svc+0x54/0x90)
Exception stack(0xc091ff30 to 0xc091ff78)
ff20:                                     00000000 00000008 c091d000 ef7d7000
ff40: ef7d6618 00000001 7725eac9 00000008 638ff226 00000008 00000000 00000001
ff60: 00000008 c091ff80 c03838f4 c0383918 60010013 ffffffff
[<c0013014>] (__irq_svc) from [<c0383918>] (cpuidle_enter_state+0xe8/0x1bc)
[<c0383918>] (cpuidle_enter_state) from [<c0050538>] (cpu_startup_entry+0x19c/0x1ec)
[<c0050538>] (cpu_startup_entry) from [<c067ebdc>] (start_kernel+0x328/0x388)
Code: ebf9c52b e3500000 15904010 01a04000 (e595301c)
---[ end trace 1b82d42394b8ee22 ]---
Kernel panic - not syncing: Fatal exception in interrupt
CPU1: stopping
CPU: 1 PID: 0 Comm: swapper/1 Tainted: G      D         4.4.0-xilinx #5
Hardware name: Xilinx Zynq Platform
[<c00163b8>] (unwind_backtrace) from [<c0012620>] (show_stack+0x10/0x14)
[<c0012620>] (show_stack) from [<c01c824c>] (dump_stack+0x80/0xcc)
[<c01c824c>] (dump_stack) from [<c0014c2c>] (ipi_cpu_stop+0x3c/0x6c)
[<c0014c2c>] (ipi_cpu_stop) from [<c0015344>] (handle_IPI+0x64/0x84)
[<c0015344>] (handle_IPI) from [<c00093d0>] (gic_handle_irq+0x74/0x90)
[<c00093d0>] (gic_handle_irq) from [<c0013014>] (__irq_svc+0x54/0x90)
Exception stack(0xef06bf68 to 0xef06bfb0)
bf60:                   00000000 00000008 c091d000 ef7e3000 ef7e2618 00000001
bf80: 845530d3 00000008 668ca7c3 00000008 00000000 00000001 00000008 ef06bfb8
bfa0: c03838f4 c0383918 600d0013 ffffffff
[<c0013014>] (__irq_svc) from [<c0383918>] (cpuidle_enter_state+0xe8/0x1bc)
[<c0383918>] (cpuidle_enter_state) from [<c0050538>] (cpu_startup_entry+0x19c/0x1ec)
[<c0050538>] (cpu_startup_entry) from [<0000948c>] (0x948c)
---[ end Kernel panic - not syncing: Fatal exception in interrupt

This patch fixes this issue in the driver
--> By updating the number of arguments in the flow handler to one.
--> Use irq_desc_get_chip instead of irq_get_chip

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agostaging: apf: Fixed buffer over run related to page pinning
Michael Gill [Fri, 20 May 2016 19:40:21 +0000 (12:40 -0700)]
staging: apf: Fixed buffer over run related to page pinning

The data structure used for storing pinned user space page
structures was a constant size.  Now it is adjustable
to accommodate large transfers from malloc allocated buffers

Signed-off-by: Michael Gill <gill@xilinx.com>
Tested-by : Radhey Shyam Pandey <radheys@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agostaging: apf: Enable MPSoC SG-DMA and removed clock control
Michael Gill [Fri, 20 May 2016 19:40:05 +0000 (12:40 -0700)]
staging: apf: Enable MPSoC SG-DMA and removed clock control

This patch enables preliminary scatter-gather support for the
apf DMA driver.  This extends only to memory allocated by a call
to sds_alloc, and dma_buf shared buffers.  Zynq support is
unchanged.  Additionally, control over clocks has been removed
due to clocks being correctly configured during petalinux
boot. There is no impact of this on a user.

Signed-off-by: Michael Gill <gill@xilinx.com>
Tested-by : Radhey Shyam Pandey <radheys@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARM: zynq: Enable RealTek phy for zynq
Michal Simek [Wed, 1 Jun 2016 11:33:14 +0000 (13:33 +0200)]
ARM: zynq: Enable RealTek phy for zynq

RealTek phy is a common phy on some dc cards.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agospi: xilinx: Update devicetree bindings for spi-xilinx
Naga Sureshkumar Relli [Fri, 27 May 2016 10:10:53 +0000 (15:40 +0530)]
spi: xilinx: Update devicetree bindings for spi-xilinx

Update bindings for spi-xilinx.
as per spi-bus.txt rename num-ss-bits to num-cs.
and add fifo-size and bits-per-word properties.

Signed-off-by: Naga Sureshkumar Relli <nagasure@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agospi: xilinx: Add devicetree binding for spi-xilinx
Shubhrajyoti Datta [Wed, 9 Mar 2016 08:47:20 +0000 (14:17 +0530)]
spi: xilinx: Add devicetree binding for spi-xilinx

Add a binding document for the spi/spi-xilinx
Sync with mainline.

Signed-off-by: Shubhrajyoti Datta <shubhraj@xilinx.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agospi: xilinx: Add QUAD support
Naga Sureshkumar Relli [Fri, 27 May 2016 10:10:52 +0000 (15:40 +0530)]
spi: xilinx: Add QUAD support

This patch adds QUAD mode support to axi spi controller.
updated supported mode bits to SPI_TX_QUAD and SPI_RX_QUAD.

Signed-off-by: Naga Sureshkumar Relli <nagasure@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agospi: xilinx: Remove bitbang and register with spi core
Naga Sureshkumar Relli [Fri, 27 May 2016 10:10:51 +0000 (15:40 +0530)]
spi: xilinx: Remove bitbang and register with spi core

This patch removes the bitbang layer registration.
it directly register with spi core using spi_register_master and uses
the call backs provided by spi_master struct.

Signed-off-by: Naga Sureshkumar Relli <nagasure@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARM64: zynqmp: Fix phy entry possition in defconfig
Michal Simek [Mon, 30 May 2016 11:39:27 +0000 (13:39 +0200)]
ARM64: zynqmp: Fix phy entry possition in defconfig

Fix phy entry defconfig position.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>