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] [day] [month] [year] [list]
Date:	Wed, 12 Aug 2015 12:00:14 -0700
From:	Michael Turquette <mturquette@...libre.com>
To:	Eric Anholt <eric@...olt.net>, linux-arm-kernel@...ts.infradead.org
Cc:	linux-rpi-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	"Stephen Warren" <swarren@...dotorg.org>,
	"Lee Jones" <lee@...nel.org>, linux-clk@...r.kernel.org,
	"Stephen Boyd" <sboyd@...eaurora.org>
Subject: Re: [PATCH v4 2/8] clk: Add a Raspberry Pi-specific clock driver.

Quoting Eric Anholt (2015-08-12 11:04:05)
> Michael Turquette <mturquette@...aro.org> writes:
> 
> > Hi Eric,
> >
> > Quoting Eric Anholt (2015-07-20 12:33:01)
> >> +void __init rpi_firmware_init_clock_provider(struct device_node *node)
> >> +{
> >> +       /* We delay construction of our struct clks until get time,
> >> +        * because we need to be able to return -EPROBE_DEFER if the
> >> +        * firmware driver isn't up yet.  clk core doesn't support
> >> +        * re-probing on -EPROBE_DEFER, but callers of clk_get can.
> >> +        */
> >> +       of_clk_add_provider(node, rpi_firmware_delayed_get_clk, node);
> >> +}
> >> +
> >> +CLK_OF_DECLARE(rpi_firmware_clocks, "raspberrypi,bcm2835-firmware-clocks",
> >> +              rpi_firmware_init_clock_provider);
> >
> > Do you require CLK_OF_DECLARE here? Could this be a platform driver
> > instead?
> 
> I'm not actually sure.  The common pattern seemed to be using
> CLK_OF_DECLARE (130 files using it versus declaring a struct
> platform_driver), and it seems to avoid a whole lot of boilerplate.
> What would the advantage be?

Correctly using the Linux driver model, having a nice struct device and
things like supsend and resume handlers, etc.

There is a lot of CLK_OF_DECLARE going on in drivers/clk, but I am
hoping we can fix that. The main reason for CLK_OF_DECLARE is when you
need to register clocks very early (e.g. timers). This is often not the
case.

Regards,
Mike
--
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