video: xylonfb: Add missing header

It should be the part of patch
"Merge tag 'v3.9' into master-next"
(sha1: 79a6cbd54869ed374f0d4ac6f2627c399b9eb34e)

The patch fix compilation errors:
drivers/video/xylon/xylonfb/of/../core/../misc/xylonfb-adv7511.c:220:1:
 error: unknown type name 'irqreturn_t'
drivers/video/xylon/xylonfb/of/../core/../misc/xylonfb-adv7511.c:228:9:
 error: 'IRQ_HANDLED' undeclared (first use in this function)
...

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
microblaze: Use proper casting for inb/inw/inl in io.h

We are going to move to asm-generic/io.h but
let's fix compilation warnings first for 3.10.

Warning message:
arch/microblaze/include/asm/io.h:126:26: warning: cast to
 pointer from integer of different size [-Wint-to-pointer-cast]
 #define inb(port)  readb((u8 *)((port)))
...

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
arm: Generate proper load section addresses

Moving to multiplatform caused that LOAD session
were wrongly generated for our images.
simpleImage is currently used by Qemu.

Wrong - before this patch:
Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  LOAD           0x008000 0xc0008000 0xc0008000 0x4fffe8 0x507fe8 RWE 0x8000
  LOAD           0x507fe8 0xc050ffe8 0xc050ffe8 0x8b130 0xb5a88 RWE 0x8000
  NOTE           0x52c2ac 0xc05342ac 0xc05342ac 0x00024 0x00024 R E 0x4
  GNU_STACK      0x000000 0x00000000 0x00000000 0x00000 0x00000 RWE 0x4

Correct - after this patch:
Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  LOAD           0x008000 0xc0008000 0x00008000 0x4fffe8 0x507fe8 RWE 0x8000
  LOAD           0x507fe8 0xc050ffe8 0x0050ffe8 0x8b130 0xb5a88 RWE 0x8000
  NOTE           0x52c2ac 0xc05342ac 0x005342ac 0x00024 0x00024 R E 0x4
  GNU_STACK      0x000000 0x00000000 0x00000000 0x00000 0x00000 RWE 0x4

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
arm: zynq: slcr: Fix array size

An array holding status bits was defined too small. This is fixed by
removing the static array size with a compile time calculation.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
zynq: Add support for zynq_cpu_kill function

Use simple hook to slcr to stop cpu.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
net: emacps: Move request_irq to the end of probe function

Move request_irq function to the end of emacps probe
because when system crashes there could be unhadled
interrupts when crashkernel come again and after
request_irq driver starts to handle it but not all
things are initialized yet.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
ARM: call disable_nonboot_cpus() from machine_shutdown()

On Tegra at least, this change allows kexec to work with SMP enabled.
Without this,  machine_shutdown() simply puts all CPUs into a loop. If
the code of that loop is over-written, the CPUs may hang or crash (which
I do observe in practice), or cause the kexec'd kernel not to be able to
initialize them.

This fix has the added benefit that the kexec always happens on the boot
CPU, and thus kexec mirrors the initial kernel boot as much as possible.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
zynq: SMP crashkernel support

Add hook to arm crashkernel to support crashkernel on smp systems
where it is necessary to disable nonboot cpus.

Based on Stephen Warren's patch:
"ARM: call disable_nonboot_cpus() from machine_shutdown()"
https://patchwork.kernel.org/patch/1925071/
which is already applied too.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
char: xdevcfg: Allow userspace fclk controls

In order to have simple control over the FPGA clocks, controls can be
exported to userspace through sysfs.

The files 'fclk_export' and 'fclk_unexport' are created under the devcfg
device node in sysfs. Reading those files returns the valid values to
write to the corresponding file.

Writing a valid value to 'fclk_export' exports clock controls for the
chosen clock in the 'fclk' subdirectory. Similarly, writing a valid
value to 'fclk_unexport' reverts the export.

Currently the CCF API functions 'clk_enable'/'clk_disable',
'clk_round_rate' and 'clk_set_rate' are exported (clk_(un)prepare is
implicitly done during (un-)export).

enable:
  Writing non-zero to this file enables the clock. Writing zero disables it.

round_rate:
  Writing a frequency in Hz to it sets the frequency to be rounded.
  Reading the file prints the set frequency and the rounded frequency.

set_rate:
  Reading this file returns the current clock frequency. Writing sets a
  new frequency.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
misc: si570: Fix compiler warning

Fix potentially uninitialized variable.

Signed-off-by: Davor Joja <davorjoja@logicbricks.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>