[U-Boot] [PATCH v2 00/26] dm: Conversion of code to the new driver model PCI API
Simon Glass
sjg at chromium.org
Sun Nov 29 21:17:45 CET 2015
PCI devices should be accessed just by their device pointer (which is
struct udevice *). At present the hose (PCI controller) is often passed
along with a pci_dev_t (bus/device/function) value.
With driver model this is not necessary but most PCI code has not been
converted over to use this new API yet.
This series converts over various drivers with the goal of moving both Tegra
and x86 to use PCI fully for driver model. In addition, both move to use
driver model for Ethernet, which on x86 is related.
The process is not complete with this series. Remaining are the Intel E1000
Ethernet driver and various x86-specific things like ICH SPI.
Changes in v2:
- Add a new pci_internal.h header file for internal PCI functions
- Add missing code in dm_pci_phys_to_bus()
- Drop non-DM PCI code
- Drop unnecessary and confusing '#ifdef CONFIG_DM_ETH' in rtl8169_eth_probe()
- Drop unnecessary comment at the top of pci_auto.c
- Fix the indentation of the 'bar' for() loop
- Fix use of 'pdev' instead of 'dev'
- Get the vendor from the PCI parent platdata
- Move the functions into pci_common.c so they can be used by old code
- Put this code behind CONFIG_DM_PCI to avoid PowerPC build errors
- Rename _dm_pci_hose_bus_to_phys() to _dm_pci_bus_to_phys()
- Rename pci_run_vga_bios() to dm_pci_run_vga_bios()
- Require driver model with pci_rom.c
- Reword the commit message for clarity
- Use dev_get_parent_platdata() instead of re-reading values from the device
- Use dm_pci_get_bdf()
- Use pci_bus_find_bdf()
- Use u32 instead of uint32_t
- Use uintptr_t to cast the hcor address
Simon Glass (26):
dm: pci: Mark legacy files as such
dm: pci: Add a dm_ prefix to pci_get_bdf()
dm: pci: Add a dm_ prefix to pci_bus_find_bdf()
dm: pci: Use driver model PCI API in auto-config
dm: pci: Add a driver-model version of pci_find_device()
dm: pci: scsi: Use driver-model PCI API
dm: pci: Add a driver-model version of pci_find_class()
dm: pci: Add a function to read a PCI BAR
dm: serial: Convert ns16550 driver to use driver model PCI API
dm: x86: ivybridge: Convert graphics init to use DM PCI API
dm: Convert bios_interrupts to use DM PCI API
dm: pci: video: Convert video and pci_rom to use DM PCI API
dm: x86: pci: Adjust bios_run_on_x86() to use the DM PCI API
dm: pci: Drop the old version of pci_find_device/s()
dm: pci: Drop the old version of pci_find_class()
dm: tegra: net: Convert tegra boards to driver model for Ethernet
dm: test: Convert PCI tests to use the DM PCI API
dm: pci: Add driver model API functions for address mapping
dm: net: Convert rtl8169 to use DM PCI API
dm: pci: Switch to DM API for PCI address mapping
dm: ahci: Convert to use new DM PCI API
dm: usb: Convert echi-pci to use new DM PCI API
dm: Convert PCI MMC over to use DM PCI API
pci: Tidy up comments in pci_bind_bus_devices()
dm: net: usb: Refactor mcs7830 driver ready for DM conversion
dm: net: usb: Convert mcs7830 driver to support driver model
arch/arm/mach-tegra/Kconfig | 1 +
arch/x86/cpu/baytrail/valleyview.c | 4 +-
arch/x86/cpu/ivybridge/bd82x6x.c | 6 +-
arch/x86/cpu/ivybridge/gma.c | 15 +-
arch/x86/cpu/quark/quark.c | 4 +-
arch/x86/cpu/queensbay/topcliff.c | 4 +-
arch/x86/include/asm/arch-ivybridge/bd82x6x.h | 3 +-
arch/x86/lib/bios.c | 3 +-
arch/x86/lib/bios_interrupts.c | 36 ++-
board/compulab/trimslice/trimslice.c | 8 -
board/nvidia/cardhu/cardhu.c | 6 -
board/nvidia/jetson-tk1/jetson-tk1.c | 6 -
board/nvidia/p2371-2180/p2371-2180.c | 6 -
board/toradex/apalis_t30/apalis_t30.c | 6 -
common/cmd_pci.c | 2 +-
common/cmd_scsi.c | 14 +-
drivers/block/ahci.c | 70 ++++-
drivers/mmc/pci_mmc.c | 15 +-
drivers/net/designware.c | 2 +-
drivers/net/e1000.c | 4 +-
drivers/net/pch_gbe.c | 2 +-
drivers/net/rtl8169.c | 84 ++++--
drivers/pci/Makefile | 7 +-
drivers/pci/pci-uclass.c | 240 ++++++++++++++--
drivers/pci/pci.c | 5 +-
drivers/pci/pci_auto.c | 386 ++++++++++++++++++++++++++
drivers/pci/pci_auto_old.c | 54 +---
drivers/pci/pci_common.c | 86 +++---
drivers/pci/pci_compat.c | 2 +-
drivers/pci/pci_internal.h | 50 ++++
drivers/pci/pci_rom.c | 47 ++--
drivers/serial/ns16550.c | 5 +-
drivers/usb/eth/mcs7830.c | 370 ++++++++++++++++--------
drivers/usb/host/ehci-pci.c | 51 +++-
drivers/video/vesa_fb.c | 10 +-
include/ahci.h | 4 +
include/bios_emul.h | 2 +-
include/fdtdec.h | 23 +-
include/mmc.h | 6 +-
include/pci.h | 102 ++++++-
include/pci_rom.h | 6 +-
lib/fdtdec.c | 57 +---
test/dm/pci.c | 15 +-
43 files changed, 1349 insertions(+), 480 deletions(-)
create mode 100644 drivers/pci/pci_auto.c
create mode 100644 drivers/pci/pci_internal.h
--
2.6.0.rc2.230.g3dd15c0
More information about the U-Boot
mailing list