qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4 1/2] ARM: exynos4210: CMU support


From: Maksim Kozlov
Subject: Re: [Qemu-devel] [PATCH v4 1/2] ARM: exynos4210: CMU support
Date: Tue, 17 Jul 2012 16:12:17 +0400
User-agent: Mozilla/5.0 (X11; Linux i686; rv:10.0) Gecko/20120129 Thunderbird/10.0

17.07.2012 01:05, Peter Maydell пишет:
On 4 July 2012 17:27, Maksim Kozlov<address@hidden>  wrote:
Add exynos4210 Clock Management Units emulation

General comment, which I suspect you're not going to like...

Underlying the exynos-specific code here, there's a general
mechanism of "I'm a device, I have a clock input, I want to be
able to find out when that clock is reprogrammed so I can
adjust my behaviour, and I want to do things like ask what
its rate is", and there's a provider of clock signals which
has some kind of clock tree, possibly rearrangable at runtime
by reprogramming the clock management unit. This is basically
the same thing the OMAP clock code in hw/omap_clk.c also provides
(though again the commonality is obscured under a heap of OMAP
specific stuff).

I think we need a generic interface for providing clocks
and plumbing them together, which can then be used by both
OMAP and Exynos and whatever later platforms come along
with clock trees. I'd also really like to see this use QOM
links rather than being a set of ad-hoc C functions for
register/get rate/etc.

You're platform number two, which I'm afraid means you get
the pain of writing a generic mechanism...

(There is a conceptual parallel with the kernel efforts to
move to a common struct_clk infrastructure, I think; I'd
much rather we did this while we have two clock tree models
rather than waiting until we have half a dozen.)

I've added some specific code review comments below, but
this is the biggie.

Ok, I will think what I can do in this direction.
Thanks





reply via email to

[Prev in Thread] Current Thread [Next in Thread]