From: Andrew Jeffery <andrew@aj.id.au>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Cédric Le Goater" <clg@kaod.org>,
"Joel Stanley" <joel@jms.id.au>,
"QEMU Developers" <qemu-devel@nongnu.org>,
qemu-arm <qemu-arm@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v2 1/3] hw/misc: Add a model for the ASPEED System Control Unit
Date: Fri, 24 Jun 2016 11:34:31 +0930 [thread overview]
Message-ID: <1466733871.23740.111.camel@aj.id.au> (raw)
In-Reply-To: <CAFEAcA9MYTmTRsj1ga-Vu0yrunytvY9rAUDwHR3ziY2oHWNYpg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2267 bytes --]
On Thu, 2016-06-23 at 18:42 +0100, Peter Maydell wrote:
> On 23 June 2016 at 03:15, Andrew Jeffery <andrew@aj.id.au> wrote:
> >
> > The SCU is a collection of chip-level control registers that manage the
> > various functions supported by ASPEED SoCs. Typically the bits control
> > interactions with clocks, external hardware or reset behaviour, and we
> > can largly take a hands-off approach to reads and writes.
> >
> > Firmware makes heavy use of the state to determine how to boot, but the
> > reset values vary from SoC to SoC (eg AST2400 vs AST2500). A qdev
> > property is exposed so that the integrating SoC model can configure the
> > silicon revision, which in-turn selects the appropriate reset values.
> > Further qdev properties are exposed so the board model can configure the
> > board-dependent hardware strapping.
> >
> > Almost all provided AST2400 reset values are specified by the datasheet.
> > The notable exception is SOC_SCRATCH1, where we mark the DRAM as
> > successfully initialised to avoid unnecessary dark corners in the SoC's
> > u-boot support.
> >
> > +static Property aspeed_scu_properties[] = {
> > + DEFINE_PROP_UINT32("silicon-rev", AspeedSCUState, silicon_rev, 0),
> > + DEFINE_PROP_UINT32("hw-strap1", AspeedSCUState, hw_strap1, 0),
> > + DEFINE_PROP_UINT32("hw-strap2", AspeedSCUState, hw_strap1, 0),
> > + DEFINE_PROP_END_OF_LIST(),
> > +};
> You don't seem to specify in the board layer or the SoC layer
> any of these except hw-strap1, so should the default values
> for these really all be zero?
Both strap register default values are 0 according to the datasheet.
>
> I suspect silicon-rev at least should either have a default
> value specified here, or have the SoC layer specify it.
> (It probably should not be specified at the board level.)
I intended to set silicon-rev in the SoC layer, so I'll fix patch 2/3.
With the addition of sanity checking in the SCU's realise() we'll catch
the case where it's an invalid value (eg 0). I don't think it's right
to plow ahead with an unexpected configuration if a chosen default
value doesn't match the SoC at hand.
Maybe I shouldn't send patches with a heavy head cold :/
Cheers,
Andrew
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-06-24 2:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-23 2:15 [Qemu-devel] [PATCH v2 0/3] Add ASPEED SCU device Andrew Jeffery
2016-06-23 2:15 ` [Qemu-devel] [PATCH v2 1/3] hw/misc: Add a model for the ASPEED System Control Unit Andrew Jeffery
2016-06-23 6:27 ` Cédric Le Goater
2016-06-23 17:37 ` Peter Maydell
2016-06-24 1:51 ` Andrew Jeffery
2016-06-23 17:42 ` Peter Maydell
2016-06-24 2:04 ` Andrew Jeffery [this message]
2016-06-23 2:15 ` [Qemu-devel] [PATCH v2 2/3] ast2400: Integrate the SCU model and set silicon revision Andrew Jeffery
2016-06-23 6:28 ` Cédric Le Goater
2016-06-23 17:38 ` Peter Maydell
2016-06-23 2:15 ` [Qemu-devel] [PATCH v2 3/3] palmetto-bmc: Configure the SCU's hardware strapping register Andrew Jeffery
2016-06-23 6:28 ` Cédric Le Goater
2016-06-23 17:39 ` Peter Maydell
2016-06-24 2:21 ` Andrew Jeffery
2016-06-24 10:55 ` Peter Maydell
2016-06-24 11:46 ` Cédric Le Goater
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1466733871.23740.111.camel@aj.id.au \
--to=andrew@aj.id.au \
--cc=clg@kaod.org \
--cc=joel@jms.id.au \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).