diff mbox series

hw/arm/exynos4210: fix Exynos4210 UART support

Message ID 9310418.Wg32kryeWE@amdc3058
State New
Headers show
Series hw/arm/exynos4210: fix Exynos4210 UART support | expand

Commit Message

Bartlomiej Zolnierkiewicz Aug. 31, 2018, 10:23 a.m. UTC
commit 97274d0c05d4 ("hw/char/exynos4210_uart.c: Remove unneeded
handling of NULL chardev") broke Exynos4210 support as it removed
NULL 'Chardev *chr' handling from exynos4210_uart_create() and
currently exynos4210_init() always passes NULL as 'Chardev *chr'
argument to exynos4210_uart_create() calls. Fix it by adding
missing serial_hd() calls to exynos4210_init().

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
 hw/arm/exynos4210.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Philippe Mathieu-Daudé Sept. 7, 2018, 6:26 p.m. UTC | #1
On 8/31/18 7:23 AM, Bartlomiej Zolnierkiewicz wrote:
> commit 97274d0c05d4 ("hw/char/exynos4210_uart.c: Remove unneeded
> handling of NULL chardev") broke Exynos4210 support as it removed
> NULL 'Chardev *chr' handling from exynos4210_uart_create() and
> currently exynos4210_init() always passes NULL as 'Chardev *chr'
> argument to exynos4210_uart_create() calls. Fix it by adding
> missing serial_hd() calls to exynos4210_init().
> 
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> ---
>  hw/arm/exynos4210.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> Index: b/hw/arm/exynos4210.c
> ===================================================================
> --- a/hw/arm/exynos4210.c	2018-08-22 12:21:06.328813907 +0200
> +++ b/hw/arm/exynos4210.c	2018-08-22 13:00:54.344771039 +0200
> @@ -352,19 +352,19 @@ Exynos4210State *exynos4210_init(MemoryR
>  
>      /*** UARTs ***/
>      exynos4210_uart_create(EXYNOS4210_UART0_BASE_ADDR,
> -                           EXYNOS4210_UART0_FIFO_SIZE, 0, NULL,
> +                           EXYNOS4210_UART0_FIFO_SIZE, 0, serial_hd(0),
>                    s->irq_table[exynos4210_get_irq(EXYNOS4210_UART_INT_GRP, 0)]);
>  
>      exynos4210_uart_create(EXYNOS4210_UART1_BASE_ADDR,
> -                           EXYNOS4210_UART1_FIFO_SIZE, 1, NULL,
> +                           EXYNOS4210_UART1_FIFO_SIZE, 1, serial_hd(1),
>                    s->irq_table[exynos4210_get_irq(EXYNOS4210_UART_INT_GRP, 1)]);
>  
>      exynos4210_uart_create(EXYNOS4210_UART2_BASE_ADDR,
> -                           EXYNOS4210_UART2_FIFO_SIZE, 2, NULL,
> +                           EXYNOS4210_UART2_FIFO_SIZE, 2, serial_hd(2),
>                    s->irq_table[exynos4210_get_irq(EXYNOS4210_UART_INT_GRP, 2)]);
>  
>      exynos4210_uart_create(EXYNOS4210_UART3_BASE_ADDR,
> -                           EXYNOS4210_UART3_FIFO_SIZE, 3, NULL,
> +                           EXYNOS4210_UART3_FIFO_SIZE, 3, serial_hd(3),
>                    s->irq_table[exynos4210_get_irq(EXYNOS4210_UART_INT_GRP, 3)]);
>  
>      /*** SD/MMC host controllers ***/
>
Peter Maydell Sept. 25, 2018, 8:44 a.m. UTC | #2
On 31 August 2018 at 11:23, Bartlomiej Zolnierkiewicz
<b.zolnierkie@samsung.com> wrote:
> commit 97274d0c05d4 ("hw/char/exynos4210_uart.c: Remove unneeded
> handling of NULL chardev") broke Exynos4210 support as it removed
> NULL 'Chardev *chr' handling from exynos4210_uart_create() and
> currently exynos4210_init() always passes NULL as 'Chardev *chr'
> argument to exynos4210_uart_create() calls. Fix it by adding
> missing serial_hd() calls to exynos4210_init().
>
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>



Applied to target-arm.next, thanks.

-- PMM
diff mbox series

Patch

Index: b/hw/arm/exynos4210.c
===================================================================
--- a/hw/arm/exynos4210.c	2018-08-22 12:21:06.328813907 +0200
+++ b/hw/arm/exynos4210.c	2018-08-22 13:00:54.344771039 +0200
@@ -352,19 +352,19 @@  Exynos4210State *exynos4210_init(MemoryR
 
     /*** UARTs ***/
     exynos4210_uart_create(EXYNOS4210_UART0_BASE_ADDR,
-                           EXYNOS4210_UART0_FIFO_SIZE, 0, NULL,
+                           EXYNOS4210_UART0_FIFO_SIZE, 0, serial_hd(0),
                   s->irq_table[exynos4210_get_irq(EXYNOS4210_UART_INT_GRP, 0)]);
 
     exynos4210_uart_create(EXYNOS4210_UART1_BASE_ADDR,
-                           EXYNOS4210_UART1_FIFO_SIZE, 1, NULL,
+                           EXYNOS4210_UART1_FIFO_SIZE, 1, serial_hd(1),
                   s->irq_table[exynos4210_get_irq(EXYNOS4210_UART_INT_GRP, 1)]);
 
     exynos4210_uart_create(EXYNOS4210_UART2_BASE_ADDR,
-                           EXYNOS4210_UART2_FIFO_SIZE, 2, NULL,
+                           EXYNOS4210_UART2_FIFO_SIZE, 2, serial_hd(2),
                   s->irq_table[exynos4210_get_irq(EXYNOS4210_UART_INT_GRP, 2)]);
 
     exynos4210_uart_create(EXYNOS4210_UART3_BASE_ADDR,
-                           EXYNOS4210_UART3_FIFO_SIZE, 3, NULL,
+                           EXYNOS4210_UART3_FIFO_SIZE, 3, serial_hd(3),
                   s->irq_table[exynos4210_get_irq(EXYNOS4210_UART_INT_GRP, 3)]);
 
     /*** SD/MMC host controllers ***/