serial: Expand the PCIe params for an Oxford two port serial cards.
PATCH 1/1 serial: Expand the PCIe params for an Oxford two port serial cards.
Which of course has a different model number and sports two serial outputs.
--- xen/drivers/char/ns16550.c | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-)
xen/drivers/char/ns16550.c +23 -0
@@ -105,6 +105,7 @@ enum { param_default =0 , param_trumanage, param_oxford, + param_oxford_2port, };/* * Create lookup tables for specific MMIO devices..
@@ -130,6 +131,16 @@ static const struct ns16550_config_param __initconst uart_param[] = { .fifo_size = 16, .lsr_mask = UART_LSR_THRE, .max_bars = 1, /* It can do more, but we would need more custom code.*/ + }, + [param_oxford_2port] = { + .base_baud = 4000000, + .uart_offset = 0x200, + .first_offset = 0x1000, + .reg_width = 1, + .reg_shift = 0, + .fifo_size = 16, + .lsr_mask = UART_LSR_THRE, + .max_bars = 2, } }; static const struct ns16550_config_mmio __initconst uart_config[] =
@@ -161,12 +172,24 @@ static const struct ns16550_config_mmio __initconst uart_config[] =/* OXPCIe952 1 Native UART */ { .vendor_id = PCI_VENDOR_ID_OXSEMI, + .dev_id = 0xc158, + .param = param_oxford_2port, + }, + /* OXPCIe952 1 Native UART */ + { + .vendor_id = PCI_VENDOR_ID_OXSEMI, .dev_id = 0xc13d, .param = param_oxford, }, /* OXPCIe952 1 Native UART */ { .vendor_id = PCI_VENDOR_ID_OXSEMI, + .dev_id = 0xc15d, + .param = param_oxford_2port, + }, + /* OXPCIe952 1 Native UART */ + { + .vendor_id = PCI_VENDOR_ID_OXSEMI, .dev_id = 0xc40b, .param = param_oxford, },
Signature · 1 line
1.7.7.6
Quoted 16 lines
Quoted 1 line
Quoted 1 line · Konrad Rzeszutek Wilk
xen/drivers/char/ns16550.c +6
-0@@ -161,12 +172,24 @@ static const struct ns16550_config_mmio __initconst uart_config[] =/* OXPCIe952 1 Native UART */ { .vendor_id = PCI_VENDOR_ID_OXSEMI, + .dev_id = 0xc158, + .param = param_oxford_2port, + }, + /* OXPCIe952 1 Native UART */ + { + .vendor_id = PCI_VENDOR_ID_OXSEMI, .dev_id = 0xc13d, .param = param_oxford, }, /* OXPCIe952 1 Native UART */ {
xen/drivers/char/ns16550.c static const struct ns16550_config_mmio __initconst uart_config[] = · line 195
Quoted 10 lines
xen/drivers/char/ns16550.c +6
-0.vendor_id = PCI_VENDOR_ID_OXSEMI, + .dev_id = 0xc15d, + .param = param_oxford_2port, + }, +/* OXPCIe952 1 Native UART */ + { + .vendor_id = PCI_VENDOR_ID_OXSEMI, .dev_id = 0xc40b, .param = param_oxford, },
While at first I only wanted to ask by what principle these entries are being ordered, I now additionally wonder what really distinguishes them (beyond the device ID): They all have the same name, and even the newly added ones say "1 native UART", despite the patch subject saying "two port".
Jan
Quoted 21 lines · Jan Beulich
Quoted 21 lines
Quoted 1 line
Quoted 1 line · Konrad Rzeszutek Wilk
xen/drivers/char/ns16550.c +10
-0@@ -161,12 +172,24 @@ static const struct ns16550_config_mmio __initconst uart_config[] =/* OXPCIe952 1 Native UART */ { .vendor_id = PCI_VENDOR_ID_OXSEMI, + .dev_id = 0xc158, + .param = param_oxford_2port, + }, + /* OXPCIe952 1 Native UART */ + { + .vendor_id = PCI_VENDOR_ID_OXSEMI, .dev_id = 0xc13d, .param = param_oxford, }, /* OXPCIe952 1 Native UART */ { .vendor_id = PCI_VENDOR_ID_OXSEMI, + .dev_id = 0xc15d, + .param = param_oxford_2port, + }, + /* OXPCIe952 1 Native UART */
Quoted 8 lines
xen/drivers/char/ns16550.c static const struct ns16550_config_mmio __initconst uart_config[] = · line 195
Quoted 5 lines
xen/drivers/char/ns16550.c +2
-0+ { + .vendor_id = PCI_VENDOR_ID_OXSEMI, .dev_id = 0xc40b, .param = param_oxford, },While at first I only wanted to ask by what principle these entries are being ordered, I now additionally wonder what really
I was putting them in the order of device_id. But I can also put them at the end of the structure if you would prefer?
Quoted 2 lines
distinguishes them (beyond the device ID): They all have the same name, and even the newly added ones say "1 native UART",
Argh. Copy-n-paste error. Should have said 'OXPCIe952 2 Native UART'
Quoted 4 lines
despite the patch subject saying "two port".
Jan
Quoted 30 lines
Quoted 1 line
Quoted 1 line · Konrad Rzeszutek Wilk
Quoted 2 lines · Jan Beulich
Review static const struct ns16550_config_mmio __initconst
Quoted 2 lines
Quoted 1 line
Quoted 1 line · Konrad Rzeszutek Wilk
(quoted diff) +0
-0@@ -161,12 +172,24 @@ static const struct ns16550_config_mmio __initconstuart_config[] =
Quoted 25 lines
Quoted 24 lines
xen/drivers/char/ns16550.c +12
-0/* OXPCIe952 1 Native UART */ { .vendor_id = PCI_VENDOR_ID_OXSEMI, + .dev_id = 0xc158, + .param = param_oxford_2port, + }, + /* OXPCIe952 1 Native UART */ + { + .vendor_id = PCI_VENDOR_ID_OXSEMI, .dev_id = 0xc13d, .param = param_oxford, }, /* OXPCIe952 1 Native UART */ { .vendor_id = PCI_VENDOR_ID_OXSEMI, + .dev_id = 0xc15d, + .param = param_oxford_2port, + }, + /* OXPCIe952 1 Native UART */ + { + .vendor_id = PCI_VENDOR_ID_OXSEMI, .dev_id = 0xc40b, .param = param_oxford, },
Quoted 5 lines
Quoted 2 lines
While at first I only wanted to ask by what principle these entries are being ordered, I now additionally wonder what really
I was putting them in the order of
device_id. But I can also put them at the end of the structure if you would prefer?
No, that's fine. And you saying that made me realize that I too the bottom most number visible above as c10b for some reason (else I would have realized that this is the ordering used) - sorry for the noise.
Jan