From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:39848) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sr6dq-0005cO-Ef for qemu-devel@nongnu.org; Tue, 17 Jul 2012 08:12:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sr6dm-0001kI-Ds for qemu-devel@nongnu.org; Tue, 17 Jul 2012 08:12:38 -0400 Received: from plane.gmane.org ([80.91.229.3]:45935) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sr6dm-0001jj-79 for qemu-devel@nongnu.org; Tue, 17 Jul 2012 08:12:34 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Sr6di-0001Z3-SX for qemu-devel@nongnu.org; Tue, 17 Jul 2012 14:12:30 +0200 Received: from 213.33.220.118 ([213.33.220.118]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 17 Jul 2012 14:12:30 +0200 Received: from m.kozlov by 213.33.220.118 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 17 Jul 2012 14:12:30 +0200 From: Maksim Kozlov Date: Tue, 17 Jul 2012 16:12:17 +0400 Message-ID: <500556A1.7090903@samsung.com> References: <1341419277-19674-1-git-send-email-m.kozlov@samsung.com> <1341419277-19674-2-git-send-email-m.kozlov@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v4 1/2] ARM: exynos4210: CMU support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kyungmin.park@samsung.com 17.07.2012 01:05, Peter Maydell пишет: > On 4 July 2012 17:27, Maksim Kozlov 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