From: linux@arm.linux.org.uk (Russell King - ARM Linux) Date: Thu, 1 Oct 2009 15:59:39 +0100 Subject: [PATCH] ep93xx: introduce clk parent In-Reply-To: References: <4AC3B748.5060904@bluewatersys.com> Message-ID: <20091001145939.GA28044@n2100.arm.linux.org.uk> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wed, Sep 30, 2009 at 05:30:28PM -0400, H Hartley Sweeten wrote: > On Wednesday, September 30, 2009 12:54 PM, Ryan Mallon wrote: > > H Hartley Sweeten wrote: > >> The clock generation system in the ep93xx uses two external oscillator's > >> and two internal PLLs to derive all the internal clocks. Many of these > >> internal clocks can be stopped to save power. > >> > >> This introduces a "parent" hierarchy for the clocks so that the users > >> count can be correctly tracked for power management. > >> > >> The "parent" for the video clock can either be one of the PLL outputs > >> or the external oscillator. In order to correctly track the "parent" > >> for the video clock calc_clk_div() needed to be modified. It now > >> returns an error code if the desired rate cannot be generated. > >> > >> Signed-off-by: H Hartley Sweeten > >> Cc: Ryan Mallon > >> > >> --- > >> > > > > Acked-by: Ryan Mallon > > Russell, > > As the clkdev maintainer, do you see any problems with this? Only comment is that you should really consider some locking in clk_enable and clk_disable to prevent the use count being corrupted by simultaneous calls.