SPI: zynq-qspi: Update config register value in init_hw in spi-zynq-qspi.c

The 2-bit qspi.Config_reg[FIFO_WIDTH] register field must always
be 2'b11 (Xilinx UG585 v1.6 p1437).

Signed-off-by: Scott McCoy <smccoy@hp.com>
Reviewed-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
net: xilinx: Fix kernel-doc warnings/error for gem driver

Fix kernel-doc issues.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
net: xilinx_emacps: Add dma_mapping_error checking

CONFIG_DMA_API_DEBUG enabled kernel showed backtraces indicating that
"DMA-API: device driver failed to check map error [device
address=0x000000002e997802] [size=322 bytes] [mapped as single]"

Add the check, unwind the mappings if it is a fragmented frame and if the
check is failed then free the skb

Reported-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
v4l: Sort YUV formats of v4l2_mbus_pixelcode

Move V4L2_MBUS_FMT_YUYV10_1X24_PADHI and V4L2_MBUS_FMT_YUYV12_1X24,
so that the enumeration is sorted correctly.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
v4l: Add VUY8 24 bits bus format

Add VUY8 24 bits bus format, V4L2_MBUS_FMT_VUY8_1X24.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
media: xilinx: vip: Add yuv444 and bayer formats

Add more video formats: yuv444 and bayer(rggb, grbg, gbrg, bggr).

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
media: xilinx: vip: Remove _TIMING_ from register definition

Remove _TIMING_ from register definitions. Change the names in xilinx-tpg.c
accordingly.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
media: xilinx: dma: Add vidioc_enum_fmt_vid_cap callback

Add vidioc_enum_fmt_vid_cap callback to enumerate the proper format
to user.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
media: xilinx: dma: Fix alignments of xvip_dma_fops definition

Fix alignments of xvip_dma_fops definition.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
media: xilinx: dma: Workaround for bytesperline

Workaround for bytesperline bug from mplayer. The mplayer (svn r34540)
that was installed in Ubuntu 12.10 and used for demo uses the bytes per
line value from V4L2 drivers without initialization. Since mplayer
doesn't change this value, mplayer could use the wrong bytes per line
value, for example, the default value (1920 * 4) for different
resolution (640x480).

The best way is to send a patch to the mplayer mailing list, and this
doesn't intend to be included in the kernel tree.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
media: xilinx: vip: Add default min/max height/width definitions

Add default min/max height/width definitions, min = 32, max = 7680.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
media: xilinx: vip: Add common sink/source pad IDs

Add common sink/source pad IDs. As commented, IP cores with multiple inputs or
outputs should define their own IDs instead of using these values.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
media: xilinx: vip: Add xvip_set_format_size()

Add xvip_set_format_size() which set the format size.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
media: xilinx: vip: Add xvip_enum_mbus_code()

media: xilinx: vip: Add xvip_enum_mbus_code(), which enumerate
the mbus code of a subdevice.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
media: xilinx: vip: Add xvip_enum_frame_size()

Add xvip_enum_frame_size(), which enumerates the min/max frame size
of a subdevice.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
media: xilinx: vip: Add register clear and set functions

Add functions, xvip_clr() and xvip_set(), to clear and set a bitmask
in the given register. Additional helper functions are introduced such as
xvip_clr_or_set() and xvip_clr_and_set(). xvip_clr_or_set() clears or sets
the register with a bitmask using set/clr functions, depending on
the boolean flag 'set'. On the other hand, xvip_clr_and_set() clears
a register with the mask 'clr' and sets the mask 'set' after.

These functions can be used to make some driver code clearer and simpler.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
media: xilinx: vip: Add xvip_start()

Add xvip_start(), which starts the IP and enables the reg update.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
media: xilinx: vip: Add xvip_stop()

Add xvip_stop(), which resets and stops the IP.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
media: xilinx: vip: Add xvip_set_frame_size()

Add xvip_set_frame_size(), which sets the frame size of IP.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
media: xilinx: vip: Add enable/disable reg update functions

Add xvip_enable_reg_update() and xvip_disable_reg_update().
Sometimes drivers need to enable and disable register update for atomicity.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>