Commit 254a1864 authored by Arnd Bergmann's avatar Arnd Bergmann

Merge tag 'ti-driver-soc-for-v5.18' of...

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

TI Driver updates for v5.18

* Fixups for k3-ringacc, smartreflex, tisci, wkup_m3_ipc
* Device detection for am62x.

* tag 'ti-driver-soc-for-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux:
  soc: ti: k3-socinfo: Add AM62x JTAG ID
  soc: ti: wkup_m3_ipc: Fix IRQ check in wkup_m3_ipc_probe
  firmware: ti_sci: inproper error handling of ti_sci_probe
  firmware: ti_sci: Fix compilation failure when CONFIG_TI_SCI_PROTOCOL is not defined
  soc: ti: smartreflex: Use platform_get_irq_optional() to get the interrupt
  soc: ti: k3-ringacc: Use devm_bitmap_zalloc() when applicable

Link: https://lore.kernel.org/r/20220228120655.wobd72acngl2bz6k@ecardSigned-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents 345932db c65d68e7
...@@ -3412,7 +3412,7 @@ static int ti_sci_probe(struct platform_device *pdev) ...@@ -3412,7 +3412,7 @@ static int ti_sci_probe(struct platform_device *pdev)
ret = register_restart_handler(&info->nb); ret = register_restart_handler(&info->nb);
if (ret) { if (ret) {
dev_err(dev, "reboot registration fail(%d)\n", ret); dev_err(dev, "reboot registration fail(%d)\n", ret);
return ret; goto out;
} }
} }
......
...@@ -1402,12 +1402,10 @@ static int k3_ringacc_init(struct platform_device *pdev, ...@@ -1402,12 +1402,10 @@ static int k3_ringacc_init(struct platform_device *pdev,
sizeof(*ringacc->rings) * sizeof(*ringacc->rings) *
ringacc->num_rings, ringacc->num_rings,
GFP_KERNEL); GFP_KERNEL);
ringacc->rings_inuse = devm_kcalloc(dev, ringacc->rings_inuse = devm_bitmap_zalloc(dev, ringacc->num_rings,
BITS_TO_LONGS(ringacc->num_rings), GFP_KERNEL);
sizeof(unsigned long), GFP_KERNEL); ringacc->proxy_inuse = devm_bitmap_zalloc(dev, ringacc->num_proxies,
ringacc->proxy_inuse = devm_kcalloc(dev, GFP_KERNEL);
BITS_TO_LONGS(ringacc->num_proxies),
sizeof(unsigned long), GFP_KERNEL);
if (!ringacc->rings || !ringacc->rings_inuse || !ringacc->proxy_inuse) if (!ringacc->rings || !ringacc->rings_inuse || !ringacc->proxy_inuse)
return -ENOMEM; return -ENOMEM;
...@@ -1483,9 +1481,8 @@ struct k3_ringacc *k3_ringacc_dmarings_init(struct platform_device *pdev, ...@@ -1483,9 +1481,8 @@ struct k3_ringacc *k3_ringacc_dmarings_init(struct platform_device *pdev,
sizeof(*ringacc->rings) * sizeof(*ringacc->rings) *
ringacc->num_rings * 2, ringacc->num_rings * 2,
GFP_KERNEL); GFP_KERNEL);
ringacc->rings_inuse = devm_kcalloc(dev, ringacc->rings_inuse = devm_bitmap_zalloc(dev, ringacc->num_rings,
BITS_TO_LONGS(ringacc->num_rings), GFP_KERNEL);
sizeof(unsigned long), GFP_KERNEL);
if (!ringacc->rings || !ringacc->rings_inuse) if (!ringacc->rings || !ringacc->rings_inuse)
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
......
...@@ -42,6 +42,7 @@ static const struct k3_soc_id { ...@@ -42,6 +42,7 @@ static const struct k3_soc_id {
{ 0xBB6D, "J7200" }, { 0xBB6D, "J7200" },
{ 0xBB38, "AM64X" }, { 0xBB38, "AM64X" },
{ 0xBB75, "J721S2"}, { 0xBB75, "J721S2"},
{ 0xBB7E, "AM62X" },
}; };
static int static int
......
...@@ -819,7 +819,7 @@ static int omap_sr_probe(struct platform_device *pdev) ...@@ -819,7 +819,7 @@ static int omap_sr_probe(struct platform_device *pdev)
{ {
struct omap_sr *sr_info; struct omap_sr *sr_info;
struct omap_sr_data *pdata = pdev->dev.platform_data; struct omap_sr_data *pdata = pdev->dev.platform_data;
struct resource *mem, *irq; struct resource *mem;
struct dentry *nvalue_dir; struct dentry *nvalue_dir;
int i, ret = 0; int i, ret = 0;
...@@ -844,7 +844,11 @@ static int omap_sr_probe(struct platform_device *pdev) ...@@ -844,7 +844,11 @@ static int omap_sr_probe(struct platform_device *pdev)
if (IS_ERR(sr_info->base)) if (IS_ERR(sr_info->base))
return PTR_ERR(sr_info->base); return PTR_ERR(sr_info->base);
irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); ret = platform_get_irq_optional(pdev, 0);
if (ret < 0 && ret != -ENXIO)
return dev_err_probe(&pdev->dev, ret, "failed to get IRQ resource\n");
if (ret > 0)
sr_info->irq = ret;
sr_info->fck = devm_clk_get(pdev->dev.parent, "fck"); sr_info->fck = devm_clk_get(pdev->dev.parent, "fck");
if (IS_ERR(sr_info->fck)) if (IS_ERR(sr_info->fck))
...@@ -870,9 +874,6 @@ static int omap_sr_probe(struct platform_device *pdev) ...@@ -870,9 +874,6 @@ static int omap_sr_probe(struct platform_device *pdev)
sr_info->autocomp_active = false; sr_info->autocomp_active = false;
sr_info->ip_type = pdata->ip_type; sr_info->ip_type = pdata->ip_type;
if (irq)
sr_info->irq = irq->start;
sr_set_clk_length(sr_info); sr_set_clk_length(sr_info);
list_add(&sr_info->node, &sr_list); list_add(&sr_info->node, &sr_list);
...@@ -926,7 +927,7 @@ static int omap_sr_probe(struct platform_device *pdev) ...@@ -926,7 +927,7 @@ static int omap_sr_probe(struct platform_device *pdev)
} }
return ret; return 0;
err_debugfs: err_debugfs:
debugfs_remove_recursive(sr_info->dbg_dir); debugfs_remove_recursive(sr_info->dbg_dir);
......
...@@ -450,9 +450,9 @@ static int wkup_m3_ipc_probe(struct platform_device *pdev) ...@@ -450,9 +450,9 @@ static int wkup_m3_ipc_probe(struct platform_device *pdev)
return PTR_ERR(m3_ipc->ipc_mem_base); return PTR_ERR(m3_ipc->ipc_mem_base);
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
if (!irq) { if (irq < 0) {
dev_err(&pdev->dev, "no irq resource\n"); dev_err(&pdev->dev, "no irq resource\n");
return -ENXIO; return irq;
} }
ret = devm_request_irq(dev, irq, wkup_m3_txev_handler, ret = devm_request_irq(dev, irq, wkup_m3_txev_handler,
......
...@@ -645,7 +645,7 @@ devm_ti_sci_get_of_resource(const struct ti_sci_handle *handle, ...@@ -645,7 +645,7 @@ devm_ti_sci_get_of_resource(const struct ti_sci_handle *handle,
static inline struct ti_sci_resource * static inline struct ti_sci_resource *
devm_ti_sci_get_resource(const struct ti_sci_handle *handle, struct device *dev, devm_ti_sci_get_resource(const struct ti_sci_handle *handle, struct device *dev,
u32 dev_id, u32 sub_type); u32 dev_id, u32 sub_type)
{ {
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment