mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 11:50:43 +09:00
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@ecard Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
@@ -3412,7 +3412,7 @@ static int ti_sci_probe(struct platform_device *pdev)
|
||||
ret = register_restart_handler(&info->nb);
|
||||
if (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,
|
||||
sizeof(*ringacc->rings) *
|
||||
ringacc->num_rings,
|
||||
GFP_KERNEL);
|
||||
ringacc->rings_inuse = devm_kcalloc(dev,
|
||||
BITS_TO_LONGS(ringacc->num_rings),
|
||||
sizeof(unsigned long), GFP_KERNEL);
|
||||
ringacc->proxy_inuse = devm_kcalloc(dev,
|
||||
BITS_TO_LONGS(ringacc->num_proxies),
|
||||
sizeof(unsigned long), GFP_KERNEL);
|
||||
ringacc->rings_inuse = devm_bitmap_zalloc(dev, ringacc->num_rings,
|
||||
GFP_KERNEL);
|
||||
ringacc->proxy_inuse = devm_bitmap_zalloc(dev, ringacc->num_proxies,
|
||||
GFP_KERNEL);
|
||||
|
||||
if (!ringacc->rings || !ringacc->rings_inuse || !ringacc->proxy_inuse)
|
||||
return -ENOMEM;
|
||||
@@ -1483,9 +1481,8 @@ struct k3_ringacc *k3_ringacc_dmarings_init(struct platform_device *pdev,
|
||||
sizeof(*ringacc->rings) *
|
||||
ringacc->num_rings * 2,
|
||||
GFP_KERNEL);
|
||||
ringacc->rings_inuse = devm_kcalloc(dev,
|
||||
BITS_TO_LONGS(ringacc->num_rings),
|
||||
sizeof(unsigned long), GFP_KERNEL);
|
||||
ringacc->rings_inuse = devm_bitmap_zalloc(dev, ringacc->num_rings,
|
||||
GFP_KERNEL);
|
||||
|
||||
if (!ringacc->rings || !ringacc->rings_inuse)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
@@ -42,6 +42,7 @@ static const struct k3_soc_id {
|
||||
{ 0xBB6D, "J7200" },
|
||||
{ 0xBB38, "AM64X" },
|
||||
{ 0xBB75, "J721S2"},
|
||||
{ 0xBB7E, "AM62X" },
|
||||
};
|
||||
|
||||
static int
|
||||
|
||||
@@ -819,7 +819,7 @@ static int omap_sr_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct omap_sr *sr_info;
|
||||
struct omap_sr_data *pdata = pdev->dev.platform_data;
|
||||
struct resource *mem, *irq;
|
||||
struct resource *mem;
|
||||
struct dentry *nvalue_dir;
|
||||
int i, ret = 0;
|
||||
|
||||
@@ -844,7 +844,11 @@ static int omap_sr_probe(struct platform_device *pdev)
|
||||
if (IS_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");
|
||||
if (IS_ERR(sr_info->fck))
|
||||
@@ -870,9 +874,6 @@ static int omap_sr_probe(struct platform_device *pdev)
|
||||
sr_info->autocomp_active = false;
|
||||
sr_info->ip_type = pdata->ip_type;
|
||||
|
||||
if (irq)
|
||||
sr_info->irq = irq->start;
|
||||
|
||||
sr_set_clk_length(sr_info);
|
||||
|
||||
list_add(&sr_info->node, &sr_list);
|
||||
@@ -926,7 +927,7 @@ static int omap_sr_probe(struct platform_device *pdev)
|
||||
|
||||
}
|
||||
|
||||
return ret;
|
||||
return 0;
|
||||
|
||||
err_debugfs:
|
||||
debugfs_remove_recursive(sr_info->dbg_dir);
|
||||
|
||||
@@ -450,9 +450,9 @@ static int wkup_m3_ipc_probe(struct platform_device *pdev)
|
||||
return PTR_ERR(m3_ipc->ipc_mem_base);
|
||||
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (!irq) {
|
||||
if (irq < 0) {
|
||||
dev_err(&pdev->dev, "no irq resource\n");
|
||||
return -ENXIO;
|
||||
return irq;
|
||||
}
|
||||
|
||||
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,
|
||||
|
||||
static inline struct ti_sci_resource *
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user