Merge tag 'qcom-drivers-for-6.13' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/drivers
Qualcomm driver updates for v6.13 Enable QSEECOM, and thereby access to EFI variables, for Lenovo Yoga Slim 7x, Dell XPS 13, Microsoft Surface Pro 9. Last Level Cache Controller (LLCC) driver code is shuffled, to improve readability of the tables. The Qualcomm socinfo driver gains support for QCS615, QCS9100, SAR1130P, SAR2130P, and SA8255P. A few drivers are simplified using dev_err_probe() and guard(), and a few kernel-doc issues are corrected. Mentioning of the #linux-msm IRC channel is added to the MAINTAINERS file. * tag 'qcom-drivers-for-6.13' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (30 commits) soc: qcom: socinfo: add QCS9100 ID dt-bindings: arm: qcom,ids: add SoC ID for QCS9100 dt-bindings: soc: qcom,aoss-qmp: Document the QCS8300 AOSS channel dt-bindings: soc: qcom: add qcom,qcs8300-imem compatible dt-bindings: firmware: qcom,scm: document SCM on QCS8300 SoCs soc: qcom: socinfo: add support for SA8255P dt-bindings: arm: qcom: add the SoC ID for SA8255P soc: qcom: smp2p: Simplify code with dev_err_probe() soc: qcom: smem: Simplify code with dev_err_probe() soc: qcom: rpmh-rsc: Simplify code with dev_err_probe() dt-bindings: soc: qcom: aoss-qmp: document support for SA8255p dt-bindings: firmware: qcom,scm: document support for SA8255p dt-bindings: soc: qcom,aoss-qmp: Add SAR2130P compatible dt-bindings: firmware: qcom,scm: Add SAR2130P compatible soc: qcom: socinfo: add SoC IDs for SAR1130P and SAR2130P dt-bindings: arm: qcom,ids: add SoC ID for SAR2130P and SAR1130P dt-bindings: soc: qcom: aoss-qmp: Add SM8750 soc: qcom: socinfo: Add QCS615 SoC ID table entry dt-bindings: arm: qcom,ids: add SoC ID for QCS615 soc: qcom: smem: Fix up kerneldoc ... Link: https://lore.kernel.org/r/20241102231953.871067-1-andersson@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
@@ -42,8 +42,11 @@ properties:
|
||||
- qcom,scm-msm8996
|
||||
- qcom,scm-msm8998
|
||||
- qcom,scm-qcm2290
|
||||
- qcom,scm-qcs8300
|
||||
- qcom,scm-qdu1000
|
||||
- qcom,scm-sa8255p
|
||||
- qcom,scm-sa8775p
|
||||
- qcom,scm-sar2130p
|
||||
- qcom,scm-sc7180
|
||||
- qcom,scm-sc7280
|
||||
- qcom,scm-sc8180x
|
||||
@@ -204,6 +207,7 @@ allOf:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,scm-sa8255p
|
||||
- qcom,scm-sa8775p
|
||||
then:
|
||||
properties:
|
||||
|
||||
@@ -25,8 +25,11 @@ properties:
|
||||
compatible:
|
||||
items:
|
||||
- enum:
|
||||
- qcom,qcs8300-aoss-qmp
|
||||
- qcom,qdu1000-aoss-qmp
|
||||
- qcom,sa8255p-aoss-qmp
|
||||
- qcom,sa8775p-aoss-qmp
|
||||
- qcom,sar2130p-aoss-qmp
|
||||
- qcom,sc7180-aoss-qmp
|
||||
- qcom,sc7280-aoss-qmp
|
||||
- qcom,sc8180x-aoss-qmp
|
||||
@@ -40,6 +43,7 @@ properties:
|
||||
- qcom,sm8450-aoss-qmp
|
||||
- qcom,sm8550-aoss-qmp
|
||||
- qcom,sm8650-aoss-qmp
|
||||
- qcom,sm8750-aoss-qmp
|
||||
- qcom,x1e80100-aoss-qmp
|
||||
- const: qcom,aoss-qmp
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ properties:
|
||||
- qcom,msm8226-imem
|
||||
- qcom,msm8974-imem
|
||||
- qcom,qcs404-imem
|
||||
- qcom,qcs8300-imem
|
||||
- qcom,qdu1000-imem
|
||||
- qcom,sa8775p-imem
|
||||
- qcom,sc7180-imem
|
||||
|
||||
@@ -2805,6 +2805,7 @@ F: arch/arm64/boot/dts/qcom/sdm845-cheza*
|
||||
|
||||
ARM/QUALCOMM MAILING LIST
|
||||
L: linux-arm-msm@vger.kernel.org
|
||||
C: irc://irc.oftc.net/linux-msm
|
||||
F: Documentation/devicetree/bindings/*/qcom*
|
||||
F: Documentation/devicetree/bindings/soc/qcom/
|
||||
F: arch/arm/boot/dts/qcom/
|
||||
@@ -2846,6 +2847,7 @@ M: Bjorn Andersson <andersson@kernel.org>
|
||||
M: Konrad Dybcio <konradybcio@kernel.org>
|
||||
L: linux-arm-msm@vger.kernel.org
|
||||
S: Maintained
|
||||
C: irc://irc.oftc.net/linux-msm
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git
|
||||
F: Documentation/devicetree/bindings/arm/qcom-soc.yaml
|
||||
F: Documentation/devicetree/bindings/arm/qcom.yaml
|
||||
@@ -18202,6 +18204,7 @@ PIN CONTROLLER - QUALCOMM
|
||||
M: Bjorn Andersson <andersson@kernel.org>
|
||||
L: linux-arm-msm@vger.kernel.org
|
||||
S: Maintained
|
||||
C: irc://irc.oftc.net/linux-msm
|
||||
F: Documentation/devicetree/bindings/pinctrl/qcom,*
|
||||
F: drivers/pinctrl/qcom/
|
||||
|
||||
|
||||
@@ -1731,9 +1731,12 @@ EXPORT_SYMBOL_GPL(qcom_scm_qseecom_app_send);
|
||||
+ any potential issues with this, only allow validated machines for now.
|
||||
*/
|
||||
static const struct of_device_id qcom_scm_qseecom_allowlist[] __maybe_unused = {
|
||||
{ .compatible = "dell,xps13-9345" },
|
||||
{ .compatible = "lenovo,flex-5g" },
|
||||
{ .compatible = "lenovo,thinkpad-t14s" },
|
||||
{ .compatible = "lenovo,thinkpad-x13s", },
|
||||
{ .compatible = "lenovo,yoga-slim7x" },
|
||||
{ .compatible = "microsoft,arcata", },
|
||||
{ .compatible = "microsoft,romulus13", },
|
||||
{ .compatible = "microsoft,romulus15", },
|
||||
{ .compatible = "qcom,sc8180x-primus" },
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -585,7 +585,8 @@ int geni_se_clk_tbl_get(struct geni_se *se, unsigned long **tbl)
|
||||
|
||||
for (i = 0; i < MAX_CLK_PERF_LEVEL; i++) {
|
||||
freq = clk_round_rate(se->clk, freq + 1);
|
||||
if (freq <= 0 || freq == se->clk_perf_tbl[i - 1])
|
||||
if (freq <= 0 ||
|
||||
(i > 0 && freq == se->clk_perf_tbl[i - 1]))
|
||||
break;
|
||||
se->clk_perf_tbl[i] = freq;
|
||||
}
|
||||
|
||||
@@ -84,16 +84,16 @@ int qcom_pbs_trigger_event(struct pbs_dev *pbs, u8 bitmap)
|
||||
if (IS_ERR_OR_NULL(pbs))
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&pbs->lock);
|
||||
guard(mutex)(&pbs->lock);
|
||||
ret = regmap_read(pbs->regmap, pbs->base + PBS_CLIENT_SCRATCH2, &val);
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
return ret;
|
||||
|
||||
if (val == PBS_CLIENT_SCRATCH2_ERROR) {
|
||||
/* PBS error - clear SCRATCH2 register */
|
||||
ret = regmap_write(pbs->regmap, pbs->base + PBS_CLIENT_SCRATCH2, 0);
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
return ret;
|
||||
}
|
||||
|
||||
for (bit_pos = 0; bit_pos < 8; bit_pos++) {
|
||||
@@ -104,37 +104,31 @@ int qcom_pbs_trigger_event(struct pbs_dev *pbs, u8 bitmap)
|
||||
ret = regmap_update_bits(pbs->regmap, pbs->base + PBS_CLIENT_SCRATCH2,
|
||||
BIT(bit_pos), 0);
|
||||
if (ret < 0)
|
||||
goto out_clear_scratch1;
|
||||
break;
|
||||
|
||||
/* Set the PBS sequence bit position */
|
||||
ret = regmap_update_bits(pbs->regmap, pbs->base + PBS_CLIENT_SCRATCH1,
|
||||
BIT(bit_pos), BIT(bit_pos));
|
||||
if (ret < 0)
|
||||
goto out_clear_scratch1;
|
||||
break;
|
||||
|
||||
/* Initiate the SW trigger */
|
||||
ret = regmap_update_bits(pbs->regmap, pbs->base + PBS_CLIENT_TRIG_CTL,
|
||||
PBS_CLIENT_SW_TRIG_BIT, PBS_CLIENT_SW_TRIG_BIT);
|
||||
if (ret < 0)
|
||||
goto out_clear_scratch1;
|
||||
break;
|
||||
|
||||
ret = qcom_pbs_wait_for_ack(pbs, bit_pos);
|
||||
if (ret < 0)
|
||||
goto out_clear_scratch1;
|
||||
break;
|
||||
|
||||
/* Clear the PBS sequence bit position */
|
||||
regmap_update_bits(pbs->regmap, pbs->base + PBS_CLIENT_SCRATCH1, BIT(bit_pos), 0);
|
||||
regmap_update_bits(pbs->regmap, pbs->base + PBS_CLIENT_SCRATCH2, BIT(bit_pos), 0);
|
||||
}
|
||||
|
||||
out_clear_scratch1:
|
||||
/* Clear all the requested bitmap */
|
||||
ret = regmap_update_bits(pbs->regmap, pbs->base + PBS_CLIENT_SCRATCH1, bitmap, 0);
|
||||
|
||||
out:
|
||||
mutex_unlock(&pbs->lock);
|
||||
|
||||
return ret;
|
||||
return regmap_update_bits(pbs->regmap, pbs->base + PBS_CLIENT_SCRATCH1, bitmap, 0);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(qcom_pbs_trigger_event);
|
||||
|
||||
|
||||
@@ -540,6 +540,7 @@ static const struct of_device_id qcom_pdm_domains[] __maybe_unused = {
|
||||
{ .compatible = "qcom,msm8996", .data = msm8996_domains, },
|
||||
{ .compatible = "qcom,msm8998", .data = msm8998_domains, },
|
||||
{ .compatible = "qcom,qcm2290", .data = qcm2290_domains, },
|
||||
{ .compatible = "qcom,qcm6490", .data = sc7280_domains, },
|
||||
{ .compatible = "qcom,qcs404", .data = qcs404_domains, },
|
||||
{ .compatible = "qcom,sc7180", .data = sc7180_domains, },
|
||||
{ .compatible = "qcom,sc7280", .data = sc7280_domains, },
|
||||
|
||||
@@ -195,8 +195,8 @@ static void qmi_send_new_lookup(struct qmi_handle *qmi, struct qmi_service *svc)
|
||||
* qmi_add_lookup() - register a new lookup with the name service
|
||||
* @qmi: qmi handle
|
||||
* @service: service id of the request
|
||||
* @instance: instance id of the request
|
||||
* @version: version number of the request
|
||||
* @instance: instance id of the request
|
||||
*
|
||||
* Registering a lookup query with the name server will cause the name server
|
||||
* to send NEW_SERVER and DEL_SERVER control messages to this socket as
|
||||
|
||||
@@ -1045,12 +1045,9 @@ static int rpmh_rsc_probe(struct platform_device *pdev)
|
||||
* do. To avoid adding this check to our children we'll do it now.
|
||||
*/
|
||||
ret = cmd_db_ready();
|
||||
if (ret) {
|
||||
if (ret != -EPROBE_DEFER)
|
||||
dev_err(&pdev->dev, "Command DB not available (%d)\n",
|
||||
ret);
|
||||
return ret;
|
||||
}
|
||||
if (ret)
|
||||
return dev_err_probe(&pdev->dev, ret,
|
||||
"Command DB not available\n");
|
||||
|
||||
drv = devm_kzalloc(&pdev->dev, sizeof(*drv), GFP_KERNEL);
|
||||
if (!drv)
|
||||
|
||||
@@ -499,6 +499,8 @@ static int qcom_smem_alloc_global(struct qcom_smem *smem,
|
||||
*
|
||||
* Allocate space for a given smem item of size @size, given that the item is
|
||||
* not yet allocated.
|
||||
*
|
||||
* Return: 0 on success, negative errno on failure.
|
||||
*/
|
||||
int qcom_smem_alloc(unsigned host, unsigned item, size_t size)
|
||||
{
|
||||
@@ -677,6 +679,8 @@ invalid_canary:
|
||||
*
|
||||
* Looks up smem item and returns pointer to it. Size of smem
|
||||
* item is returned in @size.
|
||||
*
|
||||
* Return: a pointer to an SMEM item on success, ERR_PTR() on failure.
|
||||
*/
|
||||
void *qcom_smem_get(unsigned host, unsigned item, size_t *size)
|
||||
{
|
||||
@@ -709,6 +713,8 @@ EXPORT_SYMBOL_GPL(qcom_smem_get);
|
||||
*
|
||||
* To be used by smem clients as a quick way to determine if any new
|
||||
* allocations has been made.
|
||||
*
|
||||
* Return: number of available bytes on success, negative errno on failure.
|
||||
*/
|
||||
int qcom_smem_get_free_space(unsigned host)
|
||||
{
|
||||
@@ -758,7 +764,7 @@ static bool addr_in_range(void __iomem *base, size_t size, void *addr)
|
||||
* with an smem item pointer (previously returned by qcom_smem_get()
|
||||
* @p: the virtual address to convert
|
||||
*
|
||||
* Returns 0 if the pointer provided is not within any smem region.
|
||||
* Return: physical address of the SMEM item (if found), 0 otherwise
|
||||
*/
|
||||
phys_addr_t qcom_smem_virt_to_phys(void *p)
|
||||
{
|
||||
@@ -1180,11 +1186,9 @@ static int qcom_smem_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
hwlock_id = of_hwspin_lock_get_id(pdev->dev.of_node, 0);
|
||||
if (hwlock_id < 0) {
|
||||
if (hwlock_id != -EPROBE_DEFER)
|
||||
dev_err(&pdev->dev, "failed to retrieve hwlock\n");
|
||||
return hwlock_id;
|
||||
}
|
||||
if (hwlock_id < 0)
|
||||
return dev_err_probe(&pdev->dev, hwlock_id,
|
||||
"failed to retrieve hwlock\n");
|
||||
|
||||
smem->hwlock = hwspin_lock_request_specific(hwlock_id);
|
||||
if (!smem->hwlock)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* Copyright (c) 2015, Sony Mobile Communications Inc.
|
||||
* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
#include <linux/cleanup.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/module.h>
|
||||
@@ -60,20 +61,15 @@ static struct qcom_smem_state *of_node_to_state(struct device_node *np)
|
||||
{
|
||||
struct qcom_smem_state *state;
|
||||
|
||||
mutex_lock(&list_lock);
|
||||
guard(mutex)(&list_lock);
|
||||
|
||||
list_for_each_entry(state, &smem_states, list) {
|
||||
if (state->of_node == np) {
|
||||
kref_get(&state->refcount);
|
||||
goto unlock;
|
||||
return state;
|
||||
}
|
||||
}
|
||||
state = ERR_PTR(-EPROBE_DEFER);
|
||||
|
||||
unlock:
|
||||
mutex_unlock(&list_lock);
|
||||
|
||||
return state;
|
||||
return ERR_PTR(-EPROBE_DEFER);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -467,12 +467,9 @@ static int qcom_smp2p_alloc_outbound_item(struct qcom_smp2p *smp2p)
|
||||
int ret;
|
||||
|
||||
ret = qcom_smem_alloc(pid, smem_id, sizeof(*out));
|
||||
if (ret < 0 && ret != -EEXIST) {
|
||||
if (ret != -EPROBE_DEFER)
|
||||
dev_err(smp2p->dev,
|
||||
"unable to allocate local smp2p item\n");
|
||||
return ret;
|
||||
}
|
||||
if (ret < 0 && ret != -EEXIST)
|
||||
return dev_err_probe(smp2p->dev, ret,
|
||||
"unable to allocate local smp2p item\n");
|
||||
|
||||
out = qcom_smem_get(pid, smem_id, NULL);
|
||||
if (IS_ERR(out)) {
|
||||
|
||||
@@ -422,8 +422,10 @@ static const struct soc_id soc_id[] = {
|
||||
{ qcom_board_id(IPQ9510) },
|
||||
{ qcom_board_id(QRB4210) },
|
||||
{ qcom_board_id(QRB2210) },
|
||||
{ qcom_board_id(SAR2130P) },
|
||||
{ qcom_board_id(SM8475) },
|
||||
{ qcom_board_id(SM8475P) },
|
||||
{ qcom_board_id(SA8255P) },
|
||||
{ qcom_board_id(SA8775P) },
|
||||
{ qcom_board_id(QRU1000) },
|
||||
{ qcom_board_id(SM8475_2) },
|
||||
@@ -431,6 +433,7 @@ static const struct soc_id soc_id[] = {
|
||||
{ qcom_board_id(X1E80100) },
|
||||
{ qcom_board_id(SM8650) },
|
||||
{ qcom_board_id(SM4450) },
|
||||
{ qcom_board_id(SAR1130P) },
|
||||
{ qcom_board_id(QDU1010) },
|
||||
{ qcom_board_id(QRU1032) },
|
||||
{ qcom_board_id(QRU1052) },
|
||||
@@ -443,8 +446,10 @@ static const struct soc_id soc_id[] = {
|
||||
{ qcom_board_id(QCM8550) },
|
||||
{ qcom_board_id(IPQ5300) },
|
||||
{ qcom_board_id(IPQ5321) },
|
||||
{ qcom_board_id(QCS9100) },
|
||||
{ qcom_board_id(QCS8300) },
|
||||
{ qcom_board_id(QCS8275) },
|
||||
{ qcom_board_id(QCS615) },
|
||||
};
|
||||
|
||||
static const char *socinfo_machine(struct device *dev, unsigned int id)
|
||||
|
||||
@@ -255,8 +255,10 @@
|
||||
#define QCOM_ID_IPQ9510 521
|
||||
#define QCOM_ID_QRB4210 523
|
||||
#define QCOM_ID_QRB2210 524
|
||||
#define QCOM_ID_SAR2130P 525
|
||||
#define QCOM_ID_SM8475 530
|
||||
#define QCOM_ID_SM8475P 531
|
||||
#define QCOM_ID_SA8255P 532
|
||||
#define QCOM_ID_SA8775P 534
|
||||
#define QCOM_ID_QRU1000 539
|
||||
#define QCOM_ID_SM8475_2 540
|
||||
@@ -264,6 +266,7 @@
|
||||
#define QCOM_ID_X1E80100 555
|
||||
#define QCOM_ID_SM8650 557
|
||||
#define QCOM_ID_SM4450 568
|
||||
#define QCOM_ID_SAR1130P 579
|
||||
#define QCOM_ID_QDU1010 587
|
||||
#define QCOM_ID_QRU1032 588
|
||||
#define QCOM_ID_QRU1052 589
|
||||
@@ -276,8 +279,10 @@
|
||||
#define QCOM_ID_QCM8550 604
|
||||
#define QCOM_ID_IPQ5300 624
|
||||
#define QCOM_ID_IPQ5321 650
|
||||
#define QCOM_ID_QCS9100 667
|
||||
#define QCOM_ID_QCS8300 674
|
||||
#define QCOM_ID_QCS8275 675
|
||||
#define QCOM_ID_QCS615 680
|
||||
|
||||
/*
|
||||
* The board type and revision information, used by Qualcomm bootloaders and
|
||||
|
||||
Reference in New Issue
Block a user