lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 20 Aug 2013 09:26:42 +0200
From:	Sascha Hauer <s.hauer@...gutronix.de>
To:	Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>
Cc:	Russell King <linux@....linux.org.uk>,
	Arnd Bergmann <arnd@...db.de>,
	Sascha Hauer <kernel@...gutronix.de>,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC 06/17] ARM: imx: remove custom .init_time hook

On Tue, Aug 20, 2013 at 04:04:20AM +0200, Sebastian Hesselbarth wrote:
> With arch/arm calling of_clk_init(NULL) from time_init(), we can now
> remove custom .init_time hooks.
> 
> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>
> ---
> Notes:
> - Although mx5_clocks_common_init() is shared with non-DT, removing
>   of_clk_init(NULL) should be fine, as it only registers DT clk providers.
> - For imx6q, printing of silicon revision has been moved from .init_time
>   to .init_machine hook.
> 
> Cc: Russell King <linux@....linux.org.uk>
> Cc: Arnd Bergmann <arnd@...db.de>
> Cc: Sascha Hauer <kernel@...gutronix.de>
> Cc: linux-arm-kernel@...ts.infradead.org
> Cc: linux-kernel@...r.kernel.org
> ---
>  arch/arm/mach-imx/clk-imx51-imx53.c |   12 ------------
>  arch/arm/mach-imx/common.h          |    2 --
>  arch/arm/mach-imx/imx51-dt.c        |    6 ------
>  arch/arm/mach-imx/mach-imx53.c      |    6 ------
>  arch/arm/mach-imx/mach-imx6q.c      |   14 +++-----------
>  arch/arm/mach-imx/mach-imx6sl.c     |    7 -------
>  arch/arm/mach-imx/mach-vf610.c      |    9 ---------
>  7 files changed, 3 insertions(+), 53 deletions(-)
> 
> diff --git a/arch/arm/mach-imx/clk-imx51-imx53.c b/arch/arm/mach-imx/clk-imx51-imx53.c
> index 1a56a33..5955a54 100644
> --- a/arch/arm/mach-imx/clk-imx51-imx53.c
> +++ b/arch/arm/mach-imx/clk-imx51-imx53.c
> @@ -131,8 +131,6 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil,
>  {
>  	int i;
>  
> -	of_clk_init(NULL);
> -
>  	clk[dummy] = imx_clk_fixed("dummy", 0);
>  	clk[ckil] = imx_obtain_fixed_clock("ckil", rate_ckil);
>  	clk[osc] = imx_obtain_fixed_clock("osc", rate_osc);
> @@ -569,13 +567,3 @@ int __init mx53_clocks_init(unsigned long rate_ckil, unsigned long rate_osc,
>  
>  	return 0;
>  }
> -
> -int __init mx51_clocks_init_dt(void)
> -{
> -	return mx51_clocks_init(0, 0, 0, 0);
> -}
> -
> -int __init mx53_clocks_init_dt(void)
> -{
> -	return mx53_clocks_init(0, 0, 0, 0);
> -}
> diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h
> index 4517fd7..0ce8313 100644
> --- a/arch/arm/mach-imx/common.h
> +++ b/arch/arm/mach-imx/common.h
> @@ -68,8 +68,6 @@ extern int mx53_clocks_init(unsigned long ckil, unsigned long osc,
>  extern int mx25_clocks_init_dt(void);
>  extern int mx27_clocks_init_dt(void);
>  extern int mx31_clocks_init_dt(void);
> -extern int mx51_clocks_init_dt(void);
> -extern int mx53_clocks_init_dt(void);
>  extern struct platform_device *mxc_register_gpio(char *name, int id,
>  	resource_size_t iobase, resource_size_t iosize, int irq, int irq_high);
>  extern void mxc_set_cpu_type(unsigned int type);
> diff --git a/arch/arm/mach-imx/imx51-dt.c b/arch/arm/mach-imx/imx51-dt.c
> index 53e43e5..bece8a6 100644
> --- a/arch/arm/mach-imx/imx51-dt.c
> +++ b/arch/arm/mach-imx/imx51-dt.c
> @@ -34,17 +34,11 @@ static const char *imx51_dt_board_compat[] __initdata = {
>  	NULL
>  };
>  
> -static void __init imx51_timer_init(void)
> -{
> -	mx51_clocks_init_dt();
> -}
> -
>  DT_MACHINE_START(IMX51_DT, "Freescale i.MX51 (Device Tree Support)")
>  	.map_io		= mx51_map_io,
>  	.init_early	= imx51_init_early,
>  	.init_irq	= mx51_init_irq,
>  	.handle_irq	= imx51_handle_irq,
> -	.init_time	= imx51_timer_init,

On i.MX5 the init_time hook calls mx5x_clocks_init_dt which calls
mx5x_clocks_init which not only calls of_clk_init() but also registers
all clocks in the system. You can't remove it.

I am missing some

CLK_OF_DECLARE(imx51, "fsl,imx51-ccm", imx51_clocks_init);
CLK_OF_DECLARE(imx53, "fsl,imx53-ccm", imx53_clocks_init);

Somewhere.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ