Received: from eggs.gnu.org ([2001:4830:134:3::10]:50827) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFFqK-0001nf-Fl for qemu-devel@nongnu.org; Tue, 21 Jun 2016 03:11:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFFqI-0003ms-C0 for qemu-devel@nongnu.org; Tue, 21 Jun 2016 03:11:27 -0400 Message-ID: <1466493071.4344.59.camel@aj.id.au> From: Andrew Jeffery Reply-To: andrew@aj.id.au Date: Tue, 21 Jun 2016 16:41:11 +0930 In-Reply-To: References: <1466063287-19350-1-git-send-email-andrew@aj.id.au> <1466063287-19350-2-git-send-email-andrew@aj.id.au> <1466394273.4344.25.camel@aj.id.au> <1466480985.4344.50.camel@aj.id.au> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-UqdqewCXMeSW+b7zXnev" Mime-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 1/2] hw/misc: Add a model for the ASPEED System Control Unit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: =?ISO-8859-1?Q?C=E9dric?= Le Goater , Joel Stanley , QEMU Developers , qemu-arm --=-UqdqewCXMeSW+b7zXnev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2016-06-21 at 07:56 +0100, Peter Maydell wrote: > On 21 June 2016 at 04:49, Andrew Jeffery wrote: > >=20 > > On Mon, 2016-06-20 at 14:57 +0100, Peter Maydell wrote: > > >=20 > > > I think there are a couple of plausible ways you might model this: > > >=20 > > > (a) just have a single property for "revision" which corresponds > > > to the revision of this bit of silicon IP within the SoC; the > > > model of the device itself then knows what the reset state is > > > for this revision of the device. > > > (b) ditto, but also have some configurable flags where relevant > > > (ie approximately where it's the same IP rev within the SoC > > > but it's been configured by tying down different config lines; > > > for instance hw/dma/pl330.c has a collection of properties > > > which match the configurable knobs for the hardware.) > > Okay. I think (b) is the most appropriate. The board-controllable bits > > are primarily in the hardware strapping register. The register is > > composed of fields of mostly unrelated bits, so we could go two ways > > here: > >=20 > > (1) expose the register through a single 32bit property > > (2) break out a property for each bitfield > >=20 > > Do you have a preference? grepping the tree suggests there isn't a > > precedent for "large" numbers of properties* so maybe (2) is overkill, > > but (1) feels like it might fit into the overly-general-interface > > problem that we're trying to eliminate. > >=20 > > * Seems the microblaze CPU defines the most with 9 properties? > (You forgot '-n' on your sort rune.) > hw/dma/pl330.c has 15. Ugh. >=20 > >=20 > > Approach (2) will leave us with 21 properties for the SCU. > What would the 21 properties be in this case? >=20 > But yes, a single 32 bit property would probably be better. Alright, I'll go ahead with that. Thanks for the feedback. Andrew --=-UqdqewCXMeSW+b7zXnev Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCgAGBQJXaOiPAAoJEJ0dnzgO5LT53fEP/iiQoUfrExvO7/CwjclASI7z IZrdPd4XQmYqwRWFUxn9baNFOt5fNRaLlYBaSebC1Yaf0SYcCckBeZDlcIvd6uQl UgS/fSlycW0R/18sLrjpQodUtAfZRRI9cx4qWzokTnN7MmeLNfMMTHuUb9U1+JR7 frf7vk3dkfGFYKqYxJ5n5kCxp3iNeIiq/WKbQnpb9x0nwe/awqm2+/gkoyTX9K1X yq2Lzdm+MeVxzh02blHj2WgIRhdt62rxy6rylvniCGpo+dTaE5iCvP2NOCrqUVV6 cF+eTRlxpj1hG8AKa8qEGBzghqHMJ55vyP6sHOG+em4W/jGyUbLIxhHCupPwCH/m HV4Pcw0GXqTdtCU/owXgscJQ3K4wJRKtwMJbQqSU083qECuR4kp00RN6ToIzpKdO fdqyMZ2lBBIUw+cKnEWQhgqOUXArhzoXHbCImpw7r7o+J+1n7KkUqfObL4+ZC5FV I8ufb1IPAd/t8nQmMHT5k32EfLr2u9VtupQMxT96Hotz2rJNd+rLUCUDdzOnrFGc 1LKKEhiraY8msucYZ++OfntuuQ/bet8etwJtRCooj2ZwKrmR9/a6P+6ah2P+qj3d btUtw0d3f+spZnuJHQAf+BV3vo5v/oChGikE5ICLNi2V4dH/O+lqUFBW588apLli T+oxO5d37K0f+CcQKQat =Z9HS -----END PGP SIGNATURE----- --=-UqdqewCXMeSW+b7zXnev--