From: "Cédric Le Goater" <clg@kaod.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
qemu-arm <qemu-arm@nongnu.org>, Andrew Jeffery <andrew@aj.id.au>
Subject: Re: [Qemu-devel] [PATCH v3 03/10] aspeed-soc: provide a framework to add new SoCs
Date: Fri, 12 Aug 2016 10:33:11 +0200 [thread overview]
Message-ID: <d2c9a78f-ace2-0538-ea4e-91d10b7dbe7f@kaod.org> (raw)
In-Reply-To: <CAFEAcA9xrwghN6FMRsbHAMrTfSLv3K+iVAJEA-8p-NQ+s-bfxw@mail.gmail.com>
On 08/11/2016 12:14 PM, Peter Maydell wrote:
> On 2 August 2016 at 18:15, Cédric Le Goater <clg@kaod.org> wrote:
>> Let's define an object class for each Aspeed SoC we support. A
>> AspeedSoCInfo struct gathers the SoC specifications which can later be
>> used by an instance of the class or by a board using the SoC.
>>
>> Signed-off-by: Cédric Le Goater <clg@kaod.org>
>
>> diff --git a/hw/arm/palmetto-bmc.c b/hw/arm/palmetto-bmc.c
>> index 4d11905cfb18..531c266d9449 100644
>> --- a/hw/arm/palmetto-bmc.c
>> +++ b/hw/arm/palmetto-bmc.c
>> @@ -22,8 +22,6 @@
>> #include "sysemu/blockdev.h"
>>
>> static struct arm_boot_info palmetto_bmc_binfo = {
>> - .loader_start = AST2400_SDRAM_BASE,
>> - .board_id = 0,
>> .nb_cpus = 1,
>> };
>>
>> @@ -61,14 +59,17 @@ static void palmetto_bmc_init_flashes(AspeedSMCState *s, const char *flashtype,
>> static void palmetto_bmc_init(MachineState *machine)
>> {
>> PalmettoBMCState *bmc;
>> + AspeedSoCClass *sc;
>>
>> bmc = g_new0(PalmettoBMCState, 1);
>> - object_initialize(&bmc->soc, (sizeof(bmc->soc)), TYPE_ASPEED_SOC);
>> + object_initialize(&bmc->soc, (sizeof(bmc->soc)), "ast2400-a0");
>> object_property_add_child(OBJECT(machine), "soc", OBJECT(&bmc->soc),
>> &error_abort);
>>
>> + sc = ASPEED_SOC_GET_CLASS(&bmc->soc);
>> +
>> memory_region_allocate_system_memory(&bmc->ram, NULL, "ram", ram_size);
>> - memory_region_add_subregion(get_system_memory(), AST2400_SDRAM_BASE,
>> + memory_region_add_subregion(get_system_memory(), sc->info->sdram_base,
>> &bmc->ram);
>> object_property_add_const_link(OBJECT(&bmc->soc), "ram", OBJECT(&bmc->ram),
>> &error_abort);
>> @@ -84,6 +85,9 @@ static void palmetto_bmc_init(MachineState *machine)
>> palmetto_bmc_binfo.initrd_filename = machine->initrd_filename;
>> palmetto_bmc_binfo.kernel_cmdline = machine->kernel_cmdline;
>> palmetto_bmc_binfo.ram_size = ram_size;
>> + palmetto_bmc_binfo.board_id = sc->info->silicon_rev;
>> + palmetto_bmc_binfo.loader_start = sc->info->sdram_base;
>> +
>
> This changes the behaviour from passing in the board_id
> as 0 to passing in the silicon rev. Neither of those
> things is actually a valid board ID value, which must
> be one of:
> (a) for legacy pre-device-tree boards, a value listed in
> the official database at:
> http://www.arm.linux.org.uk/developer/machines/download.php
> (b) for device-tree-only boards, -1
>
> board_id 0 means "I am an EBSA110", which this isn't,
> and your silicon rev values are completely out of range.
OK. I was not aware of this. I will request new board ids for
the ast2400 and ast2500
Thanks,
C.
> thanks
> -- PMM
>
next prev parent reply other threads:[~2016-08-12 14:29 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-02 17:15 [Qemu-devel] [PATCH v3 00/10] arm: add ast2500 support Cédric Le Goater
2016-08-02 17:15 ` [Qemu-devel] [PATCH v3 01/10] ast2400: rename the Aspeed SoC files to aspeed_soc Cédric Le Goater
2016-08-02 23:35 ` Andrew Jeffery
2016-08-11 10:22 ` Peter Maydell
2016-08-11 10:27 ` Cédric Le Goater
2016-08-02 17:15 ` [Qemu-devel] [PATCH v3 02/10] ast2400: replace ast2400 with aspeed_soc Cédric Le Goater
2016-08-02 23:44 ` Andrew Jeffery
2016-08-11 10:23 ` Peter Maydell
2016-08-02 17:15 ` [Qemu-devel] [PATCH v3 03/10] aspeed-soc: provide a framework to add new SoCs Cédric Le Goater
2016-08-02 23:46 ` Andrew Jeffery
2016-08-11 10:14 ` Peter Maydell
2016-08-12 8:33 ` Cédric Le Goater [this message]
2016-08-12 9:21 ` Peter Maydell
2016-08-22 9:07 ` Cédric Le Goater
2016-08-02 17:15 ` [Qemu-devel] [PATCH v3 04/10] palmetto-bmc: rename the Aspeed board file to aspeed.c Cédric Le Goater
2016-08-02 23:47 ` Andrew Jeffery
2016-08-11 10:24 ` Peter Maydell
2016-08-02 17:15 ` [Qemu-devel] [PATCH v3 05/10] palmetto-bmc: replace palmetto_bmc with aspeed Cédric Le Goater
2016-08-02 23:56 ` Andrew Jeffery
2016-08-11 10:23 ` Peter Maydell
2016-08-02 17:15 ` [Qemu-devel] [PATCH v3 06/10] palmetto-bmc: add board specific configuration Cédric Le Goater
2016-08-02 23:58 ` Andrew Jeffery
2016-08-11 10:27 ` Peter Maydell
2016-08-12 8:28 ` Cédric Le Goater
2016-08-02 17:15 ` [Qemu-devel] [PATCH v3 07/10] hw/misc: use macros to define hw-strap1 register on the AST2400 Aspeed SoC Cédric Le Goater
2016-08-03 0:13 ` Andrew Jeffery
2016-08-11 10:29 ` Peter Maydell
2016-08-02 17:15 ` [Qemu-devel] [PATCH v3 08/10] aspeed: add a AST2500 SoC and support to the SCU and SDMC controllers controllers Cédric Le Goater
2016-08-03 0:19 ` Andrew Jeffery
2016-08-11 10:33 ` Peter Maydell
2016-08-02 17:15 ` [Qemu-devel] [PATCH v3 09/10] arm: add support for an ast2500 evaluation board Cédric Le Goater
2016-08-03 0:22 ` Andrew Jeffery
2016-08-11 10:34 ` Peter Maydell
2016-08-02 17:15 ` [Qemu-devel] [PATCH v3 10/10] palmetto-bmc: remove extra no_sdcard assignement Cédric Le Goater
2016-08-03 0:23 ` Andrew Jeffery
2016-08-03 7:03 ` Cédric Le Goater
2016-08-11 10:35 ` Peter Maydell
2016-08-11 10:47 ` [Qemu-devel] [PATCH v3 00/10] arm: add ast2500 support Peter Maydell
2016-08-12 8:38 ` Cédric Le Goater
2016-08-12 9:22 ` 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=d2c9a78f-ace2-0538-ea4e-91d10b7dbe7f@kaod.org \
--to=clg@kaod.org \
--cc=andrew@aj.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).