soc: arm platform code changes for 7.0

These are mainly code cleanups, dropping some unneeded code,
 plus a reference counting leak fix.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmmLVtQACgkQmmx57+YA
 GNkRIRAAjZwCSrEypK0zioeGsJf5VWzZjbOcDyGFhj3qBFAujAgluLdZ4Noz4X2S
 YsvgbMc1IK2s4hnss/u0gk8x4YxBltfj0ytcHrOUgKkBqbq0oEKw6lXeXNn67TbN
 lQzXD7dzYNHv3eLiNnHG4SQrA63fPq+CzE+6V3k3gWrAGO2krDFfPrgHiO+Vm8PC
 ziARCUJRTMSi6CDeALiW+us5Me3LsL9qO0IPDlSQ1fVfb8DIlFWqhGjKNoRLZEej
 ki4D50404mo7l3UzwJrdheOlLdKqOOT/Pi6kcBDt+pCxz1koyT0bn5P37cY3TsFQ
 qZ971Hu5vhW9I/OLf1u/XVEE7Qzg2v2qWUK6HR6x7mqipZsCUQi/BqsL2FHE83Go
 tPvxbeY1IwLrDf9boZI0cOqmFfsJ8wUDhMQVExw6ki0mw41ppDebMfqqVwjwSgEt
 5OVRnBBxSJQTap+6wemojE2arwr/YcITELnbnKZzOfGUi/QRx1erhwzZtCZN72zY
 Cvy9evufx80lqRTddk0wCeNDT3U5RfMgH1g7I+CjSoyGUUb3CRW6OBpgjnz1IVEU
 zL1hSnEADicQS0yejocbpgj56wG2Ij1Naw3kIIDSQodqbSlKx/MPNnGfl2D/gq8V
 WhMv7h/2JpAy9aas04HZsYcIDC5gmjUa73n8AsqzHdMd2VGsdZw=
 =AKoJ
 -----END PGP SIGNATURE-----

Merge tag 'soc-arm-7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull arm platform SoC code updates from Arnd Bergmann:
 "These are mainly code cleanups, dropping some unneeded code, plus a
  reference counting leak fix"

* tag 'soc-arm-7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
  ARM: at91: remove unnecessary of_platform_default_populate calls
  ARM: at91: Move PM init functions to .init_late hook
  ARM: omap1: drop unused Kconfig symbol
  ARM: omap2: Fix reference count leaks in omap_control_init()
master
Linus Torvalds 2026-02-10 21:03:14 -08:00
commit 60dc45dde4
8 changed files with 18 additions and 77 deletions

View File

@ -7,26 +7,16 @@
* 2012 Joachim Eastwood <manabian@gmail.com>
*/
#include <linux/of.h>
#include <linux/of_platform.h>
#include <asm/mach/arch.h>
#include "generic.h"
static void __init at91rm9200_dt_device_init(void)
{
of_platform_default_populate(NULL, NULL, NULL);
at91rm9200_pm_init();
}
static const char *const at91rm9200_dt_board_compat[] __initconst = {
"atmel,at91rm9200",
NULL
};
DT_MACHINE_START(at91rm9200_dt, "Atmel AT91RM9200")
.init_machine = at91rm9200_dt_device_init,
.init_late = at91rm9200_pm_init,
.dt_compat = at91rm9200_dt_board_compat,
MACHINE_END

View File

@ -6,21 +6,11 @@
* 2011 Nicolas Ferre <nicolas.ferre@atmel.com>
*/
#include <linux/of.h>
#include <linux/of_platform.h>
#include <asm/mach/arch.h>
#include <asm/system_misc.h>
#include "generic.h"
static void __init at91sam9_init(void)
{
of_platform_default_populate(NULL, NULL, NULL);
at91sam9_pm_init();
}
static const char *const at91_dt_board_compat[] __initconst = {
"atmel,at91sam9",
NULL
@ -28,6 +18,6 @@ static const char *const at91_dt_board_compat[] __initconst = {
DT_MACHINE_START(at91sam_dt, "Atmel AT91SAM9")
/* Maintainer: Atmel */
.init_machine = at91sam9_init,
.init_late = at91sam9_pm_init,
.dt_compat = at91_dt_board_compat,
MACHINE_END

View File

@ -7,21 +7,11 @@
* Author: Claudiu Beznea <claudiu.beznea@microchip.com>
*/
#include <linux/of.h>
#include <linux/of_platform.h>
#include <asm/mach/arch.h>
#include <asm/system_misc.h>
#include "generic.h"
static void __init sam9x60_init(void)
{
of_platform_default_populate(NULL, NULL, NULL);
sam9x60_pm_init();
}
static const char *const sam9x60_dt_board_compat[] __initconst = {
"microchip,sam9x60",
NULL
@ -29,6 +19,6 @@ static const char *const sam9x60_dt_board_compat[] __initconst = {
DT_MACHINE_START(sam9x60_dt, "Microchip SAM9X60")
/* Maintainer: Microchip */
.init_machine = sam9x60_init,
.init_late = sam9x60_pm_init,
.dt_compat = sam9x60_dt_board_compat,
MACHINE_END

View File

@ -7,20 +7,10 @@
* Author: Varshini Rajendran <varshini.rajendran@microchip.com>
*/
#include <linux/of.h>
#include <linux/of_platform.h>
#include <asm/mach/arch.h>
#include "generic.h"
static void __init sam9x7_init(void)
{
of_platform_default_populate(NULL, NULL, NULL);
sam9x7_pm_init();
}
static const char * const sam9x7_dt_board_compat[] __initconst = {
"microchip,sam9x7",
NULL
@ -28,6 +18,6 @@ static const char * const sam9x7_dt_board_compat[] __initconst = {
DT_MACHINE_START(sam9x7_dt, "Microchip SAM9X7")
/* Maintainer: Microchip */
.init_machine = sam9x7_init,
.init_late = sam9x7_pm_init,
.dt_compat = sam9x7_dt_board_compat,
MACHINE_END

View File

@ -6,9 +6,6 @@
* 2013 Ludovic Desroches <ludovic.desroches@atmel.com>
*/
#include <linux/of.h>
#include <linux/of_platform.h>
#include <asm/hardware/cache-l2x0.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
@ -30,12 +27,6 @@ static void __init sama5_secure_cache_init(void)
outer_cache.write_sec = sama5_l2c310_write_sec;
}
static void __init sama5_dt_device_init(void)
{
of_platform_default_populate(NULL, NULL, NULL);
sama5_pm_init();
}
static const char *const sama5_dt_board_compat[] __initconst = {
"atmel,sama5",
NULL
@ -43,7 +34,7 @@ static const char *const sama5_dt_board_compat[] __initconst = {
DT_MACHINE_START(sama5_dt, "Atmel SAMA5")
/* Maintainer: Atmel */
.init_machine = sama5_dt_device_init,
.init_late = sama5_pm_init,
.dt_compat = sama5_dt_board_compat,
MACHINE_END
@ -54,17 +45,11 @@ static const char *const sama5_alt_dt_board_compat[] __initconst = {
DT_MACHINE_START(sama5_alt_dt, "Atmel SAMA5")
/* Maintainer: Atmel */
.init_machine = sama5_dt_device_init,
.init_late = sama5_pm_init,
.dt_compat = sama5_alt_dt_board_compat,
.l2c_aux_mask = ~0UL,
MACHINE_END
static void __init sama5d2_init(void)
{
of_platform_default_populate(NULL, NULL, NULL);
sama5d2_pm_init();
}
static const char *const sama5d2_compat[] __initconst = {
"atmel,sama5d2",
NULL
@ -72,8 +57,8 @@ static const char *const sama5d2_compat[] __initconst = {
DT_MACHINE_START(sama5d2, "Atmel SAMA5")
/* Maintainer: Atmel */
.init_machine = sama5d2_init,
.init_early = sama5_secure_cache_init,
.init_late = sama5d2_pm_init,
.dt_compat = sama5d2_compat,
.l2c_aux_mask = ~0UL,
MACHINE_END

View File

@ -6,20 +6,11 @@
*
*/
#include <linux/of.h>
#include <linux/of_platform.h>
#include <asm/mach/arch.h>
#include <asm/system_misc.h>
#include "generic.h"
static void __init sama7_dt_device_init(void)
{
of_platform_default_populate(NULL, NULL, NULL);
sama7_pm_init();
}
static const char *const sama7_dt_board_compat[] __initconst = {
"microchip,sama7",
NULL
@ -27,7 +18,7 @@ static const char *const sama7_dt_board_compat[] __initconst = {
DT_MACHINE_START(sama7_dt, "Microchip SAMA7")
/* Maintainer: Microchip */
.init_machine = sama7_dt_device_init,
.init_late = sama7_pm_init,
.dt_compat = sama7_dt_board_compat,
MACHINE_END

View File

@ -4,7 +4,6 @@ menuconfig ARCH_OMAP1
depends on ARCH_MULTI_V4T || ARCH_MULTI_V5
depends on CPU_LITTLE_ENDIAN
depends on ATAGS
select ARCH_HAS_HOLES_MEMORYMODEL
select ARCH_OMAP
select CLKSRC_MMIO
select FORCE_PCI if PCCARD

View File

@ -732,7 +732,7 @@ int __init omap2_control_base_init(void)
*/
int __init omap_control_init(void)
{
struct device_node *np, *scm_conf;
struct device_node *np, *scm_conf, *clocks_node;
const struct of_device_id *match;
const struct omap_prcm_init_data *data;
int ret;
@ -753,16 +753,19 @@ int __init omap_control_init(void)
if (IS_ERR(syscon)) {
ret = PTR_ERR(syscon);
goto of_node_put;
goto err_put_scm_conf;
}
if (of_get_child_by_name(scm_conf, "clocks")) {
clocks_node = of_get_child_by_name(scm_conf, "clocks");
if (clocks_node) {
of_node_put(clocks_node);
ret = omap2_clk_provider_init(scm_conf,
data->index,
syscon, NULL);
if (ret)
goto of_node_put;
goto err_put_scm_conf;
}
of_node_put(scm_conf);
} else {
/* No scm_conf found, direct access */
ret = omap2_clk_provider_init(np, data->index, NULL,
@ -780,6 +783,9 @@ int __init omap_control_init(void)
return 0;
err_put_scm_conf:
if (scm_conf)
of_node_put(scm_conf);
of_node_put:
of_node_put(np);
return ret;