gpio: Add support for microblaze xilinx GPIO

Microblaze uses gpio which is connected to the system reset.
Currently gpio subsystem wasn't used for it.

Add gpio driver and change Microblaze reset logic to be done
via gpio subsystem.

There are various configurations which Microblaze can have
that's why gpio_alloc/gpio_alloc_dual(for dual channel)
function has been introduced and gpio can be allocated
dynamically.

Adding several gpios IP is also possible and supported.

For listing gpio configuration please use "gpio status" command

This patch also remove one compilation warning:
microblaze-generic.c: In function 'do_reset':
microblaze-generic.c:38:47: warning: operation on '*1073741824u'
 may be undefined [-Wsequence-point]

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
arm: lds: Remove libgcc eabi exception handling tables

Remove ARM eabi exception handling tables (for frame unwinding).
AFAICT, u-boot stubs away the frame unwiding routines, so the tables will
more or less just consume space. It should be OK to remove them.

Comment from Albert:
By default the *exidx* sections are between rodata and data, so
removing them causes many apparent changes at the binary level.
However, builds of zynq based on ARM master with the patch above vs
master with a patch mapping *exidx* sections after BSS gives identical
binaries. Thus the RFC has no functional effect.

Also, ARM EHABI states that [exception] Tables are not required for ABI
compliance at the C/Assembler level but are required for C++.

http://infocenter.arm.com/help/topic/com.arm.doc.ihi0038a/IHI0038A_ehabi.pdf

So as long as we don't put any C++ code in U-Boot (a prospect that I
don't see happening any time soon), this RFC is safe and either is a
no-op or removes useless bytes from the binary.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
petalinux: Remove unused CONFIG_XILINX_SPI_BASEADDR

There is no reference in the u-boot code.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
petalinux: Remove XILINX_PS7_QSPI_FLASH_BASEADDR assignments

petalinux-arm-auto.h assignment is useless.
Do not assing XILINX_PS7_QSPI_FLASH_BASEADDR to XILINX_SPI_FLASH_BASEADDR
because below it is check by if defined().

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
zynq: spi: Add ZYNQ_QSPI_BASEADDR to hardware.h

And also remove all references to this hardcoded value.
It is next step for synchronization with mainlne
configuration style.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
nand: Clean nand initialization in mainline way

Move hardcoded values to hardware.h and use it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
nane: Clean nand coding style

Start to work with clean coding style and keep in in that shape.
Do not use uintX_t types - use u8 and u32 types instead.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
nand: Use calloc instead of malloc

Simplify the code.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
nand: Remove ancient nand hack

xnandps_device_ready

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
nand: Rename all xnandps to zynq_nand

Use proper name for the driver before we go to mainline.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
nand: Upgrade header information

- driver description
- Copyright years

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
zynq: slcr: Wait 100ms till clk is properly setup

If you don't wait you will loose the first sent packet
even all bits in emacps are correctly setup.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
zynq: Do not enable icache

icache is already turned on.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Revert "mtd: cfi_flash: Fix CFI flash driver for 8-bit bus support"

This reverts commit 239cb9d904cfa8ab50d840a47b3306189d695c75.

Signed-off-by: Stefan Roese <sr@denx.de>
zynq: Add missing empty gpio.h

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