drivers/rapidio/lsi: squash a bunch rapidio stuff together and Cleanup

Remove extraneous diagnostic message.

fixed getting vsid and dse_id from interrupt register

The CNTLZW macro only works if interrupts bits 0,1,2,3,4,8,16, it does
not work for other cases. Thus made a fix so that the proper vsid and
dse_id can be retrieved from the interrupt register.

Reset the AXXIA RIO controller to use 'port index' of 0 in all cases
to reduce addressing errors.  Also, fix a confusion in the AXXIA RIO
specific driver code between 'id' and 'port index'.

Add definition for AXXIA_RIO_SYSMEM_BARRIER() for ARM platform using
assembly directive '__asm__ __volatile__ ("dmb" : : : "memory")'.

Update diagnostic messages and compile headers for lock debugging.
Add initialization of component tag for AXXIA RIO endpoints that
prevents full network enumeration of boards with multiple controllers.

This patch adds support for enumeration of multiple SRIO controllers
to the Axxia AXM55xx platform.  Note that special handling is needed
to disambiguate an interlock issue.  This patch only improves the
enumeration algorithm for instances of this platform.

Add 'cookie' to private data structure and test for it when performing
local memory accesses.  Also improve bounds checking in code that tests
for available DMEs when opening/closing mailboxes.

Signed-off-by: ningligong <ning.li@lsi.com>
Signed-off-by: Paul Butler <paul.butler@windriver.com>
Signed-off-by: Michael Bringmann <michael.bringmann@lsi.com>
LSI: Fix Device Tree "compatible" fields

The latest boot loader updates the frequency of the clocks in the
device tree; it expects there to be a place to put them.

Fix the device trees for ACP and AXM platforms such that the "compatible"
field uses the form <manufacturer>,<model>.

Signed-off-by: John Jacques <john.jacques@lsi.com>
Signed-off-by: David Mercado <david.mercado@windriver.com>
Signed-off-by: Paul Butler <paul.butler@windriver.com>
arch/powerpc: Backport of 32dda05f4ec2b854b594bd91590c46c5197d77e1

Otherwise, we get a debug traceback due to the use of
smp_processor_id() (or get_paca()) inside hard_smp_processor_id().
mpic_host_map() is just looking for a default CPU, so it doesn't matter
if we migrate after getting the CPU ID.

This is signed off by Scott Wood <scottwood@freescale.com>

Signed-off-by: John Jacques <john.jacques@lsi.com>
Added support for ncr_read/ncr_write to access PCIe/SRIO SerDes config in 0x115 node

Signed-off-by: SangeethaRao <sangeetha.rao@lsi.com>
drivers/i2c-axxia: Support I2C_M_RECV_LEN

Add support for the I2C_M_RECV_LEN flag to enable SMBus block data transfers.

scripts/setlocalversion strips out the tag if there is a match
since the Linux version is in Makefile.  Without the tag information,
there is no way to get back to the specific tag used in defect
reports etc.  This patch adds, in the LSI Axxia case, the lsi tag.

Add a timeout condition to the soft reset code.

Currently this will time out when running on simulator since it fails to clear
the soft reset bit.

Signed-off-by: John Jacques <john.jacques@lsi.com>
Signed-off-by: Anders Berg <anders.berg@lsi.com>
arm/mach-axxia: Same build for HW and simlation and DDR Retention Reset and clock init.

Added a flush of the L3 cache before initiating a DDR retention
reset.

In some tests, a data synchronization barrier is needed
after turning the L3 cache back on (part of the L3 cache
flush process).  Without the barrier, resets sometimes fail.

Removed local "kill_time" function; now uses udelay().

Removed the config ARCH_AXXIA_SIM, that used to identify builds for simulator.
The same build can now be run on both hardware and simulation platforms, using
different DTBs.

Handle minor difference in clock config in simulator and read hardware.

By default, the simulator only supports 4 cores; the axm55xxsim.dts
device tree now reflects that.  It is not difficult to support all
16 cores; a device tree for that, axm55xxsim16.dts, is provided for
that as well.

Signed-off-by: Anders Berg <anders.berg@lsi.com>
Signed-off-by: Michael Bringmann <michael.bringmann@lsi.com>
Signed-off-by: John Jacques <john.jacques@lsi.com>
LSI AXM55XX/rapidio: Stability and bug fix improvements , Correct boundary, Expand valid condition.

Add additional spinlocks/mutexes to each controller state to increase
concurrency and performance.  Fix some bound checks for full outbound
DME descriptor chains, correct a lockup/delay issue with errors in the
outbound DME chains, and remove a delay loop.

rapidio/LSI AXM55xx: Correct some boundary checks for argument values.

Also correct formatting of platform-specific function code.

LSI AXM55xx: Expand valid condition checks for inbound message DME chains.

Signed-off-by: Michael Bringmann <michael.bringmann@lsi.com>
axxia: Remove Wrapper Functions

These functions were temporary.  They were added to allow
development to continue on an external module that was not,
at the time, released under the GPL.

Signed-off-by: John Jacques <john.jacques@lsi.com>
Signed-off-by: Paul Butler <paul.butler@windriver.com>