gpu: drm: xylon: Disabled layer color key transparency

Added functionality to have by default disabled layer color key transparency for
all available layers (planes).

Signed-off-by: Davor Joja <davorjoja@logicbricks.com>
Tested-by: Christian Kohn <christian.kohn@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
net: xilinx_emacps: Fix issue with wake-on-LAN

When checking the WOL register value against the option masks, use '&'
rather than '|' so the bitwise operations work as expected.

Signed-off-by: Jeff Westfahl <jeff.westfahl@ni.com>
Signed-off-by: Ben Shelton <ben.shelton@ni.com>
Acked-by: Jaeden Amero <jaeden.amero@ni.com>
Acked-by: Gratian Crisan <gratian.crisan@ni.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
APF: cleanup before enabling xlnk loading from device tree

Minor cleanup to return 0 directly

Signed-off-by: S Mohan <s.mohan@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
APF: Second cleanup before enabling xlnk loading from device tree

Move some initialization code from init to probe

Signed-off-by: S Mohan <s.mohan@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
APF: enable xlnk loading from device tree

Basic code changes to allow xlnk to be loaded from device tree

Signed-off-by: S Mohan <s.mohan@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
APF: enable and disable clocks for xlnk

Read the available clocks from device tree at probe time
and enable them on xlnk_open and disable them on xlnk_close

Signed-off-by: S Mohan <s.mohan@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
tty: xuartps: Add support for setting modem control signals

Add support for setting the state of the DTR and RTS signals.

Acked-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
net: can: comparison of unsigned variable

err was of the type u32. it was being compared with < 0, and being
an unsigned variable the comparison would have been always false.

moreover, err was getting the return value from set_reset_mode()
and xcan_set_bittiming(), and both are returning int.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
tty: xuartps: Fix RX hang, and TX corruption in termios call

The implementation of flushing the RX FIFO breaks in a number of cases,
it is impossible to ensure an complete flush of the RX FIFO due to the
hardware not allowing the use of the FIFOs when the receiver is disabled
(Reading from the FIFO register does not remove it from the FIFO when
the RX_EN=0 or RX_DIS=1). Additionally during an initial set_termios
call where RX_DIS=1 causes a hang waiting forever for the RX FIFO to
empty. On top of this the FIFO will be cleared by the use of the RXRST
bits on the Control Register, making the RX flush pointless (as it does
not preserve the data read anyway).

Due to the TXRST the TX FIFO and transmitter can be interrupted during
frame trasmission, causing corruption and additionally data lost in the
FIFO. Most other serial drivers do not flush or clear the FIFOs during
a termios configuration change and as such do not have issues with
corruption. For this UART controller is it required that the TXRST/RXRST
bit be flagged during the change, this means that the data in the FIFO
will be dropped when changing configuration. In order to prevent data
loss and corruption of the transmitted data, wait until the TX FIFO is
empty before changing the configuration. The performance of this may
cause the set_termios call to take a longer amount of time especially
on lower baud rates, however it is comparable to the same performance
hit that a console_write call costs.

Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
Acked-by: Anirudha Sarangi <anirudh@xilinx.com>
Acked-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
spi: cadence: Init HW after reading devicetree attributes

This will make it possible to use the settings specified in the devicetree
to configure the hardware.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
spi: cadence: Fix 3-to-8 mux mode

In 3-to-8 mux mode for the CS pins we need to set the PERI_SEL bit in the
control register. Currently the driver never sets this bit even when
configured for 3-to-8 mux mode. This patch adds code which sets the bit
during device initialization when necessary.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
i2c: cadence: Handle > 252 byte transfers

The I2C controller sends a NACK to the slave when transfer size register
reaches zero, irrespective of the hold bit. So, in order to handle transfers
greater than 252 bytes, the transfer size register has to be maintained at a
value >= 1. This patch implements the same.
The interrupt status is cleared at the beginning of the isr instead of
the end, to avoid missing any interrupts - this is in sync with the new
transfer handling.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
i2c: cadence: cadence: Set the Hardware time-out register to MAX

This patch set Hardware time-out register value to MAX i.e 0xFF because
in master receiver mode, I2C master generates invalid read transactions
after time-out.

This is a cadence IP BUG.The issue happens even if the time-out interrupt
is disabled.

Writing value to time-out register will not avoid the issue completely but
reduce the chances of error.

Signed-off-by: Vishnu Motghare <vishnum@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
net: ethernet: xilinx: Get local MAC address from DTS

Get local MAC address from "local-mac-address" DTS property.
Used when u-boot does not set MAC address.

Signed-off-by: Davor Joja <davorjoja@logicbricks.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Radhey Shyam Pandey <radheys@xilinx.com>
ARM: zynq: DT: Add zc702 pushbuttons to DT as gpio-keys

Adds the two MIO connected pushbuttons on the zc702 board to the devicetree as a
single multi-key device for us with the gpio-keys driver.

This patch may require the leds patch (ARM: zynq: DT: Add LEDs to zc702 DT) in
order to apply correctly.

Signed-off-by: Ezra Savard <ezra.savard@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
zynq: usb: Fix modularization problems

Change Kconfig of USB_GADGET_XUSBPS from boolean to tristate so that the
Zynq USB peripheral driver can be built as a module.

Add a description to the Kconfig of USB_XUSBPS_DR_OF so that we can
choose to build it into the kernel when the rest of the Zynq USB drivers
are built as modules. The Zynq USB drivers don't work as modules unless
this piece is built into the kernel. Fixed USB Makefile for this as
well.

Export GPL symbol usb_port_suspend from usb/core/hub.c. The Zynq OTG
driver uses this function.

Signed-off-by: Jeff Westfahl <jeff.westfahl@ni.com>
Signed-off-by: Nathan Sullivan <nathan.sullivan@ni.com>
Signed-off-by: Ben Shelton <ben.shelton@ni.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
staging: axivdma: Remove useless casting from memory allocation

This patch will remove warning reported by coccicheck.
Warning:
./drivers/staging/video/axivdma/xvdma.c:280:22-38: WARNING: casting
value returned by memory allocation function to (struct xvdma_dev *) is
useless.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
staging: pmods: Remove useless casting from memory allocation

This patch will remove warning reported by coccicheck.
Warning:
./drivers/staging/rtl8188eu/os_dep/osdep_service.c:54:13-20: WARNING:
casting value returned by memory allocation function to (void * *) is
useless.
./drivers/staging/pmods/pmodoled-gpio.c:625:22-49: WARNING: casting
value returned by memory allocation function to (struct
gpio_pmodoled_device *) is useless.
./drivers/staging/pmods/pmodoled-gpio.c:681:23-45: WARNING: casting
value returned by memory allocation function to (struct platform_device
*) is useless.
./drivers/staging/pmods/pmodoled-gpio.c:668:24-53: WARNING: casting
value returned by memory allocation function to (struct
spi_gpio_platform_data *) is useless.
./drivers/staging/pmods/pmodoled-gpio.c:632:32-39: WARNING: casting
value returned by memory allocation function to (uint8_t *) is useless.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
staging: apf: Use kzalloc instead of kmalloc/memset

This patch will remove warning reported by coccicheck.
Warning:
./drivers/staging/apf/xilinx-dma-apf.c:782:11-18: WARNING: kzalloc
should be used for dmahead, instead of kmalloc/memset

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
usb: gadget: xilinx_udc: Use kzalloc instead of kmalloc/memset

This patch will remove warning reported by coccicheck.
Warning:
./drivers/usb/gadget/udc/xilinx_udc.c:1001:7-14: WARNING: kzalloc should
be used for req, instead of kmalloc/memset

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