* Fixups for k3-ringacc, smartreflex, tisci, wkup_m3_ipc
 * Device detection for am62x.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE+KKGk1TrgjIXoxo03bWEnRc2JJ0FAmIctj8ACgkQ3bWEnRc2
 JJ2yUhAAgm/9jJZphktxVc5gsra/GvwAcYQEPLD2dcoBBGvhAlbIr8XtZkuKYScZ
 JhOxQeH/J9H036VFw6riA62xIp5fi/QoT6DXFtyPFLhaxLfU7Z70kK5KCIAPSqR1
 ep5ZF6FaCtgMsdTd3hA/pUo6NoCbyfXgLTD7yv1Zmn0NliWE7Dnllsaal8dYQEjQ
 HdKSnk91JH0AYVF7zCYdh/92QDp+POMp0uJKj+oCoGHZhq3/kCyPjgNzXo/5bJ30
 3gcNmV+enTYtxLULRS8vZ7gkjBZlRfCozOCEH4ep9ujrFC0pVifEJ2cVfocz489m
 OpCPOja4+z10iLxWdFdt4mPOVt/SHr/U0nqMB9TlRJpBxDzjaeORtLk/oA8fTXFh
 dTfkF3Eau1v7Kau1sfqX9u7nipfBAaFDzFTMozyO/IfGVoa9qgOVvgCosm/Hy3cj
 RR1ofb7yKGaz9HSZXcPkBati3iWRYlucZlZeCdWikAPNHnuv+SjYFBEzwSHkCHVW
 sxhEH3leqsc0lnP5I80NeYpAqybj/KF86auFC5R6mwTO2wJw0YqpWXLYFdp/6bGy
 X+xJr3aQb4d+Rse7P6ZAwtsE/1cO0KgNPMDpeWyPt5aYjcVv6Wn0BB55WbaXRVpv
 Jo+Oqlnypdkhx6qR33dSvE72tl+YqOib/jeQtgKf9JAS/hjNt4Y=
 =8Gnw
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmIcwlsACgkQmmx57+YA
 GNnzrQ/+LCLw4ab6ipwNsShyWibHh+HEA70owCigGzrkB2+RljaSt8p4koB5wMC0
 eTgfpkZLLhHlDdA6zZZNJgDHEveoLg1yWk7u3tx3K+hNDiZX4VVH+3OhuefeVaFe
 /Ii94rrVtjNscEve2X4KbJXfeeHaNz2nJTFvKloHgW0wkjL/djcqbOm/tKwEiPiw
 gB6mF1MaBLiH1ijgg2JUGpNtK4pILtEb8X9dmxL7iP6X4rSKWkNVYQcxfu+8c0iI
 Tt4RY+u/9PzTQtyl7y0uN8LJ388nfZWedb+yxwUiQ8AkuKCbYcTYFm5HazAurBTd
 LSSK5qO9NV2O4FoYJ9fZRKuLU0eVCXePRxo8XMfzUdu0U+cet1p7icsR/91SV7Gj
 h2ELZLXh5ZamU9jE/GEb9rxbnUfQISy9UPstiD9dQUQBjDQnd5TsA4Fo3HRJZYls
 ELB2nqgY4rS414MNYOaFY1hARc/NHT86tyW4mvIsRit31Qle2Tm9T06IMilkSf7U
 D4gnmHEETZRMEtaP0cML/BAFS7I/xbCZGU+c4JjcOs/D/EKTd0rwUwmaiGc/2XiF
 Ng6Ow/KhCckiEX3fut7Bl7emZvtAfB8RwMlExOXY/pof5F479ahoRDd4I5JmZQlq
 YNb77p9Gf2gvnzVFcUsjU/NiycuZnEuG/ZALZCpx4atVKNWaf7c=
 =rCpA
 -----END PGP SIGNATURE-----

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:
Arnd Bergmann 2022-02-28 13:38:51 +01:00
Родитель 345932db14 c65d68e7e9
Коммит 254a1864e4
6 изменённых файлов: 18 добавлений и 19 удалений

Просмотреть файл

@ -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);
}