Received: from eggs.gnu.org ([2001:4830:134:3::10]:37712) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dOOJH-0006aK-2N for qemu-devel@nongnu.org; Fri, 23 Jun 2017 09:07:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dOOJD-0003vz-SV for qemu-devel@nongnu.org; Fri, 23 Jun 2017 09:07:39 -0400 Received: from mel.act-europe.fr ([194.98.77.210]:39007 helo=smtp.eu.adacore.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dOOJD-0003vO-J4 for qemu-devel@nongnu.org; Fri, 23 Jun 2017 09:07:35 -0400 References: <1488276185-31168-1-git-send-email-fred.konrad@greensocs.com> <1db78209-e426-03b5-9a19-592da96adaee@greensocs.com> <20170615145742.GF4859@toto> <20170615151530.GC12347@toto> <209d2c8f-fd46-0a6f-17ac-b4f53f47c43e@adacore.com> From: KONRAD Frederic Message-ID: <3871c989-d00e-c2fb-4e62-18624114ada4@adacore.com> Date: Fri, 23 Jun 2017 15:07:31 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v3 00/10] Clock framework API. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: "Edgar E. Iglesias" , Mark Burton , QEMU Developers , Alistair Francis , =?UTF-8?Q?C=c3=a9dric_Le_Goater?= , Paolo Bonzini , "Edgar E. Iglesias" , KONRAD Frederic Le 06/23/2017 =C3=A0 02:47 PM, Peter Maydell a =C3=A9crit : > On 23 June 2017 at 13:38, KONRAD Frederic = wrote: >> Le 06/23/2017 =C3=A0 11:51 AM, Peter Maydell a =C3=A9crit : >>> As an aside, I still find it very odd that you get a clock >>> object for both an input clock and an output clock. I feel >>> like we should have one end owns the clock object and the >>> other just has a reference to it of some kind. >> >> >> The point is beeing able to bind/unbind clocks inside the device >> to model a clock selector for example. So you just bind/unbind >> the input and output clocks. >=20 > I don't see why this needs both 'input clock' and 'output > clock' to be separate objects. What I have in mind is: >=20 > Device A: > has-a clock C1 >=20 > Device B: > has-a clock C2 >=20 > Device C: (a clock selector) > clock inputs CI1, CI2 > has-a clock C3 >=20 > Each device "owns" its output clock objects, but input > clocks are just pointers to the clock object owned by the > device at the other end. In the board you wire up CI1 to C1, > and CI2 to C2 (using link properties I guess). > Then in device C you can implement the clock switching by > some kind of bind(s->CI1, &s->C3) call because you have > pointers to all the relevant clock objects. >=20 > As I understand it your current implementation makes not > just the output clocks C1 C2 C2 be clock objects, but also > the inputs CI1 CI2, so effectively each link from a clock > source to a clock sink has two objects involved. Yes that makes sense but you won't have the name. And one other thing I wanted to have is beeing able to refresh the clock tree without refreshing everything. If you start a refresh from the "pointer" and it is bind to other things you will refresh the other devices as well. Maybe we don't care or we can workaround that but.. Fred >=20 > thanks > -- PMM >=20