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

Configure Feed

Select the types of activity you want to include in your feed.

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>

+34 -51
+16 -13
drivers/firmware/ti_sci.h
··· 580 580 } __packed; 581 581 582 582 /** 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. 584 584 * 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 590 590 * resume to allow JTAG connection and debug. 591 591 * 592 592 * This message is used as the first step of entering a low power mode. It ··· 610 610 } __packed; 611 611 612 612 /** 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. 614 614 * 615 615 * @hdr: Generic header 616 616 * @state: The deseared state of the IO isolation. ··· 676 676 * TISCI_MSG_LPM_SET_LATENCY_CONSTRAINT. 677 677 * 678 678 * @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 680 680 * in milliseconds. The deeper the state, the higher the latency. 681 681 * @state: The desired state of wakeup latency constraint: set or clear. 682 682 * @rsvd: Reserved for future use. ··· 855 855 * UDMAP transmit channels mapped to source threads will have their 856 856 * TCHAN_THRD_ID register programmed with the destination thread if the pairing 857 857 * is successful. 858 - 858 + * 859 859 * @dst_thread: PSI-L destination thread ID within the PSI-L System thread map. 860 860 * PSI-L destination threads start at index 0x8000. The request is NACK'd if 861 861 * the destination thread is not greater than or equal to 0x8000. ··· 1000 1000 } __packed; 1001 1001 1002 1002 /** 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 1004 1005 * 1005 1006 * Configures the non-real-time registers of a Navigator Subsystem UDMAP 1006 1007 * transmit channel. The channel index must be assigned to the host defined ··· 1129 1128 } __packed; 1130 1129 1131 1130 /** 1132 - * Configures a Navigator Subsystem UDMAP receive channel 1131 + * struct ti_sci_msg_rm_udmap_rx_ch_cfg_req - Configures a 1132 + * Navigator Subsystem UDMAP receive channel 1133 1133 * 1134 1134 * Configures the non-real-time registers of a Navigator Subsystem UDMAP 1135 1135 * receive channel. The channel index must be assigned to the host defined ··· 1249 1247 } __packed; 1250 1248 1251 1249 /** 1252 - * Configures a Navigator Subsystem UDMAP receive flow 1250 + * struct ti_sci_msg_rm_udmap_flow_cfg_req - Configures a 1251 + * Navigator Subsystem UDMAP receive flow 1253 1252 * 1254 1253 * Configures a Navigator Subsystem UDMAP receive flow's registers. 1255 1254 * Configuration does not include the flow registers which handle size-based ··· 1261 1258 * 1262 1259 * @hdr: Standard TISCI header 1263 1260 * 1264 - * @valid_params 1261 + * @valid_params: 1265 1262 * Bitfield defining validity of rx flow configuration parameters. The 1266 1263 * rx flow configuration fields are not valid, and will not be used for flow 1267 1264 * configuration, if their corresponding valid bit is zero. Valid bit usage:
+1 -1
drivers/soc/ti/Kconfig
··· 62 62 If unsure, say N. 63 63 64 64 config TI_K3_SOCINFO 65 - bool 65 + bool "K3 SoC Information driver" if COMPILE_TEST 66 66 depends on ARCH_K3 || COMPILE_TEST 67 67 select SOC_BUS 68 68 select MFD_SYSCON
+1 -1
drivers/soc/ti/k3-socinfo.c
··· 141 141 if (IS_ERR(base)) 142 142 return PTR_ERR(base); 143 143 144 - regmap = regmap_init_mmio(dev, base, &k3_chipinfo_regmap_cfg); 144 + regmap = devm_regmap_init_mmio(dev, base, &k3_chipinfo_regmap_cfg); 145 145 if (IS_ERR(regmap)) 146 146 return PTR_ERR(regmap); 147 147
+7 -14
drivers/soc/ti/knav_dma.c
··· 706 706 { 707 707 struct device *dev = &pdev->dev; 708 708 struct device_node *node = pdev->dev.of_node; 709 - struct device_node *child; 710 709 int ret = 0; 711 710 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"); 716 713 717 714 kdev = devm_kzalloc(dev, 718 715 sizeof(struct knav_dma_pool_device), GFP_KERNEL); 719 - if (!kdev) { 720 - dev_err(dev, "could not allocate driver mem\n"); 716 + if (!kdev) 721 717 return -ENOMEM; 722 - } 723 718 724 719 kdev->dev = dev; 725 720 INIT_LIST_HEAD(&kdev->list); ··· 722 727 pm_runtime_enable(kdev->dev); 723 728 ret = pm_runtime_resume_and_get(kdev->dev); 724 729 if (ret < 0) { 725 - dev_err(kdev->dev, "unable to enable pktdma, err %d\n", ret); 730 + dev_err(dev, "unable to enable pktdma, err %d\n", ret); 726 731 goto err_pm_disable; 727 732 } 728 733 729 734 /* Initialise all packet dmas */ 730 - for_each_child_of_node(node, child) { 735 + for_each_child_of_node_scoped(node, child) { 731 736 ret = dma_init(node, child); 732 737 if (ret) { 733 - of_node_put(child); 734 - dev_err(&pdev->dev, "init failed with %d\n", ret); 738 + dev_err(dev, "init failed with %d\n", ret); 735 739 break; 736 740 } 737 741 } 738 742 739 743 if (list_empty(&kdev->list)) { 740 - dev_err(dev, "no valid dma instance\n"); 741 - ret = -ENODEV; 744 + ret = dev_err_probe(dev, -ENODEV, "no valid dma instance\n"); 742 745 goto err_put_sync; 743 746 } 744 747
+7 -18
drivers/soc/ti/knav_qmss_queue.c
··· 1079 1079 struct device_node *regions __free(device_node) = 1080 1080 of_get_child_by_name(node, "descriptor-regions"); 1081 1081 struct knav_region *region; 1082 - struct device_node *child; 1083 1082 u32 temp[2]; 1084 1083 int ret; 1085 1084 ··· 1086 1087 return dev_err_probe(dev, -ENODEV, 1087 1088 "descriptor-regions not specified\n"); 1088 1089 1089 - for_each_child_of_node(regions, child) { 1090 + for_each_child_of_node_scoped(regions, child) { 1090 1091 region = devm_kzalloc(dev, sizeof(*region), GFP_KERNEL); 1091 - if (!region) { 1092 - of_node_put(child); 1093 - dev_err(dev, "out of memory allocating region\n"); 1092 + if (!region) 1094 1093 return -ENOMEM; 1095 - } 1096 1094 1097 1095 region->name = knav_queue_find_name(child); 1098 1096 of_property_read_u32(child, "id", &region->id); ··· 1393 1397 struct device_node *qmgrs __free(device_node) = 1394 1398 of_get_child_by_name(node, "qmgrs"); 1395 1399 struct knav_qmgr_info *qmgr; 1396 - struct device_node *child; 1397 1400 u32 temp[2]; 1398 1401 int ret; 1399 1402 ··· 1400 1405 return dev_err_probe(dev, -ENODEV, 1401 1406 "queue manager info not specified\n"); 1402 1407 1403 - for_each_child_of_node(qmgrs, child) { 1408 + for_each_child_of_node_scoped(qmgrs, child) { 1404 1409 qmgr = devm_kzalloc(dev, sizeof(*qmgr), GFP_KERNEL); 1405 - if (!qmgr) { 1406 - of_node_put(child); 1407 - dev_err(dev, "out of memory allocating qmgr\n"); 1410 + if (!qmgr) 1408 1411 return -ENOMEM; 1409 - } 1410 1412 1411 1413 ret = of_property_read_u32_array(child, "managed-queues", 1412 1414 temp, 2); ··· 1495 1503 { 1496 1504 struct device *dev = kdev->dev; 1497 1505 struct knav_pdsp_info *pdsp; 1498 - struct device_node *child; 1499 1506 1500 - for_each_child_of_node(pdsps, child) { 1507 + for_each_child_of_node_scoped(pdsps, child) { 1501 1508 pdsp = devm_kzalloc(dev, sizeof(*pdsp), GFP_KERNEL); 1502 - if (!pdsp) { 1503 - of_node_put(child); 1504 - dev_err(dev, "out of memory allocating pdsp\n"); 1509 + if (!pdsp) 1505 1510 return -ENOMEM; 1506 - } 1511 + 1507 1512 pdsp->name = knav_queue_find_name(child); 1508 1513 pdsp->iram = 1509 1514 knav_queue_map_reg(kdev, child,
+2 -4
drivers/soc/ti/pruss.c
··· 366 366 367 367 ret = devm_add_action_or_reset(dev, pruss_of_free_clk_provider, 368 368 clk_mux_np); 369 - if (ret) { 369 + if (ret) 370 370 dev_err(dev, "failed to add clkmux free action %d", ret); 371 - goto put_clk_mux_np; 372 - } 373 371 374 - return 0; 372 + return ret; 375 373 376 374 put_clk_mux_np: 377 375 of_node_put(clk_mux_np);