summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2026-01-21 18:43:45 +0300
committerArnd Bergmann <arnd@arndb.de>2026-01-21 18:43:46 +0300
commit599efa093ffcc342b8ec18e9c77a8c959efd4b9b (patch)
tree06335e04b4e5633e93fa218c02696fdabd6b2a34
parent6d9e4c74372bd08c75d7c2dbdccc4d713caabbd9 (diff)
parent80db65d4acfb9ff12d00172aed39ea8b98261aad (diff)
downloadlinux-599efa093ffcc342b8ec18e9c77a8c959efd4b9b.tar.xz
Merge tag 'ti-driver-soc-for-v6.20' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into soc/drivers
TI SoC driver updates for v6.20 Bug Fixes: - pruss: Fix double free in pruss_clk_mux_setup() - k3-socinfo: Fix regmap leak on probe failure - k3-socinfo: Fix compile testing dependency issue Cleanups: - knav_dma/knav_qmss: Remove redundant ENOMEM printks and simplify error messages - knav_dma/knav: Simplify code with scoped for each OF child loops - ti_sci.h: Fix all kernel-doc warnings * tag 'ti-driver-soc-for-v6.20' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux: soc: ti: pruss: Fix double free in pruss_clk_mux_setup() soc: ti: k3-socinfo: Fix regmap leak on probe failure soc: ti: k3-socinfo: Fix compile testing soc: ti: knav_dma: Simplify with scoped for each OF child loop soc: ti: knav: Simplify with scoped for each OF child loop soc: ti: knav_dma: Simplify error messages in probe soc: ti: knav_dma: Remove ENOMEM printks soc: ti: knav_qmss: Remove ENOMEM printks firmware: ti_sci.h: fix all kernel-doc warnings Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r--drivers/firmware/ti_sci.h29
-rw-r--r--drivers/soc/ti/Kconfig2
-rw-r--r--drivers/soc/ti/k3-socinfo.c2
-rw-r--r--drivers/soc/ti/knav_dma.c21
-rw-r--r--drivers/soc/ti/knav_qmss_queue.c25
-rw-r--r--drivers/soc/ti/pruss.c6
6 files changed, 34 insertions, 51 deletions
diff --git a/drivers/firmware/ti_sci.h b/drivers/firmware/ti_sci.h
index 91f234550c43..4616127e33ff 100644
--- a/drivers/firmware/ti_sci.h
+++ b/drivers/firmware/ti_sci.h
@@ -580,13 +580,13 @@ struct ti_sci_msg_resp_get_clock_freq {
} __packed;
/**
- * struct tisci_msg_req_prepare_sleep - Request for TISCI_MSG_PREPARE_SLEEP.
+ * struct ti_sci_msg_req_prepare_sleep - Request for TISCI_MSG_PREPARE_SLEEP.
*
- * @hdr TISCI header to provide ACK/NAK flags to the host.
- * @mode Low power mode to enter.
- * @ctx_lo Low 32-bits of physical pointer to address to use for context save.
- * @ctx_hi High 32-bits of physical pointer to address to use for context save.
- * @debug_flags Flags that can be set to halt the sequence during suspend or
+ * @hdr: TISCI header to provide ACK/NAK flags to the host.
+ * @mode: Low power mode to enter.
+ * @ctx_lo: Low 32-bits of physical pointer to address to use for context save.
+ * @ctx_hi: High 32-bits of physical pointer to address to use for context save.
+ * @debug_flags: Flags that can be set to halt the sequence during suspend or
* resume to allow JTAG connection and debug.
*
* This message is used as the first step of entering a low power mode. It
@@ -610,7 +610,7 @@ struct ti_sci_msg_req_prepare_sleep {
} __packed;
/**
- * struct tisci_msg_set_io_isolation_req - Request for TI_SCI_MSG_SET_IO_ISOLATION.
+ * struct ti_sci_msg_req_set_io_isolation - Request for TI_SCI_MSG_SET_IO_ISOLATION.
*
* @hdr: Generic header
* @state: The deseared state of the IO isolation.
@@ -676,7 +676,7 @@ struct ti_sci_msg_req_lpm_set_device_constraint {
* TISCI_MSG_LPM_SET_LATENCY_CONSTRAINT.
*
* @hdr: TISCI header to provide ACK/NAK flags to the host.
- * @wkup_latency: The maximum acceptable latency to wake up from low power mode
+ * @latency: The maximum acceptable latency to wake up from low power mode
* in milliseconds. The deeper the state, the higher the latency.
* @state: The desired state of wakeup latency constraint: set or clear.
* @rsvd: Reserved for future use.
@@ -855,7 +855,7 @@ struct ti_sci_msg_rm_ring_cfg_req {
* UDMAP transmit channels mapped to source threads will have their
* TCHAN_THRD_ID register programmed with the destination thread if the pairing
* is successful.
-
+ *
* @dst_thread: PSI-L destination thread ID within the PSI-L System thread map.
* PSI-L destination threads start at index 0x8000. The request is NACK'd if
* the destination thread is not greater than or equal to 0x8000.
@@ -1000,7 +1000,8 @@ struct rm_ti_sci_msg_udmap_rx_flow_opt_cfg {
} __packed;
/**
- * Configures a Navigator Subsystem UDMAP transmit channel
+ * struct ti_sci_msg_rm_udmap_tx_ch_cfg_req - Configures a
+ * Navigator Subsystem UDMAP transmit channel
*
* Configures the non-real-time registers of a Navigator Subsystem UDMAP
* transmit channel. The channel index must be assigned to the host defined
@@ -1128,7 +1129,8 @@ struct ti_sci_msg_rm_udmap_tx_ch_cfg_req {
} __packed;
/**
- * Configures a Navigator Subsystem UDMAP receive channel
+ * struct ti_sci_msg_rm_udmap_rx_ch_cfg_req - Configures a
+ * Navigator Subsystem UDMAP receive channel
*
* Configures the non-real-time registers of a Navigator Subsystem UDMAP
* receive channel. The channel index must be assigned to the host defined
@@ -1247,7 +1249,8 @@ struct ti_sci_msg_rm_udmap_rx_ch_cfg_req {
} __packed;
/**
- * Configures a Navigator Subsystem UDMAP receive flow
+ * struct ti_sci_msg_rm_udmap_flow_cfg_req - Configures a
+ * Navigator Subsystem UDMAP receive flow
*
* Configures a Navigator Subsystem UDMAP receive flow's registers.
* Configuration does not include the flow registers which handle size-based
@@ -1258,7 +1261,7 @@ struct ti_sci_msg_rm_udmap_rx_ch_cfg_req {
*
* @hdr: Standard TISCI header
*
- * @valid_params
+ * @valid_params:
* Bitfield defining validity of rx flow configuration parameters. The
* rx flow configuration fields are not valid, and will not be used for flow
* configuration, if their corresponding valid bit is zero. Valid bit usage:
diff --git a/drivers/soc/ti/Kconfig b/drivers/soc/ti/Kconfig
index 1a93001c9e36..163aadd589d3 100644
--- a/drivers/soc/ti/Kconfig
+++ b/drivers/soc/ti/Kconfig
@@ -62,7 +62,7 @@ config TI_K3_RINGACC
If unsure, say N.
config TI_K3_SOCINFO
- bool
+ bool "K3 SoC Information driver" if COMPILE_TEST
depends on ARCH_K3 || COMPILE_TEST
select SOC_BUS
select MFD_SYSCON
diff --git a/drivers/soc/ti/k3-socinfo.c b/drivers/soc/ti/k3-socinfo.c
index 50c170a995f9..42275cb5ba1c 100644
--- a/drivers/soc/ti/k3-socinfo.c
+++ b/drivers/soc/ti/k3-socinfo.c
@@ -141,7 +141,7 @@ static int k3_chipinfo_probe(struct platform_device *pdev)
if (IS_ERR(base))
return PTR_ERR(base);
- regmap = regmap_init_mmio(dev, base, &k3_chipinfo_regmap_cfg);
+ regmap = devm_regmap_init_mmio(dev, base, &k3_chipinfo_regmap_cfg);
if (IS_ERR(regmap))
return PTR_ERR(regmap);
diff --git a/drivers/soc/ti/knav_dma.c b/drivers/soc/ti/knav_dma.c
index 553ae7ee20f1..e5f5e3142fc4 100644
--- a/drivers/soc/ti/knav_dma.c
+++ b/drivers/soc/ti/knav_dma.c
@@ -706,20 +706,15 @@ static int knav_dma_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct device_node *node = pdev->dev.of_node;
- struct device_node *child;
int ret = 0;
- if (!node) {
- dev_err(&pdev->dev, "could not find device info\n");
- return -EINVAL;
- }
+ if (!node)
+ return dev_err_probe(dev, -EINVAL, "could not find device info\n");
kdev = devm_kzalloc(dev,
sizeof(struct knav_dma_pool_device), GFP_KERNEL);
- if (!kdev) {
- dev_err(dev, "could not allocate driver mem\n");
+ if (!kdev)
return -ENOMEM;
- }
kdev->dev = dev;
INIT_LIST_HEAD(&kdev->list);
@@ -727,23 +722,21 @@ static int knav_dma_probe(struct platform_device *pdev)
pm_runtime_enable(kdev->dev);
ret = pm_runtime_resume_and_get(kdev->dev);
if (ret < 0) {
- dev_err(kdev->dev, "unable to enable pktdma, err %d\n", ret);
+ dev_err(dev, "unable to enable pktdma, err %d\n", ret);
goto err_pm_disable;
}
/* Initialise all packet dmas */
- for_each_child_of_node(node, child) {
+ for_each_child_of_node_scoped(node, child) {
ret = dma_init(node, child);
if (ret) {
- of_node_put(child);
- dev_err(&pdev->dev, "init failed with %d\n", ret);
+ dev_err(dev, "init failed with %d\n", ret);
break;
}
}
if (list_empty(&kdev->list)) {
- dev_err(dev, "no valid dma instance\n");
- ret = -ENODEV;
+ ret = dev_err_probe(dev, -ENODEV, "no valid dma instance\n");
goto err_put_sync;
}
diff --git a/drivers/soc/ti/knav_qmss_queue.c b/drivers/soc/ti/knav_qmss_queue.c
index 6e56e7609ccd..86d7a9c9ae01 100644
--- a/drivers/soc/ti/knav_qmss_queue.c
+++ b/drivers/soc/ti/knav_qmss_queue.c
@@ -1079,7 +1079,6 @@ static int knav_queue_setup_regions(struct knav_device *kdev,
struct device_node *regions __free(device_node) =
of_get_child_by_name(node, "descriptor-regions");
struct knav_region *region;
- struct device_node *child;
u32 temp[2];
int ret;
@@ -1087,13 +1086,10 @@ static int knav_queue_setup_regions(struct knav_device *kdev,
return dev_err_probe(dev, -ENODEV,
"descriptor-regions not specified\n");
- for_each_child_of_node(regions, child) {
+ for_each_child_of_node_scoped(regions, child) {
region = devm_kzalloc(dev, sizeof(*region), GFP_KERNEL);
- if (!region) {
- of_node_put(child);
- dev_err(dev, "out of memory allocating region\n");
+ if (!region)
return -ENOMEM;
- }
region->name = knav_queue_find_name(child);
of_property_read_u32(child, "id", &region->id);
@@ -1397,7 +1393,6 @@ static int knav_queue_init_qmgrs(struct knav_device *kdev,
struct device_node *qmgrs __free(device_node) =
of_get_child_by_name(node, "qmgrs");
struct knav_qmgr_info *qmgr;
- struct device_node *child;
u32 temp[2];
int ret;
@@ -1405,13 +1400,10 @@ static int knav_queue_init_qmgrs(struct knav_device *kdev,
return dev_err_probe(dev, -ENODEV,
"queue manager info not specified\n");
- for_each_child_of_node(qmgrs, child) {
+ for_each_child_of_node_scoped(qmgrs, child) {
qmgr = devm_kzalloc(dev, sizeof(*qmgr), GFP_KERNEL);
- if (!qmgr) {
- of_node_put(child);
- dev_err(dev, "out of memory allocating qmgr\n");
+ if (!qmgr)
return -ENOMEM;
- }
ret = of_property_read_u32_array(child, "managed-queues",
temp, 2);
@@ -1503,15 +1495,12 @@ static int knav_queue_init_pdsps(struct knav_device *kdev,
{
struct device *dev = kdev->dev;
struct knav_pdsp_info *pdsp;
- struct device_node *child;
- for_each_child_of_node(pdsps, child) {
+ for_each_child_of_node_scoped(pdsps, child) {
pdsp = devm_kzalloc(dev, sizeof(*pdsp), GFP_KERNEL);
- if (!pdsp) {
- of_node_put(child);
- dev_err(dev, "out of memory allocating pdsp\n");
+ if (!pdsp)
return -ENOMEM;
- }
+
pdsp->name = knav_queue_find_name(child);
pdsp->iram =
knav_queue_map_reg(kdev, child,
diff --git a/drivers/soc/ti/pruss.c b/drivers/soc/ti/pruss.c
index 038576805bfa..0fd59c73f585 100644
--- a/drivers/soc/ti/pruss.c
+++ b/drivers/soc/ti/pruss.c
@@ -366,12 +366,10 @@ static int pruss_clk_mux_setup(struct pruss *pruss, struct clk *clk_mux,
ret = devm_add_action_or_reset(dev, pruss_of_free_clk_provider,
clk_mux_np);
- if (ret) {
+ if (ret)
dev_err(dev, "failed to add clkmux free action %d", ret);
- goto put_clk_mux_np;
- }
- return 0;
+ return ret;
put_clk_mux_np:
of_node_put(clk_mux_np);