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 <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
This commit is contained in:
Wei Liu 2019-11-11 14:58:15 +08:00 committed by wenlingz
parent 5dd1c5350c
commit d9cb750ed9

View File

@ -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