From: Joel Stanley <joel@jms.id.au>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "QEMU Developers" <qemu-devel@nongnu.org>,
qemu-arm <qemu-arm@nongnu.org>,
"Jim Mussared" <jim.mussared@gmail.com>,
"Stefan Hajnoczi" <stefanha@gmail.com>,
"Steffen Görtz" <contrib@steffen-goertz.de>,
"Julia Suvorova" <jusual@mail.ru>
Subject: Re: [Qemu-devel] [PATCH v5 2/3] arm: Add Nordic Semiconductor nRF51 SoC
Date: Sat, 25 Aug 2018 17:48:01 -0700 [thread overview]
Message-ID: <CACPK8Xeqaq2=Ey7cDxjQZrS1nw9mvbVsWd5ObOCDVVAuu0T8eA@mail.gmail.com> (raw)
In-Reply-To: <CAFEAcA9N_H2PqVUP-W=Sp-SQ4WYpbu5fqyN5hxkHdHGocX59Mg@mail.gmail.com>
Hi Peter,
On Thu, 16 Aug 2018 at 07:24, Peter Maydell <peter.maydell@linaro.org> wrote:
> > +static Property nrf51_soc_properties[] = {
> > + DEFINE_PROP_LINK("memory", NRF51State, board_memory, TYPE_MEMORY_REGION,
> > + MemoryRegion *),
> > + DEFINE_PROP_UINT32("sram-size", NRF51State, sram_size, NRF51822_SRAM_SIZE),
> > + DEFINE_PROP_UINT32("flash-size", NRF51State, flash_size, NRF51822_FLASH_SIZE),
> > + DEFINE_PROP_END_OF_LIST(),
> > +};
>
> Ah, I was wondering how flash_size was handled when I looked at patch 3.
>
> Instead of your patch 3 board model code reaching into the internals
> of the NRF51State struct to pull out the flash_size field, the board
> code should set this property on the object it creates, and then it
> knows how big the flash it's asked for is and can pass that value also
> to the armv7m_load_kernel() function.
Thanks for the review. I've sorted out the other comments relating to
this patch, but I wanted to discuss this one.
I agree that it would be neater to do this. I didn't as the flash is
part of the NRF51822 SoC, opposed to some external flash that is on
the microbit board and connected to the SoC. This is mentioned in the
comment at the start of the file:
/*
* The size and base is for the NRF51822 part. If other parts
* are supported in the future, add a sub-class of NRF51SoC for
* the specific variants
*/
What would you prefer we do here?
Cheers,
Joel
next prev parent reply other threads:[~2018-08-26 0:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-16 14:13 [Qemu-devel] [PATCH v5 0/3] arm: Add nRF51 SoC and micro:bit machine Joel Stanley
2018-08-16 14:13 ` [Qemu-devel] [PATCH v5 1/3] MAINTAINERS: Add NRF51 entry Joel Stanley
2018-08-16 14:13 ` [Qemu-devel] [PATCH v5 2/3] arm: Add Nordic Semiconductor nRF51 SoC Joel Stanley
2018-08-16 14:24 ` Peter Maydell
2018-08-26 0:48 ` Joel Stanley [this message]
2018-08-26 10:57 ` Peter Maydell
2018-08-27 13:19 ` Stefan Hajnoczi
2018-08-16 14:13 ` [Qemu-devel] [PATCH v5 3/3] arm: Add BBC micro:bit machine Joel Stanley
2018-08-16 14:28 ` [Qemu-devel] [PATCH v5 0/3] arm: Add nRF51 SoC and " Peter Maydell
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='CACPK8Xeqaq2=Ey7cDxjQZrS1nw9mvbVsWd5ObOCDVVAuu0T8eA@mail.gmail.com' \
--to=joel@jms.id.au \
--cc=contrib@steffen-goertz.de \
--cc=jim.mussared@gmail.com \
--cc=jusual@mail.ru \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
/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).