[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH-for-5.2 3/5] hw/arm/nseries: Remove invalid/unnecessary n8x0_
From: |
Peter Maydell |
Subject: |
Re: [PATCH-for-5.2 3/5] hw/arm/nseries: Remove invalid/unnecessary n8x0_uart_setup() |
Date: |
Mon, 9 Nov 2020 14:22:01 +0000 |
On Sat, 7 Nov 2020 at 19:34, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> omap2420_mpu_init() introduced in commit 827df9f3c5f ("Add basic
> OMAP2 chip support") takes care of creating the 3 UARTs.
>
> Then commit 58a26b477e9 ("Emulate a serial bluetooth HCI with H4+
> extensions and attach to n8x0's UART") added n8x0_uart_setup()
> which create the UART and connects it to an IRQ output,
> overwritting the existing peripheral and its IRQ connection.
> This is incorrect.
>
> Fortunately we don't need to fix this, because commit 6da68df7f9b
> ("hw/arm/nseries: Replace the bluetooth chardev with a "null"
> chardev") removed the use of this peripheral. We can simply
> remove the code.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> hw/arm/nseries.c | 11 -----------
> 1 file changed, 11 deletions(-)
>
> diff --git a/hw/arm/nseries.c b/hw/arm/nseries.c
> index 76fd7fe9854..6215c18d627 100644
> --- a/hw/arm/nseries.c
> +++ b/hw/arm/nseries.c
> @@ -789,16 +789,6 @@ static void n8x0_cbus_setup(struct n800_s *s)
> cbus_attach(cbus, s->tahvo = tahvo_init(tahvo_irq, 1));
> }
>
> -static void n8x0_uart_setup(struct n800_s *s)
> -{
> - Chardev *radio = qemu_chr_new("bt-dummy-uart", "null", NULL);
> - /*
> - * Note: We used to connect N8X0_BT_RESET_GPIO and N8X0_BT_WKUP_GPIO
> - * here, but this code has been removed with the bluetooth backend.
> - */
> - omap_uart_attach(s->mpu->uart[BT_UART], radio);
> -}
This deletes the only use of omap_uart_attach(), so as a
follow-up patch you could remove that function entirely.
thanks
-- PMM
- [PATCH-for-5.2 0/5] hw/arm: Fix various incorrect IRQ handling, Philippe Mathieu-Daudé, 2020/11/07
- [PATCH-for-5.2 1/5] hw/arm/armsse: Correct expansion MPC interrupt lines, Philippe Mathieu-Daudé, 2020/11/07
- [PATCH-for-5.2 2/5] hw/misc/stm32f2xx_syscfg: Remove extraneous IRQ, Philippe Mathieu-Daudé, 2020/11/07
- [PATCH-for-5.2 3/5] hw/arm/nseries: Remove invalid/unnecessary n8x0_uart_setup(), Philippe Mathieu-Daudé, 2020/11/07
- Re: [PATCH-for-5.2 3/5] hw/arm/nseries: Remove invalid/unnecessary n8x0_uart_setup(),
Peter Maydell <=
- [PATCH-for-5.2? 4/5] hw/arm/musicpal: Don't connect two qemu_irqs directly to the same input, Philippe Mathieu-Daudé, 2020/11/07
- [PATCH-for-6.0 5/5] hw/arm/musicpal: Only use qdev_get_gpio_in() when necessary, Philippe Mathieu-Daudé, 2020/11/07
- Re: [PATCH-for-5.2 0/5] hw/arm: Fix various incorrect IRQ handling, Peter Maydell, 2020/11/09