Skip to content

Commit 599efa0

Browse files
committed
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>
2 parents 6d9e4c7 + 80db65d commit 599efa0

6 files changed

Lines changed: 34 additions & 51 deletions

File tree

drivers/firmware/ti_sci.h

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -580,13 +580,13 @@ struct ti_sci_msg_resp_get_clock_freq {
580580
} __packed;
581581

582582
/**
583-
* struct tisci_msg_req_prepare_sleep - Request for TISCI_MSG_PREPARE_SLEEP.
583+
* struct ti_sci_msg_req_prepare_sleep - Request for TISCI_MSG_PREPARE_SLEEP.
584584
*
585-
* @hdr TISCI header to provide ACK/NAK flags to the host.
586-
* @mode Low power mode to enter.
587-
* @ctx_lo Low 32-bits of physical pointer to address to use for context save.
588-
* @ctx_hi High 32-bits of physical pointer to address to use for context save.
589-
* @debug_flags Flags that can be set to halt the sequence during suspend or
585+
* @hdr: TISCI header to provide ACK/NAK flags to the host.
586+
* @mode: Low power mode to enter.
587+
* @ctx_lo: Low 32-bits of physical pointer to address to use for context save.
588+
* @ctx_hi: High 32-bits of physical pointer to address to use for context save.
589+
* @debug_flags: Flags that can be set to halt the sequence during suspend or
590590
* resume to allow JTAG connection and debug.
591591
*
592592
* 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 {
610610
} __packed;
611611

612612
/**
613-
* struct tisci_msg_set_io_isolation_req - Request for TI_SCI_MSG_SET_IO_ISOLATION.
613+
* struct ti_sci_msg_req_set_io_isolation - Request for TI_SCI_MSG_SET_IO_ISOLATION.
614614
*
615615
* @hdr: Generic header
616616
* @state: The deseared state of the IO isolation.
@@ -676,7 +676,7 @@ struct ti_sci_msg_req_lpm_set_device_constraint {
676676
* TISCI_MSG_LPM_SET_LATENCY_CONSTRAINT.
677677
*
678678
* @hdr: TISCI header to provide ACK/NAK flags to the host.
679-
* @wkup_latency: The maximum acceptable latency to wake up from low power mode
679+
* @latency: The maximum acceptable latency to wake up from low power mode
680680
* in milliseconds. The deeper the state, the higher the latency.
681681
* @state: The desired state of wakeup latency constraint: set or clear.
682682
* @rsvd: Reserved for future use.
@@ -855,7 +855,7 @@ struct ti_sci_msg_rm_ring_cfg_req {
855855
* UDMAP transmit channels mapped to source threads will have their
856856
* TCHAN_THRD_ID register programmed with the destination thread if the pairing
857857
* is successful.
858-
858+
*
859859
* @dst_thread: PSI-L destination thread ID within the PSI-L System thread map.
860860
* PSI-L destination threads start at index 0x8000. The request is NACK'd if
861861
* 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 {
10001000
} __packed;
10011001

10021002
/**
1003-
* Configures a Navigator Subsystem UDMAP transmit channel
1003+
* struct ti_sci_msg_rm_udmap_tx_ch_cfg_req - Configures a
1004+
* Navigator Subsystem UDMAP transmit channel
10041005
*
10051006
* Configures the non-real-time registers of a Navigator Subsystem UDMAP
10061007
* 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 {
11281129
} __packed;
11291130

11301131
/**
1131-
* Configures a Navigator Subsystem UDMAP receive channel
1132+
* struct ti_sci_msg_rm_udmap_rx_ch_cfg_req - Configures a
1133+
* Navigator Subsystem UDMAP receive channel
11321134
*
11331135
* Configures the non-real-time registers of a Navigator Subsystem UDMAP
11341136
* 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 {
12471249
} __packed;
12481250

12491251
/**
1250-
* Configures a Navigator Subsystem UDMAP receive flow
1252+
* struct ti_sci_msg_rm_udmap_flow_cfg_req - Configures a
1253+
* Navigator Subsystem UDMAP receive flow
12511254
*
12521255
* Configures a Navigator Subsystem UDMAP receive flow's registers.
12531256
* 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 {
12581261
*
12591262
* @hdr: Standard TISCI header
12601263
*
1261-
* @valid_params
1264+
* @valid_params:
12621265
* Bitfield defining validity of rx flow configuration parameters. The
12631266
* rx flow configuration fields are not valid, and will not be used for flow
12641267
* configuration, if their corresponding valid bit is zero. Valid bit usage:

drivers/soc/ti/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ config TI_K3_RINGACC
6262
If unsure, say N.
6363

6464
config TI_K3_SOCINFO
65-
bool
65+
bool "K3 SoC Information driver" if COMPILE_TEST
6666
depends on ARCH_K3 || COMPILE_TEST
6767
select SOC_BUS
6868
select MFD_SYSCON

drivers/soc/ti/k3-socinfo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ static int k3_chipinfo_probe(struct platform_device *pdev)
141141
if (IS_ERR(base))
142142
return PTR_ERR(base);
143143

144-
regmap = regmap_init_mmio(dev, base, &k3_chipinfo_regmap_cfg);
144+
regmap = devm_regmap_init_mmio(dev, base, &k3_chipinfo_regmap_cfg);
145145
if (IS_ERR(regmap))
146146
return PTR_ERR(regmap);
147147

drivers/soc/ti/knav_dma.c

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -706,44 +706,37 @@ static int knav_dma_probe(struct platform_device *pdev)
706706
{
707707
struct device *dev = &pdev->dev;
708708
struct device_node *node = pdev->dev.of_node;
709-
struct device_node *child;
710709
int ret = 0;
711710

712-
if (!node) {
713-
dev_err(&pdev->dev, "could not find device info\n");
714-
return -EINVAL;
715-
}
711+
if (!node)
712+
return dev_err_probe(dev, -EINVAL, "could not find device info\n");
716713

717714
kdev = devm_kzalloc(dev,
718715
sizeof(struct knav_dma_pool_device), GFP_KERNEL);
719-
if (!kdev) {
720-
dev_err(dev, "could not allocate driver mem\n");
716+
if (!kdev)
721717
return -ENOMEM;
722-
}
723718

724719
kdev->dev = dev;
725720
INIT_LIST_HEAD(&kdev->list);
726721

727722
pm_runtime_enable(kdev->dev);
728723
ret = pm_runtime_resume_and_get(kdev->dev);
729724
if (ret < 0) {
730-
dev_err(kdev->dev, "unable to enable pktdma, err %d\n", ret);
725+
dev_err(dev, "unable to enable pktdma, err %d\n", ret);
731726
goto err_pm_disable;
732727
}
733728

734729
/* Initialise all packet dmas */
735-
for_each_child_of_node(node, child) {
730+
for_each_child_of_node_scoped(node, child) {
736731
ret = dma_init(node, child);
737732
if (ret) {
738-
of_node_put(child);
739-
dev_err(&pdev->dev, "init failed with %d\n", ret);
733+
dev_err(dev, "init failed with %d\n", ret);
740734
break;
741735
}
742736
}
743737

744738
if (list_empty(&kdev->list)) {
745-
dev_err(dev, "no valid dma instance\n");
746-
ret = -ENODEV;
739+
ret = dev_err_probe(dev, -ENODEV, "no valid dma instance\n");
747740
goto err_put_sync;
748741
}
749742

drivers/soc/ti/knav_qmss_queue.c

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,21 +1079,17 @@ static int knav_queue_setup_regions(struct knav_device *kdev,
10791079
struct device_node *regions __free(device_node) =
10801080
of_get_child_by_name(node, "descriptor-regions");
10811081
struct knav_region *region;
1082-
struct device_node *child;
10831082
u32 temp[2];
10841083
int ret;
10851084

10861085
if (!regions)
10871086
return dev_err_probe(dev, -ENODEV,
10881087
"descriptor-regions not specified\n");
10891088

1090-
for_each_child_of_node(regions, child) {
1089+
for_each_child_of_node_scoped(regions, child) {
10911090
region = devm_kzalloc(dev, sizeof(*region), GFP_KERNEL);
1092-
if (!region) {
1093-
of_node_put(child);
1094-
dev_err(dev, "out of memory allocating region\n");
1091+
if (!region)
10951092
return -ENOMEM;
1096-
}
10971093

10981094
region->name = knav_queue_find_name(child);
10991095
of_property_read_u32(child, "id", &region->id);
@@ -1397,21 +1393,17 @@ static int knav_queue_init_qmgrs(struct knav_device *kdev,
13971393
struct device_node *qmgrs __free(device_node) =
13981394
of_get_child_by_name(node, "qmgrs");
13991395
struct knav_qmgr_info *qmgr;
1400-
struct device_node *child;
14011396
u32 temp[2];
14021397
int ret;
14031398

14041399
if (!qmgrs)
14051400
return dev_err_probe(dev, -ENODEV,
14061401
"queue manager info not specified\n");
14071402

1408-
for_each_child_of_node(qmgrs, child) {
1403+
for_each_child_of_node_scoped(qmgrs, child) {
14091404
qmgr = devm_kzalloc(dev, sizeof(*qmgr), GFP_KERNEL);
1410-
if (!qmgr) {
1411-
of_node_put(child);
1412-
dev_err(dev, "out of memory allocating qmgr\n");
1405+
if (!qmgr)
14131406
return -ENOMEM;
1414-
}
14151407

14161408
ret = of_property_read_u32_array(child, "managed-queues",
14171409
temp, 2);
@@ -1503,15 +1495,12 @@ static int knav_queue_init_pdsps(struct knav_device *kdev,
15031495
{
15041496
struct device *dev = kdev->dev;
15051497
struct knav_pdsp_info *pdsp;
1506-
struct device_node *child;
15071498

1508-
for_each_child_of_node(pdsps, child) {
1499+
for_each_child_of_node_scoped(pdsps, child) {
15091500
pdsp = devm_kzalloc(dev, sizeof(*pdsp), GFP_KERNEL);
1510-
if (!pdsp) {
1511-
of_node_put(child);
1512-
dev_err(dev, "out of memory allocating pdsp\n");
1501+
if (!pdsp)
15131502
return -ENOMEM;
1514-
}
1503+
15151504
pdsp->name = knav_queue_find_name(child);
15161505
pdsp->iram =
15171506
knav_queue_map_reg(kdev, child,

drivers/soc/ti/pruss.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -366,12 +366,10 @@ static int pruss_clk_mux_setup(struct pruss *pruss, struct clk *clk_mux,
366366

367367
ret = devm_add_action_or_reset(dev, pruss_of_free_clk_provider,
368368
clk_mux_np);
369-
if (ret) {
369+
if (ret)
370370
dev_err(dev, "failed to add clkmux free action %d", ret);
371-
goto put_clk_mux_np;
372-
}
373371

374-
return 0;
372+
return ret;
375373

376374
put_clk_mux_np:
377375
of_node_put(clk_mux_np);

0 commit comments

Comments
 (0)