Christophe JAILLET
20be064ec8
nvmem: sprd: Fix an error message
...
'ret' is known to be 0 here.
The expected error status is stored in 'status', so use it instead.
Also change %d in %u, because status is an u32, not a int.
Fixes: 096030e7f4 ("nvmem: sprd: Add Spreadtrum SoCs eFuse support")
Acked-by: Chunyan Zhang <[email protected] >
Signed-off-by: Christophe JAILLET <[email protected] >
Link: https://lore.kernel.org/r/5bc44aace2fe7e1c91d8b35c8fe31e7134ceab2c.1620406852.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <[email protected] >
2021-05-14 13:39:50 +02:00
Tiezhu Yang
bcd14bb7a6
nvmem: sprd: Fix return value of sprd_efuse_probe()
...
When call function devm_platform_ioremap_resource(), we should use IS_ERR()
to check the return value and return PTR_ERR() if failed.
Fixes: 096030e7f4 ("nvmem: sprd: Add Spreadtrum SoCs eFuse support")
Signed-off-by: Tiezhu Yang <[email protected] >
Signed-off-by: Srinivas Kandagatla <[email protected] >
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected] >
2020-07-29 17:12:08 +02:00
Baolin Wang
4bd5a15d93
nvmem: sprd: Determine double data programming from device data
...
We've saved the double data flag in the device data, so we should
use it when programming a block.
Signed-off-by: Baolin Wang <[email protected] >
Signed-off-by: Srinivas Kandagatla <[email protected] >
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected] >
2020-03-23 20:05:23 +01:00
Freeman Liu
5af25388ba
nvmem: sprd: Optimize the block lock operation
...
We have some cases that will programme the eFuse block partially multiple
times, so we should allow the block to be programmed again if it was
programmed partially. But we should lock the block if the whole block
was programmed. Thus add a condition to validate if we need lock the
block or not.
Moreover we only enable the auto-check function when locking the block.
Signed-off-by: Freeman Liu <[email protected] >
Signed-off-by: Baolin Wang <[email protected] >
Signed-off-by: Srinivas Kandagatla <[email protected] >
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected] >
2020-03-23 20:05:23 +01:00
Freeman Liu
c66ebde4d9
nvmem: sprd: Fix the block lock operation
...
According to the Spreadtrum eFuse specification, we should write 0 to
the block to trigger the lock operation.
Fixes: 096030e7f4 ("nvmem: sprd: Add Spreadtrum SoCs eFuse support")
Cc: stable <[email protected] >
Signed-off-by: Freeman Liu <[email protected] >
Signed-off-by: Baolin Wang <[email protected] >
Signed-off-by: Srinivas Kandagatla <[email protected] >
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected] >
2020-03-23 20:05:23 +01:00
Freeman Liu
096030e7f4
nvmem: sprd: Add Spreadtrum SoCs eFuse support
...
The Spreadtrum eFuse controller is widely used to dump chip ID,
configuration setting, function select and so on, as well as
supporting one-time programming.
Signed-off-by: Freeman Liu <[email protected] >
Signed-off-by: Baolin Wang <[email protected] >
Signed-off-by: Srinivas Kandagatla <[email protected] >
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected] >
2019-11-05 18:35:31 +01:00