Skip to content

x86: Support pci based uart as the U-Boot serial console

Bin Meng u-boot 4 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest4 patches 0 repliesNew
  2. v37 patches 0 repliesSuperseded
  3. v27 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v15 patches0 repliesSuperseded

Changes in v4 from the cover letter

- Check compatible string 12th byte against '\0'
- Add , after pciclass in the pci compatible string per spec
- Drop the first 3 patches which are already applied

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4fdt: Add several apis to decode pci device nodeinclude/fdtdec.h lib/fdtdec.c+254 -252 replies
2/4serial: ns16550: Support ns16550 compatible pci uart devicesdrivers/serial/ns16550.c+31 -01 reply
3/4x86: Use ePAPR defined properties for x86-uartarch/x86/dts/serial.dtsi drivers/serial/serial_x86.c+9 -41 reply
4/4x86: crownbay: Add pci devices in the dts filearch/x86/dts/crownbay.dts+81 -02 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchSimon Glass
1/4A-b
2/4A-b
3/4A-b
4/4A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [U-Boot] [PATCH v4 0/4] x86: Support pci based uart as the U-Boot serial console

This series add support to the ns16550 compatible pci devices.

Newer x86 Platform Controller Hub chipset (like Topcliff, BayTrail) starts to integrate ns16550 compatible pci uart devices. In order to use them, we have to scan the pci bus and allocate memory/io address in the early phase. A gd->hose is added to save the pci bus controller hose in the early phase so that pci apis can be used.

On Intel Crown Bay board, there are 4 DB9 connectors, one of which is from the superio legacy serial port and the other 3 are connected to the Topcliff PCH UART devices. In order to use them as the U-Boot serial console, we need describe those devices in the board's dts file per Open Firmware PCI bus bindings and specify it as the console via the 'stdout-path' in the chosen node. Several APIs are added in fdtdec.c to provide help for decoding the pci device nodes.

Changes in v4:
- Check compatible string 12th byte against '\0'
- Add , after pciclass in the pci compatible string per spec
- Drop the first 3 patches which are already applied

Changes in v3:
- Fixed a typo: parant -> parent
- Return better error code in fdtdec_get_pci_addr()
- Add some debug output in fdtdec_get_pci_addr()
- Reuse variable 'len' instead of creating a new one 'l'
- Check compatible string length and existence of '.'
- Using simple_strtol() directly on the compatible sub-string
- Change variable 'bn' to 'barnum' which is self-documenting
- Update to use 'memory-mapped' and 'i/o-mapped' in several places
- Use 'Processor Local Bus' instead of 'plb'
- Change the logic in ns16550_serial_ofdata_to_platdata() to avoid goto

Changes in v2:
- New patch to add several apis to decode pci device node
- New patch to support ns16550 compatible pci uart devices
- New patch to use ePAPR defined properties for x86-uart
- New patch to add pci devices in crownbay.dts
- Drop v1 patch: Add an API for finding pci devices in the early phase
- Drop v1 patch: Support PCI UART in the x86_serial driver
- Drop v1 patch: Add PCI UART related defines in crownbay.h

Bin Meng (4):
fdt: Add several apis to decode pci device node
serial: ns16550: Support ns16550 compatible pci uart devices
x86: Use ePAPR defined properties for x86-uart
x86: crownbay: Add pci devices in the dts file

 arch/x86/dts/crownbay.dts   |  81 +++++++++++++++++++++
 arch/x86/dts/serial.dtsi    |   5 +-
 drivers/serial/ns16550.c    |  31 ++++++++
 drivers/serial/serial_x86.c |   8 ++-
 include/fdtdec.h            | 108 +++++++++++++++++++++++++---
 lib/fdtdec.c                | 171 ++++++++++++++++++++++++++++++++++++++++----
 6 files changed, 375 insertions(+), 29 deletions(-)
Signature · 1 line
1.8.2.1