Merge "nvmem: qfprom: Add keepout regions and Enable qfprom support"

This commit is contained in:
qctecmdr 2024-03-14 12:51:48 -07:00 committed by Gerrit - the friendly Code Review server
commit b6ed876cc9
3 changed files with 32 additions and 3 deletions

View File

@ -166,7 +166,7 @@ CONFIG_QCOM_PIL_INFO=m
CONFIG_QCOM_PMU_LIB=m
CONFIG_QCOM_Q6V5_COMMON=m
CONFIG_QCOM_Q6V5_PAS=m
# CONFIG_QCOM_QFPROM_SYS is not set
CONFIG_QCOM_QFPROM_SYS=m
CONFIG_QCOM_QMI_HELPERS=m
CONFIG_QCOM_RAMDUMP=m
CONFIG_QCOM_RPMH=m

View File

@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2015 Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#include <linux/clk.h>
@ -175,6 +175,34 @@ static const struct qfprom_soc_compatible_data pitti_qfprom = {
.nkeepout = ARRAY_SIZE(pitti_qfprom_keepout)
};
static const struct nvmem_keepout niobe_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 = 0x150, .end = 0x200},
{.start = 0x238, .end = 0x300},
{.start = 0x328, .end = 0x400},
{.start = 0x4a8, .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 = 0x898, .end = 0xa00},
{.start = 0xa50, .end = 0xb00},
{.start = 0xb04, .end = 0xb10},
{.start = 0xcc0, .end = 0x1000},
};
static const struct qfprom_soc_compatible_data niobe_qfprom = {
.keepout = niobe_qfprom_keepout,
.nkeepout = ARRAY_SIZE(niobe_qfprom_keepout)
};
/**
* qfprom_disable_fuse_blowing() - Undo enabling of fuse blowing.
@ -432,7 +460,6 @@ static int qfprom_probe(struct platform_device *pdev)
const struct qfprom_soc_compatible_data *soc_data;
struct qfprom_priv *priv;
int ret;
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;
@ -519,6 +546,7 @@ static const struct of_device_id qfprom_of_match[] = {
{ .compatible = "qcom,sc7280-qfprom", .data = &sc7280_qfprom},
{ .compatible = "qcom,cliffs-qfprom", .data = &cliffs_qfprom},
{ .compatible = "qcom,pitti-qfprom", .data = &pitti_qfprom},
{ .compatible = "qcom,niobe-qfprom", .data = &niobe_qfprom},
{/* sentinel */},
};
MODULE_DEVICE_TABLE(of, qfprom_of_match);

View File

@ -155,6 +155,7 @@ def define_niobe():
"drivers/soc/qcom/qcom_ramdump.ko",
"drivers/soc/qcom/qcom_rpmh.ko",
"drivers/soc/qcom/qcom_wdt_core.ko",
"drivers/soc/qcom/qfprom-sys.ko",
"drivers/soc/qcom/qmi_helpers.ko",
"drivers/soc/qcom/qti_battery_debug.ko",
"drivers/soc/qcom/secure_buffer.ko",