Unverified Commit 508471c3 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

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

Merge tag 'ti-driver-soc-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into soc/drivers

TI SoC driver updates for v6.4

* Minor fixups for of_property, using devm_platform_ioremap
* Fixups for refcount leaks in pm33xx
* Fixups for k3-ringacc for dmaring_request
* SoCinfo detection for J784S4 SoC.

* tag 'ti-driver-soc-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux:
  soc: ti: Use devm_platform_ioremap_resource()
  soc: ti: k3-socinfo: Add entry for J784S4 SOC
  soc: ti: Use of_property_read_bool() for boolean properties
  soc: ti: Use of_property_present() for testing DT property presence
  soc: ti: pm33xx: Fix refcount leak in am33xx_pm_probe
  soc: ti: k3-ringacc: Add try_module_get() to k3_dmaring_request_dual_ring()

Link: https://lore.kernel.org/r/20230410140506.ucvkwq7vz2h47vyj@stipulate


Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents 9f8f0d07 a33bfafd
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -406,6 +406,11 @@ static int k3_dmaring_request_dual_ring(struct k3_ringacc *ringacc, int fwd_id,

	mutex_lock(&ringacc->req_lock);

	if (!try_module_get(ringacc->dev->driver->owner)) {
		ret = -EINVAL;
		goto err_module_get;
	}

	if (test_bit(fwd_id, ringacc->rings_inuse)) {
		ret = -EBUSY;
		goto error;
@@ -421,6 +426,8 @@ static int k3_dmaring_request_dual_ring(struct k3_ringacc *ringacc, int fwd_id,
	return 0;

error:
	module_put(ringacc->dev->driver->owner);
err_module_get:
	mutex_unlock(&ringacc->req_lock);
	return ret;
}
+1 −0
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ static const struct k3_soc_id {
	{ 0xBB38, "AM64X" },
	{ 0xBB75, "J721S2"},
	{ 0xBB7E, "AM62X" },
	{ 0xBB80, "J784S4" },
	{ 0xBB8D, "AM62AX" },
};

+2 −2
Original line number Diff line number Diff line
@@ -666,8 +666,8 @@ static int dma_init(struct device_node *cloud, struct device_node *dma_node)
	dma->rx_priority = DMA_PRIO_DEFAULT;
	dma->tx_priority = DMA_PRIO_DEFAULT;

	dma->enable_all	= (of_get_property(node, "ti,enable-all", NULL) != NULL);
	dma->loopback	= (of_get_property(node, "ti,loop-back",  NULL) != NULL);
	dma->enable_all	= of_property_read_bool(node, "ti,enable-all");
	dma->loopback	= of_property_read_bool(node, "ti,loop-back");

	ret = of_property_read_u32(node, "ti,rx-retry-timeout", &timeout);
	if (ret < 0) {
+1 −1
Original line number Diff line number Diff line
@@ -521,7 +521,7 @@ int knav_init_acc_range(struct knav_device *kdev,

	info->pdsp = pdsp;
	channels = range->num_queues;
	if (of_get_property(node, "multi-queue", NULL)) {
	if (of_property_read_bool(node, "multi-queue")) {
		range->flags |= RANGE_MULTI_QUEUE;
		channels = 1;
		if (range->queue_base & (32 - 1)) {
+2 −2
Original line number Diff line number Diff line
@@ -1264,10 +1264,10 @@ static int knav_setup_queue_range(struct knav_device *kdev,
	if (range->num_irqs)
		range->flags |= RANGE_HAS_IRQ;

	if (of_get_property(node, "qalloc-by-id", NULL))
	if (of_property_read_bool(node, "qalloc-by-id"))
		range->flags |= RANGE_RESERVED;

	if (of_get_property(node, "accumulator", NULL)) {
	if (of_property_present(node, "accumulator")) {
		ret = knav_init_acc_range(kdev, node, range);
		if (ret < 0) {
			devm_kfree(dev, range);
Loading