* [PATCH 0/3] hw/sparc: Map the UART devices unconditionally
@ 2020-06-08 17:21 Philippe Mathieu-Daudé
2020-06-08 17:21 ` [PATCH 1/3] hw/sparc/leon3: Map the UART device unconditionally Philippe Mathieu-Daudé
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-08 17:21 UTC (permalink / raw)
To: qemu-devel
Cc: KONRAD Frederic, Mark Cave-Ayland, Fabien Chouteau,
Artyom Tarasenko, Philippe Mathieu-Daudé
Few more SPARC patches.
Mark/Artyom/Frederic if you Ack them I'll simply add them
to the current trivial SPARC patch queue I prepared.
Regards,
Phil.
Philippe Mathieu-Daudé (3):
hw/sparc/leon3: Map the UART device unconditionally
hw/sparc64/niagara: Remove duplicated NIAGARA_UART_BASE definition
hw/sparc64/niagara: Map the UART device unconditionally
hw/sparc/leon3.c | 18 ++++++++----------
hw/sparc64/niagara.c | 7 ++-----
2 files changed, 10 insertions(+), 15 deletions(-)
--
2.21.3
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/3] hw/sparc/leon3: Map the UART device unconditionally
2020-06-08 17:21 [PATCH 0/3] hw/sparc: Map the UART devices unconditionally Philippe Mathieu-Daudé
@ 2020-06-08 17:21 ` Philippe Mathieu-Daudé
2020-06-08 17:28 ` Fred Konrad
2020-06-08 17:21 ` [PATCH 2/3] hw/sparc64/niagara: Remove duplicated NIAGARA_UART_BASE definition Philippe Mathieu-Daudé
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-08 17:21 UTC (permalink / raw)
To: qemu-devel
Cc: KONRAD Frederic, Mark Cave-Ayland, Fabien Chouteau,
Artyom Tarasenko, Philippe Mathieu-Daudé
The UART is present on the chipset regardless there is a
character device connected to it. Map it unconditionally.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/sparc/leon3.c | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c
index 8f024dab7b..cc55117dec 100644
--- a/hw/sparc/leon3.c
+++ b/hw/sparc/leon3.c
@@ -339,16 +339,14 @@ static void leon3_generic_hw_init(MachineState *machine)
0, LEON3_TIMER_IRQ, GRLIB_APBIO_AREA);
/* Allocate uart */
- if (serial_hd(0)) {
- dev = qdev_create(NULL, TYPE_GRLIB_APB_UART);
- qdev_prop_set_chr(dev, "chrdev", serial_hd(0));
- qdev_init_nofail(dev);
- sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, LEON3_UART_OFFSET);
- sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, cpu_irqs[LEON3_UART_IRQ]);
- grlib_apb_pnp_add_entry(apb_pnp, LEON3_UART_OFFSET, 0xFFF,
- GRLIB_VENDOR_GAISLER, GRLIB_APBUART_DEV, 1,
- LEON3_UART_IRQ, GRLIB_APBIO_AREA);
- }
+ dev = qdev_create(NULL, TYPE_GRLIB_APB_UART);
+ qdev_prop_set_chr(dev, "chrdev", serial_hd(0));
+ qdev_init_nofail(dev);
+ sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, LEON3_UART_OFFSET);
+ sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, cpu_irqs[LEON3_UART_IRQ]);
+ grlib_apb_pnp_add_entry(apb_pnp, LEON3_UART_OFFSET, 0xFFF,
+ GRLIB_VENDOR_GAISLER, GRLIB_APBUART_DEV, 1,
+ LEON3_UART_IRQ, GRLIB_APBIO_AREA);
}
static void leon3_generic_machine_init(MachineClass *mc)
--
2.21.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/3] hw/sparc64/niagara: Remove duplicated NIAGARA_UART_BASE definition
2020-06-08 17:21 [PATCH 0/3] hw/sparc: Map the UART devices unconditionally Philippe Mathieu-Daudé
2020-06-08 17:21 ` [PATCH 1/3] hw/sparc/leon3: Map the UART device unconditionally Philippe Mathieu-Daudé
@ 2020-06-08 17:21 ` Philippe Mathieu-Daudé
2020-06-08 19:28 ` Artyom Tarasenko
2020-06-08 17:21 ` [PATCH 3/3] hw/sparc64/niagara: Map the UART device unconditionally Philippe Mathieu-Daudé
2020-06-09 5:14 ` [PATCH 0/3] hw/sparc: Map the UART devices unconditionally Philippe Mathieu-Daudé
3 siblings, 1 reply; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-08 17:21 UTC (permalink / raw)
To: qemu-devel
Cc: KONRAD Frederic, Mark Cave-Ayland, Fabien Chouteau,
Artyom Tarasenko, Philippe Mathieu-Daudé
NIAGARA_UART_BASE is already defined few lines earlier.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/sparc64/niagara.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/hw/sparc64/niagara.c b/hw/sparc64/niagara.c
index ab5ef8c5b3..201fb05d50 100644
--- a/hw/sparc64/niagara.c
+++ b/hw/sparc64/niagara.c
@@ -68,7 +68,6 @@ typedef struct NiagaraBoardState {
#define NIAGARA_VDISK_BASE 0x1f40000000ULL
#define NIAGARA_RTC_BASE 0xfff0c1fff8ULL
-#define NIAGARA_UART_BASE 0x1f10000000ULL
/* Firmware layout
*
--
2.21.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/3] hw/sparc64/niagara: Map the UART device unconditionally
2020-06-08 17:21 [PATCH 0/3] hw/sparc: Map the UART devices unconditionally Philippe Mathieu-Daudé
2020-06-08 17:21 ` [PATCH 1/3] hw/sparc/leon3: Map the UART device unconditionally Philippe Mathieu-Daudé
2020-06-08 17:21 ` [PATCH 2/3] hw/sparc64/niagara: Remove duplicated NIAGARA_UART_BASE definition Philippe Mathieu-Daudé
@ 2020-06-08 17:21 ` Philippe Mathieu-Daudé
2020-06-08 19:26 ` Artyom Tarasenko
2020-06-09 5:14 ` [PATCH 0/3] hw/sparc: Map the UART devices unconditionally Philippe Mathieu-Daudé
3 siblings, 1 reply; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-08 17:21 UTC (permalink / raw)
To: qemu-devel
Cc: KONRAD Frederic, Mark Cave-Ayland, Fabien Chouteau,
Artyom Tarasenko, Philippe Mathieu-Daudé
The UART is present on the machine regardless there is a
character device connected to it. Map it unconditionally.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/sparc64/niagara.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/hw/sparc64/niagara.c b/hw/sparc64/niagara.c
index 201fb05d50..a87d55f6bb 100644
--- a/hw/sparc64/niagara.c
+++ b/hw/sparc64/niagara.c
@@ -151,10 +151,8 @@ static void niagara_init(MachineState *machine)
exit(1);
}
}
- if (serial_hd(0)) {
- serial_mm_init(sysmem, NIAGARA_UART_BASE, 0, NULL, 115200,
- serial_hd(0), DEVICE_BIG_ENDIAN);
- }
+ serial_mm_init(sysmem, NIAGARA_UART_BASE, 0, NULL,
+ 115200, serial_hd(0), DEVICE_BIG_ENDIAN);
create_unimplemented_device("sun4v-iob", NIAGARA_IOBBASE, NIAGARA_IOBSIZE);
sun4v_rtc_init(NIAGARA_RTC_BASE);
}
--
2.21.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/3] hw/sparc/leon3: Map the UART device unconditionally
2020-06-08 17:21 ` [PATCH 1/3] hw/sparc/leon3: Map the UART device unconditionally Philippe Mathieu-Daudé
@ 2020-06-08 17:28 ` Fred Konrad
2020-06-08 19:30 ` Artyom Tarasenko
0 siblings, 1 reply; 9+ messages in thread
From: Fred Konrad @ 2020-06-08 17:28 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Mark Cave-Ayland, Fabien Chouteau, Artyom Tarasenko
Le 6/8/20 à 7:21 PM, Philippe Mathieu-Daudé a écrit :
> The UART is present on the chipset regardless there is a
> character device connected to it. Map it unconditionally.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> hw/sparc/leon3.c | 18 ++++++++----------
> 1 file changed, 8 insertions(+), 10 deletions(-)
>
> diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c
> index 8f024dab7b..cc55117dec 100644
> --- a/hw/sparc/leon3.c
> +++ b/hw/sparc/leon3.c
> @@ -339,16 +339,14 @@ static void leon3_generic_hw_init(MachineState *machine)
> 0, LEON3_TIMER_IRQ, GRLIB_APBIO_AREA);
>
> /* Allocate uart */
> - if (serial_hd(0)) {
> - dev = qdev_create(NULL, TYPE_GRLIB_APB_UART);
> - qdev_prop_set_chr(dev, "chrdev", serial_hd(0));
> - qdev_init_nofail(dev);
> - sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, LEON3_UART_OFFSET);
> - sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, cpu_irqs[LEON3_UART_IRQ]);
> - grlib_apb_pnp_add_entry(apb_pnp, LEON3_UART_OFFSET, 0xFFF,
> - GRLIB_VENDOR_GAISLER, GRLIB_APBUART_DEV, 1,
> - LEON3_UART_IRQ, GRLIB_APBIO_AREA);
> - }
> + dev = qdev_create(NULL, TYPE_GRLIB_APB_UART);
> + qdev_prop_set_chr(dev, "chrdev", serial_hd(0));
> + qdev_init_nofail(dev);
> + sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, LEON3_UART_OFFSET);
> + sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, cpu_irqs[LEON3_UART_IRQ]);
> + grlib_apb_pnp_add_entry(apb_pnp, LEON3_UART_OFFSET, 0xFFF,
> + GRLIB_VENDOR_GAISLER, GRLIB_APBUART_DEV, 1,
> + LEON3_UART_IRQ, GRLIB_APBIO_AREA);
> }
>
> static void leon3_generic_machine_init(MachineClass *mc)
>
Reviewed-by: KONRAD Frederic <frederic.konrad@adacore.com>
Thanks!
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 3/3] hw/sparc64/niagara: Map the UART device unconditionally
2020-06-08 17:21 ` [PATCH 3/3] hw/sparc64/niagara: Map the UART device unconditionally Philippe Mathieu-Daudé
@ 2020-06-08 19:26 ` Artyom Tarasenko
0 siblings, 0 replies; 9+ messages in thread
From: Artyom Tarasenko @ 2020-06-08 19:26 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: KONRAD Frederic, Mark Cave-Ayland, qemu-devel, Fabien Chouteau
On Mon, Jun 8, 2020 at 7:21 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> The UART is present on the machine regardless there is a
> character device connected to it. Map it unconditionally.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Artyom Tarasenko <atar4qemu@gmail.com>
> ---
> hw/sparc64/niagara.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/hw/sparc64/niagara.c b/hw/sparc64/niagara.c
> index 201fb05d50..a87d55f6bb 100644
> --- a/hw/sparc64/niagara.c
> +++ b/hw/sparc64/niagara.c
> @@ -151,10 +151,8 @@ static void niagara_init(MachineState *machine)
> exit(1);
> }
> }
> - if (serial_hd(0)) {
> - serial_mm_init(sysmem, NIAGARA_UART_BASE, 0, NULL, 115200,
> - serial_hd(0), DEVICE_BIG_ENDIAN);
> - }
> + serial_mm_init(sysmem, NIAGARA_UART_BASE, 0, NULL,
> + 115200, serial_hd(0), DEVICE_BIG_ENDIAN);
> create_unimplemented_device("sun4v-iob", NIAGARA_IOBBASE, NIAGARA_IOBSIZE);
> sun4v_rtc_init(NIAGARA_RTC_BASE);
> }
> --
> 2.21.3
>
--
Regards,
Artyom Tarasenko
SPARC and PPC PReP under qemu blog: http://tyom.blogspot.com/search/label/qemu
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/3] hw/sparc64/niagara: Remove duplicated NIAGARA_UART_BASE definition
2020-06-08 17:21 ` [PATCH 2/3] hw/sparc64/niagara: Remove duplicated NIAGARA_UART_BASE definition Philippe Mathieu-Daudé
@ 2020-06-08 19:28 ` Artyom Tarasenko
0 siblings, 0 replies; 9+ messages in thread
From: Artyom Tarasenko @ 2020-06-08 19:28 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: KONRAD Frederic, Mark Cave-Ayland, qemu-devel, Fabien Chouteau
On Mon, Jun 8, 2020 at 7:21 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> NIAGARA_UART_BASE is already defined few lines earlier.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Thanks!
Reviewed-by: Artyom Tarasenko <atar4qemu@gmail.com>
> ---
> hw/sparc64/niagara.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/hw/sparc64/niagara.c b/hw/sparc64/niagara.c
> index ab5ef8c5b3..201fb05d50 100644
> --- a/hw/sparc64/niagara.c
> +++ b/hw/sparc64/niagara.c
> @@ -68,7 +68,6 @@ typedef struct NiagaraBoardState {
>
> #define NIAGARA_VDISK_BASE 0x1f40000000ULL
> #define NIAGARA_RTC_BASE 0xfff0c1fff8ULL
> -#define NIAGARA_UART_BASE 0x1f10000000ULL
>
> /* Firmware layout
> *
> --
> 2.21.3
>
--
Regards,
Artyom Tarasenko
SPARC and PPC PReP under qemu blog: http://tyom.blogspot.com/search/label/qemu
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/3] hw/sparc/leon3: Map the UART device unconditionally
2020-06-08 17:28 ` Fred Konrad
@ 2020-06-08 19:30 ` Artyom Tarasenko
0 siblings, 0 replies; 9+ messages in thread
From: Artyom Tarasenko @ 2020-06-08 19:30 UTC (permalink / raw)
To: Fred Konrad
Cc: Mark Cave-Ayland, Philippe Mathieu-Daudé,
Fabien Chouteau, qemu-devel
On Mon, Jun 8, 2020 at 7:28 PM Fred Konrad <konrad@adacore.com> wrote:
>
>
>
> Le 6/8/20 à 7:21 PM, Philippe Mathieu-Daudé a écrit :
> > The UART is present on the chipset regardless there is a
> > character device connected to it. Map it unconditionally.
> >
> > Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> > ---
> > hw/sparc/leon3.c | 18 ++++++++----------
> > 1 file changed, 8 insertions(+), 10 deletions(-)
> >
> > diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c
> > index 8f024dab7b..cc55117dec 100644
> > --- a/hw/sparc/leon3.c
> > +++ b/hw/sparc/leon3.c
> > @@ -339,16 +339,14 @@ static void leon3_generic_hw_init(MachineState *machine)
> > 0, LEON3_TIMER_IRQ, GRLIB_APBIO_AREA);
> >
> > /* Allocate uart */
> > - if (serial_hd(0)) {
> > - dev = qdev_create(NULL, TYPE_GRLIB_APB_UART);
> > - qdev_prop_set_chr(dev, "chrdev", serial_hd(0));
> > - qdev_init_nofail(dev);
> > - sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, LEON3_UART_OFFSET);
> > - sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, cpu_irqs[LEON3_UART_IRQ]);
> > - grlib_apb_pnp_add_entry(apb_pnp, LEON3_UART_OFFSET, 0xFFF,
> > - GRLIB_VENDOR_GAISLER, GRLIB_APBUART_DEV, 1,
> > - LEON3_UART_IRQ, GRLIB_APBIO_AREA);
> > - }
> > + dev = qdev_create(NULL, TYPE_GRLIB_APB_UART);
> > + qdev_prop_set_chr(dev, "chrdev", serial_hd(0));
> > + qdev_init_nofail(dev);
> > + sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, LEON3_UART_OFFSET);
> > + sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, cpu_irqs[LEON3_UART_IRQ]);
> > + grlib_apb_pnp_add_entry(apb_pnp, LEON3_UART_OFFSET, 0xFFF,
> > + GRLIB_VENDOR_GAISLER, GRLIB_APBUART_DEV, 1,
> > + LEON3_UART_IRQ, GRLIB_APBIO_AREA);
> > }
> >
> > static void leon3_generic_machine_init(MachineClass *mc)
> >
>
> Reviewed-by: KONRAD Frederic <frederic.konrad@adacore.com>
Acked-by: Artyom Tarasenko <atar4qemu@gmail.com>
--
Regards,
Artyom Tarasenko
SPARC and PPC PReP under qemu blog: http://tyom.blogspot.com/search/label/qemu
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/3] hw/sparc: Map the UART devices unconditionally
2020-06-08 17:21 [PATCH 0/3] hw/sparc: Map the UART devices unconditionally Philippe Mathieu-Daudé
` (2 preceding siblings ...)
2020-06-08 17:21 ` [PATCH 3/3] hw/sparc64/niagara: Map the UART device unconditionally Philippe Mathieu-Daudé
@ 2020-06-09 5:14 ` Philippe Mathieu-Daudé
3 siblings, 0 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-09 5:14 UTC (permalink / raw)
To: qemu-devel
Cc: KONRAD Frederic, Mark Cave-Ayland, Artyom Tarasenko, Fabien Chouteau
On 6/8/20 7:21 PM, Philippe Mathieu-Daudé wrote:
> Few more SPARC patches.
>
> Mark/Artyom/Frederic if you Ack them I'll simply add them
> to the current trivial SPARC patch queue I prepared.
>
> Regards,
>
> Phil.
>
> Philippe Mathieu-Daudé (3):
> hw/sparc/leon3: Map the UART device unconditionally
> hw/sparc64/niagara: Remove duplicated NIAGARA_UART_BASE definition
> hw/sparc64/niagara: Map the UART device unconditionally
>
> hw/sparc/leon3.c | 18 ++++++++----------
> hw/sparc64/niagara.c | 7 ++-----
> 2 files changed, 10 insertions(+), 15 deletions(-)
>
Thanks, series applied to for the next (temporary) sparc-next pull request.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2020-06-09 5:16 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-08 17:21 [PATCH 0/3] hw/sparc: Map the UART devices unconditionally Philippe Mathieu-Daudé
2020-06-08 17:21 ` [PATCH 1/3] hw/sparc/leon3: Map the UART device unconditionally Philippe Mathieu-Daudé
2020-06-08 17:28 ` Fred Konrad
2020-06-08 19:30 ` Artyom Tarasenko
2020-06-08 17:21 ` [PATCH 2/3] hw/sparc64/niagara: Remove duplicated NIAGARA_UART_BASE definition Philippe Mathieu-Daudé
2020-06-08 19:28 ` Artyom Tarasenko
2020-06-08 17:21 ` [PATCH 3/3] hw/sparc64/niagara: Map the UART device unconditionally Philippe Mathieu-Daudé
2020-06-08 19:26 ` Artyom Tarasenko
2020-06-09 5:14 ` [PATCH 0/3] hw/sparc: Map the UART devices unconditionally Philippe Mathieu-Daudé
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.