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. -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE+KKGk1TrgjIXoxo03bWEnRc2JJ0FAmQ0EDkACgkQ3bWEnRc2 JJ0JCw/9G3i8c1Q3ls9cz6RB4kP3IvDbkf9GVI7vqh4R/83gOLITYd+5BnKNNZjD fQkqcbOqU/Vxjn49b5x2NifUkUNQdyPxU2rvQ/4Op2Ap1giqJfR12r7N3I9219U5 7vG1T9+ourNYPGTmAqe5e8ZPvWyOMzrGUFDv+BADpLb8Gmuf8eOAJVAyoKiA68Zy IaE6LQSzRBYUPhRxBNv0hrXzRXiRhgVE8b6Yhx/PHtlbzgV3RB6i7T+JYf2UQFsj xvDJXRnQr6lTO7vFlBPw36zDGKYv0CLOaJkkfw9c3XSK8QWuG/WEVWC/1d4D4QKJ NtRnAJlgP2WWARV7FZ6c6PXcj4tE2M/oeBGcjFUxMwu94ZsLcF4zcog31xicgYxT 44FuFo6p4CZ3ER3f/GRjkg6Bc0fThVFS9are5nVHYOUKBDDqkXHtiZWZ7VYCaLXn OsLFArInhGEpfgeLYlPqr3e5lZApZXxzvJ3IRXJLMuBtJDsNUMiWRBnQmjngUYf6 8RIQUVpDDAFPBjJXGX+CocQRmFdmfxDwEXHnoborN3P1O6YxYNdVtjJkaC+MYsj6 aPdgM9Pfchs3/7CTkqvKZam1idCP4eIj2KgzkUdWcKI4pGRb32iPgYM2GuLq79v+ 7UV55wueUK29pB71DAU/opazFH74PrFBl0NR4cb33YGJ0SSFANg= =2CFe -----END PGP SIGNATURE----- gpgsig -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmQ5SCEACgkQYKtH/8kJ UicvJA//U2SF2dMRvRxN6Pr2aDD+yQSMssY8OJHNmBtKj8PnZ0nuX0mwdnx98PCX 7aadETtirvm+49vZH8j2I3W11hXt/vIEnIS29IFXflmevUAwRjfR7yk6V7Zxgtxe wICg2JybXPZ/kRYlxSyIgLPs04OeoZY6gvZtn6eUChtroMgs2gmjBs75O/DqS3UF joArIGHk4CkdENrr2ilPW95gyOkPrRngnDv9xCpo8GYbZlNHvCY0kNOzTWu8MJWV b5i6gu3S8FvFWrdW5oHT2tJkpuTLbckjkJO5dbZpcFW/YLQfxWBBNNttzMI3beC2 QBYwN1XMMj+3DxZEtvaqtbyzXULsOBIaNYLjzRop/daMhZpetoCvvTI2juK7zWDN POyTg26zEUv8oEZkt2rntkC1/XnOqaNIgZITGH/CrGwARFIt+Xu0tMqGChmyqFzr eCIUwuTE2xYdxkKrqXhc7prSMAKIEZTl7rXIg6GcApGwCj3yk8ZSbuBTmZYY7IE/ Qx0sUY97m3BypuBI4gEErYEqHa22jJlb96ReJNRKu2sJ+Ib+31cvnVTj7FifW+mU l9z6mTTMZwWjZtGAr1fIzKz/HnedBWpXxW1vL91w3ozO9kbEygwwOnQu+6cC11M0 bYDH1Ma9tgNpGTLuPZRy2TLQRY1t1XYqH12ux4bOAA2RhzYVito= =UhNJ -----END PGP SIGNATURE----- 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: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
commit
508471c3de
@ -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;
|
||||
}
|
||||
|
@ -43,6 +43,7 @@ static const struct k3_soc_id {
|
||||
{ 0xBB38, "AM64X" },
|
||||
{ 0xBB75, "J721S2"},
|
||||
{ 0xBB7E, "AM62X" },
|
||||
{ 0xBB80, "J784S4" },
|
||||
{ 0xBB8D, "AM62AX" },
|
||||
};
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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)) {
|
||||
|
@ -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);
|
||||
|
@ -684,7 +684,7 @@ static int omap_prm_domain_init(struct device *dev, struct omap_prm *prm)
|
||||
const char *name;
|
||||
int error;
|
||||
|
||||
if (!of_find_property(dev->of_node, "#power-domain-cells", NULL))
|
||||
if (!of_property_present(dev->of_node, "#power-domain-cells"))
|
||||
return 0;
|
||||
|
||||
of_node_put(dev->of_node);
|
||||
|
@ -527,7 +527,7 @@ static int am33xx_pm_probe(struct platform_device *pdev)
|
||||
|
||||
ret = am33xx_pm_alloc_sram();
|
||||
if (ret)
|
||||
return ret;
|
||||
goto err_wkup_m3_ipc_put;
|
||||
|
||||
ret = am33xx_pm_rtc_setup();
|
||||
if (ret)
|
||||
@ -572,13 +572,14 @@ err_pm_runtime_put:
|
||||
pm_runtime_put_sync(dev);
|
||||
err_pm_runtime_disable:
|
||||
pm_runtime_disable(dev);
|
||||
wkup_m3_ipc_put(m3_ipc);
|
||||
err_unsetup_rtc:
|
||||
iounmap(rtc_base_virt);
|
||||
clk_put(rtc_fck);
|
||||
err_free_sram:
|
||||
am33xx_pm_free_sram();
|
||||
pm33xx_dev = NULL;
|
||||
err_wkup_m3_ipc_put:
|
||||
wkup_m3_ipc_put(m3_ipc);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -615,7 +615,6 @@ static int wkup_m3_ipc_probe(struct platform_device *pdev)
|
||||
int irq, ret, temp;
|
||||
phandle rproc_phandle;
|
||||
struct rproc *m3_rproc;
|
||||
struct resource *res;
|
||||
struct task_struct *task;
|
||||
struct wkup_m3_ipc *m3_ipc;
|
||||
struct device_node *np = dev->of_node;
|
||||
@ -624,8 +623,7 @@ static int wkup_m3_ipc_probe(struct platform_device *pdev)
|
||||
if (!m3_ipc)
|
||||
return -ENOMEM;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
m3_ipc->ipc_mem_base = devm_ioremap_resource(dev, res);
|
||||
m3_ipc->ipc_mem_base = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(m3_ipc->ipc_mem_base))
|
||||
return PTR_ERR(m3_ipc->ipc_mem_base);
|
||||
|
||||
@ -681,7 +679,7 @@ static int wkup_m3_ipc_probe(struct platform_device *pdev)
|
||||
dev_warn(dev, "Invalid VTT GPIO(%d) pin\n", temp);
|
||||
}
|
||||
|
||||
if (of_find_property(np, "ti,set-io-isolation", NULL))
|
||||
if (of_property_read_bool(np, "ti,set-io-isolation"))
|
||||
wkup_m3_set_io_isolation(m3_ipc);
|
||||
|
||||
ret = of_property_read_string(np, "firmware-name",
|
||||
|
Loading…
Reference in New Issue
Block a user