[U-Boot] [PATCH v3 0/7] x86: Support pci based uart as the U-Boot serial console
Bin Meng
bmeng.cn at gmail.com
Tue Dec 30 15:53:18 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 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:
- Add a commit message
- New patch to make pci apis usable before relocation
- 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 (7):
x86: Add missing DECLARE_GLOBAL_DATA_PTR for pci.c
x86: Support pci bus scan in the early phase
pci: Make pci apis usable before relocation
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/cpu/pci.c | 11 ++-
arch/x86/dts/crownbay.dts | 81 ++++++++++++++++++
arch/x86/dts/serial.dtsi | 5 +-
arch/x86/include/asm/global_data.h | 1 -
arch/x86/include/asm/pci.h | 2 +-
drivers/pci/pci.c | 25 ++++--
drivers/serial/ns16550.c | 31 +++++++
drivers/serial/serial_x86.c | 8 +-
include/asm-generic/global_data.h | 6 ++
include/fdtdec.h | 108 +++++++++++++++++++++---
lib/fdtdec.c | 166 +++++++++++++++++++++++++++++++++----
11 files changed, 401 insertions(+), 43 deletions(-)
--
1.8.2.1
More information about the U-Boot
mailing list