From d9cb750ed9dc640a390909489341d465182429fd Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Mon, 11 Nov 2019 14:58:15 +0800 Subject: [PATCH] acrn-config: alloc vuart1 irq when pttyS1 not exist only If pttyS1 do not exist, we can alloc irq for vuart1, but if pttyS1 exist, we should reuse the irq of pttyS1 to keep compliance. Tracked-On: #4073 Signed-off-by: Wei Liu Acked-by: Victor Sun --- misc/acrn-config/library/board_cfg_lib.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/misc/acrn-config/library/board_cfg_lib.py b/misc/acrn-config/library/board_cfg_lib.py index b9c0ec4d2..8b45a1b46 100644 --- a/misc/acrn-config/library/board_cfg_lib.py +++ b/misc/acrn-config/library/board_cfg_lib.py @@ -375,11 +375,10 @@ def get_board_private_vuart(branch_tag, tag_console): vuart0_console_dic[ttys_n] = NATIVE_CONSOLE_DIC[ttys_n] # VUART1 - if len(NATIVE_CONSOLE_DIC) >= 2: + if len(NATIVE_CONSOLE_DIC) >= 2 and 'ttyS1' in NATIVE_CONSOLE_DIC.keys(): # There are more than 1 serial port in native, we need to use native ttyS1 info for vuart1 which include # base ioport and irq number. - if 'ttyS1' in NATIVE_CONSOLE_DIC.keys(): - vuart1_console_dic['ttyS1'] = NATIVE_CONSOLE_DIC['ttyS1'] + vuart1_console_dic['ttyS1'] = NATIVE_CONSOLE_DIC['ttyS1'] else: # There is only one native serial port. We hardcode base ioport for vuart1 and allocate a irq which is # free in native env and use it for vuart1 irq number