diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-08-18 19:50:40 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-08-18 19:50:40 -0700 |
| commit | bd5f485f3f026225b86573e559af0b7254ef4184 (patch) | |
| tree | 92b9cabbbefe9b8cee634769676b9b97238cdfc7 /drivers | |
| parent | 6eb1ea5ff48d647deb67c58b7a0e97bbf4de088a (diff) | |
| parent | acf1efa9485fda84f332c8fbbe7b4453dbec183a (diff) | |
Pull ARM SoC platform updates from Arnd Bergmann:
"The 32-bit Arm platforms are a bit more interesting this time: I
refreshed an earlier series to mark code as deprecated that does have
the tendency of getting in the way of cleanups and new features but
has close to zero users. Among these are:
- 22 of the remaining 28 legacy board files that predate the current
devicetree based descriptions, using old chips from Intel and
Marvell. The remaining six board files are for TI OMAP1 and Samsung
s3c64xx chips and all still have known users.
- support for Cortex-M3/M4/M7 and ARM1136r0 CPU cores and the 25
machines based on these. These all use devicetree but the CPU
support causes disproportional work. Most of them are just
reference boards, the notable exceptions being the Nokia N800/N810
tablet and the Buglabs BUG platform.
- be8, be32, oabi and iwmmxt userspace binaries, which were mostly
associated with the platforms now scheduled for removal and are
increasingly problematic to support with modern toolchains.
Nothing is actually removed at this point, to ensure that any
remaining users continue to have the 7.3-LTS for a while longer.
Patches for removal are currently being tested.
Other updates include a continued work to convert GPIO number based
interfaces to descriptors, a patch to restore little-endian mode on
the one Arm platform (ixp4xx) that only worked in big-endian mode
recently, and some minor cleanups and bugfixes"
* tag 'soc-arm-7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (41 commits)
MAINTAINERS: Drop redundant lists from various Samsung entries
ARM: tegra: Replace __ASSEMBLY__ with __ASSEMBLER__
ARM: tegra: Fix OF node reference leaks in IRQ init
ARM: lpc32xx: remove a few manually populated OF devices
ARM: lpc32xx: only run SoC init on LPC32xx hardware
firmware: imx: scu: manage mailbox channels and global handle
ARM: sa1100: h3xxx: convert gpio-keys to use software nodes
ARM: sa1100: collie: convert gpio-keys to use software nodes
ARM: sa1100: assabet: convert gpio-keys to use software nodes
gpio: sa1100: register software node for GPIO controller
ARM: ixp4xx: Relax endianness
ARM: replace linux/gpio.h inclusions
soc: imx9: devm_kasprintf error handling
ARM: mark mv78xx0 support as deprecated
ARM: mark axxia platform as deprecated
ARM: mark Cortex-M3/M4/M7 based boards as deprecated
ARM: mark footbridge as deprecated
ARM: mark RiscPC as deprecated
ARM: mark mach-sa1100 as deprecated
ARM: orion5x: mark all board files as deprecated
...
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/firmware/imx/imx-scu.c | 25 | ||||
| -rw-r--r-- | drivers/firmware/imx/sm-misc.c | 3 | ||||
| -rw-r--r-- | drivers/gpio/gpio-sa1100.c | 10 | ||||
| -rw-r--r-- | drivers/soc/imx/soc-imx9.c | 9 |
4 files changed, 45 insertions, 2 deletions
diff --git a/drivers/firmware/imx/imx-scu.c b/drivers/firmware/imx/imx-scu.c index 67b267a7408a..203aac421252 100644 --- a/drivers/firmware/imx/imx-scu.c +++ b/drivers/firmware/imx/imx-scu.c @@ -82,6 +82,17 @@ static int imx_sc_linux_errmap[IMX_SC_ERR_LAST] = { static struct imx_sc_ipc *imx_sc_ipc_handle; +static void imx_scu_free_mbox_chan(void *data) +{ + mbox_free_channel(data); +} + +static void imx_scu_clear_handle(void *data) +{ + if (imx_sc_ipc_handle == data) + imx_sc_ipc_handle = NULL; +} + static inline int imx_sc_to_linux_errno(int errno) { if (errno >= IMX_SC_ERR_NONE && errno < IMX_SC_ERR_LAST) @@ -321,6 +332,11 @@ static int imx_scu_probe(struct platform_device *pdev) dev_dbg(dev, "request mbox chan %s\n", chan_name); /* chan_name is not used anymore by framework */ kfree(chan_name); + + ret = devm_add_action_or_reset(dev, imx_scu_free_mbox_chan, + sc_chan->ch); + if (ret) + return ret; } sc_ipc->dev = dev; @@ -330,6 +346,9 @@ static int imx_scu_probe(struct platform_device *pdev) init_completion(&sc_ipc->done); imx_sc_ipc_handle = sc_ipc; + ret = devm_add_action_or_reset(dev, imx_scu_clear_handle, sc_ipc); + if (ret) + return ret; ret = imx_scu_soc_init(dev); if (ret) @@ -342,7 +361,11 @@ static int imx_scu_probe(struct platform_device *pdev) dev_info(dev, "NXP i.MX SCU Initialized\n"); - return devm_of_platform_populate(dev); + ret = devm_of_platform_populate(dev); + if (ret) + of_platform_depopulate(dev); + + return ret; } static const struct of_device_id imx_scu_match[] = { diff --git a/drivers/firmware/imx/sm-misc.c b/drivers/firmware/imx/sm-misc.c index ac9af824c2d4..fb8d7bdb5b08 100644 --- a/drivers/firmware/imx/sm-misc.c +++ b/drivers/firmware/imx/sm-misc.c @@ -79,6 +79,9 @@ static int syslog_show(struct seq_file *file, void *priv) u16 size = SZ_4K / 4; int ret; + if (!syslog) + return -ENOMEM; + if (!ph) return -ENODEV; diff --git a/drivers/gpio/gpio-sa1100.c b/drivers/gpio/gpio-sa1100.c index 1938ffa2f4f3..ffa73dd3b982 100644 --- a/drivers/gpio/gpio-sa1100.c +++ b/drivers/gpio/gpio-sa1100.c @@ -13,6 +13,11 @@ #include <mach/hardware.h> #include <mach/irqs.h> #include <mach/generic.h> +#include <linux/property.h> + +const struct software_node sa1100_gpiochip_node = { + .name = "sa1100-gpio", +}; struct sa1100_gpio_chip { struct gpio_chip chip; @@ -317,6 +322,7 @@ static const int sa1100_gpio_irqs[] __initconst = { void __init sa1100_init_gpio(void) { struct sa1100_gpio_chip *sgc = &sa1100_gpio_chip; + struct gpio_chip *gc = &sgc->chip; int i; /* clear all GPIO edge detects */ @@ -324,7 +330,9 @@ void __init sa1100_init_gpio(void) writel_relaxed(0, sgc->membase + R_GRER); writel_relaxed(-1, sgc->membase + R_GEDR); - gpiochip_add_data(&sa1100_gpio_chip.chip, NULL); + software_node_register(&sa1100_gpiochip_node); + gc->fwnode = software_node_fwnode(&sa1100_gpiochip_node); + gpiochip_add_data(gc, NULL); sa1100_gpio_irqdomain = irq_domain_create_simple(NULL, 28, IRQ_GPIO0, diff --git a/drivers/soc/imx/soc-imx9.c b/drivers/soc/imx/soc-imx9.c index 58eef7d4f908..23b54b7d7502 100644 --- a/drivers/soc/imx/soc-imx9.c +++ b/drivers/soc/imx/soc-imx9.c @@ -35,6 +35,8 @@ static int imx9_soc_probe(struct platform_device *pdev) return dev_err_probe(dev, err, "%s: missing model property\n", __func__); attr->family = devm_kasprintf(dev, GFP_KERNEL, "Freescale i.MX"); + if (!attr->family) + return -ENOMEM; /* * Retrieve the soc id, rev & uid info: @@ -52,11 +54,18 @@ static int imx9_soc_probe(struct platform_device *pdev) rev_minor = SOC_REV_MINOR(res.a1); attr->soc_id = devm_kasprintf(dev, GFP_KERNEL, "i.MX%2x", soc_id); + if (!attr->soc_id) + return -ENOMEM; + attr->revision = devm_kasprintf(dev, GFP_KERNEL, "%d.%d", rev_major, rev_minor); + if (!attr->revision) + return -ENOMEM; uid127_64 = res.a2; uid63_0 = res.a3; attr->serial_number = devm_kasprintf(dev, GFP_KERNEL, "%016llx%016llx", uid127_64, uid63_0); + if (!attr->serial_number) + return -ENOMEM; sdev = soc_device_register(attr); if (IS_ERR(sdev)) |
