Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'qcom-drivers-for-6.10' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/drivers

Qualcomm driver updates for v6.10

The Qualcomm SCM driver initialization order is improved, to avoid any
potential for a client to find a half-initialized SCM instance.
The handling of download mode bits is updated to not attempt
QCOM_SCM_BOOT_SET_DLOAD_MODE if a io-address for the update is
specified, and that path is changed to perform a read-modify-write to
avoid updating unrelated bits. Error handling is corrected in the
peripheral authentication service (PAS) functions, to release
interconnect bandwidth votes in the case of an error. An unwanted error
print on allocation error is also removed from this code path.

The QSEECOM allow list is marked __maybe_unused to avoid build warnings
when built with !OF. The error handling related to the interconnect API
is cleaned up to avoid handling the impossible IS_ERR() condition.

initcall level is bumped to "core" for cmd-db and rpmh-rsc, as dependent
drivers like regulators, interconnects and clocks are registered at this
level.

Another attempt is made to remove the strncpy() usage in cmd-db, this
time with strtomem_pad() which has the correct characteristics.

The bwmon regmap cache is changed to maple tree.

After an attempt to add missing MODULE_DEVICE_TABLEs to debug drivers,
the intention of not having them automatically load is documented.

Operations on the pmic_glink client list is put under mutual exclusion,
to avoid races when clients are being registered. pmic_glink client
registered after the firmware notification arrived was not informed that
the firmware was up, this is resolved.

More DSPs and the apss subsystem is added to the Qualcomm sleep stats driver.

Checks for in-flight regulator requests in the RPMh RSC driver is
improved to deal with the fact that these occupy multiple registers, so
it's insufficient to just to direct address comparison.

The socinfo drivers learns about X1 Elite and SMB2360 PMIC.

The maintainers entry is split between the linux-arm-msm list and
subset that is maintained in the qcom-soc tree, to avoid some confusion
about maintainership.

* tag 'qcom-drivers-for-6.10' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (21 commits)
soc: qcom: cmd-db: replace deprecated strncpy with strtomem
soc: qcom: rpmh-rsc: Enhance check for VRM in-flight request
firmware: qcom: scm: Modify only the download bits in TCSR register
firmware: qcom: scm: Fix __scm and waitq completion variable initialization
firmware: qcom: scm: Rework dload mode availability check
firmware: qcom: scm: Remove redundant scm argument from qcom_scm_waitq_wakeup()
firmware: qcom: scm: Remove log reporting memory allocation failure
soc: qcom: pmic_glink: notify clients about the current state
soc: qcom: pmic_glink: don't traverse clients list without a lock
soc: qcom: mention intentionally broken module autoloading
firmware: qcom: qcm: fix unused qcom_scm_qseecom_allowlist
MAINTAINERS: Split Qualcomm SoC and linux-arm-msm entries
soc: qcom: qcom_stats: Add DSPs and apss subsystem stats
dt-bindings: soc: qcom: qcom,pmic-glink: document QCM6490 compatible
soc: qcom: socinfo: Add SMB2360 PMIC
soc: qcom: socinfo: Add X1E80100 SoC ID table entry
dt-bindings: arm: qcom,ids: Add SoC ID for X1E80100
soc: qcom: Update init level to core_initcall() for cmd-db and rpmh-rsc
soc: qcom: icc-bwmon: Convert to use maple tree register cache
firmware: qcom_scm: remove IS_ERR() checks from qcom_scm_bw_{en,dis}able()
...

Link: https://lore.kernel.org/r/20240427160917.1431354-1-andersson@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+151 -49
+28 -5
MAINTAINERS
··· 2586 2586 F: arch/arm64/boot/dts/qcom/sc7280* 2587 2587 F: arch/arm64/boot/dts/qcom/sdm845-cheza* 2588 2588 2589 - ARM/QUALCOMM SUPPORT 2590 - M: Bjorn Andersson <andersson@kernel.org> 2591 - M: Konrad Dybcio <konrad.dybcio@linaro.org> 2589 + ARM/QUALCOMM MAILING LIST 2592 2590 L: linux-arm-msm@vger.kernel.org 2593 - S: Maintained 2594 - T: git git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git 2595 2591 F: Documentation/devicetree/bindings/*/qcom* 2596 2592 F: Documentation/devicetree/bindings/soc/qcom/ 2597 2593 F: arch/arm/boot/dts/qcom/ ··· 2623 2627 F: include/dt-bindings/*/qcom* 2624 2628 F: include/linux/*/qcom* 2625 2629 F: include/linux/soc/qcom/ 2630 + 2631 + ARM/QUALCOMM SUPPORT 2632 + M: Bjorn Andersson <andersson@kernel.org> 2633 + M: Konrad Dybcio <konrad.dybcio@linaro.org> 2634 + L: linux-arm-msm@vger.kernel.org 2635 + S: Maintained 2636 + T: git git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git 2637 + F: Documentation/devicetree/bindings/arm/qcom-soc.yaml 2638 + F: Documentation/devicetree/bindings/arm/qcom.yaml 2639 + F: Documentation/devicetree/bindings/bus/qcom* 2640 + F: Documentation/devicetree/bindings/cache/qcom,llcc.yaml 2641 + F: Documentation/devicetree/bindings/firmware/qcom,scm.yaml 2642 + F: Documentation/devicetree/bindings/reserved-memory/qcom 2643 + F: Documentation/devicetree/bindings/soc/qcom/ 2644 + F: arch/arm/boot/dts/qcom/ 2645 + F: arch/arm/configs/qcom_defconfig 2646 + F: arch/arm/mach-qcom/ 2647 + F: arch/arm64/boot/dts/qcom/ 2648 + F: drivers/bus/qcom* 2649 + F: drivers/firmware/qcom/ 2650 + F: drivers/soc/qcom/ 2651 + F: include/dt-bindings/arm/qcom,ids.h 2652 + F: include/dt-bindings/firmware/qcom,scm.h 2653 + F: include/dt-bindings/soc/qcom* 2654 + F: include/linux/firmware/qcom 2655 + F: include/linux/soc/qcom/ 2656 + F: include/soc/qcom/ 2626 2657 2627 2658 ARM/RDA MICRO ARCHITECTURE 2628 2659 M: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
+50 -29
drivers/firmware/qcom/qcom_scm.c
··· 4 4 */ 5 5 6 6 #include <linux/arm-smccc.h> 7 + #include <linux/bitfield.h> 8 + #include <linux/bits.h> 7 9 #include <linux/clk.h> 8 10 #include <linux/completion.h> 9 11 #include <linux/cpumask.h> ··· 116 114 #define QCOM_SMC_WAITQ_FLAG_WAKE_ONE BIT(0) 117 115 #define QCOM_SMC_WAITQ_FLAG_WAKE_ALL BIT(1) 118 116 117 + #define QCOM_DLOAD_MASK GENMASK(5, 4) 118 + #define QCOM_DLOAD_NODUMP 0 119 + #define QCOM_DLOAD_FULLDUMP 1 120 + 119 121 static const char * const qcom_scm_convention_names[] = { 120 122 [SMC_CONVENTION_UNKNOWN] = "unknown", 121 123 [SMC_CONVENTION_ARM_32] = "smc arm 32", ··· 169 163 if (!__scm->path) 170 164 return 0; 171 165 172 - if (IS_ERR(__scm->path)) 173 - return -EINVAL; 174 - 175 166 mutex_lock(&__scm->scm_bw_lock); 176 167 if (!__scm->scm_vote_count) { 177 168 ret = icc_set_bw(__scm->path, 0, UINT_MAX); ··· 186 183 187 184 static void qcom_scm_bw_disable(void) 188 185 { 189 - if (IS_ERR_OR_NULL(__scm->path)) 186 + if (!__scm->path) 190 187 return; 191 188 192 189 mutex_lock(&__scm->scm_bw_lock); ··· 499 496 return qcom_scm_call_atomic(__scm->dev, &desc, NULL); 500 497 } 501 498 499 + static int qcom_scm_io_rmw(phys_addr_t addr, unsigned int mask, unsigned int val) 500 + { 501 + unsigned int old; 502 + unsigned int new; 503 + int ret; 504 + 505 + ret = qcom_scm_io_readl(addr, &old); 506 + if (ret) 507 + return ret; 508 + 509 + new = (old & ~mask) | (val & mask); 510 + 511 + return qcom_scm_io_writel(addr, new); 512 + } 513 + 502 514 static void qcom_scm_set_download_mode(bool enable) 503 515 { 504 - bool avail; 516 + u32 val = enable ? QCOM_DLOAD_FULLDUMP : QCOM_DLOAD_NODUMP; 505 517 int ret = 0; 506 518 507 - avail = __qcom_scm_is_call_available(__scm->dev, 508 - QCOM_SCM_SVC_BOOT, 509 - QCOM_SCM_BOOT_SET_DLOAD_MODE); 510 - if (avail) { 519 + if (__scm->dload_mode_addr) { 520 + ret = qcom_scm_io_rmw(__scm->dload_mode_addr, QCOM_DLOAD_MASK, 521 + FIELD_PREP(QCOM_DLOAD_MASK, val)); 522 + } else if (__qcom_scm_is_call_available(__scm->dev, QCOM_SCM_SVC_BOOT, 523 + QCOM_SCM_BOOT_SET_DLOAD_MODE)) { 511 524 ret = __qcom_scm_set_dload_mode(__scm->dev, enable); 512 - } else if (__scm->dload_mode_addr) { 513 - ret = qcom_scm_io_writel(__scm->dload_mode_addr, 514 - enable ? QCOM_SCM_BOOT_SET_DLOAD_MODE : 0); 515 525 } else { 516 526 dev_err(__scm->dev, 517 527 "No available mechanism for setting download mode\n"); ··· 573 557 */ 574 558 mdata_buf = dma_alloc_coherent(__scm->dev, size, &mdata_phys, 575 559 GFP_KERNEL); 576 - if (!mdata_buf) { 577 - dev_err(__scm->dev, "Allocation of metadata buffer failed.\n"); 560 + if (!mdata_buf) 578 561 return -ENOMEM; 579 - } 562 + 580 563 memcpy(mdata_buf, metadata, size); 581 564 582 565 ret = qcom_scm_clk_enable(); ··· 584 569 585 570 ret = qcom_scm_bw_enable(); 586 571 if (ret) 587 - return ret; 572 + goto disable_clk; 588 573 589 574 desc.args[1] = mdata_phys; 590 575 591 576 ret = qcom_scm_call(__scm->dev, &desc, &res); 592 - 593 577 qcom_scm_bw_disable(); 578 + 579 + disable_clk: 594 580 qcom_scm_clk_disable(); 595 581 596 582 out: ··· 653 637 654 638 ret = qcom_scm_bw_enable(); 655 639 if (ret) 656 - return ret; 640 + goto disable_clk; 657 641 658 642 ret = qcom_scm_call(__scm->dev, &desc, &res); 659 643 qcom_scm_bw_disable(); 644 + 645 + disable_clk: 660 646 qcom_scm_clk_disable(); 661 647 662 648 return ret ? : res.result[0]; ··· 690 672 691 673 ret = qcom_scm_bw_enable(); 692 674 if (ret) 693 - return ret; 675 + goto disable_clk; 694 676 695 677 ret = qcom_scm_call(__scm->dev, &desc, &res); 696 678 qcom_scm_bw_disable(); 679 + 680 + disable_clk: 697 681 qcom_scm_clk_disable(); 698 682 699 683 return ret ? : res.result[0]; ··· 726 706 727 707 ret = qcom_scm_bw_enable(); 728 708 if (ret) 729 - return ret; 709 + goto disable_clk; 730 710 731 711 ret = qcom_scm_call(__scm->dev, &desc, &res); 732 - 733 712 qcom_scm_bw_disable(); 713 + 714 + disable_clk: 734 715 qcom_scm_clk_disable(); 735 716 736 717 return ret ? : res.result[0]; ··· 1670 1649 * We do not yet support re-entrant calls via the qseecom interface. To prevent 1671 1650 + any potential issues with this, only allow validated machines for now. 1672 1651 */ 1673 - static const struct of_device_id qcom_scm_qseecom_allowlist[] = { 1652 + static const struct of_device_id qcom_scm_qseecom_allowlist[] __maybe_unused = { 1674 1653 { .compatible = "lenovo,thinkpad-x13s", }, 1675 1654 { } 1676 1655 }; ··· 1759 1738 */ 1760 1739 bool qcom_scm_is_available(void) 1761 1740 { 1762 - return !!__scm; 1741 + return !!READ_ONCE(__scm); 1763 1742 } 1764 1743 EXPORT_SYMBOL_GPL(qcom_scm_is_available); 1765 1744 ··· 1790 1769 return 0; 1791 1770 } 1792 1771 1793 - static int qcom_scm_waitq_wakeup(struct qcom_scm *scm, unsigned int wq_ctx) 1772 + static int qcom_scm_waitq_wakeup(unsigned int wq_ctx) 1794 1773 { 1795 1774 int ret; 1796 1775 ··· 1822 1801 goto out; 1823 1802 } 1824 1803 1825 - ret = qcom_scm_waitq_wakeup(scm, wq_ctx); 1804 + ret = qcom_scm_waitq_wakeup(wq_ctx); 1826 1805 if (ret) 1827 1806 goto out; 1828 1807 } while (more_pending); ··· 1840 1819 if (!scm) 1841 1820 return -ENOMEM; 1842 1821 1822 + scm->dev = &pdev->dev; 1843 1823 ret = qcom_scm_find_dload_address(&pdev->dev, &scm->dload_mode_addr); 1844 1824 if (ret < 0) 1845 1825 return ret; 1846 1826 1827 + init_completion(&scm->waitq_comp); 1847 1828 mutex_init(&scm->scm_bw_lock); 1848 1829 1849 1830 scm->path = devm_of_icc_get(&pdev->dev, NULL); ··· 1877 1854 if (ret) 1878 1855 return ret; 1879 1856 1880 - __scm = scm; 1881 - __scm->dev = &pdev->dev; 1882 - 1883 - init_completion(&__scm->waitq_comp); 1857 + /* Let all above stores be available after this */ 1858 + smp_store_release(&__scm, scm); 1884 1859 1885 1860 irq = platform_get_irq_optional(pdev, 0); 1886 1861 if (irq < 0) {
+33 -8
drivers/soc/qcom/cmd-db.c
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 - /* Copyright (c) 2016-2018, 2020, The Linux Foundation. All rights reserved. */ 2 + /* 3 + * Copyright (c) 2016-2018, 2020, The Linux Foundation. All rights reserved. 4 + * Copyright (c) 2024, Qualcomm Innovation Center, Inc. All rights reserved. 5 + */ 3 6 7 + #include <linux/bitfield.h> 4 8 #include <linux/debugfs.h> 5 9 #include <linux/kernel.h> 6 10 #include <linux/module.h> ··· 21 17 #define MAX_SLV_ID 8 22 18 #define SLAVE_ID_MASK 0x7 23 19 #define SLAVE_ID_SHIFT 16 20 + #define SLAVE_ID(addr) FIELD_GET(GENMASK(19, 16), addr) 21 + #define VRM_ADDR(addr) FIELD_GET(GENMASK(19, 4), addr) 24 22 25 23 /** 26 24 * struct entry_header: header for each entry in cmddb ··· 153 147 if (ret) 154 148 return ret; 155 149 156 - /* 157 - * Pad out query string to same length as in DB. NOTE: the output 158 - * query string is not necessarily '\0' terminated if it bumps up 159 - * against the max size. That's OK and expected. 160 - */ 161 - strncpy(query, id, sizeof(query)); 150 + strtomem_pad(query, id, 0); 162 151 163 152 for (i = 0; i < MAX_SLV_ID; i++) { 164 153 rsc_hdr = &cmd_db_header->header[i]; ··· 220 219 return rsc_offset(rsc_hdr, ent); 221 220 } 222 221 EXPORT_SYMBOL_GPL(cmd_db_read_aux_data); 222 + 223 + /** 224 + * cmd_db_match_resource_addr() - Compare if both Resource addresses are same 225 + * 226 + * @addr1: Resource address to compare 227 + * @addr2: Resource address to compare 228 + * 229 + * Return: true if two addresses refer to the same resource, false otherwise 230 + */ 231 + bool cmd_db_match_resource_addr(u32 addr1, u32 addr2) 232 + { 233 + /* 234 + * Each RPMh VRM accelerator resource has 3 or 4 contiguous 4-byte 235 + * aligned addresses associated with it. Ignore the offset to check 236 + * for VRM requests. 237 + */ 238 + if (addr1 == addr2) 239 + return true; 240 + else if (SLAVE_ID(addr1) == CMD_DB_HW_VRM && VRM_ADDR(addr1) == VRM_ADDR(addr2)) 241 + return true; 242 + 243 + return false; 244 + } 245 + EXPORT_SYMBOL_GPL(cmd_db_match_resource_addr); 223 246 224 247 /** 225 248 * cmd_db_read_slave_id - Get the slave ID for a given resource address ··· 387 362 { 388 363 return platform_driver_register(&cmd_db_dev_driver); 389 364 } 390 - arch_initcall(cmd_db_device_init); 365 + core_initcall(cmd_db_device_init); 391 366 392 367 MODULE_DESCRIPTION("Qualcomm Technologies, Inc. Command DB Driver"); 393 368 MODULE_LICENSE("GPL v2");
+4 -4
drivers/soc/qcom/icc-bwmon.c
··· 282 282 * Cache is necessary for using regmap fields with non-readable 283 283 * registers. 284 284 */ 285 - .cache_type = REGCACHE_RBTREE, 285 + .cache_type = REGCACHE_MAPLE, 286 286 }; 287 287 288 288 static const struct regmap_config msm8998_bwmon_global_regmap_cfg = { ··· 301 301 * Cache is necessary for using regmap fields with non-readable 302 302 * registers. 303 303 */ 304 - .cache_type = REGCACHE_RBTREE, 304 + .cache_type = REGCACHE_MAPLE, 305 305 }; 306 306 307 307 static const struct reg_field sdm845_cpu_bwmon_reg_fields[] = { ··· 369 369 * Cache is necessary for using regmap fields with non-readable 370 370 * registers. 371 371 */ 372 - .cache_type = REGCACHE_RBTREE, 372 + .cache_type = REGCACHE_MAPLE, 373 373 }; 374 374 375 375 /* BWMON v5 */ ··· 446 446 * Cache is necessary for using regmap fields with non-readable 447 447 * registers. 448 448 */ 449 - .cache_type = REGCACHE_RBTREE, 449 + .cache_type = REGCACHE_MAPLE, 450 450 }; 451 451 452 452 static void bwmon_clear_counters(struct icc_bwmon *bwmon, bool clear_all)
+9
drivers/soc/qcom/pmic_glink.c
··· 83 83 client->pdr_notify = pdr; 84 84 client->priv = priv; 85 85 86 + mutex_lock(&pg->state_lock); 86 87 mutex_lock(&pg->client_lock); 88 + 87 89 list_add(&client->node, &pg->clients); 90 + client->pdr_notify(client->priv, pg->client_state); 91 + 88 92 mutex_unlock(&pg->client_lock); 93 + mutex_unlock(&pg->state_lock); 89 94 90 95 devres_add(dev, client); 91 96 ··· 120 115 121 116 hdr = data; 122 117 118 + mutex_lock(&pg->client_lock); 123 119 list_for_each_entry(client, &pg->clients, node) { 124 120 if (client->id == le32_to_cpu(hdr->owner)) 125 121 client->cb(data, len, client->priv); 126 122 } 123 + mutex_unlock(&pg->client_lock); 127 124 128 125 return 0; 129 126 } ··· 175 168 } 176 169 177 170 if (new_state != pg->client_state) { 171 + mutex_lock(&pg->client_lock); 178 172 list_for_each_entry(client, &pg->clients, node) 179 173 client->pdr_notify(client->priv, new_state); 174 + mutex_unlock(&pg->client_lock); 180 175 pg->client_state = new_state; 181 176 } 182 177 }
+4
drivers/soc/qcom/pmic_pdcharger_ulog.c
··· 150 150 { "PMIC_LOGS_ADSP_APPS" }, 151 151 {} 152 152 }; 153 + /* 154 + * No MODULE_DEVICE_TABLE intentionally: that's a debugging module, to be 155 + * loaded manually only. 156 + */ 153 157 154 158 static struct rpmsg_driver pmic_pdcharger_ulog_rpmsg_driver = { 155 159 .probe = pmic_pdcharger_ulog_rpmsg_probe,
+4
drivers/soc/qcom/qcom_stats.c
··· 35 35 { "wpss", 605, 13 }, 36 36 { "adsp", 606, 2 }, 37 37 { "cdsp", 607, 5 }, 38 + { "cdsp1", 607, 12 }, 39 + { "gpdsp0", 607, 17 }, 40 + { "gpdsp1", 607, 18 }, 38 41 { "slpi", 608, 3 }, 39 42 { "gpu", 609, 0 }, 40 43 { "display", 610, 0 }, 41 44 { "adsp_island", 613, 2 }, 42 45 { "slpi_island", 613, 3 }, 46 + { "apss", 631, QCOM_SMEM_HOST_ANY }, 43 47 }; 44 48 45 49 struct stats_config {
+4
drivers/soc/qcom/rpm_master_stats.c
··· 148 148 { .compatible = "qcom,rpm-master-stats" }, 149 149 { }, 150 150 }; 151 + /* 152 + * No MODULE_DEVICE_TABLE intentionally: that's a debugging module, to be 153 + * loaded manually only. 154 + */ 151 155 152 156 static struct platform_driver master_stats_driver = { 153 157 .probe = master_stats_probe,
+3 -2
drivers/soc/qcom/rpmh-rsc.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 /* 3 3 * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. 4 + * Copyright (c) 2023-2024, Qualcomm Innovation Center, Inc. All rights reserved. 4 5 */ 5 6 6 7 #define pr_fmt(fmt) "%s " fmt, KBUILD_MODNAME ··· 558 557 for_each_set_bit(j, &curr_enabled, MAX_CMDS_PER_TCS) { 559 558 addr = read_tcs_cmd(drv, drv->regs[RSC_DRV_CMD_ADDR], i, j); 560 559 for (k = 0; k < msg->num_cmds; k++) { 561 - if (addr == msg->cmds[k].addr) 560 + if (cmd_db_match_resource_addr(msg->cmds[k].addr, addr)) 562 561 return -EBUSY; 563 562 } 564 563 } ··· 1155 1154 { 1156 1155 return platform_driver_register(&rpmh_driver); 1157 1156 } 1158 - arch_initcall(rpmh_driver_init); 1157 + core_initcall(rpmh_driver_init); 1159 1158 1160 1159 MODULE_DESCRIPTION("Qualcomm Technologies, Inc. RPMh Driver"); 1161 1160 MODULE_LICENSE("GPL v2");
+2
drivers/soc/qcom/socinfo.c
··· 133 133 [72] = "PMR735D", 134 134 [73] = "PM8550", 135 135 [74] = "PMK8550", 136 + [82] = "SMB2360", 136 137 }; 137 138 138 139 struct socinfo_params { ··· 431 430 { qcom_board_id(QRU1000) }, 432 431 { qcom_board_id(SM8475_2) }, 433 432 { qcom_board_id(QDU1000) }, 433 + { qcom_board_id(X1E80100) }, 434 434 { qcom_board_id(SM8650) }, 435 435 { qcom_board_id(SM4450) }, 436 436 { qcom_board_id(QDU1010) },
+1
include/dt-bindings/arm/qcom,ids.h
··· 258 258 #define QCOM_ID_QRU1000 539 259 259 #define QCOM_ID_SM8475_2 540 260 260 #define QCOM_ID_QDU1000 545 261 + #define QCOM_ID_X1E80100 555 261 262 #define QCOM_ID_SM8650 557 262 263 #define QCOM_ID_SM4450 568 263 264 #define QCOM_ID_QDU1010 587
+9 -1
include/soc/qcom/cmd-db.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 - /* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. */ 2 + /* 3 + * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. 4 + * Copyright (c) 2024, Qualcomm Innovation Center, Inc. All rights reserved. 5 + */ 3 6 4 7 #ifndef __QCOM_COMMAND_DB_H__ 5 8 #define __QCOM_COMMAND_DB_H__ ··· 24 21 25 22 const void *cmd_db_read_aux_data(const char *resource_id, size_t *len); 26 23 24 + bool cmd_db_match_resource_addr(u32 addr1, u32 addr2); 25 + 27 26 enum cmd_db_hw_type cmd_db_read_slave_id(const char *resource_id); 28 27 29 28 int cmd_db_ready(void); ··· 35 30 36 31 static inline const void *cmd_db_read_aux_data(const char *resource_id, size_t *len) 37 32 { return ERR_PTR(-ENODEV); } 33 + 34 + static inline bool cmd_db_match_resource_addr(u32 addr1, u32 addr2) 35 + { return false; } 38 36 39 37 static inline enum cmd_db_hw_type cmd_db_read_slave_id(const char *resource_id) 40 38 { return -ENODEV; }