hw/arm/exynos4210: fix Exynos4210 UART support
A message that is not in the archive (sent off-list or not yet received): CGME20180831102306eucas1p1ffbf82383f23675fecb5faf8a2fa54d7@eucas1p1.samsung.com
PATCH 1/1 hw/arm/exynos4210: fix Exynos4210 UART support
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().
--- hw/arm/exynos4210.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
hw/arm/exynos4210.c +4 -4
@@ -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 ***/
Quoted 11 lines · Bartlomiej Zolnierkiewicz
commit
97274d0c05d4("hw/char/exynos4210_uart.c: Remove unneeded handling of NULL chardev") broke Exynos4210 support as it removed NULL 'Chardev *chr' handling fromexynos4210_uart_create()and currentlyexynos4210_init()always passes NULL as 'Chardev *chr' argument toexynos4210_uart_create()calls. Fix it by adding missingserial_hd()calls toexynos4210_init().Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>--- hw/arm/exynos4210.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
PS: If you've got some spare time, maybe you could consider to also write a regression test (e.g. for tests/boot-serial-test.c) to avoid that this happens again?
Quoted 8 lines · Bartlomiej Zolnierkiewicz
commit
97274d0c05d4("hw/char/exynos4210_uart.c: Remove unneeded handling of NULL chardev") broke Exynos4210 support as it removed NULL 'Chardev *chr' handling fromexynos4210_uart_create()and currentlyexynos4210_init()always passes NULL as 'Chardev *chr' argument toexynos4210_uart_create()calls. Fix it by adding missingserial_hd()calls toexynos4210_init().Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>
Quoted 33 lines
--- hw/arm/exynos4210.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)Index:
b/hw/arm/exynos4210.c
===================================================================hw/arm/exynos4210.c +4
-4@@ -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
AppliedQuoted 8 lines · Bartlomiej Zolnierkiewicz
commit
97274d0c05d4("hw/char/exynos4210_uart.c: Remove unneeded handling of NULL chardev") broke Exynos4210 support as it removed NULL 'Chardev *chr' handling fromexynos4210_uart_create()and currentlyexynos4210_init()always passes NULL as 'Chardev *chr' argument toexynos4210_uart_create()calls. Fix it by adding missingserial_hd()calls toexynos4210_init().Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>
Applied to target-arm.next, thanks.
-- PMM