]> rtime.felk.cvut.cz Git - zynq/linux.git/log
zynq/linux.git
5 years agozynqmp: firmware: provides support to access efuse
Durga Challa [Thu, 11 Oct 2018 10:52:52 +0000 (16:22 +0530)]
zynqmp: firmware: provides support to access efuse

This patch adds support for accessing efuse memory
from Linux.

Signed-off-by: Durga Challa <vnsl.durga.challa@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agomedia: xilinx: csi2rxss: store format size
Sam Bobrowicz [Thu, 27 Sep 2018 06:28:08 +0000 (23:28 -0700)]
media: xilinx: csi2rxss: store format size

Currently set_format does not store the dimensions when setting a
non-RAW format. Although they are irrelevant to the operation of the
CSI RX IP, this can cause link_validate to fail and also unexpected
results when calling get_format. Fix this by storing the format size.

Signed-off-by: Sam Bobrowicz <sam@elite-embedded.com>
Reviewed-by: Vishal Sagar <vishal.sagar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agogpio: gpio-xilinx: Fix unbalanced clock reference count
Appana Durga Kedareswara rao [Fri, 12 Oct 2018 04:21:07 +0000 (09:51 +0530)]
gpio: gpio-xilinx: Fix unbalanced clock reference count

while unloading the module, in case of graceful exit
driver is not handling the clocks properly.

This patch fixes this issue.

Signed-off-by: Appana Durga Kedareswara rao <appana.durga.rao@xilinx.com>
Reviewed-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agocrypto: zynqmp-aes: Fix for segfault seen with large sets of data
Kalyani Akula [Wed, 10 Oct 2018 09:20:39 +0000 (14:50 +0530)]
crypto: zynqmp-aes: Fix for segfault seen with large sets of data

This patch resolves the issue seen when encrypt/decrypt of large sets of
data.

Issue is seen due to improper handing of blkcipher_walk. When large
amount of data is sent for encrypt/decrypt, af_alg framework copies it
to the TSGL (TX SGL) kernel. When driver does a walk on the scatterlist,
walk returns nbytes to be processed. nbytes can be complete data sent
from user space or few bytes. So, when data is received in multiple
walks, we are accumulating the data and sending complete data at once.

Signed-off-by: Kalyani Akula <kalyani.akula@xilinx.com>
Reviewed-by: Appana Durga Kedareswara rao <appana.durga.rao@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: zynqmp: Added device tree node for zynqmp-aes driver
Kalyani Akula [Wed, 10 Oct 2018 09:20:38 +0000 (14:50 +0530)]
arm64: zynqmp: Added device tree node for zynqmp-aes driver

This patch adds device node for zynqmp-aes driver

Signed-off-by: Kalyani Akula <kalyani.akula@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agomedia: ov5640: Add additional media bus formats
Sam Bobrowicz [Thu, 11 Oct 2018 16:23:30 +0000 (09:23 -0700)]
media: ov5640: Add additional media bus formats

Add support for 1X16 yuv media bus formats (v4l2_mbus_framefmt).
These formats are equivalent to the 2X8 formats that are already
supported, both of which accurately describe the data present on
the CSI2 interface. This change will increase compatibility with
CSI2 RX drivers that only advertise support for the 1X16 formats.

Signed-off-by: Sam Bobrowicz <sam@elite-embedded.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agomedia: ov5640: add support for 60Hz
Sam Bobrowicz [Thu, 11 Oct 2018 16:23:29 +0000 (09:23 -0700)]
media: ov5640: add support for 60Hz

Add support for 60Hz modes. Modified try_frame_interval
so that future frame rates can be added easier.

Signed-off-by: Sam Bobrowicz <sam@elite-embedded.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agomedia: ov5640: Don't access ctrl regs when off
Sam Bobrowicz [Thu, 11 Oct 2018 16:23:28 +0000 (09:23 -0700)]
media: ov5640: Don't access ctrl regs when off

Add a check to g_volatile_ctrl to prevent trying to read
registers when the sensor is not powered.

Signed-off-by: Sam Bobrowicz <sam@elite-embedded.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agomedia: ov5640: fix get_light_freq on auto
Sam Bobrowicz [Thu, 11 Oct 2018 16:23:27 +0000 (09:23 -0700)]
media: ov5640: fix get_light_freq on auto

Light frequency was not properly returned when in auto
mode and the detected frequency was 60Hz. Fix this.

Signed-off-by: Sam Bobrowicz <sam@elite-embedded.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agomedia: ov5640: fix resolution update
Sam Bobrowicz [Thu, 11 Oct 2018 16:23:26 +0000 (09:23 -0700)]
media: ov5640: fix resolution update

set_fmt was not properly triggering a mode change when
a new mode was set that happened to have the same format
as the previous mode (for example, when only changing the
frame dimensions). Fix this.

Signed-off-by: Sam Bobrowicz <sam@elite-embedded.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agomedia: ov5640: set DPHY timing registers
Sam Bobrowicz [Thu, 11 Oct 2018 16:23:25 +0000 (09:23 -0700)]
media: ov5640: set DPHY timing registers

Register 0x4837 is used to calculate the DPHY timing
parameters such as HS_SETTLE. It needs to be set to the
current pclk period. It is possible for some CSI receivers
to tune this on the RX side, but some do not.

Currently this value is not set, so fix this by setting it
whenever setting the rest of the PLL settings.

Also, a change to the init register blob that helps ensure
the following DPHY spec requirement is met:

MIN HS_ZERO + MIN HS_PREPARE > 145 + t_UI * 10

Signed-off-by: Sam Bobrowicz <sam@elite-embedded.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agomedia: ov5640: calculate PLL settings for modes
Sam Bobrowicz [Thu, 11 Oct 2018 16:23:24 +0000 (09:23 -0700)]
media: ov5640: calculate PLL settings for modes

Remove the PLL settings from the register blobs and
calculate them based on required clocks. This allows
more mode and input clock (xclk) configurations.

Signed-off-by: Sam Bobrowicz <sam@elite-embedded.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoxilinx: v4l: m2m: Set default mode for framebuffer IP
Devarsh Thakkar [Tue, 9 Oct 2018 23:30:23 +0000 (16:30 -0700)]
xilinx: v4l: m2m: Set default mode for framebuffer IP

- Set the framebuffer IP to default mode instead of auto-restart
  mode for mem2mem usecases due to reason explained below:

- By framebuffer IP is programmed by driver to use a special mode
  called auto_restart mode or free-running mode in which core processes
  data periodically irrespective of input rate.

- So in this scenario, if input is stalled for sometime,
  then framebuffer IP will still process with previous data
  and transmit/receive the DMA descriptors.

- This behaviour of auto_restart or free-running mode is fine for
  streaming usecases where display device needs to be provided
  with data at a consistent rate but is not acceptable for mem2mem usecases
  where output needs to have exact 1-to-1 relationship with input
  without any duplication of frames.

- Furthermore this gives a performance benefit for mem2mem usecases
  as the default mode doesn't require to stage a descriptor and
  instead the active descriptor can be marked as complete after
  interrupt is received to process next descriptor.

Signed-off-by: Devarsh Thakkar <devarsh.thakkar@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agodma: xilinx: Add API to set framebuffer IP mode
Devarsh Thakkar [Tue, 9 Oct 2018 23:30:22 +0000 (16:30 -0700)]
dma: xilinx: Add API to set framebuffer IP mode

This adds API so that client driver can set operation mode
for framebuffer IP core to either auto_restart or default mode
of operation :

- Auto_restart or free-running mode is more suitable for streaming
  usecases which have a strict requirement to maintain uniform
  throughput to display devices. In this mode framebuffer IP
  core is restarted automatically after completing first transaction
  even if input is delayed or blocked, where core will use same descriptor
  again thereby maintaining consistent throughput by duplicating frames.

- Default mode of operation is suitable for non-streaming usecases
  like mem2mem usecases where there has to be a 1-to-1 relationship
  for frame sequence and frame numbers with respect to input and
  so if input is delayed core should wait until it gets new descriptor.

- Unless explicitly set by client driver framebuffer IP core should
  use auto_restart mode as previously, so set mode as auto_restart during
  channel probe.

- Add enum in framebuffer channel structure to select operation mode.

- Use operation mode enum to decide mode during framebuffer start and halt.

- Add a function "frmbuf_find_chan" to find corresponding framebuffer
  channel structure from dma channel structure.

- Export an API "xilinx_xdma_set_mode" to set operation mode of framebuffer
  IP core to either auto-restart or default.

- Unlike Auto-restart mode which follows a 3-stage model
  where it marks the descriptor as staging on submit,
  as active when next interrupt is received, and eventually
  as complete after next interrupt is received, there is no
  such requirement in default mode, so for default mode
  we directly mark the current descriptor submitted to IP
  as active and then mark it as complete when next
  interrupt is received.

- Fix some typos in xilinx_xdma_drm_config and xilinx_xdma_v4l2_config
  description.

Signed-off-by: Devarsh Thakkar <devarsh.thakkar@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agodma: xilinx: Mark previous active decriptor as complete in irq handler
Devarsh Thakkar [Tue, 9 Oct 2018 23:30:21 +0000 (16:30 -0700)]
dma: xilinx: Mark previous active decriptor as complete in irq handler

Moving the block to mark previous active descriptor as complete
to irq handler as it's more appropriate to do it in interrupt
context which confirms that previous transaction was completed.

There is no semantic change in the flow,
previously descriptor was marked as completed in
xilinx_frmbuf_start_transfer() assuming it's is called by
the done interrupt handler which didn't seem required,
so we now mark it as completed in the interrupt handler itelf.

Signed-off-by: Devarsh Thakkar <devarsh.thakkar@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agodrm: xlnx: Select VIDEOMODE_HELPERS when DRM_XLNX_PL_DISP is selected
Vishal Sagar [Thu, 11 Oct 2018 06:04:31 +0000 (11:34 +0530)]
drm: xlnx: Select VIDEOMODE_HELPERS when DRM_XLNX_PL_DISP is selected

Select the VIDEOMODE_HELPERS when DRM_XLNX_PL_DISP is selected in
menuconfig. This fixes the compilation error of undefined reference to
drm_display_mode_to_videomode in the Xilinx PL Display driver.

This is also added to DRM_XLNX_MIXER as the same API is being used
there.

Signed-off-by: Vishal Sagar <vishal.sagar@xilinx.com>
Reviewed-by: Saurabh Sengar <saurabh.singh@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoxilinx: v4l: dma: Invoke s_power function of subdevice
Sam Bobrowicz [Thu, 11 Oct 2018 00:21:55 +0000 (17:21 -0700)]
xilinx: v4l: dma: Invoke s_power function of subdevice

This patch enables driver to invoke s_power, which is part of subdev
core APIs. This can put subdevice in power saving mode or normal
operation mode.

Signed-off-by: Sam Bobrowicz <sam@elite-embedded.com>
Signed-off-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Sai Hari Chandana Kalluri <chandana.kalluri@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoxilinx: v4l: vipp: Avoid decrementing refcount of a node twice
Satish Kumar Nagireddy [Wed, 10 Oct 2018 18:43:17 +0000 (11:43 -0700)]
xilinx: v4l: vipp: Avoid decrementing refcount of a node twice

In the current implementation, driver is calling of_graph_get_next_endpoint()
and of_node_put() functions to get next endpoint and decrement refcount of a
node. As the former function is already decrementing refcount, there is no need
of calling the later function which decrements the refcount again.

This patch avoids calling of_node_put() function in driver, as the same has been
taken care in of_graph_get_next_endpoint() implementation.

Signed-off-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: zynqmp: Add reset-on-timeout for all boards and modify default timeout value
Mounika Grace Akula [Tue, 9 Oct 2018 15:22:50 +0000 (20:52 +0530)]
arm64: zynqmp: Add reset-on-timeout for all boards and modify default timeout value

This patch adds reset-on-timeout to FPD WDT which will trigger an
interrupt to PMU when watchdog expiry happens and PMU takes the
necessary action. If this property is not enabled, reason will not be
known when watchdog expiry happens.
This patch also modifies the default timeout to 60 seconds. Reason is
that if u-boot enables WDT, it will set the timeout to 10 seconds and
this is not enough to boot till Linux and start the WDT application in
Linux. 60 seconds is the maximum safest value to boot till Linux and
start the WDT application.

Users need to change this timeout value to fit their needs.

Signed-off-by: Mounika Grace Akula <mounika.grace.akula@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agostaging: xroeframer: radio_ctrl_base address change
Vasileios Bimpikas [Tue, 9 Oct 2018 13:25:08 +0000 (14:25 +0100)]
staging: xroeframer: radio_ctrl_base address change

To reflect a recent change in the hardware design, RADIO_CTRL_BASE has
been changed from 0xA0030000 to 0xA0060000 in xroe_framer.h.
This is to be skipped altogether along with any remaining hard-coded
values when the secondary devices are properly implemented
in the device tree.

Signed-off-by: Vasileios Bimpikas <vasileios.bimpikas@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agostaging: apf: Correct kernel-doc structure for xlnk.c
Michael Gill [Tue, 9 Oct 2018 19:42:04 +0000 (12:42 -0700)]
staging: apf: Correct kernel-doc structure for xlnk.c

This patch eliminates warnings associated with kernel-doc
formatting in the apf driver.  It does this by removing the
partial comment was being detected as being an attempt at a
kernel-doc comment.  This patch is only meant to resolve
warnings.  Follow up patches will be to comment the driver.

Signed-off-by: Michael Gill <michael.gill@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Add reserve area between channel 4 and 5
Suresh Gupta [Fri, 5 Oct 2018 14:18:08 +0000 (19:48 +0530)]
v4l: xilinx-multi-scaler: Add reserve area between channel 4 and 5

There is reserve area between XM2MSC_DSTIMGBUF0 and XM2MSC_DSTIMGBUF1
of channel 4 due to which the offset for XM2MSC_DSTIMGBUF1 channel 4
is 0x01000 instead of 0x0A00.

Also, this shift the base offset of channels 5 and onward.
So, the effective base offsets for channels are:
Channel 0: 0x100,
Channel 1: 0x300,
Channel 2: 0x500,
Channel 3: 0x700,
Channel 4: 0x900,
Channel 5: 0x1100, <-- Should be 0xb00
Channel 6: 0x1300,
Channel 7: 0x1500;

This patch fixes this problem by increment the offset of channel 5, 6,
and 7 by reserved value. And increments the XM2MSC_DSTIMGBUF1
of channel 4 by reserved value.

This is temporary fix and can be taken care in next version of IP.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Vishal Sagar <vishal.sagar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Fix pointers in set chk chan_stream
Suresh Gupta [Fri, 5 Oct 2018 14:13:07 +0000 (19:43 +0530)]
v4l: xilinx-multi-scaler: Fix pointers in set chk chan_stream

Driver is setting cap pointer for output, which is incorrect
This patch corrects the functionality by taking proper
pointer.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Check any channel is still running in streamoff
Suresh Gupta [Fri, 5 Oct 2018 14:13:06 +0000 (19:43 +0530)]
v4l: xilinx-multi-scaler: Check any channel is still running in streamoff

If an application queued buffer while the device is busy in processing
of previous buffer, the application will not call device_run () again.
And at this point if some application running higher channel stops stream,
the device_run () return as there is no buffere for stopping channel.
In this situation the first channel does not get chance to call
device_run() again and will wait for infinite time.

This patch checks if there is/are any continues channels are still running
and if running, start the process again.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Add number of frames processed per channel
Suresh Gupta [Fri, 5 Oct 2018 14:13:05 +0000 (19:43 +0530)]
v4l: xilinx-multi-scaler: Add number of frames processed per channel

Patch helps in debugging to indicate the number of frames
processed by the channel.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Wait for all running channels to get buffer
Suresh Gupta [Fri, 5 Oct 2018 14:13:04 +0000 (19:43 +0530)]
v4l: xilinx-multi-scaler: Wait for all running channels to get buffer

So, this patch waits until all continuous running channels have buffer.
Driver do not support processing if any in between intermediate
channel stops streaming.

Limitation: If any intermediate channel stops the streaming,
the streaming continues for only channels which fall under a
low number of stop channel. In this case if channel 0,1,2,3,4
are running and channel 3 stops, then the streaming for channels
0,1,2 will continue and driver stop processing 4th channel without
any error indications. So, application running channel 4 may wait
indefinitely if it does not implement timeout.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Do not allow new task when device is busy
Suresh Gupta [Fri, 5 Oct 2018 14:13:03 +0000 (19:43 +0530)]
v4l: xilinx-multi-scaler: Do not allow new task when device is busy

Driver supports multiple channel so device_run( ) can be
called for multiple time.
This patch would not allow reprograming and running
of device again when driver is waiting for IP to
complete processing.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Allow stream on for the immediate next channel
Suresh Gupta [Fri, 5 Oct 2018 14:13:02 +0000 (19:43 +0530)]
v4l: xilinx-multi-scaler: Allow stream on for the immediate next channel

This patch enables the use case to add one more stream when driver already
processing streams of some channels.
Start of new channel requires reset and reprogram of HW IP.

Here the condition is that only next immediate channel
will able to start and stop the stream.

Example: Channels 0,1,2,3 are streaming, then the user can stream on
immediate next channel 4.

Limitation: if user adds stream for channel 6 when channels 0,1,2,3
are running, then driver does not start 6th channel and do not return
any error. And if any intermediate channel stops the streaming,
the streaming continues for only channels which fall under a low number
of stop channel. In this case if channel 0,1,2,3,4 are running and
channel 3 stops, then the streaming for channels 0,1,2 will continue
and driver stop processing 4th channel without any error indications.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Restructuring of functions
Suresh Gupta [Fri, 5 Oct 2018 14:13:01 +0000 (19:43 +0530)]
v4l: xilinx-multi-scaler: Restructuring of functions

This patch is just the preparation for following
changes so that changes can be easily visible.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Allow device run for single channel
Suresh Gupta [Fri, 5 Oct 2018 14:13:00 +0000 (19:43 +0530)]
v4l: xilinx-multi-scaler: Allow device run for single channel

Start the processing of channels whose stream_on called.
This removes the dependency that scaling starts
only after all channel calls the stream_on.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Fix stop streaming
Suresh Gupta [Fri, 5 Oct 2018 14:12:59 +0000 (19:42 +0530)]
v4l: xilinx-multi-scaler: Fix stop streaming

Driver is setting bit on stop streaming which is incorrect
This patch corrects the functionality by clearing the bit
on stop streaming.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Allow abort for individual channels
Suresh Gupta [Fri, 5 Oct 2018 14:12:58 +0000 (19:42 +0530)]
v4l: xilinx-multi-scaler: Allow abort for individual channels

Driver do not support individual stremoff/abort of any channel and
consider abort will come together for all channels.

This patch allows individual channel abort,
by freeing all pending buffers. This will help to
remove/abort the last running channel while all
other channels continue running stream.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: ENUM_FMT map index with enabled format
Suresh Gupta [Fri, 5 Oct 2018 14:12:57 +0000 (19:42 +0530)]
v4l: xilinx-multi-scaler: ENUM_FMT map index with enabled format

Returns formats which are enabled in DT.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Fix buffer type in enum_fmt_vid_out
Suresh Gupta [Fri, 5 Oct 2018 14:12:56 +0000 (19:42 +0530)]
v4l: xilinx-multi-scaler: Fix buffer type in enum_fmt_vid_out

Driver is checking with wrong buffer type in enum_fmt_vid_out()
implementation.
This patch corrects the buffer type to be checked against.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Corrects the format struct in TRY_FMT
Suresh Gupta [Fri, 5 Oct 2018 14:12:55 +0000 (19:42 +0530)]
v4l: xilinx-multi-scaler: Corrects the format struct in TRY_FMT

V4L2 specification suggests the driver corrects the
format struct if any of the dimensions is unsupported.

The patch limits the minimum height and width to 64 and
maximum height and width to the value set in DT.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Return the proper parameters in S_FMT
Suresh Gupta [Fri, 5 Oct 2018 14:12:54 +0000 (19:42 +0530)]
v4l: xilinx-multi-scaler: Return the proper parameters in S_FMT

The VIDIOC_S_FMT ioctl returns the current format parameters as
VIDIOC_G_FMT does.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Remove unused variables min_col and min_row
Suresh Gupta [Fri, 5 Oct 2018 14:12:53 +0000 (19:42 +0530)]
v4l: xilinx-multi-scaler: Remove unused variables min_col and min_row

MIN_WIDTH and MIN_HEIGHT is hardcoded to 64 in IP,
so removing min_col and min_row variables with macros.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Add support for VIDIOC_CREATE_BUFS for Dmabuf io_mode
Suresh Gupta [Fri, 5 Oct 2018 14:12:52 +0000 (19:42 +0530)]
v4l: xilinx-multi-scaler: Add support for VIDIOC_CREATE_BUFS for Dmabuf io_mode

Gstremer V4L2transform Plugin calls VIDIOC_CREATE_BUFS ioctl
for Dmabuf io_mode followed by VIDIOC_EXPBUF which is used
to export previously created buffer as a DMABUF file.

But VIDIOC_EXPBUF is available only for V4L2_MEMORY_MMAP buffers.
So, enabling VB2_MMAP flags while creating the m2m_buffer queues.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Remove unsupported formats
Suresh Gupta [Fri, 5 Oct 2018 14:12:51 +0000 (19:42 +0530)]
v4l: xilinx-multi-scaler: Remove unsupported formats

The Multi-Scaler IP do not support Alpha formats and
planes which are non-contiguous in memory, so removing
those formats.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoxilinx: v4l: dma: In case of error xvip_pipeline_start_stop should return gracefully
Saurabh Sengar [Mon, 8 Oct 2018 04:42:47 +0000 (10:12 +0530)]
xilinx: v4l: dma: In case of error xvip_pipeline_start_stop should return gracefully

In case of any error inside the xvip_pipeline_start_stop function, it
should release the lock taken and do media graph cleanup.

Signed-off-by: Saurabh Sengar <saurabh.singh@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agodrm: xlnx: zynqmp_disp: Fixing potential segmentation fault
Saurabh Sengar [Sat, 6 Oct 2018 04:37:54 +0000 (10:07 +0530)]
drm: xlnx: zynqmp_disp: Fixing potential segmentation fault

If info is NULL, its member shouldn't be accessed.

Signed-off-by: Saurabh Sengar <saurabh.singh@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l2-core: Update entries for BGRX32 format
Suresh Gupta [Fri, 5 Oct 2018 14:20:42 +0000 (19:50 +0530)]
v4l2-core: Update entries for BGRX32 format

This patch adds missing entry BGRX32 format

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agocan: xilinx: Fix the documentation
Shubhrajyoti Datta [Sat, 6 Oct 2018 12:06:54 +0000 (17:36 +0530)]
can: xilinx: Fix the documentation

Fix a typo in the can description of the can 1.0 controllers

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: zynqmp: Remove the SERIAL_UARTLITE_NR_UARTS macro
Shubhrajyoti Datta [Thu, 4 Oct 2018 14:37:43 +0000 (20:07 +0530)]
arm64: zynqmp: Remove the SERIAL_UARTLITE_NR_UARTS macro

Remove the SERIAL_UARTLITE_NR_UARTS macro as it is unused.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoserial-uartlite: Remove SERIAL_UARTLITE_NR_UARTS
Shubhrajyoti Datta [Thu, 4 Oct 2018 14:37:42 +0000 (20:07 +0530)]
serial-uartlite: Remove SERIAL_UARTLITE_NR_UARTS

Remove SERIAL_UARTLITE_NR_UARTS from Kconfig as it is unused.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoserial-uartlite: Remove ULITE_NR_PORTS macro
Shubhrajyoti Datta [Thu, 4 Oct 2018 14:37:39 +0000 (20:07 +0530)]
serial-uartlite: Remove ULITE_NR_PORTS macro

This patch is removing ULITE_NR_PORTS macro which limits number of
ports which can be used. Every instance is registering own struct
uart_driver with minor number which corresponds to alias ID (or 0 now).
and with 1 uart port. The same alias ID is saved to
tty_driver->name_base which is key field for creating ttyULX name.

Because name_base and minor number are setup already there is no need to
setup any port->line number because 0 is the right value.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoserial-uartlite: Use allocated structure instead of static ones
Shubhrajyoti Datta [Thu, 4 Oct 2018 14:37:40 +0000 (20:07 +0530)]
serial-uartlite: Use allocated structure instead of static ones

Remove the use of the static uartlite structure.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoserial-uartlite: Change logic how console_port is setup
Shubhrajyoti Datta [Thu, 4 Oct 2018 14:37:38 +0000 (20:07 +0530)]
serial-uartlite: Change logic how console_port is setup

Change logic how console_port is setup by using CON_ENABLED flag
instead of index. There will be unique uart_console
structure that's why code can't use id for console_port
assignment.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoserial-uartlite: Fix the unbind path
Shubhrajyoti Datta [Thu, 4 Oct 2018 14:37:37 +0000 (20:07 +0530)]
serial-uartlite: Fix the unbind path

Currently the clocks are not enabled at probe but when the port is used.
Remove the unconditional disable at remove.

Fixes the below
[   77.660196] ------------[ cut here ]------------
[   77.664749] WARNING: CPU: 0 PID: 1992 at drivers/clk/clk.c:622
clk_core_disable+0x78/0x80
[   77.672892] Modules linked in:
[   77.675930] CPU: 0 PID: 1992 Comm: sh Not tainted 4.14.0 #23
[   77.681570] Hardware name: xlnx,zynqmp (DT)
[   77.685736] task: ffffffc879e2e580 task.stack: ffffff800be30000
[   77.691641] PC is at clk_core_disable+0x78/0x80

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoserial-uartlite: define console when CONFIG_SERIAL_UARTLITE_CONSOLE is defined
Shubhrajyoti Datta [Thu, 4 Oct 2018 14:37:36 +0000 (20:07 +0530)]
serial-uartlite: define console when CONFIG_SERIAL_UARTLITE_CONSOLE is defined

Define console when CONFIG_SERIAL_UARTLITE_CONSOLE is defined.

The patch removes this warning:
drivers/tty/serial/uartlite.c:64:26: warning: ‘console_port’ defined but
not used [-Wunused-variable]
 static struct uart_port *console_port;
                          ^~~~~~~~~~~~

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoserial-uartlite: Add runtime support
Michal Simek [Fri, 5 Oct 2018 08:48:22 +0000 (10:48 +0200)]
serial-uartlite: Add runtime support

Add runtime support

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoserial-uartlite: Do not use static struct uart_driver out of probe()
Shubhrajyoti Datta [Thu, 4 Oct 2018 14:37:34 +0000 (20:07 +0530)]
serial-uartlite: Do not use static struct uart_driver out of probe()

ulite_uart_suspend()/resume() and remove() are using static reference
to struct uart_driver. Assign this referece to private data structure
as preparation step for dynamic struct uart_driver allocation.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoserial-uartlite: Add get serial id if not provided
Shubhrajyoti Datta [Thu, 4 Oct 2018 14:37:33 +0000 (20:07 +0530)]
serial-uartlite: Add get serial id if not provided

Add get serial id if not provided

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoserial: uartps: Fix error path when alloc failed
Michal Simek [Fri, 5 Oct 2018 09:20:14 +0000 (11:20 +0200)]
serial: uartps: Fix error path when alloc failed

When cdns_uart_console allocation failed there is a need to also clear
ID from ID list.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx: vpss-scaler: Correct default values when max width, height dt property...
Vishal Sagar [Fri, 5 Oct 2018 03:46:28 +0000 (09:16 +0530)]
v4l: xilinx: vpss-scaler: Correct default values when max width, height dt property absent

Revert to 3840x2160 as default value of max width and height to
maintain compatibility instead of 8192x4320.

Signed-off-by: Vishal Sagar <vishal.sagar@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-gamma: Correct default values when max width, height dt property absent
Vishal Sagar [Fri, 5 Oct 2018 03:46:27 +0000 (09:16 +0530)]
v4l: xilinx-gamma: Correct default values when max width, height dt property absent

Revert to 3840x2160 as default value of max width and height to
maintain compatibility instead of 8192x4320.

Signed-off-by: Vishal Sagar <vishal.sagar@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-demosaic: Correct default values when width, height dt property absent
Vishal Sagar [Fri, 5 Oct 2018 03:46:26 +0000 (09:16 +0530)]
v4l: xilinx-demosaic: Correct default values when width, height dt property absent

Revert to 3840x2160 as default value of max width and height to maintain
compatibility instead of 8192x4320.

Signed-off-by: Vishal Sagar <vishal.sagar@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoxilinx: v4l: dma: Remove unused function definition
Satish Kumar Nagireddy [Thu, 4 Oct 2018 18:23:43 +0000 (11:23 -0700)]
xilinx: v4l: dma: Remove unused function definition

This patch removes unused function definition xvip_get_entity_sink().

Signed-off-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agousb: xilinx: Add suspend resume support
Shubhrajyoti Datta [Mon, 1 Oct 2018 12:45:57 +0000 (18:15 +0530)]
usb: xilinx: Add suspend resume support

Add suspend resume support.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Reviewed-by: Anurag Kumar Vulisha <anurag.kumar.vulisha@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agostaging: xroeframer: IRQ allocation change in probe()
Vasileios Bimpikas [Wed, 3 Oct 2018 14:00:25 +0000 (15:00 +0100)]
staging: xroeframer: IRQ allocation change in probe()

As the IRQ is not yet fully implemented in the hardware, the probe will
return 0 instead of propagating the error returned by attempting to
allocate the IRQ. A TODO to fix that once it's finalised in the hardware
design has been added along with the change.

Signed-off-by: Vasileios Bimpikas <vasileios.bimpikas@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agostaging: xroeframer: IPv4 sysfs address entries change
Vasileios Bimpikas [Wed, 3 Oct 2018 13:46:26 +0000 (14:46 +0100)]
staging: xroeframer: IPv4 sysfs address entries change

Changing the variable that stores the IPv4 destination and source
addresses in IPv4 "show" sysfs entries (sysfs_xroe_framer_ipv4.c) from
variable to fixed length (as it will always be exactly 4 numbers,
barring errors which are already handled and returned to the user).

Signed-off-by: Vasileios Bimpikas <vasileios.bimpikas@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoASoC: xlnx: enable axi clock in audio formatter
Maruthi Srinivas Bayyavarapu [Wed, 3 Oct 2018 12:48:45 +0000 (18:18 +0530)]
ASoC: xlnx: enable axi clock in audio formatter

A phandle to axi clock is obtained and clock is enabled/disabled
appropriately.

Signed-off-by: Maruthi Srinivas Bayyavarapu <maruthi.srinivas.bayyavarapu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoASoC: xlnx: support multiple sampling rates for I2S
Maruthi Srinivas Bayyavarapu [Wed, 3 Oct 2018 12:48:44 +0000 (18:18 +0530)]
ASoC: xlnx: support multiple sampling rates for I2S

This adds support for I2S playback and capture at various
sampling rates. Various rates can result in different period bytes,
but should be divisible by 64(considering 2 channels).
Added that constraint.

Signed-off-by: Maruthi Srinivas Bayyavarapu <maruthi.srinivas.bayyavarapu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agodt-bindings: ASoC: xlnx,audio-formatter.txt: add clocks
Maruthi Srinivas Bayyavarapu [Wed, 3 Oct 2018 12:48:43 +0000 (18:18 +0530)]
dt-bindings: ASoC: xlnx,audio-formatter.txt: add clocks

Added clocks. s_axi_lite_aclk will be used and enabled/disabled in
audio formatter driver. aud_mclk will be used in PL sound card driver
to dynamically change the mclk connected to various audio interfaces.
This change adds audio use case at different sampling rates.

Signed-off-by: Maruthi Srinivas Bayyavarapu <maruthi.srinivas.bayyavarapu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agocrypto: zynqmp-rsa: Fix alignment in the driver
Michal Simek [Thu, 4 Oct 2018 13:24:45 +0000 (15:24 +0200)]
crypto: zynqmp-rsa: Fix alignment in the driver

Fix coding style issues.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agocrypto: zynqmp-rsa: Fix for crash seen when the data less than 512 bytes
Kalyani Akula [Thu, 4 Oct 2018 06:07:45 +0000 (11:37 +0530)]
crypto: zynqmp-rsa: Fix for crash seen when the data less than 512 bytes

This patch fixed the crash seen when data sent is less
than 512 bytes by adjusting the cra_blocksize for RSA driver.

ZYNQMP_BLOCK_SIZE is chosen as 64 because the minimum key size
supported by RSA crypto engine is 512 bit (64 bytes).

Signed-off-by: Kalyani Akula <kalyani.akula@xilinx.com>
Reviewed-by: Appana Durga Kedareswara rao <appana.durga.rao@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agodrm: xlnx: mixer: Fix switching to 4K after 1080p
Vishal Sagar [Mon, 1 Oct 2018 18:39:57 +0000 (00:09 +0530)]
drm: xlnx: mixer: Fix switching to 4K after 1080p

This patch fixes the issue of switching to higher resolution like 4K
once the primary layer has been set to a lower resolution like 1080p.
This is done by disabling the need to check frame parameters like width,
height if the plane to be set is the primary plane.

Signed-off-by: Vishal Sagar <vishal.sagar@xilinx.com>
Reviewed-by: Saurabh Sengar <saurabhs@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agostaging: xroeframer: framer's register map update
Vasileios Bimpikas [Tue, 2 Oct 2018 12:55:40 +0000 (13:55 +0100)]
staging: xroeframer: framer's register map update

Updating the register map of the framer (roe_framer_ctrl.h) to match the latest
changes in the hardware

Signed-off-by: Vasileios Bimpikas <vasileios.bimpikas@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agostaging: xroeframer: adding correct offset to framer_enable sysfs store entry
Vasileios Bimpikas [Tue, 2 Oct 2018 13:14:16 +0000 (14:14 +0100)]
staging: xroeframer: adding correct offset to framer_enable sysfs store entry

Fixed using CFG_MASTER_INT_ENABLE_ADDR instead of CFG_MASTER_INT_ENABLE_OFFSET
STATS_BASE from the passed offset in enable_show() in sysfs_xroe.c.

Signed-off-by: Vasileios Bimpikas <vasileios.bimpikas@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agostaging: xroeframer: fixing stats device size in ioctl address range check
Vasileios Bimpikas [Tue, 2 Oct 2018 13:03:56 +0000 (14:03 +0100)]
staging: xroeframer: fixing stats device size in ioctl address range check

Fixing using RADIO_CTRL_SIZE instead of STATS_SIZE, as well as not subtracting
STATS_BASE from the passed offset in stats_ioctl() in xroe_framer.c.
As it is now, it can (and will) result in R/W request in unmapped memory.

Signed-off-by: Vasileios Bimpikas <vasileios.bimpikas@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agosoc: xilinx: vcu: Update vcu init/reset sequence
Dhaval Shah [Mon, 1 Oct 2018 16:27:49 +0000 (09:27 -0700)]
soc: xilinx: vcu: Update vcu init/reset sequence

Updated vcu init/reset sequence as per design changes.
If VCU reset GPIO is available then do assert and de-assert it before
enabling/disabling gasket isolation.
This GPIO is added because gasket isolation will be removed during startup
that requires access to SLCR register space. Post startup, the ownership of
the register interface lies with logiCORE IP

Signed-off-by: Dhaval Shah <dhaval.shah@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agodt-bindings: soc: xilinx: Update VCU bindings for vcu reset pin
Dhaval Shah [Mon, 1 Oct 2018 16:27:48 +0000 (09:27 -0700)]
dt-bindings: soc: xilinx: Update VCU bindings for vcu reset pin

Updated VCU binding for reset GPIO pin as optional property

Signed-off-by: Dhaval Shah <dhaval.shah@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx: xcsi2rxss: Add VCX support
Vishal Sagar [Mon, 1 Oct 2018 07:34:11 +0000 (13:04 +0530)]
v4l: xilinx: xcsi2rxss: Add VCX support

Add support for VCX in driver. When VCX is enabled in IP, xlnx,en-vcx
optional dt property must be present in dt node. When VCX is enabled
then maximum number of Virtual channels is 16 otherwise it is 4 as
earlier. This adds a new VCX Frame error bit in the Interrupt Status
Register and Interrupt Enable Register at offset 30. When a frame sync
or level interrupt occurs on virtual channels 4 through 15, this bit is
set and the corresponding error bit is set in a new status register at
offset 0x34. New Image Information registers have been added for these
new virtual channels. The error counts for these are also maintained in
a separate structure vcx_events.

Signed-off-by: Vishal Sagar <vishal.sagar@xilinx.com>
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agodt-bindings: csi2rxss: Enable VCX support
Vishal Sagar [Mon, 1 Oct 2018 07:34:10 +0000 (13:04 +0530)]
dt-bindings: csi2rxss: Enable VCX support

A new optional dt bool property xlnx,en-vcx is now added to the dt node
of the MIPI CSI2 Rx Subsystem. When this is enabled, the maximum number
of virtual channels is 16 else 4.

Signed-off-by: Vishal Sagar <vishal.sagar@xilinx.com>
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agomisc: xilinx-sdfec: Update config from hardware
Derek Kiernan [Mon, 1 Oct 2018 14:48:23 +0000 (15:48 +0100)]
misc: xilinx-sdfec: Update config from hardware

Updates the config from sdfec hardware registers for order, bypass,
interrupt configuration and if the device has been started. These
values can be set in the hardware design when the PL initializes the
device and after a sdfec has been reset.
The updated configuration includes a Code Write Protect value which
replaces wr_protect usage.

Signed-off-by: Derek Kiernan <derek.kiernan@xilinx.com>
Signed-off-by: Mauro DeLuca <mauro.de-luca@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agomisc: xilinx-sdfec: Increase number of LDPC codes
Derek Kiernan [Mon, 1 Oct 2018 14:34:18 +0000 (15:34 +0100)]
misc: xilinx-sdfec: Increase number of LDPC codes

Increase the offset ranges for REG0, REG1, REG2 and REG3 increases the
number of LDPC codes that can be stored to 128.

Signed-off-by: Derek Kiernan <derek.kiernan@xilinx.com>
Signed-off-by: Mauro DeLuca <mauro.de-luca@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agomedia: imx274: fix stack-out-of-bounds issue
Subhransu S. Prusty [Fri, 28 Sep 2018 18:56:20 +0000 (00:26 +0530)]
media: imx274: fix stack-out-of-bounds issue

There is random kernel paging request failure with imx274 driver.
Enabling KASAN shows stack-out-of-bounds around the register read code.
Analyzing the code further it is found that the memory allocated is
of type u8 whereas the regmap_read expects unsigned int.
This could possibly be trying to write beyond the memory allocated.
Changed the u8 arrays to unsigned int and don't see the paging request
failure anymore.

Signed-off-by: Subhransu S. Prusty <subhransu.sekhar.prusty@xilinx.com>
Signed-off-by: Vishal Sagar <vishal.sagar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agostaging: xroeframer: UDP sysfs source file commit
Vasileios Bimpikas [Fri, 28 Sep 2018 15:00:21 +0000 (16:00 +0100)]
staging: xroeframer: UDP sysfs source file commit

Committing sysfs_xroe_framer_udp.c, which creates the "udp" sysfs
directory under "xroe" and contains the UDP related entries for
controlling the framer, such as the source and destination ports.

Signed-off-by: Vasileios Bimpikas <vasileios.bimpikas@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: zynqmp: Fix binding of hclk clock (gem nodes)
Mirela Simonovic [Mon, 17 Sep 2018 12:24:18 +0000 (14:24 +0200)]
arm64: zynqmp: Fix binding of hclk clock (gem nodes)

This patch is required to fix binding of gem interface clocks to
system-level clock IDs that have changed. The gem0 clock IDs are now:
1) Clock ID 45 represents GEM0_TX clock
2) Clock ID 49 represents GEM0_RX clock
3) Clock ID 104 represents GEM0_REF clock

Clock IDs for other gems changed similarly, e.g. for i in {1, 2, 3}
GEMi_TX = GEM0_TX + i, etc. Other clock IDs have not changed.

Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Will Wong <willw@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agodt-bindings: clock: Fix documentation for Xilinx ZynqMP clock driver
Mirela Simonovic [Mon, 17 Sep 2018 12:24:19 +0000 (14:24 +0200)]
dt-bindings: clock: Fix documentation for Xilinx ZynqMP clock driver

Documentation is fixed to reflect recent changes in clock tree:
- Clock ID definitions have changed for gem-related clock IDs
- New clock IDs are defined to distinguish external (E)MIO sources
  for gem Tx and Rx clocks
- New clock ID is defined for acpu full clock

Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Will Wong <willw@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agomisc: xilinx-sdfec: Add ADD_LDPC_CODE protection
Derek Kiernan [Fri, 28 Sep 2018 11:06:18 +0000 (12:06 +0100)]
misc: xilinx-sdfec: Add ADD_LDPC_CODE protection

For the ioctl ADD_LDPC_CODE_PARAMS increase the protection to ensure
codes cannot be added when the device has started.

Signed-off-by: Derek Kiernan <derek.kiernan@xilinx.com>
Signed-off-by: Mauro DeLuca <mauro.de-luca@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agomisc: xilinx-sdfec: Remove GET_LDPC_PARAMS ioctl
Derek Kiernan [Fri, 28 Sep 2018 11:06:16 +0000 (12:06 +0100)]
misc: xilinx-sdfec: Remove GET_LDPC_PARAMS ioctl

Unable to fully reconstruct from register values.

Signed-off-by: Derek Kiernan <derek.kiernan@xilinx.com>
Signed-off-by: Mauro DeLuca <mauro.de-luca@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoof: configfs: Fix memory leak in create overlay
Jesper Larsen [Tue, 25 Sep 2018 11:33:31 +0000 (13:33 +0200)]
of: configfs: Fix memory leak in create overlay

of_fdt_unflatten_tree will allocate memory for the device tree, and
returns the pointer for the memory.

Keep a reference for that memory, and free it during release.

Signed-off-by: Jesper Larsen <jela@gomspace.com>
Tested-by: Nava kishore Manne <nava.manne@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoof: configfs: lock while resolving and applying
Jesper Larsen [Tue, 25 Sep 2018 11:24:23 +0000 (13:24 +0200)]
of: configfs: lock while resolving and applying

Protect resolving phandles and applying the overlay by a mutex.

This ensures that overlays being loaded in parallel are not assigned the
same range of phandles, leading to phandle collisions.

Signed-off-by: Jesper Larsen <jela@gomspace.com>
Tested-by: Nava kishore Manne <nava.manne@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agodrm: xlnx: scaler: Fix array out of bound access
Vishal Sagar [Fri, 28 Sep 2018 05:35:07 +0000 (11:05 +0530)]
drm: xlnx: scaler: Fix array out of bound access

This patch fixes random kernel crashes observed due to accessing and
modifying the out of bound address of the vertical scaler coefficients
array.

Signed-off-by: Vishal Sagar <vishal.sagar@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx: vpss-scaler: Fix array out of bound access
Vishal Sagar [Fri, 28 Sep 2018 05:35:06 +0000 (11:05 +0530)]
v4l: xilinx: vpss-scaler: Fix array out of bound access

This patch fixes random kernel crashes caused while accessing and
modifying the vertical scaler coefficients.

Signed-off-by: Vishal Sagar <vishal.sagar@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agodrm: xlnx: pl_disp: Pass interlaced field info to frmbuf DMA
Satish Kumar Nagireddy [Thu, 27 Sep 2018 17:23:33 +0000 (10:23 -0700)]
drm: xlnx: pl_disp: Pass interlaced field info to frmbuf DMA

This patch passes interlaced field information to frmbuf DMA
based on framebuffer flag.

Signed-off-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoxilinx: v4l: m2m: Terminate the dma engine before releasing buffers
Devarsh Thakkar [Fri, 28 Sep 2018 02:52:04 +0000 (19:52 -0700)]
xilinx: v4l: m2m: Terminate the dma engine before releasing buffers

- When the process involving mem2mem driver was stopped abruptly,
  buffers were being returned to videobuf while dmaengines were still
  active causing a kernel panic.

- So now we terminate the dmaengines before returning buffers to videobuf.

- This fixes a hang on control-c for below transcode pipeline involving
  mem2mem driver where FBread->FBwrite block is managed by mem2mem driver.

- Use more specific mplane macro V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE for checking
  the source vb2 buffer queue type as it's type is set as mplane during
  queue initialization.

Pipeline:
H264 Decode->FBread (from PL)->FBwrite (to PS)->HEVC Encode->File

Signed-off-by: Devarsh Thakkar <devarsh.thakkar@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agostaging: clocking-wizard: Update the dt binding documentation
Shubhrajyoti Datta [Mon, 1 Oct 2018 10:58:49 +0000 (16:28 +0530)]
staging: clocking-wizard: Update the dt binding documentation

Add the clock-cells description to the dt bindings.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agostaging: apf: Correct Kconfig dependencies for apf driver
Michael Gill [Fri, 28 Sep 2018 17:41:55 +0000 (10:41 -0700)]
staging: apf: Correct Kconfig dependencies for apf driver

The APF driver requires UIO and DMA_SHARED_BUFFER, but did not
have them listed in Kconfig.  This corrects that oversight.

Signed-off-by: Michael Gill <michael.gill@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agomisc: xilinx-sdfec: Change OUT i/fs always enabled
Derek Kiernan [Thu, 27 Sep 2018 11:57:05 +0000 (12:57 +0100)]
misc: xilinx-sdfec: Change OUT i/fs always enabled

Change leaves the DOUT AXI always enabled so any data blocks present in
the SD-FEC core will be streamed after a calling STOP_DEV ioctl.

Signed-off-by: Derek Kiernan <derek.kiernan@xilinx.com>
Signed-off-by: Mauro DeLuca <mauro.de-luca@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agomtd: nand: pl35x: Fix gcc warning
Naga Sureshkumar Relli [Thu, 27 Sep 2018 10:41:33 +0000 (16:11 +0530)]
mtd: nand: pl35x: Fix gcc warning

This patch fixes the below gcc warning
drivers/mtd/nand/pl35x_nand.c: In function ‘pl35x_nand_read_page_swecc’:
drivers/mtd/nand/pl35x_nand.c:816:6: warning: variable ‘ret’ set but not
used [-Wunused-but-set-variable]
u32 ret;
^~~

Signed-off-by: Naga Sureshkumar Relli <naga.sureshkumar.relli@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agomisc: xilinx-sdfec: Fix ECC ISR err classification
Mauro DeLuca [Thu, 27 Sep 2018 09:13:08 +0000 (10:13 +0100)]
misc: xilinx-sdfec: Fix ECC ISR err classification

When an ECC multi-bit error occurs a corresponding ECC event is also
raised. This correction ensures that the multi-bit error and
corresponding event are clear together. This ensures that the event is
not interpreted as a single-bit error.

Signed-off-by: Mauro DeLuca <mauro.de-luca@xilinx.com>
Signed-off-by: Derek Kiernan <derek.kiernan@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoi2c: xiic: Fix the clocking across bind unbind
Shubhrajyoti Datta [Thu, 27 Sep 2018 07:37:58 +0000 (13:07 +0530)]
i2c: xiic: Fix the clocking across bind unbind

The recommendation is that the the set_active should be done
withruntine disabled.
Also fix the remove path for clocking.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agostaging: xroeframer: IPv6 sysfs source file commit
Vasileios Bimpikas [Mon, 24 Sep 2018 14:48:58 +0000 (15:48 +0100)]
staging: xroeframer: IPv6 sysfs source file commit

Committing sysfs_xroe_framer_ipv6.c, which creates the "ipv6" sysfs
directory under "xroe" and contains the IPv6 related entries for
controlling the framer, such as source and destination addresses,
traffic class, hop limit etc.

Signed-off-by: Vasileios Bimpikas <vasileios.bimpikas@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoASoC: xlnx: Reset S2MM for next channel status update
Maruthi Srinivas Bayyavarapu [Tue, 25 Sep 2018 17:53:34 +0000 (23:23 +0530)]
ASoC: xlnx: Reset S2MM for next channel status update

For the same input stream, after the end of audio capture usecase,
unless S2MM path is reset, next audio capture usecase will not get channel
status update. Added S2MM reset during close callback.

Signed-off-by: Maruthi Srinivas Bayyavarapu <maruthi.srinivas.bayyavarapu@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoASoC: xlnx: Add AES channel status parsing
Maruthi Srinivas Bayyavarapu [Tue, 25 Sep 2018 17:53:33 +0000 (23:23 +0530)]
ASoC: xlnx: Add AES channel status parsing

This add AES channel status parsing logic, which provides audio
stream parameter information like channel count, bit depth, sampling
rate. User provided capture parameters will be compared against parsed
parameters to have proper audio capture.

Signed-off-by: Maruthi Srinivas Bayyavarapu <maruthi.srinivas.bayyavarapu@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoASoC: xlnx: Move audio interface node names to driver data
Maruthi Srinivas Bayyavarapu [Tue, 25 Sep 2018 17:53:32 +0000 (23:23 +0530)]
ASoC: xlnx: Move audio interface node names to driver data

Audio interface node names are now required in hw_params() callback,
as AES channel status parsing will be done based on node names (hdmi/sdi).
So, moved them accordingly.

Signed-off-by: Maruthi Srinivas Bayyavarapu <maruthi.srinivas.bayyavarapu@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoASoC: xlnx: correct the audio formatter masks
Maruthi Srinivas Bayyavarapu [Tue, 25 Sep 2018 17:53:31 +0000 (23:23 +0530)]
ASoC: xlnx: correct the audio formatter masks

Corrected few mask and shift values of audio formatter.

Signed-off-by: Maruthi Srinivas Bayyavarapu <maruthi.srinivas.bayyavarapu@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoASoC: xlnx: remove SDI Rx AES parsing
Maruthi Srinivas Bayyavarapu [Tue, 25 Sep 2018 17:53:30 +0000 (23:23 +0530)]
ASoC: xlnx: remove SDI Rx AES parsing

AES parsing logic will be moved to audio formatter driver.
Removed the same from sdi audio driver. Now, instead of waiting
for channel status update (which gives AES bytes for parsing), Rx
startup callback waits for sample rate update status which conveys
valid stream received on SDI extract block.

Signed-off-by: Maruthi Srinivas Bayyavarapu <maruthi.srinivas.bayyavarapu@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>