* [PATCH v1] Adding new machine Yosemitev2 in QEMU
@ 2023-02-10 12:50 Karthikeyan Pasupathi
2023-02-13 8:03 ` Cédric Le Goater
0 siblings, 1 reply; 4+ messages in thread
From: Karthikeyan Pasupathi @ 2023-02-10 12:50 UTC (permalink / raw)
To: clg, peter.maydell, andrew, joel, qemu-arm, qemu-devel
Cc: Karthikeyan Pasupathi
This patch support Yosemitev2 in QEMU environment.
Signed-off-by: Karthikeyan Pasupathi <pkarthikeyan1509@gmail.com>
---
hw/arm/aspeed.c | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index 27dda58338..74dc07190d 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -536,6 +536,14 @@ static void create_pca9552(AspeedSoCState *soc, int bus_id, int addr)
TYPE_PCA9552, addr);
}
+static void fb_bmc_i2c_init(AspeedMachineState *bmc)
+{
+ AspeedSoCState *soc = &bmc->soc;
+
+ /* The FB board AST2500 compatible with ds1338 */
+ i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 11), "ds1338", 0x32);
+}
+
static void sonorapass_bmc_i2c_init(AspeedMachineState *bmc)
{
AspeedSoCState *soc = &bmc->soc;
@@ -1191,6 +1199,24 @@ static void aspeed_machine_romulus_class_init(ObjectClass *oc, void *data)
aspeed_soc_num_cpus(amc->soc_name);
};
+static void aspeed_machine_fbyv2_class_init(ObjectClass *oc, void *data)
+{
+ MachineClass *mc = MACHINE_CLASS(oc);
+ AspeedMachineClass *amc = ASPEED_MACHINE_CLASS(oc);
+
+ mc->desc = "Facebook YosemiteV2 BMC (ARM1176)";
+ amc->soc_name = "ast2500-a1";
+ amc->hw_strap1 = AST2500_EVB_HW_STRAP1;
+ amc->hw_strap2 = 0;
+ amc->fmc_model = "n25q256a";
+ amc->spi_model = "mx25l25635e";
+ amc->num_cs = 2;
+ amc->i2c_init = fb_bmc_i2c_init;
+ mc->default_ram_size = 512 * MiB;
+ mc->default_cpus = mc->min_cpus = mc->max_cpus =
+ aspeed_soc_num_cpus(amc->soc_name);
+};
+
static void aspeed_machine_sonorapass_class_init(ObjectClass *oc, void *data)
{
MachineClass *mc = MACHINE_CLASS(oc);
@@ -1554,6 +1580,10 @@ static const TypeInfo aspeed_machine_types[] = {
.name = MACHINE_TYPE_NAME("sonorapass-bmc"),
.parent = TYPE_ASPEED_MACHINE,
.class_init = aspeed_machine_sonorapass_class_init,
+ }, {
+ .name = MACHINE_TYPE_NAME("fbyv2-bmc"),
+ .parent = TYPE_ASPEED_MACHINE,
+ .class_init = aspeed_machine_fbyv2_class_init,
}, {
.name = MACHINE_TYPE_NAME("witherspoon-bmc"),
.parent = TYPE_ASPEED_MACHINE,
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v1] Adding new machine Yosemitev2 in QEMU
2023-02-10 12:50 [PATCH v1] Adding new machine Yosemitev2 in QEMU Karthikeyan Pasupathi
@ 2023-02-13 8:03 ` Cédric Le Goater
[not found] ` <CA+ezb7ifqiE-WJnBfDpn6-F17ukkarqnXTmMsSTNRGAHEnp0mA@mail.gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Cédric Le Goater @ 2023-02-13 8:03 UTC (permalink / raw)
To: Karthikeyan Pasupathi, peter.maydell, andrew, joel, qemu-arm,
qemu-devel
Hello,
On 2/10/23 13:50, Karthikeyan Pasupathi wrote:
> This patch support Yosemitev2 in QEMU environment.
It looks OK apart from the naming. Could we call it "yosemite2-bmc" instead ?
Thanks,
C.
> Signed-off-by: Karthikeyan Pasupathi <pkarthikeyan1509@gmail.com>
> ---
> hw/arm/aspeed.c | 30 ++++++++++++++++++++++++++++++
> 1 file changed, 30 insertions(+)
>
> diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
> index 27dda58338..74dc07190d 100644
> --- a/hw/arm/aspeed.c
> +++ b/hw/arm/aspeed.c
> @@ -536,6 +536,14 @@ static void create_pca9552(AspeedSoCState *soc, int bus_id, int addr)
> TYPE_PCA9552, addr);
> }
>
> +static void fb_bmc_i2c_init(AspeedMachineState *bmc)
The same routine name is proposed in the tiogapass patch :
https://lore.kernel.org/qemu-devel/20230210122641.837614-1-pkarthikeyan1509@gmail.com/
Do you have plans to populate the I2C buses differently ?
> +{
> + AspeedSoCState *soc = &bmc->soc;
> +
> + /* The FB board AST2500 compatible with ds1338 */
> + i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 11), "ds1338", 0x32);
> +}
> +
> static void sonorapass_bmc_i2c_init(AspeedMachineState *bmc)
> {
> AspeedSoCState *soc = &bmc->soc;
> @@ -1191,6 +1199,24 @@ static void aspeed_machine_romulus_class_init(ObjectClass *oc, void *data)
> aspeed_soc_num_cpus(amc->soc_name);
> };
>
> +static void aspeed_machine_fbyv2_class_init(ObjectClass *oc, void *data)
> +{
> + MachineClass *mc = MACHINE_CLASS(oc);
> + AspeedMachineClass *amc = ASPEED_MACHINE_CLASS(oc);
> +
> + mc->desc = "Facebook YosemiteV2 BMC (ARM1176)";
> + amc->soc_name = "ast2500-a1";
> + amc->hw_strap1 = AST2500_EVB_HW_STRAP1;
> + amc->hw_strap2 = 0;
> + amc->fmc_model = "n25q256a";
> + amc->spi_model = "mx25l25635e";
same as tiogapass ?
> + amc->num_cs = 2;
> + amc->i2c_init = fb_bmc_i2c_init;
> + mc->default_ram_size = 512 * MiB;
The RAM size is the only difference with the tiogapass and one could use the
-m machine option instead.
Thanks,
C.
> + mc->default_cpus = mc->min_cpus = mc->max_cpus =
> + aspeed_soc_num_cpus(amc->soc_name);
> +};
> +
> static void aspeed_machine_sonorapass_class_init(ObjectClass *oc, void *data)
> {
> MachineClass *mc = MACHINE_CLASS(oc);
> @@ -1554,6 +1580,10 @@ static const TypeInfo aspeed_machine_types[] = {
> .name = MACHINE_TYPE_NAME("sonorapass-bmc"),
> .parent = TYPE_ASPEED_MACHINE,
> .class_init = aspeed_machine_sonorapass_class_init,
> + }, {
> + .name = MACHINE_TYPE_NAME("fbyv2-bmc"),
> + .parent = TYPE_ASPEED_MACHINE,
> + .class_init = aspeed_machine_fbyv2_class_init,
> }, {
> .name = MACHINE_TYPE_NAME("witherspoon-bmc"),
> .parent = TYPE_ASPEED_MACHINE,
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1] Adding new machine Yosemitev2 in QEMU
[not found] ` <CA+ezb7ifqiE-WJnBfDpn6-F17ukkarqnXTmMsSTNRGAHEnp0mA@mail.gmail.com>
@ 2023-02-14 7:05 ` Cédric Le Goater
2023-02-15 5:09 ` karthikeyan Pasupathi
0 siblings, 1 reply; 4+ messages in thread
From: Cédric Le Goater @ 2023-02-14 7:05 UTC (permalink / raw)
To: karthikeyan Pasupathi, QEMU Developers, qemu-arm
Hello,
[ adding the lists ]
> > +static void fb_bmc_i2c_init(AspeedMachineState *bmc)
>
> The same routine name is proposed in the tiogapass patch :
>
> https://lore.kernel.org/qemu-devel/20230210122641.837614-1-pkarthikeyan1509@gmail.com/ <https://lore.kernel.org/qemu-devel/20230210122641.837614-1-pkarthikeyan1509@gmail.com/>
>
> Do you have plans to populate the I2C buses differently ?
>
>
> This is an initial patch we have been working on adding more specific configurations in the future.
OK. Then please rename the routine with a "yosemite" like prefix.
Thanks,
C.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1] Adding new machine Yosemitev2 in QEMU
2023-02-14 7:05 ` Cédric Le Goater
@ 2023-02-15 5:09 ` karthikeyan Pasupathi
0 siblings, 0 replies; 4+ messages in thread
From: karthikeyan Pasupathi @ 2023-02-15 5:09 UTC (permalink / raw)
To: Cédric Le Goater; +Cc: QEMU Developers, qemu-arm
[-- Attachment #1: Type: text/plain, Size: 770 bytes --]
Ok, will do that.
On Tue, Feb 14, 2023 at 12:35 PM Cédric Le Goater <clg@kaod.org> wrote:
> Hello,
>
> [ adding the lists ]
>
> > > +static void fb_bmc_i2c_init(AspeedMachineState *bmc)
> >
> > The same routine name is proposed in the tiogapass patch :
> >
> >
> https://lore.kernel.org/qemu-devel/20230210122641.837614-1-pkarthikeyan1509@gmail.com/
> <
> https://lore.kernel.org/qemu-devel/20230210122641.837614-1-pkarthikeyan1509@gmail.com/
> >
> >
> > Do you have plans to populate the I2C buses differently ?
> >
> >
> > This is an initial patch we have been working on adding more specific
> configurations in the future.
>
> OK. Then please rename the routine with a "yosemite" like prefix.
>
> Thanks,
>
> C.
>
>
>
[-- Attachment #2: Type: text/html, Size: 1412 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-02-15 5:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-10 12:50 [PATCH v1] Adding new machine Yosemitev2 in QEMU Karthikeyan Pasupathi
2023-02-13 8:03 ` Cédric Le Goater
[not found] ` <CA+ezb7ifqiE-WJnBfDpn6-F17ukkarqnXTmMsSTNRGAHEnp0mA@mail.gmail.com>
2023-02-14 7:05 ` Cédric Le Goater
2023-02-15 5:09 ` karthikeyan Pasupathi
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).