Revert "This commit was taken from a set of patches submitted to the kernel's SPI devel"

This reverts commit aa549c61b544a9b8b8615a38bbda30433d65a2fd.
spi: zynq-qspi: Make of_device_id array const

Make of_device_id array const, because all OF functions handle
it as const.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
spi: zynq-qspi: Wait for FIFO to be empty when switching TXD registers

When switching from TXD0 to TXD1/2/3, software has to wait for FIFO to be
empty before writing to TXD1/2/3 as per the documentation.

Although previous discussions and tests revealed that this waiting
is required only for TXD1/2/3 to TXD0 switches and not vice-verse,
design team conveyed that TXD0 to TXD1/2/3 switching can behave unpredictably
if wait is not used. Hence this change is made to comply.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Acked-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
spi: zynq-qspi: Fix kernel-doc format

Fix descriptions and format.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Harini Katakam <harinik@xilinx.com>
mtd: m25p80: Support for lock/unlock in parallel and stacked modes

This patch adds support for lock/unlock operations in Micron
(this is slightly different from other flash devices).
Support for the same operations in stacked and parallel mode is added.

Lock/unlock feature support is provided based on the flag M25P80_FLASH_LOCK only.

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

Conflicts:
	drivers/mtd/devices/m25p80.c
Revert "mtd: m25p80: Support for lock/unlock in parallel and stacked modes"

This reverts commit 6ad54483a7834604f0d3fb0b51565cb4c61cd3e9.
mtd: m25p80: Calculate flash block protect bits based on number of sectors

This patch generalises the calculation of block protect bits based on the number
of sectors and implements the _is_locked function.

Existing calculation of block protect bits only works for devices with 64
sectors or more. This new logic is applicable to the STmicro devices:
m25p10, p20, p40, p80, p16, pe16, p32, p64, p128.
Note devices with >64 sectors only allow the protected region to be specified
to a resolution of 1/64th of the total size (such as m25p64).

New return codes for ioctl(MEMISLOCKED) have been added to uapi/mtd/mtd-abi.h
because the _is_locked function can query a region which is partially unlocked.

Added flag to m25p_ids table to indicate if flash protection is supported.

Added n_sectors and sector_size to m25p flash structure so it can be used in
block protect bit calculation.

Merged with xilinx's custom mtd implementation.

From: Austin Boyle <boyle.austin@gmail.com>
Signed-off-by: Austin Boyle <boyle.austin@gmail.com>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
mtd: m25p80: Support for lock/unlock in parallel and stacked modes

This patch adds support for lock/unlock operations in Micron
(this is slightly different from other flash devices).
Support for the same operations in stacked and parallel mode is added.

Lock/unlock feature support is provided based on the flag M25P80_FLASH_LOCK only.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Fixed typo that caused vccint to be read from XADC instead of vccaux

Signed-off-by: Joshua Lamorie <joshua.lamorie@xiphos.com>