summaryrefslogtreecommitdiffstats
path: root/external
diff options
context:
space:
mode:
authorCyril Bur <cyril.bur@au1.ibm.com>2016-10-24 15:36:47 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-10-25 19:52:02 +1100
commit9c3b35a15f3a2762288e1e460843c9c1246e1acd (patch)
treeaea6e9df4fddf12ff7dba9edaadabbbf5e787365 /external
parent29967757e58e596b5a713c8a5ef3053753324edf (diff)
downloadtalos-skiboot-9c3b35a15f3a2762288e1e460843c9c1246e1acd.tar.gz
talos-skiboot-9c3b35a15f3a2762288e1e460843c9c1246e1acd.zip
external/common: arm: Don't error trying to wrprotect with MTD access
If the access method to the flash is PNOR_MTD or BMC_MTD then the actual access is being done for us by the kernel. This means we don't need to worry about wrprotecting. The arch level shouldn't be returning an error, it should be fall though. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Acked-by: Joel Stanley <joel@jms.id.au> [stewart@linux.vnet.ibm.com: preserve Joel's ack] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'external')
-rw-r--r--external/common/arch_flash_arm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/external/common/arch_flash_arm.c b/external/common/arch_flash_arm.c
index 4e71dd99..07764369 100644
--- a/external/common/arch_flash_arm.c
+++ b/external/common/arch_flash_arm.c
@@ -324,6 +324,9 @@ int arch_flash_set_wrprotect(struct blocklevel_device *bl, int set)
if (!arch_data.init_bl || arch_data.init_bl != bl)
return -1;
+ if (arch_data.access == PNOR_MTD || arch_data.access == BMC_MTD)
+ return 0; /* Kernel looks after this for us */
+
if (!arch_data.flash_chip)
return -1;
OpenPOWER on IntegriCloud