Unverified Commit 599efa09 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge tag 'ti-driver-soc-for-v6.20' of...

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: default avatarArnd Bergmann <arnd@arndb.de>
parents 6d9e4c74 80db65d4
Loading
Loading
Loading
Loading
+16 −13
Original line number Diff line number Diff line
@@ -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:
+1 −1
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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);

+7 −14
Original line number Diff line number Diff line
@@ -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;
	}

+7 −18
Original line number Diff line number Diff line
@@ -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,
Loading