zynq: pcie: Removed sparse warnings

Removes sparse warnings and cleans up code.

Signed-off-by: Srikanth Thokala <sthokal@xilinx.com>
video: fb: xylonfb: Fix driver coding style

Fixed bug in Kconfig for selecting FB mode helpers.
Linux coding style errors and most of warnings.

Signed-off-by: Davor Joja <davor.joja@logicbricks.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
media: video: adv7511: Driver update for 3.8 kernel

Driver updated for compiling on 3.8 kernel version.
Linux coding style errors and most of warnings.

Signed-off-by: Davor Joja <davor.joja@logicbricks.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
tty: xuartps: Store baud rate in driver data

Store the current baudrate in struct xuartps.
This data is used in some parts of the driver
but was never initialized correctly.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
usb: xilinxps_udc: Fixed zero length packet issue with control endpoint.

Fixed sending a separate zero length packet for control IN endpoint. The
ZLT bit in dQH takes care of it. Configured control OUT endpoint not to
wait for zero length packet from the host controller. See USB 2.0 section
5.5.3 for more details.

Signed-off-by: Naveen Mamindlapalli <naveenm@xilinx.com>
xilinx: dts: Update the memory amount for zc706

Updated the actual memory amount used by zc706 board.

This changes is follow-up on memory amount in previous patch.
"Xilinx: ARM: Added zc706 device tree and compatibility"
(sha1: 082f42fd30e07bb35100c435199f56adef932875)

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
watchdog: Remove additional compatibility string

Device-tree bsp generate proper compatible string
and all IPs are backward compatible to 1.00.a version.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
arm: zynq: Gracefully handle missing OCM

Although, OCM is always part of the system, it might be unavailable due
to an erroneous DT. Handle this cases gracefully instead of crashing the
system.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
arm: zynq: Do not use PHYS_OFFSET for multi platfrom kernel

CONFIG_ARM_PATCH_PHYS_VIRT is always yes that's why
CONFIG_PHYS_OFFSET is not setup anymore.

Detect where kernel runs and if runs from zero then
reserve memory which is not DMAable.

This patch also fix the problem with rootfs on MMC card
where this fault is report:
mmc0: Timeout waiting for hardware interrupt.
mmcblk0: error -110 transferring data, sector 1574716, nr 136,
 cmd response 0x900, card status 0xb00
mmcblk0: retrying using single block read

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Tested-by: Michael Przybylski <michaeljprzybylski@gmail.com>
Tested-by: Lars-Peter Clausen <lars@metafoo.de>
microblaze: Fix uaccess_ok macro

Fix access_ok macro no to permit
case where user will try to access
the last address space which is equal
to segment address.

Example:
segment addr = 0xbfff ffff
address = 0xbfff fff0
size = 0x10

Current wrong implementation
0xbfff ffff >= (0xbfff fff0 | 0x10 | (0xbfff fff0 + 0x10))
0xbfff ffff >= (0xbfff fff0        | 0xc000 0000)
0xbfff ffff >= 0xf000 0000
return 0 which is access failed even the combination is valid.
because get_fs().seq returns the last valid address.

This patch fix this problem.

Size equals to zero is valid access.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
usb: gadget: Updated to support little endian systems.

Updated to support little endian systems.
Cleaned up the code for setup packet handling.

Signed-off-by: Subbaraya Sundeep Bhatta <sbhatta@xilinx.com>
usb: gadget: Updated to support 3.8 kernel

- Defined gadget max_speed
- Modified xudc_start for new bind function
- Changed endpoint names

The endpoint names are parsed in udc framework and
the addresses are assigned based on that. In 3.6 kernel,
the ednpoint address are denoted by a single variable
and hence we get proper address to the driver.
Now the endpoints are differentiated based on direction
and we always get endpoint address as 1 (for 2 endpoints)
and we fail accessing the EP RAM address for ep2

Signed-off-by: Subbaraya Sundeep Bhatta <sbhatta@xilinx.com>
usb: gadget: Code cleanup

Code cleanup for checkpatch.

Signed-off-by: Subbaraya Sundeep Bhatta <sbhatta@xilinx.com>
usb: gadget: Select AXI USB gadget driver for Zynq

Select AXI USB gadget driver for Zynq to use in Zynq PL.

Signed-off-by: Subbaraya Sundeep Bhatta <sbhatta@xilinx.com>
arm: dt: zynq-zc702: Fix ucd9248 nodes

Commit 'arm: zynq: fix indentation and formatting' (sha1:
3a48d14c4fbb1a08ae659fed98091667a9778b53) wrongly added '0x' prefixes to
the reg properties of ucd9248 nodes.
Rectify this issue by removing the wrongly added prefixes.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
xilinx_emacps: Remove unused hash-defines

This patch removes the unused hash-defines related to SLCR divisors
and SLCR address offsets.

Signed-off-by: Anirudha Sarangi <anirudh@xilinx.com>
xilinx_emacps: Adds support for fragmented

This patch alters the features parameter in ndev to add support
for fragmented packets. It also adds support for scatter-gather
packets.

Signed-off-by: Anirudha Sarangi <anirudh@xilinx.com>
xilinx_emacps: Process the Tx done interrupt

The releasing of the Tx BDs after Tx done interrupts earlier used to
happen in the interrupt context. This patch changes it to ensure that
the Tx done BD releasing happens in a bottom half(tasklet).

Signed-off-by: Anirudha Sarangi <anirudh@xilinx.com>
xilinx_emacps: Changes spin-lock

The existing implementation had a single lock for tx and rx paths.
This resulted in creating dependencies between tx and rx paths. For
example a Rx interrupt had to wait for the start_xmit routine to
finish. This could also result in potential locking issues as
reported by running on Qemu.
This patch uses two locks(one each for tx and rx paths) instead
of a single lock. This patch avoids to the extent possible not to
disable IRQs (avoids spin-lock-irqsave) and instead uses spin-lock-bh.
This effectively makes the Tx and Rx paths independent of each other.
This patch addresses all concerns (because of this new implementation)
related to inadvertent corruption of registers.

Signed-off-by: Anirudha Sarangi <anirudh@xilinx.com>
xilinx_emacps: Fixes the Tx timeout handling

The existing tx timeout handler was resulting a kernel crash when
invoked for tx timeout case. The tx timeout handler was trying to
allocate coherent memory for the BDs which was resulting in an error
case for scheduling while atomic.
This patch fixes it by using work queues for Tx timeout handling.

Signed-off-by: Anirudha Sarangi <anirudh@xilinx.com>