On 2/9/20 11:51 PM, Niek Linnenbank wrote: > Hi Philippe, > > > On Sat, Feb 8, 2020 at 5:57 PM Philippe Mathieu-Daudé <f4...@amsat.org > <mailto:f4...@amsat.org>> wrote: > > We hardcode the board revision as 0xa21041 for the raspi2, and > 0xa02082 for the raspi3: > > 166 static void raspi_init(MachineState *machine, int version) > 167 { > ... > 194 int board_rev = version == 3 ? 0xa02082 : 0xa21041; > > These revision codes are for the 2B and 3B models, see: > > https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md > > Correct the board description. > > Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org > <mailto:f4...@amsat.org>> > --- > hw/arm/raspi.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c > index f2ccabc662..818146fdbb 100644 > --- a/hw/arm/raspi.c > +++ b/hw/arm/raspi.c > @@ -221,7 +221,7 @@ static void raspi2_init(MachineState *machine) > > static void raspi2_machine_init(MachineClass *mc) > { > - mc->desc = "Raspberry Pi 2"; > + mc->desc = "Raspberry Pi 2B"; > mc->init = raspi2_init; > mc->block_default_type = IF_SD; > mc->no_parallel = 1; > @@ -243,7 +243,7 @@ static void raspi3_init(MachineState *machine) > > static void raspi3_machine_init(MachineClass *mc) > { > - mc->desc = "Raspberry Pi 3"; > + mc->desc = "Raspberry Pi 3B"; > > > Could this patch be replaced by patch #11 "hw/arm/raspi: Extract the > board model from the board revision"?
It has to be changed before patch #8, and while patch #8 is tiny, it is complex. I prefer to keep #8 as simple as possible, by making this trivial change first (I don't want to do 2 different changes in the same patch). If you want I can move this #2 as #7 just before #8, but I'm not sure this makes things clearer. > > mc->init = raspi3_init; > mc->block_default_type = IF_SD; > mc->no_parallel = 1; > -- > 2.21.1 > > > > -- > Niek Linnenbank >