arch/arm/mach-axxia: Fix Compiler Warnings

Fixes compilation warnings introduced by:
- LSI ACP34XX: Update new Axxia GIC Driver
  commit ba251fcf654cd1f17e72a17f7e0ea903f33f92e0
  author: David Mercado
- arch/arm/mach-axxia: Support for CPU Hotplug
  commit ef5cfa9d171bb7525ecd24b1de34342915645a93
  author: John Jacques

See below the warning messages:

arch/arm/mach-axxia/axxia-gic.c:51:0: warning: "MAX_NUM_CLUSTERS"
redefined [enabled by default]
 #define MAX_NUM_CLUSTERS    4
 ^
In file included from arch/arm/mach-axxia/axxia-gic.c:48:0:
arch/arm/mach-axxia/lsi_power_management.h:156:0: note: this is the
location of the previous definition
 #define MAX_NUM_CLUSTERS    (4)
 ^
arch/arm/mach-axxia/axxia-gic.c:52:0: warning: "CORES_PER_CLUSTER"
redefined [enabled by default]
 #define CORES_PER_CLUSTER   4
 ^
In file included from arch/arm/mach-axxia/axxia-gic.c:48:0:
arch/arm/mach-axxia/lsi_power_management.h:157:0: note: this is the
location of the previous definition
 #define CORES_PER_CLUSTER   (4)
 ^
arch/arm/mach-axxia/axxia-gic.c: In function
'axxia_hotplug_gic_secondary_init':
arch/arm/mach-axxia/axxia-gic.c:1369:24: warning: unused variable 'gic'
[-Wunused-variable]
  struct gic_chip_data *gic = &gic_data;

Signed-off-by: John Jacques <john.jacques@lsi.com>
drivers/spi: Fix Compiler Warnings

Fixes compilation warning introduced by:
- spi: Revert to mainline spi-pl022
  commit 4dbd5a248f16e8c16d09132006816a0000a82f0d
  author: Anders Berg

See below the warning message:

drivers/spi/spi-pl022.c: In function 'pl022_probe':
drivers/spi/spi-pl022.c:2222:2: warning: format '%x' expects argument of
type 'unsigned int', but argument 2 has type 'resource_size_t'
[-Wformat=]
  pr_info("pl022: mapped registers from 0x%08x to %p\n",

Signed-off-by: John Jacques <john.jacques@lsi.com>
arch/arm/mach-axxia: Fix Build Warnings

Signed-off-by: John Jacques <john.jacques@lsi.com>
drivers/net/ethernet/lsi: Fix Compiler Warnings

Fixes compilation warnings introduced by:
- LSI FEMAC Ethernet Driver
  commit 3a99fb32b9aee41fc6d30c2ebf68c3cf73a443ce
  author: David Mercado
-  arm/include: A clean up of the femac code.
  commit 4ab937c6b46316531bdf9f099553393fa9406769
  author: John Jacques

See below the warning messages:

drivers/net/ethernet/lsi/lsi_acp_net.h: In function 'femac_uncache':
drivers/net/ethernet/lsi/lsi_acp_net.h:521:2: warning: passing argument
2 of '__raw_writel' makes pointer from integer without a cast [enabled
by default]
  writel(0x0, GPREG_HPROT_FEMAC);

drivers/net/ethernet/lsi/lsi_acp_net.c: In function
'appnic_handle_link_change':
drivers/net/ethernet/lsi/lsi_acp_net.c:190:3: warning: passing argument
1 of '__raw_readl' makes pointer from integer without a cast [enabled by
default]
   if (rx_configuration != read_mac(APPNIC_RX_CONF))

arch/arm/include/asm/io.h:88:20:
note: expected 'volatile void *' but argument is of type 'long unsigned
int'
 static inline void __raw_writel(u32 val, volatile void __iomem *addr)

include/uapi/linux/byteorder/little_endian.h:32:51: note: in definition
of macro '__cpu_to_le32'
 #define __cpu_to_le32(x) ((__force __le32)(__u32)(x))

Signed-off-by: John Jacques <john.jacques@lsi.com>
arch/arm/mach-axxia: Added a Device Tree for Simulation

This simulation device tree supports virtio and mmc.

Signed-off-by: John Jacques <john.jacques@lsi.com>
arch/arm/mach-axxia: Fixed affinity error on IRQ migration

This patch redesigned the gic_set_affinity function and added
a system work queue to process the affinity requests that are
needed to be processed via the IPI. The reason for the workqueue
is to insure that all interrupts get migrated. When code relies
on and interrupt to be updated and that interrupt is being migrated,
problems arose.

This patch also adds a choice to hotplug. There are two ways to
power down the cpu, either to a low power mode or completely off.
If the power off mode is selected then the a new option is available
to power off the L2 cache as well.

Signed-off-by: John Jacques <john.jacques@lsi.com>
drivers/misc/lsi-smmon.c: Updated smmon driver

Updated smmon driver such that uncorrectable errors causes
machine_restart instead of kernel panic. Also, setting
persistent register (0xdc) bit 3 to indicate
uncorrectable errors. Updated kconfig such that if EDAC
driver is enabled in Kernel config then smmon driver will
be disabled by default.

Signed-off-by: SangeethaRao <sangeetha.rao@lsi.com>
arch/arm/mach-axxia: machine_restart() related change to axxia_restart()

Signed-off-by: SangeethaRao <sangeetha.rao@lsi.com>
arch/arm/mach-axxia: Added support for doorbell interrupts

Added support for doorbell interrupts for both RootComplex
and EndPoint modes.

Signed-off-by: SangeethaRao <sangeetha.rao@lsi.com>
Updated USB driver to not apply USB SW workarounds for 3500

Signed-off-by: SangeethaRao <sangeetha.rao@lsi.com>
arch/arm/mach-axxia: fixed failure to power up cluster

Fixed the intermittent failure to power up the cluster by
setting the L2CTLR, L2ACTLR and ACTLR2 registers. Also updated
the power on GIC process to only power on the current cpu when
powering up a GIC cluster

Signed-off-by: John Jacques <john.jacques@lsi.com>
arch/arm/mach-axxia: fixed hang in preempt kernel

Fixed the hang in the affinity code. The selection of a cpu on a
clear affinity did not have the right mask, causing the affinity
to be moved to a cpu that was not powered up.

Signed-off-by: John Jacques <john.jacques@lsi.com>