spi: xilinx-qps: Add support for dual stack and parallel configurations

Added support in the driver to update accordingly the linear qspi
cfg register based on is-dual property.

is-dual=1 implies dual parallel configuration and is-dual=0 could be
single or dual stack and user has to manually enable
CONFIG_SPI_XILINX_PS_QSPI_DUAL_STACKED as Kconfig parameter to
use dual stack configuration.

Created CONFIG_SPI_XILINX_PS_QSPI_DUAL_STACKED Kconfig entry to
provide support for Dual Stack configuration.

Based on SPI_MASTER_U_PAGE bitmask in the transfer flags, choice is
made to select upper/lower flash.

Signed-off-by: Suneel Garapati <suneel.garapati@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
mtd: m25p80: xilinx: Add support for zynq dual qspi configs

added member variables shift isparallel isstacked to m25p structure
and are used in read /write/erase functions to support dual configs.

Remove the iffery on XILINX_QSPI and initialize the m25p structure
members for dual stack and parallel mode support only if the connected
controller is zynq qspi.

The changes regarding dual qspi support needs discussion on mainline
and will be re-visited later.

Signed-off-by: Suneel Garapati <suneel.garapati@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
mtd: m25p80: Use conditional compilation for OF function calls in probe

Place the code which calls OF api's under conditional compilation
parameter CONFIG_OF and default initialize the variable otherwise.

Signed-off-by: Suneel Garapati <suneel.garapati@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
microblaze: Don't mark arch_kgdb_ops as const.

Other architectures don't do it, and it conflicts with the extern'd definition
in include/linux/kgdb.h.

The patch fails checkpatch but it reflects current
functions declaration and solved compilation error.

Signed-off-by: Graeme Smecher <gsmecher@threespeedlogic.com>
CC: Michal Simek <monstr@monstr.eu>
CC: linux-kernel@vger.kernel.org
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
spi: xilinx-qps: Fix qspi issues wrt read and write to flash

Use correct offset while copying the data to TXD1/2/3 register.
In case of dual parallel, write/read must be of double byte
resolution, hence, use TXD0 register as hack on hw limitation,
and on RXD register always parse 4 bytes.

Signed-off-by: Suneel Garapati <suneel.garapati@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
mtd: m25p80: Use conditional compilation for OF function calls

Place the code which calls OF api's under conditional compilation
parameter CONFIG_OF.

Signed-off-by: Suneel Garapati <suneel.garapati@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
mtd: m25p80: Fix sparse warnings

- do not define device_node *np again
- is dual must be u32 because of_property_read_u32

Warning log:
drivers/mtd/devices/m25p80.c:1238:22: warning: symbol 'np' shadows an earlier one
drivers/mtd/devices/m25p80.c:1148:36: originally declared here
drivers/mtd/devices/m25p80.c:1337:23: warning: symbol 'np' shadows an earlier one
drivers/mtd/devices/m25p80.c:1148:36: originally declared here
drivers/mtd/devices/m25p80.c:1244:45: warning: incorrect type in argument 3 (different signedness)
drivers/mtd/devices/m25p80.c:1244:45:    expected unsigned int [usertype] *out_value
drivers/mtd/devices/m25p80.c:1244:45:    got int static *<noident>

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Suneel Garapati <suneel.garapati@xilinx.com>