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

Bin Meng bmeng.cn at gmail.com
Wed Dec 31 09:05:10 CET 2014


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(-)

-- 
1.8.2.1



More information about the U-Boot mailing list