aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/powernv/opal-xscom.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-07-28powerpc/powernv: Switch powernv drivers to use machine_xxx_initcall()Michael Ellerman1-1/+1
A lot of the code in platforms/powernv is using non-machine initcalls. That means if a kernel built with powernv support runs on another platform, for example pseries, the initcalls will still run. That is usually OK, because the initcalls will check for something in the device tree or elsewhere before doing anything, so on other platforms they will usually just return. But it's fishy for powernv code to be running on other platforms, so switch them all to be machine initcalls. If we want any of them to run on other platforms in future they should move to sysdev. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-02-28powerpc/powernv: Fix indirect XSCOM unmanglingBenjamin Herrenschmidt1-9/+12
We need to unmangle the full address, not just the register number, and we also need to support the real indirect bit being set for in-kernel uses. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> CC: <stable@vger.kernel.org> [v3.13]
2013-12-13powerpc/powernv: Fix endian issue in opal_xscom_readAnton Blanchard1-1/+3
opal_xscom_read uses a pointer to return the data so we need to byteswap it on LE builds. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-11-06powerpc/powernv: Add support for indirect XSCOM via debugfsBenjamin Herrenschmidt1-0/+23
Indirect XSCOM addresses normally have the top bit set (of the 64-bit address). This doesn't work via the normal debugfs interface, so we use a different encoding, which we need to convert before calling OPAL. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-11-06powerpc/scom: Enable 64-bit addressesBenjamin Herrenschmidt1-3/+3
On P8, XSCOM addresses has a special "indirect" form that requires more than 32-bits, so let's use u64 everywhere in the code instead of u32. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-10-11powerpc/powernv: Add scom support under OPALv3Benjamin Herrenschmidt1-0/+105
OPAL v3 provides interfaces to access the chips XSCOM, expose this via the existing scom infrastructure. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>