drm: xilinx: Use the correct drm format code for yuv422 format

Use the correct drm format code, DRM_FORMAT_YUYV, for Xilinx yuv422 format.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drm: xilinx: drv: Add color depth info to the format descriptor

Add color depth info to the the format descriptor. xilinx_drm_format_depth()
can be used to retrieve the color depth value corresponding to the given drm
format code.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drm: xilinx: drv: Set bpp and color depth to drm_framebuffer

The drm crtc helper doesn't set bpp and color depth for non RGB format
drm_framebuffer, and that results in not supporting YUV format planes
properly. This patch fixes and the YUV format drm_framebuffer can be allocated
and used for planes.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drm: xilinx: vtc: Return IRQ_NONE for no interrupt

Return IRQ_NONE in the interrupt handler, when there's no interrupt.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drm: i2c: adv7511: Initialize the DPMS value in adv7511_probe()

Initialize the DPMS value to DRM_MODE_DPMS_OFF in adv7511_probe() function.
Otherwise, the value is set to DRM_MODE_DPMS_ON(=0) which doesn't reflect
the actual device's DPMS state. This also results in not turning on
the device properly.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
media: xilinx: dma: Stop entity chain walk at the entity with no sink pad

When starting or stopping the pipeline, the pipeline driver walks
the entities chain, and starts or stops all of them. When the walk reaches
the entity with no sink pad, walk needs to stop. xvip_get_entity_sink()
returns either the valid sink pad, or NULL when the entity doesn't have any
sink pad. When NULL is returned, stop the walk.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Acked-by: Radhey Shyam Pandey <radheys@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
net: gem: Do not probe phy if phy-handle is not setup

Driver doesn't support automatic phy detection
as macb driver that's why don't crash when phy is not found.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Tested-by: Nathan Rossi <nathan.rossi@xilinx.com>
microblaze: Wire-up new system calls sched_setattr/getattr

Wire-up sched_setattr/getattr syscalls.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
tty: serial: uartlite: Specify time for sending chars

Xilinx MDM (Microblaze Debug Module) also contains
uart interface via JTAG which is compatible with
uartlite driver. This interface is really slow
that's why timeout is setup to 1s.

Make this time delay not to be cpu speed dependent.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
spi: cadence: Use max speed checks in the core

Set master->max_speed_hz to let core perform necessary checks.
Remove checks in the driver.
If transfer speed is requested as zero after checks in the core,
dont set max speed, default to min speed.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
spi: cadence: Use bits per word checks in core

Set master->bits_per_word_mask. Remove checks in driver.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
spi: cadence: irq related cleanup

Request irq after init_hw in probe.
Check for irq<=0 as 0 is also considered error condition.
Return IRQ_HANDLED only when interrupt is handled, otherwise return IRQ_NONE.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
spi: cadence: Make register read and write operations static inline functions

Make cdns_spi_read and cdns_spi_write static inline functions which
take driver instance pointer, offset, data as inputs and perform necessary
read/write operation.
Modify init_hw function to pass instance pointer instead of register base address.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
spi: cadence: Use transfer_one hook

Implement transfer_one and set_cs functions. Change initialization, completion
and irq handling accordingly. Remove timeout check as core does this.
Remove reset function as it is no longer used.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
spi: cadence: setup cleanup

Make CPOL/CPHA configuration a separate function. Since these dont vary
between transfers and need to be set when preparing hw before enabling spi,
call from prep_transfer_hw.
Remove spi_setup as this is no longer required.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
spi: cadence: Suspend/Resume cleanup

Remove use of driver state in probe, suspend, resume and prep_transfer_hw.
Just call master suspend/resume and disable_unprepare or prepare_enable clocks
as required in suspend/resume.
Remove debug prints in suspend/resume.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
spi: cadence: Chip select related changes

Change chip select property name to "num-cs". Use a default value
instead of giving error when num-cs is not found.
Add "is-decoded-cs" property for using extended slave select; make
necessary changes in cdns_spi_chipselect function.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
spi: cadence: Probe and remove cleanup

Remove unbalanced master_put().
Remove unecessary prints.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
spi: cadence: Rename remaining_byte and requested_bytes

Rename to tx_bytes and rx_bytes to be clear.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
spi: cadence: Remove MODULE_ALIAS; add xilinx compatible string too

Remove MODULE_ALIAS.
Add xilinx specific compatible string along with IP compatible string
according to mainline suggestions.

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