]> xenbits.xensource.com Git - people/aperard/xen-unstable.git/commit
ns16550: enable memory decoding on MMIO-based PCI console card
authorMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Mon, 8 May 2023 12:15:38 +0000 (14:15 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 8 May 2023 12:15:38 +0000 (14:15 +0200)
commita16fb78515d54be95f81c0d1c0a3a7b954a54d0a
tree3a4692197d24b5e329cef6e7ba7f8f4cc7056b71
parentfb751d9a2431e01586844978d38b7fa5b5468ff4
ns16550: enable memory decoding on MMIO-based PCI console card

pci_serial_early_init() enables PCI_COMMAND_IO for IO-based UART
devices, add setting PCI_COMMAND_MEMORY for MMIO-based UART devices too.
Note the MMIO-based devices in practice need a "pci" sub-option,
otherwise a few parameters are not initialized (including bar_idx,
reg_shift, reg_width etc). The "pci" is not supposed to be used with
explicit BDF, so do not key setting PCI_COMMAND_MEMORY on explicit BDF
being set. Contrary to the IO-based UART, pci_serial_early_init() will
not attempt to set BAR0 address, even if user provided io_base manually
- in most cases, those are with an offest and the current cmdline syntax
doesn't allow expressing it. Due to this, enable PCI_COMMAND_MEMORY only
if uart->bar is already populated. In similar spirit, this patch does
not support setting BAR0 of the bridge.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/drivers/char/ns16550.c