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]
Message-Id: <201404231439.02913.arnd@arndb.de>
Date:	Wed, 23 Apr 2014 14:39:02 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	linux-arm-kernel@...ts.infradead.org
Cc:	Maxime Ripard <maxime.ripard@...e-electrons.com>,
	Emilio Lopez <emilio@...pez.com.ar>,
	Dan Williams <dan.j.williams@...el.com>,
	Vinod Koul <vinod.koul@...el.com>, devicetree@...r.kernel.org,
	Mike Turquette <mturquette@...aro.org>,
	andriy.shevchenko@...el.com, linux-kernel@...r.kernel.org,
	zhuzhenhua@...winnertech.com, shuge@...winnertech.com,
	linux-sunxi@...glegroups.com, kevin.z.m.zh@...il.com,
	sunny@...winnertech.com, dmaengine@...r.kernel.org
Subject: Re: [PATCH v6 3/8] ARM: sunxi: Move the clock protection to machine hooks

On Thursday 17 April 2014, Maxime Ripard wrote:
> Since we start to have a lot of clocks to protect, some of them in a few boards
> only, it becomes difficult to handle the clock protection without having to add
> per machine exceptions.
> 
> Move these where they belong, in the machine definition code.
> 
> Signed-off-by: Maxime Ripard <maxime.ripard@...e-electrons.com>

I don't like the fact that these are required to be hardcoded
anywhere in source code.

> +#include <linux/clk.h>
>  #include <linux/init.h>
>  #include <linux/of_platform.h>
>  
> @@ -19,9 +20,17 @@
>  
>  static void __init sun4i_dt_init(void)
>  {
> +       struct clk *clk;
> +
>         sunxi_setup_restart();
>  
>         of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
> +
> +       /* Make sure the clocks we absolutely need are enabled */
> +       /* DDR clock */
> +       clk = clk_get(NULL, "pll5_ddr");
> +       if (!IS_ERR(clk))
> +               clk_prepare_enable(clk);
>  }

Isn't there already DT syntax to do the same? If not, should there be?

	Arnd
--
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