linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: rmallon@gmail.com (Ryan Mallon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 04/17] ARM: ep93xx: use machine specific hook for late init
Date: Fri, 27 Apr 2012 07:11:07 +1000	[thread overview]
Message-ID: <4F99B9EB.6060806@gmail.com> (raw)
In-Reply-To: <1335454725-13089-5-git-send-email-shawn.guo@linaro.org>

On 27/04/12 01:38, Shawn Guo wrote:

> Cc: Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Ryan Mallon <rmallon@gmail.com>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>


Why do we want this? It increases the size of the code and changes
a static function to a non-static one that now requires ifdefery
to handle the !CONFIG_CRUNCH case. I don't see the value in this
patch?

~Ryan

> ---
>  arch/arm/mach-ep93xx/adssphere.c             |    1 +
>  arch/arm/mach-ep93xx/core.c                  |    5 +++++
>  arch/arm/mach-ep93xx/crunch.c                |    4 +---
>  arch/arm/mach-ep93xx/gesbc9312.c             |    1 +
>  arch/arm/mach-ep93xx/include/mach/platform.h |    7 +++++++
>  arch/arm/mach-ep93xx/micro9.c                |    4 ++++
>  arch/arm/mach-ep93xx/simone.c                |    1 +
>  arch/arm/mach-ep93xx/snappercl15.c           |    1 +
>  arch/arm/mach-ep93xx/ts72xx.c                |    1 +
>  arch/arm/mach-ep93xx/vision_ep9307.c         |    1 +
>  10 files changed, 23 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/mach-ep93xx/adssphere.c b/arch/arm/mach-ep93xx/adssphere.c
> index 2d45947..a472777 100644
> --- a/arch/arm/mach-ep93xx/adssphere.c
> +++ b/arch/arm/mach-ep93xx/adssphere.c
> @@ -41,5 +41,6 @@ MACHINE_START(ADSSPHERE, "ADS Sphere board")
>  	.handle_irq	= vic_handle_irq,
>  	.timer		= &ep93xx_timer,
>  	.init_machine	= adssphere_init_machine,
> +	.init_late	= ep93xx_init_late,
>  	.restart	= ep93xx_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
> index 8d25895..365a90b 100644
> --- a/arch/arm/mach-ep93xx/core.c
> +++ b/arch/arm/mach-ep93xx/core.c
> @@ -904,3 +904,8 @@ void ep93xx_restart(char mode, const char *cmd)
>  	while (1)
>  		;
>  }
> +
> +void __init ep93xx_init_late(void)
> +{
> +	crunch_init();
> +}
> diff --git a/arch/arm/mach-ep93xx/crunch.c b/arch/arm/mach-ep93xx/crunch.c
> index 74753e2..a4a2ab9 100644
> --- a/arch/arm/mach-ep93xx/crunch.c
> +++ b/arch/arm/mach-ep93xx/crunch.c
> @@ -79,12 +79,10 @@ static struct notifier_block crunch_notifier_block = {
>  	.notifier_call	= crunch_do,
>  };
>  
> -static int __init crunch_init(void)
> +int __init crunch_init(void)
>  {
>  	thread_register_notifier(&crunch_notifier_block);
>  	elf_hwcap |= HWCAP_CRUNCH;
>  
>  	return 0;
>  }
> -
> -late_initcall(crunch_init);
> diff --git a/arch/arm/mach-ep93xx/gesbc9312.c b/arch/arm/mach-ep93xx/gesbc9312.c
> index fcdffbe..437c341 100644
> --- a/arch/arm/mach-ep93xx/gesbc9312.c
> +++ b/arch/arm/mach-ep93xx/gesbc9312.c
> @@ -41,5 +41,6 @@ MACHINE_START(GESBC9312, "Glomation GESBC-9312-sx")
>  	.handle_irq	= vic_handle_irq,
>  	.timer		= &ep93xx_timer,
>  	.init_machine	= gesbc9312_init_machine,
> +	.init_late	= ep93xx_init_late,
>  	.restart	= ep93xx_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-ep93xx/include/mach/platform.h b/arch/arm/mach-ep93xx/include/mach/platform.h
> index 602bd87..1ecb040 100644
> --- a/arch/arm/mach-ep93xx/include/mach/platform.h
> +++ b/arch/arm/mach-ep93xx/include/mach/platform.h
> @@ -53,5 +53,12 @@ void ep93xx_init_devices(void);
>  extern struct sys_timer ep93xx_timer;
>  
>  void ep93xx_restart(char, const char *);
> +void ep93xx_init_late(void);
> +
> +#ifdef CONFIG_CRUNCH
> +int crunch_init(void);
> +#else
> +static inline int crunch_init(void) { return 0; }
> +#endif
>  
>  #endif
> diff --git a/arch/arm/mach-ep93xx/micro9.c b/arch/arm/mach-ep93xx/micro9.c
> index dc431c5..3d7cdab 100644
> --- a/arch/arm/mach-ep93xx/micro9.c
> +++ b/arch/arm/mach-ep93xx/micro9.c
> @@ -85,6 +85,7 @@ MACHINE_START(MICRO9, "Contec Micro9-High")
>  	.handle_irq	= vic_handle_irq,
>  	.timer		= &ep93xx_timer,
>  	.init_machine	= micro9_init_machine,
> +	.init_late	= ep93xx_init_late,
>  	.restart	= ep93xx_restart,
>  MACHINE_END
>  #endif
> @@ -98,6 +99,7 @@ MACHINE_START(MICRO9M, "Contec Micro9-Mid")
>  	.handle_irq	= vic_handle_irq,
>  	.timer		= &ep93xx_timer,
>  	.init_machine	= micro9_init_machine,
> +	.init_late	= ep93xx_init_late,
>  	.restart	= ep93xx_restart,
>  MACHINE_END
>  #endif
> @@ -111,6 +113,7 @@ MACHINE_START(MICRO9L, "Contec Micro9-Lite")
>  	.handle_irq	= vic_handle_irq,
>  	.timer		= &ep93xx_timer,
>  	.init_machine	= micro9_init_machine,
> +	.init_late	= ep93xx_init_late,
>  	.restart	= ep93xx_restart,
>  MACHINE_END
>  #endif
> @@ -124,6 +127,7 @@ MACHINE_START(MICRO9S, "Contec Micro9-Slim")
>  	.handle_irq	= vic_handle_irq,
>  	.timer		= &ep93xx_timer,
>  	.init_machine	= micro9_init_machine,
> +	.init_late	= ep93xx_init_late,
>  	.restart	= ep93xx_restart,
>  MACHINE_END
>  #endif
> diff --git a/arch/arm/mach-ep93xx/simone.c b/arch/arm/mach-ep93xx/simone.c
> index f40c298..33dc079 100644
> --- a/arch/arm/mach-ep93xx/simone.c
> +++ b/arch/arm/mach-ep93xx/simone.c
> @@ -86,5 +86,6 @@ MACHINE_START(SIM_ONE, "Simplemachines Sim.One Board")
>  	.handle_irq	= vic_handle_irq,
>  	.timer		= &ep93xx_timer,
>  	.init_machine	= simone_init_machine,
> +	.init_late	= ep93xx_init_late,
>  	.restart	= ep93xx_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-ep93xx/snappercl15.c b/arch/arm/mach-ep93xx/snappercl15.c
> index 0c00852..eb28237 100644
> --- a/arch/arm/mach-ep93xx/snappercl15.c
> +++ b/arch/arm/mach-ep93xx/snappercl15.c
> @@ -183,5 +183,6 @@ MACHINE_START(SNAPPER_CL15, "Bluewater Systems Snapper CL15")
>  	.handle_irq	= vic_handle_irq,
>  	.timer 		= &ep93xx_timer,
>  	.init_machine	= snappercl15_init_machine,
> +	.init_late	= ep93xx_init_late,
>  	.restart	= ep93xx_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c
> index 5ea7909..d4ef339 100644
> --- a/arch/arm/mach-ep93xx/ts72xx.c
> +++ b/arch/arm/mach-ep93xx/ts72xx.c
> @@ -252,5 +252,6 @@ MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC")
>  	.handle_irq	= vic_handle_irq,
>  	.timer		= &ep93xx_timer,
>  	.init_machine	= ts72xx_init_machine,
> +	.init_late	= ep93xx_init_late,
>  	.restart	= ep93xx_restart,
>  MACHINE_END
> diff --git a/arch/arm/mach-ep93xx/vision_ep9307.c b/arch/arm/mach-ep93xx/vision_ep9307.c
> index ba156eb..2905a49 100644
> --- a/arch/arm/mach-ep93xx/vision_ep9307.c
> +++ b/arch/arm/mach-ep93xx/vision_ep9307.c
> @@ -367,5 +367,6 @@ MACHINE_START(VISION_EP9307, "Vision Engraving Systems EP9307")
>  	.handle_irq	= vic_handle_irq,
>  	.timer		= &ep93xx_timer,
>  	.init_machine	= vision_init_machine,
> +	.init_late	= ep93xx_init_late,
>  	.restart	= ep93xx_restart,
>  MACHINE_END

  reply	other threads:[~2012-04-26 21:11 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-26 15:38 [PATCH 00/17] arch/arm/mach-* late_initcall cleanup Shawn Guo
2012-04-26 15:38 ` [PATCH 01/17] ARM: provide a late_initcall hook for platform initialization Shawn Guo
2012-05-02  2:16   ` Rob Lee
2012-04-26 15:38 ` [PATCH 02/17] ARM: at91: use machine specific hook for late init Shawn Guo
2012-04-26 15:29   ` Jean-Christophe PLAGNIOL-VILLARD
2012-04-27 14:07     ` Shawn Guo
2012-04-27 14:26       ` Jean-Christophe PLAGNIOL-VILLARD
2012-04-28  2:30         ` Shawn Guo
2012-04-28  5:30           ` Jean-Christophe PLAGNIOL-VILLARD
2012-04-28  6:53             ` Shawn Guo
2012-04-30  8:46               ` Arnd Bergmann
2012-05-02  2:51                 ` Jean-Christophe PLAGNIOL-VILLARD
2012-05-02  7:22                   ` Shawn Guo
2012-04-26 15:38 ` [PATCH 03/17] ARM: davinci: " Shawn Guo
2012-04-26 15:38 ` [PATCH 04/17] ARM: ep93xx: " Shawn Guo
2012-04-26 21:11   ` Ryan Mallon [this message]
2012-04-26 21:49     ` H Hartley Sweeten
2012-04-26 22:12       ` Russell King - ARM Linux
2012-04-26 22:27         ` H Hartley Sweeten
2012-04-26 22:41       ` Ryan Mallon
2012-04-27  8:41         ` Arnd Bergmann
2012-04-27 13:23         ` Shawn Guo
2012-04-26 22:42   ` H Hartley Sweeten
2012-04-27 13:08     ` Shawn Guo
2012-04-26 15:38 ` [PATCH 05/17] ARM: exynos: " Shawn Guo
2012-04-26 15:38 ` [PATCH 06/17] ARM: imx: " Shawn Guo
2012-04-27  9:05   ` Sascha Hauer
2012-04-27 13:05     ` Shawn Guo
2012-04-26 15:38 ` [PATCH 07/17] ARM: kirkwood: " Shawn Guo
2012-04-26 15:38 ` [PATCH 08/17] ARM: msm: " Shawn Guo
2012-04-26 17:41   ` David Brown
2012-04-27 12:36     ` Shawn Guo
2012-04-26 15:38 ` [PATCH 09/17] ARM: omap1: " Shawn Guo
2012-04-26 15:38 ` [PATCH 10/17] ARM: omap2: " Shawn Guo
2012-04-26 15:38 ` [PATCH 11/17] ARM: pnx4008: " Shawn Guo
2012-04-26 15:38 ` [PATCH 12/17] ARM: prima2: " Shawn Guo
2012-04-29 14:06   ` Barry Song
2012-04-26 15:38 ` [PATCH 13/17] ARM: s3c64xx: " Shawn Guo
2012-04-26 15:38 ` [PATCH 14/17] ARM: sa1100: " Shawn Guo
2012-04-26 15:38 ` [PATCH 15/17] ARM: shmobile: " Shawn Guo
2012-04-27  9:15   ` Magnus Damm
2012-04-29 21:35     ` Rafael J. Wysocki
2012-04-30  0:54       ` Shawn Guo
2012-04-30 21:58         ` Rafael J. Wysocki
2012-05-01  1:56           ` Shawn Guo
2012-05-01 13:35             ` Rafael J. Wysocki
2012-05-01 13:35               ` Shawn Guo
2012-04-26 15:38 ` [PATCH 16/17] ARM: tegra: " Shawn Guo
2012-04-26 15:51   ` Stephen Warren
2012-04-27 12:54     ` Shawn Guo
2012-04-26 15:38 ` [PATCH 17/17] ARM: ux500: " Shawn Guo
2012-04-27  7:08   ` Srinidhi Kasagar
2012-04-27 12:38     ` Shawn Guo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F99B9EB.6060806@gmail.com \
    --to=rmallon@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).