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>