Skip to contentSkip to conversation

ARM: shmobile: Remove unused auxdata tables

PATCH Superseded Magnus Damm 3 participants 10 messages Jun 28, 2013 – Jul 1, 2013

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Magnus Damm

author maintainer
#0 lore raw

cover ARM: shmobile: Remove unused auxdata tables

ARM: shmobile: Remove unused auxdata tables

[PATCH 01/06] ARM: shmobile: Remove unused EMEV2 auxdata table [PATCH 02/06] ARM: shmobile: Remove unused r8a7740 auxdata table [PATCH 03/06] ARM: shmobile: Remove unused r8a7778 auxdata table [PATCH 04/06] ARM: shmobile: Remove unused r8a7779 auxdata table [PATCH 05/06] ARM: shmobile: Remove unused sh7372 auxdata table [PATCH 06/06] ARM: shmobile: Remove unused sh73a0 auxdata table

Rework the mach-shmobile code to pass NULL to of_platform_populate() instead of empty lists. This cleans up the code and reduces the number of lines. The recently added SoCs r8a7790 and r8a73a4 are already following this style, so no need to touch them.

---

Written against renesas.git renesas-next-20130628

 arch/arm/mach-shmobile/setup-emev2.c   |    6 +-----
 arch/arm/mach-shmobile/setup-r8a7740.c |    7 +------
 arch/arm/mach-shmobile/setup-r8a7778.c |    7 +------
 arch/arm/mach-shmobile/setup-r8a7779.c |    7 +------
 arch/arm/mach-shmobile/setup-sh7372.c  |    7 +------
 arch/arm/mach-shmobile/setup-sh73a0.c  |    7 +------
 6 files changed, 6 insertions(+), 35 deletions(-)
author maintainer
#1 lore raw

PATCH 1/6 ARM: shmobile: Remove unused EMEV2 auxdata table

From: Magnus Damm <[email protected]>

Pass NULL to of_platform_populate instead of passing an empty list. This cleans up the code and reduces the number of lines.

---

 arch/arm/mach-shmobile/setup-emev2.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
arch/arm/mach-shmobile/setup-emev2.c +1 -5
@@ -435,14 +435,10 @@ void __init emev2_init_irq(void)
 }
 
 #ifdef CONFIG_USE_OF
-static const struct of_dev_auxdata emev2_auxdata_lookup[] __initconst = {
-	{ }
-};
 
 static void __init emev2_add_standard_devices_dt(void)
 {
-	of_platform_populate(NULL, of_default_bus_match_table,
-			     emev2_auxdata_lookup, NULL);
+	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
 
 static const char *emev2_boards_compat_dt[] __initdata = {
author maintainer
#2 lore raw

PATCH 2/6 ARM: shmobile: Remove unused r8a7740 auxdata table

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Pass NULL to of_platform_populate instead of passing an empty list. This cleans up the code and reduces the number of lines.

---

 arch/arm/mach-shmobile/setup-r8a7740.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
arch/arm/mach-shmobile/setup-r8a7740.c +1 -6
@@ -986,16 +986,11 @@ void __init r8a7740_add_early_devices(vo
 
 #ifdef CONFIG_USE_OF
 
-static const struct of_dev_auxdata r8a7740_auxdata_lookup[] __initconst = {
-	{ }
-};
-
 void __init r8a7740_add_standard_devices_dt(void)
 {
 	platform_add_devices(r8a7740_devices_dt,
 			    ARRAY_SIZE(r8a7740_devices_dt));
-	of_platform_populate(NULL, of_default_bus_match_table,
-			     r8a7740_auxdata_lookup, NULL);
+	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
 
 void __init r8a7740_init_delay(void)
author maintainer
#3 lore raw

PATCH 3/6 ARM: shmobile: Remove unused r8a7778 auxdata table

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Pass NULL to of_platform_populate instead of passing an empty list. This cleans up the code and reduces the number of lines.

---

 arch/arm/mach-shmobile/setup-r8a7778.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
arch/arm/mach-shmobile/setup-r8a7778.c +1 -6
@@ -457,14 +457,9 @@ void __init r8a7778_init_irq_dt(void)
 	r8a7778_init_irq_common();
 }
 
-static const struct of_dev_auxdata r8a7778_auxdata_lookup[] __initconst = {
-	{},
-};
-
 void __init r8a7778_add_standard_devices_dt(void)
 {
-	of_platform_populate(NULL, of_default_bus_match_table,
-			     r8a7778_auxdata_lookup, NULL);
+	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
 
 static const char *r8a7778_compat_dt[] __initdata = {
#4 lore raw

PATCH 3/6 ARM: shmobile: Remove unused r8a7778 auxdata table

Quoted 8 lines · Magnus Damm

ach-shmobile/setup-r8a7778.c
+++ work/arch/arm/mach-shmobile/setup-r8a7778.c 2013-06-28 15:48:43.000000000 +0900

arch/arm/mach-shmobile/setup-r8a7778.c +0 -2
@@ -457,14 +457,9 @@ void __init r8a7778_init_irq_dt(void)
        r8a7778_init_irq_common();
 }
 
-static const struct of_dev_auxdata r8a7778_auxdata_lookup[] __initconst = {
-       {},

arch/arm/mach-shmobile/setup-r8a7778.c void __init r8a7778_init_irq_dt(void) · line 465

Quoted 10 lines
arch/arm/mach-shmobile/setup-r8a7778.c +1 -4
-};
-
 void __init r8a7778_add_standard_devices_dt(void)
 {
-       of_platform_populate(NULL, of_default_bus_match_table,
-                            r8a7778_auxdata_lookup, NULL);
+       of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
 
 static const char *r8a7778_compat_dt[] __initdata = {

Since this is now the trivial form of the function, you can drop r8a7778_add_standard_devices_dt entirely and have a NULL init_machine pointer. Same for the first two patches.

Arnd

author maintainer
#5 lore raw

PATCH 3/6 ARM: shmobile: Remove unused r8a7778 auxdata table

Hi Arnd,

Quoted 18 lines · Arnd Bergmann
Quoted 17 lines · Magnus Damm

ach-shmobile/setup-r8a7778.c
+++ work/arch/arm/mach-shmobile/setup-r8a7778.c 2013-06-28 15:48:43.000000000 +0900

arch/arm/mach-shmobile/setup-r8a7778.c +1 -6
@@ -457,14 +457,9 @@ void __init r8a7778_init_irq_dt(void)
        r8a7778_init_irq_common();
 }
 
-static const struct of_dev_auxdata r8a7778_auxdata_lookup[] __initconst = {
-       {},
-};
-
 void __init r8a7778_add_standard_devices_dt(void)
 {
-       of_platform_populate(NULL, of_default_bus_match_table,
-                            r8a7778_auxdata_lookup, NULL);
+       of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
 
Quoted 5 lines

arch/arm/mach-shmobile/setup-r8a7778.c void __init r8a7778_init_irq_dt(void) · line 465

Quoted 1 line
arch/arm/mach-shmobile/setup-r8a7778.c +0 -0
 static const char *r8a7778_compat_dt[] __initdata = {

Since this is now the trivial form of the function, you can drop r8a7778_add_standard_devices_dt entirely and have a NULL init_machine pointer. Same for the first two patches.

Thanks, I will rework the patches for the SoCs where NULL is possible and resend the series.

Cheers,

/ magnus

author maintainer
#6 lore raw

PATCH 4/6 ARM: shmobile: Remove unused r8a7779 auxdata table

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Pass NULL to of_platform_populate instead of passing an empty list. This cleans up the code and reduces the number of lines.

---

 arch/arm/mach-shmobile/setup-r8a7779.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
arch/arm/mach-shmobile/setup-r8a7779.c +1 -6
@@ -665,10 +665,6 @@ void __init r8a7779_init_delay(void)
 	shmobile_setup_delay(1000, 2, 4); /* Cortex-A9 @ 1000MHz */
 }
 
-static const struct of_dev_auxdata r8a7779_auxdata_lookup[] __initconst = {
-	{},
-};
-
 void __init r8a7779_add_standard_devices_dt(void)
 {
 	/* clocks are setup late during boot in the case of DT */
@@ -676,8 +672,7 @@ void __init r8a7779_add_standard_devices
 
 	platform_add_devices(r8a7779_devices_dt,
 			     ARRAY_SIZE(r8a7779_devices_dt));
-	of_platform_populate(NULL, of_default_bus_match_table,
-			     r8a7779_auxdata_lookup, NULL);
+	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
 
 static const char *r8a7779_compat_dt[] __initdata = {
author maintainer
#7 lore raw

PATCH 5/6 ARM: shmobile: Remove unused sh7372 auxdata table

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Pass NULL to of_platform_populate instead of passing an empty list. This cleans up the code and reduces the number of lines.

---

 arch/arm/mach-shmobile/setup-sh7372.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
arch/arm/mach-shmobile/setup-sh7372.c +1 -6
@@ -1147,10 +1147,6 @@ void __init sh7372_add_early_devices_dt(
 	shmobile_setup_console();
 }
 
-static const struct of_dev_auxdata sh7372_auxdata_lookup[] __initconst = {
-	{ }
-};
-
 void __init sh7372_add_standard_devices_dt(void)
 {
 	/* clocks are setup late during boot in the case of DT */
@@ -1159,8 +1155,7 @@ void __init sh7372_add_standard_devices_
 	platform_add_devices(sh7372_early_devices,
 			    ARRAY_SIZE(sh7372_early_devices));
 
-	of_platform_populate(NULL, of_default_bus_match_table,
-			     sh7372_auxdata_lookup, NULL);
+	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
 
 static const char *sh7372_boards_compat_dt[] __initdata = {
author maintainer
#8 lore raw

PATCH 6/6 ARM: shmobile: Remove unused sh73a0 auxdata table

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Pass NULL to of_platform_populate instead of passing an empty list. This cleans up the code and reduces the number of lines.

---

 arch/arm/mach-shmobile/setup-sh73a0.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
arch/arm/mach-shmobile/setup-sh73a0.c +1 -6
@@ -958,10 +958,6 @@ void __init sh73a0_add_early_devices(voi
 
 #ifdef CONFIG_USE_OF
 
-static const struct of_dev_auxdata sh73a0_auxdata_lookup[] __initconst = {
-	{},
-};
-
 void __init sh73a0_add_standard_devices_dt(void)
 {
 	struct platform_device_info devinfo = { .name = "cpufreq-cpu0", .id = -1, };
@@ -971,8 +967,7 @@ void __init sh73a0_add_standard_devices_
 
 	platform_add_devices(sh73a0_devices_dt,
 			     ARRAY_SIZE(sh73a0_devices_dt));
-	of_platform_populate(NULL, of_default_bus_match_table,
-			     sh73a0_auxdata_lookup, NULL);
+	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 
 	/* Instantiate cpufreq-cpu0 */
 	platform_device_register_full(&devinfo);
#9 lore raw

cover ARM: shmobile: Remove unused auxdata tables

In reply to Magnus Damm

Hello.

Quoted 9 lines · Magnus Damm

ARM: shmobile: Remove unused auxdata tables

[PATCH 01/06] ARM: shmobile: Remove unused EMEV2 auxdata table [PATCH 02/06] ARM: shmobile: Remove unused r8a7740 auxdata table [PATCH 03/06] ARM: shmobile: Remove unused r8a7778 auxdata table [PATCH 04/06] ARM: shmobile: Remove unused r8a7779 auxdata table [PATCH 05/06] ARM: shmobile: Remove unused sh7372 auxdata table [PATCH 06/06] ARM: shmobile: Remove unused sh73a0 auxdata table

Quoted 4 lines

Rework the mach-shmobile code to pass NULL to of_platform_populate() instead of empty lists. This cleans up the code and reduces the number of lines. The recently added SoCs r8a7790 and r8a73a4 are already following this style, so no need to touch them.

Right, these tables will actually be needed in the board code
instead, e.g. for Ether. Although, for the USB devices we might still need them where they are, once these devices are described in DT. Dilemma... I suspect we might be too hasty with this patch.

WBR, Sergei