linux/drivers/soc/qcom/smem.h
Konrad Dybcio 1d234eeafc soc: qcom: smem: Expose DDR data from SMEM
Most modern Qualcomm platforms (>= SM8150) expose information about the
DDR memory present on the system via SMEM.

Details from this information is used in various scenarios, such as
multimedia drivers configuring the hardware based on the "Highest Bank
address Bit" (hbb), or the list of valid frequencies in validation
scenarios...

Add support for parsing v3-v7 version of the structs. Unforunately,
they are not versioned, so some elbow grease is necessary to determine
which one is present. See for reference:

ver 3: 1d11897d2c
ver 4: f6e9aa5492
ver 5: 617d3297ab
ver 5 with 6regions: d770e009f9
ver 6: 62659b557f
ver 7: 734d95599c

Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: 1d11897d2c
Link: https://lore.kernel.org/r/20260727-topic-smem_dramc-v5-2-66188b3e338d@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2026-07-30 17:05:46 -05:00

13 lines
331 B
C

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __QCOM_SMEM_INTERNAL__
#define __QCOM_SMEM_INTERNAL__
#include <linux/device.h>
struct qcom_smem;
struct dentry *smem_dram_parse(struct qcom_smem *smem, struct device *dev);
void *__qcom_smem_get(struct qcom_smem *smem, unsigned int host, unsigned int item, size_t *size);
#endif