* [PATCH v2] digic: remove bios_name
@ 2020-11-13 10:17 Paolo Bonzini
2020-11-13 10:22 ` Peter Maydell
0 siblings, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2020-11-13 10:17 UTC (permalink / raw)
To: qemu-devel; +Cc: peter.maydell, qemu-arm
Pull defaults to digic4_board_init so that a MachineState is available.
Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/arm/digic_boards.c | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a/hw/arm/digic_boards.c b/hw/arm/digic_boards.c
index d5524d3e72..fd228fa96f 100644
--- a/hw/arm/digic_boards.c
+++ b/hw/arm/digic_boards.c
@@ -70,19 +70,20 @@ static void digic4_board_init(MachineState *machine, DigicBoard *board)
memory_region_add_subregion(get_system_memory(), 0, machine->ram);
if (board->add_rom0) {
- board->add_rom0(s, DIGIC4_ROM0_BASE, board->rom0_def_filename);
+ board->add_rom0(s, DIGIC4_ROM0_BASE,
+ machine->firmware ?: board->rom0_def_filename);
}
if (board->add_rom1) {
- board->add_rom1(s, DIGIC4_ROM1_BASE, board->rom1_def_filename);
+ board->add_rom1(s, DIGIC4_ROM1_BASE,
+ machine->firmware ?: board->rom1_def_filename);
}
}
static void digic_load_rom(DigicState *s, hwaddr addr,
- hwaddr max_size, const char *def_filename)
+ hwaddr max_size, const char *filename)
{
target_long rom_size;
- const char *filename;
if (qtest_enabled()) {
/* qtest runs no code so don't attempt a ROM load which
@@ -91,12 +92,6 @@ static void digic_load_rom(DigicState *s, hwaddr addr,
return;
}
- if (bios_name) {
- filename = bios_name;
- } else {
- filename = def_filename;
- }
-
if (filename) {
char *fn = qemu_find_file(QEMU_FILE_TYPE_BIOS, filename);
@@ -119,7 +114,7 @@ static void digic_load_rom(DigicState *s, hwaddr addr,
* 64M Bit (4Mx16) Page Mode / Multi-Bank NOR Flash Memory
*/
static void digic4_add_k8p3215uqb_rom(DigicState *s, hwaddr addr,
- const char *def_filename)
+ const char *filename)
{
#define FLASH_K8P3215UQB_SIZE (4 * 1024 * 1024)
#define FLASH_K8P3215UQB_SECTOR_SIZE (64 * 1024)
@@ -131,7 +126,7 @@ static void digic4_add_k8p3215uqb_rom(DigicState *s, hwaddr addr,
0x00EC, 0x007E, 0x0003, 0x0001,
0x0555, 0x2aa, 0);
- digic_load_rom(s, addr, FLASH_K8P3215UQB_SIZE, def_filename);
+ digic_load_rom(s, addr, FLASH_K8P3215UQB_SIZE, filename);
}
static DigicBoard digic4_board_canon_a1100 = {
--
2.26.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] digic: remove bios_name
2020-11-13 10:17 [PATCH v2] digic: remove bios_name Paolo Bonzini
@ 2020-11-13 10:22 ` Peter Maydell
2020-11-13 10:37 ` Paolo Bonzini
0 siblings, 1 reply; 4+ messages in thread
From: Peter Maydell @ 2020-11-13 10:22 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-arm, QEMU Developers
On Fri, 13 Nov 2020 at 10:17, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> Pull defaults to digic4_board_init so that a MachineState is available.
>
> Cc: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> hw/arm/digic_boards.c | 19 +++++++------------
> 1 file changed, 7 insertions(+), 12 deletions(-)
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Did you want me to take this via target-arm.next or are you
planning to include it in some other series/pull ?
thanks
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] digic: remove bios_name
2020-11-13 10:22 ` Peter Maydell
@ 2020-11-13 10:37 ` Paolo Bonzini
2020-11-13 10:44 ` Peter Maydell
0 siblings, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2020-11-13 10:37 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-arm, QEMU Developers
On 13/11/20 11:22, Peter Maydell wrote:
>> Pull defaults to digic4_board_init so that a MachineState is available.
>>
>> Cc: Peter Maydell<peter.maydell@linaro.org>
>> Signed-off-by: Paolo Bonzini<pbonzini@redhat.com>
>> ---
>> hw/arm/digic_boards.c | 19 +++++++------------
>> 1 file changed, 7 insertions(+), 12 deletions(-)
> Reviewed-by: Peter Maydell<peter.maydell@linaro.org>
>
> Did you want me to take this via target-arm.next or are you
> planning to include it in some other series/pull ?
I have ~15 patches each for bios_name and ram_size and I was planning to
send them all myself (most have already received acks/reviews from
maintainers), but it's the same.
I did want to run this through you since this particular board was one
of very few that didn't have a purely mechanical change, and you had a
suggestion on how to improve on v1.
Paolo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] digic: remove bios_name
2020-11-13 10:37 ` Paolo Bonzini
@ 2020-11-13 10:44 ` Peter Maydell
0 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2020-11-13 10:44 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-arm, QEMU Developers
On Fri, 13 Nov 2020 at 10:37, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> On 13/11/20 11:22, Peter Maydell wrote:
> >> Pull defaults to digic4_board_init so that a MachineState is available.
> >>
> >> Cc: Peter Maydell<peter.maydell@linaro.org>
> >> Signed-off-by: Paolo Bonzini<pbonzini@redhat.com>
> >> ---
> >> hw/arm/digic_boards.c | 19 +++++++------------
> >> 1 file changed, 7 insertions(+), 12 deletions(-)
> > Reviewed-by: Peter Maydell<peter.maydell@linaro.org>
> >
> > Did you want me to take this via target-arm.next or are you
> > planning to include it in some other series/pull ?
>
> I have ~15 patches each for bios_name and ram_size and I was planning to
> send them all myself (most have already received acks/reviews from
> maintainers), but it's the same.
Yeah, I though you might. That's fine (less work for me!), just
making sure we were on the same page.
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-11-13 10:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-13 10:17 [PATCH v2] digic: remove bios_name Paolo Bonzini
2020-11-13 10:22 ` Peter Maydell
2020-11-13 10:37 ` Paolo Bonzini
2020-11-13 10:44 ` Peter Maydell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.