diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-05-26 10:25:22 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-05-26 10:25:22 -0700 |
commit | c011dd537ffe47462051930413fed07dbdc80313 (patch) | |
tree | 3cf9bdf68a5e01bfe7e7e3cc49711e8f931c6381 /arch/arm/mach-omap2 | |
parent | 3378323bbb9e77643a645f6b1ff10f7bdb9d61e4 (diff) | |
parent | 426ecc5851021519374542b0a954b2a9a3942d04 (diff) |
Merge tag 'arm-soc-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
Pull 32-bit ARM SoC updates from Arnd Bergmann:
"These updates are for platform specific code in arch/arm/, mostly
fixing minor issues.
The at91 platform gains support for better power management on the
lan966 platform and new firmware on the sama5 platform. The mediatek
soc drivers in turn are enabled for the new mt8195 SoC"
* tag 'arm-soc-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (34 commits)
ARM: at91: debug: add lan966 support
ARM: at91: pm: add support for sama5d2 secure suspend
ARM: at91: add code to handle secure calls
ARM: at91: Kconfig: implement PIT64B selection
ARM: at91: pm: add quirks for pm
ARM: at91: pm: use kernel documentation style
ARM: at91: pm: introduce macros for pm mode replacement
ARM: at91: pm: keep documentation inline with structure members
orion5x: fix typos in comments
ARM: hisi: Add missing of_node_put after of_find_compatible_node
ARM: shmobile: rcar-gen2: Drop comma after OF match table sentinel
ARM: shmobile: Drop commas after dt_compat sentinels
soc: mediatek: mutex: remove mt8195 MOD0 and SOF0 definition
MAINTAINERS: Add Broadcom BCMBCA entry
arm: bcmbca: add arch bcmbca machine entry
MAINTAINERS: Broadcom internal lists aren't maintainers
dt-bindings: pwrap: mediatek: Update pwrap document for mt8195
soc: mediatek: add DDP_DOMPONENT_DITHER0 enum for mt8195 vdosys0
soc: mediatek: add mtk-mutex support for mt8195 vdosys0
soc: mediatek: add mtk-mmsys support for mt8195 vdosys0
...
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | arch/arm/mach-omap2/cm_common.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-omap2/control.c | 19 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_device.c | 20 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_device.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/prm_common.c | 8 |
5 files changed, 26 insertions, 30 deletions
diff --git a/arch/arm/mach-omap2/cm_common.c b/arch/arm/mach-omap2/cm_common.c index e2d069fe67f1..87f2c2d2d754 100644 --- a/arch/arm/mach-omap2/cm_common.c +++ b/arch/arm/mach-omap2/cm_common.c @@ -320,8 +320,10 @@ int __init omap2_cm_base_init(void) data = (struct omap_prcm_init_data *)match->data; ret = of_address_to_resource(np, 0, &res); - if (ret) + if (ret) { + of_node_put(np); return ret; + } if (data->index == TI_CLKM_CM) mem = &cm_base; @@ -367,8 +369,10 @@ int __init omap_cm_init(void) continue; ret = omap2_clk_provider_init(np, data->index, NULL, data->mem); - if (ret) + if (ret) { + of_node_put(np); return ret; + } } return 0; diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c index 062d431fc33a..c514a9602269 100644 --- a/arch/arm/mach-omap2/control.c +++ b/arch/arm/mach-omap2/control.c @@ -769,8 +769,10 @@ int __init omap2_control_base_init(void) data = (struct control_init_data *)match->data; mem = of_iomap(np, 0); - if (!mem) + if (!mem) { + of_node_put(np); return -ENOMEM; + } if (data->index == TI_CLKM_CTRL) { omap2_ctrl_base = mem; @@ -810,22 +812,24 @@ int __init omap_control_init(void) if (scm_conf) { syscon = syscon_node_to_regmap(scm_conf); - if (IS_ERR(syscon)) - return PTR_ERR(syscon); + if (IS_ERR(syscon)) { + ret = PTR_ERR(syscon); + goto of_node_put; + } if (of_get_child_by_name(scm_conf, "clocks")) { ret = omap2_clk_provider_init(scm_conf, data->index, syscon, NULL); if (ret) - return ret; + goto of_node_put; } } else { /* No scm_conf found, direct access */ ret = omap2_clk_provider_init(np, data->index, NULL, data->mem); if (ret) - return ret; + goto of_node_put; } } @@ -836,6 +840,11 @@ int __init omap_control_init(void) } return 0; + +of_node_put: + of_node_put(np); + return ret; + } /** diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c index 56d6814bec26..8b3701901991 100644 --- a/arch/arm/mach-omap2/omap_device.c +++ b/arch/arm/mach-omap2/omap_device.c @@ -96,9 +96,6 @@ static void _add_clkdev(struct omap_device *od, const char *clk_alias, * omap_device, this function adds an entry in the clkdev table of the * form <dev-id=dev_name, con-id=role> if it does not exist already. * - * The function is called from inside omap_device_build_ss(), after - * omap_device_register. - * * This allows drivers to get a pointer to its optional clocks based on its role * by calling clk_get(<dev*>, <role>). * In the case of the main clock, a "fck" alias is used. @@ -473,23 +470,6 @@ struct dev_pm_domain omap_device_pm_domain = { } }; -/** - * omap_device_register - register an omap_device with one omap_hwmod - * @pdev: the platform device (omap_device) to register. - * - * Register the omap_device structure. This currently just calls - * platform_device_register() on the underlying platform_device. - * Returns the return value of platform_device_register(). - */ -int omap_device_register(struct platform_device *pdev) -{ - pr_debug("omap_device: %s: registering\n", pdev->name); - - dev_pm_domain_set(&pdev->dev, &omap_device_pm_domain); - return platform_device_add(pdev); -} - - /* Public functions for use by device drivers through struct platform_data */ /** diff --git a/arch/arm/mach-omap2/omap_device.h b/arch/arm/mach-omap2/omap_device.h index f77e76a7841a..d607532cf5e0 100644 --- a/arch/arm/mach-omap2/omap_device.h +++ b/arch/arm/mach-omap2/omap_device.h @@ -71,7 +71,6 @@ int omap_device_idle(struct platform_device *pdev); struct omap_device *omap_device_alloc(struct platform_device *pdev, struct omap_hwmod **ohs, int oh_cnt); void omap_device_delete(struct omap_device *od); -int omap_device_register(struct platform_device *pdev); struct device *omap_device_get_by_hwmod_name(const char *oh_name); diff --git a/arch/arm/mach-omap2/prm_common.c b/arch/arm/mach-omap2/prm_common.c index 65b2d82efa27..fb2d48cfe756 100644 --- a/arch/arm/mach-omap2/prm_common.c +++ b/arch/arm/mach-omap2/prm_common.c @@ -752,8 +752,10 @@ int __init omap2_prm_base_init(void) data = (struct omap_prcm_init_data *)match->data; ret = of_address_to_resource(np, 0, &res); - if (ret) + if (ret) { + of_node_put(np); return ret; + } data->mem = ioremap(res.start, resource_size(&res)); @@ -799,8 +801,10 @@ int __init omap_prcm_init(void) data = match->data; ret = omap2_clk_provider_init(np, data->index, NULL, data->mem); - if (ret) + if (ret) { + of_node_put(np); return ret; + } } omap_cm_init(); |