nvmem: qfprom: Add keepout region for Ravelin

Some fuse ranges are protected that the AP cannot
access them. Attempting to do so causes an NOC Error.
Use the newly introduced per-soc compatible string,
and the newly introduced keepout support to attach
the set of regions we should not access.

Change-Id: I3daece532ef86b9329e63dc4d6675b52ac8dec78
Signed-off-by: Yue Liu <quic_yueliu@quicinc.com>
This commit is contained in:
Yue Liu 2023-03-03 17:39:53 +08:00
parent ae8779846a
commit 6bbd9e1f49

View File

@ -118,6 +118,37 @@ struct qfprom_soc_compatible_data {
unsigned int nkeepout;
};
static const struct nvmem_keepout ravelin_qfprom_keepout[] = {
{.start = 0x20, .end = 0x24},
{.start = 0x28, .end = 0x30},
{.start = 0x34, .end = 0x40},
{.start = 0x58, .end = 0x60},
{.start = 0x68, .end = 0x70},
{.start = 0x78, .end = 0x80},
{.start = 0x90, .end = 0x100},
{.start = 0x138, .end = 0x200},
{.start = 0x230, .end = 0x300},
{.start = 0x320, .end = 0x400},
{.start = 0x460, .end = 0x500},
{.start = 0x550, .end = 0x600},
{.start = 0x608, .end = 0x610},
{.start = 0x618, .end = 0x630},
{.start = 0x638, .end = 0x700},
{.start = 0x738, .end = 0x73c},
{.start = 0x748, .end = 0x770},
{.start = 0x7e8, .end = 0x800},
{.start = 0x888, .end = 0xa00},
{.start = 0xa38, .end = 0xb00},
{.start = 0xb08, .end = 0xb10},
{.start = 0xb18, .end = 0xd00},
{.start = 0xe18, .end = 0x1000}
};
static const struct qfprom_soc_compatible_data ravelin_qfprom = {
.keepout = ravelin_qfprom_keepout,
.nkeepout = ARRAY_SIZE(ravelin_qfprom_keepout)
};
/**
* qfprom_disable_fuse_blowing() - Undo enabling of fuse blowing.
* @priv: Our driver data.
@ -574,6 +605,7 @@ static int qfprom_probe(struct platform_device *pdev)
static const struct of_device_id qfprom_of_match[] = {
{ .compatible = "qcom,qfprom",},
{ .compatible = "qcom,ravelin-qfprom", .data = &ravelin_qfprom},
{/* sentinel */},
};
MODULE_DEVICE_TABLE(of, qfprom_of_match);