From mboxrd@z Thu Jan 1 00:00:00 1970 From: maxime.ripard@free-electrons.com (Maxime Ripard) Date: Thu, 30 Jul 2015 12:17:23 +0200 Subject: [PATCH 7/7] clk: sunxi: Add a simple gates driver In-Reply-To: References: <1437945270-32014-1-git-send-email-maxime.ripard@free-electrons.com> <1437945270-32014-8-git-send-email-maxime.ripard@free-electrons.com> <20150727202648.GB14521@codeaurora.org> Message-ID: <20150730101723.GL2564@lukather> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Thu, Jul 30, 2015 at 03:55:17PM +0800, Chen-Yu Tsai wrote: > On Tue, Jul 28, 2015 at 4:26 AM, Stephen Boyd wrote: > > On 07/26, Maxime Ripard wrote: > >> diff --git a/drivers/clk/sunxi/clk-simple-gates.c b/drivers/clk/sunxi/clk-simple-gates.c > >> new file mode 100644 > >> index 000000000000..1a3963a8a686 > >> --- /dev/null > >> +++ b/drivers/clk/sunxi/clk-simple-gates.c > >> @@ -0,0 +1,159 @@ > >> +/* > >> + * Copyright 2015 Maxime Ripard > >> + * > >> + * Maxime Ripard > >> + * > >> + * This program is free software; you can redistribute it and/or modify > >> + * it under the terms of the GNU General Public License as published by > >> + * the Free Software Foundation; either version 2 of the License, or > >> + * (at your option) any later version. > >> + * > >> + * This program is distributed in the hope that it will be useful, > >> + * but WITHOUT ANY WARRANTY; without even the implied warranty of > >> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > >> + * GNU General Public License for more details. > >> + */ > >> + > > I'm guessing the following were copied from clk-sunxi.c. > > >> +#include > >> +#include > > > > Is this used? > > clk_register_clkdev() is not used in this file, so not needed. > > >> +#include > >> +#include > >> +#include > > > > Is this used? > > A remnant of the USB clocks, which has been moved to clk-usb.c. > > Not needed here nor in clk-sunxi.c. > > >> +#include > >> +#include > > > > Is this used? > > This is only used for clock factor calculation. Not applicable in > clk-simple-gates.c, so no. You're right, we don't need any of these... > >> +static DEFINE_SPINLOCK(gates_lock); > >> + > > [...] > >> + > >> +static const int sun4i_a10_ahb_critical_clocks[] __initdata = { > > > > Shouldn't it be __initconst ? > > Not sure why our critical clocks lists are __initdata... Why shouldn't it be? CLK_OF_DECLARE callbacks only run at of_clk_init time, which is way before the init memory is discarded. Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: