History log of /arch/powerpc/platforms/powernv/opal-flash.c
Revision Date Author Comments
8b8f7bf4c218628fd243d03fc85cdbc7039e9e35 05-Jun-2014 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> powerpc/powernv: Pass buffer size to OPAL validate flash call

We pass actual buffer size to opal_validate_flash() OPAL API call
and in return it contains output buffer size.

Commit cc146d1d (Fix little endian issues) missed to set the size
param before making OPAL call. So firmware image validation fails.

This patch sets size variable before making OPAL call.

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Tested-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2196c6f1ed66eef23df3b478cfe71661ae83726e 09-Apr-2014 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> powerpc/powernv: Return secondary CPUs to firmware before FW update

Firmware update on PowerNV platform takes several minutes. During
this time one CPU is stuck in FW and the kernel complains about "soft
lockups".

This patch returns all secondary CPUs to firmware before starting
firmware update process.

[ Reworked a bit and cleaned up -- BenH ]

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
3441f04b4b62758a798f9fbbf2047dfedf0329a5 22-Apr-2014 Anton Blanchard <anton@samba.org> powerpc/powernv: Create OPAL sglist helper functions and fix endian issues

We have two copies of code that creates an OPAL sg list. Consolidate
these into a common set of helpers and fix the endian issues.

The flash interface embedded a version number in the num_entries
field, whereas the dump interface did did not. Since versioning
wasn't added to the flash interface and it is impossible to add
this in a backwards compatible way, just remove it.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
cc146d1db0673396429ce4f906350d684ef4ca2a 23-Apr-2014 Anton Blanchard <anton@samba.org> powerpc/powernv: Fix little endian issues in OPAL flash code

With this patch I was able to update firmware on an LE kernel.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
bf16a4c2515ace64f08f7adb182ca147c5b01145 02-Jan-2014 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> powerpc/powernv: Increase candidate fw image size

At present we assume candidate image is <= 256MB. But in P8,
candidate image size can go up to 750MB. Hence increasing
candidate image max size to 1GB.

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
8faaaead62c3c7394fa6302303ce70e484b509ba 07-Jan-2014 Masanari Iida <standby24x7@gmail.com> treewide: fix comments and printk msgs

This patch fixed several typo in printk from various
part of kernel source.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
7e1ce5a492e18449fd47ef6305b26e0c572d26e9 18-Nov-2013 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> powerpc/powernv: Move SG list structure to header file

Move SG list and entry structure to header file so that
it can be used in other places as well.

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
50bd6153d1a68354a0a0c8bca1fe949fa8875875 24-Oct-2013 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> powerpc/powernv: Code update interface

Code update interface for powernv platform. This provides
sysfs interface to pass new image, validate, update and
commit images.

This patch includes:
- Below OPAL APIs for code update
- opal_validate_flash()
- opal_manage_flash()
- opal_update_flash()

- Create below sysfs files under /sys/firmware/opal
- image : Interface to pass new FW image
- validate_flash : Validate candidate image
- manage_flash : Commit/Reject operations
- update_flash : Flash new candidate image

Updating Image:
"update_flash" is an interface to indicate flash new FW.
It just passes image SG list to FW. Actual flashing is done
during system reboot time.

Note:
- SG entry format:
I have kept version number to keep this list similar to what
PAPR is defined.

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>