public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 00/26] dm: Conversion of code to the new driver model PCI API
@ 2015-11-29 20:17 Simon Glass
  2015-11-29 20:17 ` [U-Boot] [PATCH v2 01/26] dm: pci: Mark legacy files as such Simon Glass
                   ` (25 more replies)
  0 siblings, 26 replies; 81+ messages in thread
From: Simon Glass @ 2015-11-29 20:17 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 81+ messages in thread

end of thread, other threads:[~2016-02-12 20:04 UTC | newest]

Thread overview: 81+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-29 20:17 [U-Boot] [PATCH v2 00/26] dm: Conversion of code to the new driver model PCI API Simon Glass
2015-11-29 20:17 ` [U-Boot] [PATCH v2 01/26] dm: pci: Mark legacy files as such Simon Glass
2015-12-14  3:45   ` Simon Glass
2015-11-29 20:17 ` [U-Boot] [PATCH v2 02/26] dm: pci: Add a dm_ prefix to pci_get_bdf() Simon Glass
2015-12-03  9:06   ` Bin Meng
2015-12-14  3:45     ` Simon Glass
2015-11-29 20:17 ` [U-Boot] [PATCH v2 03/26] dm: pci: Add a dm_ prefix to pci_bus_find_bdf() Simon Glass
2015-12-03  9:06   ` Bin Meng
2015-12-14  3:45     ` Simon Glass
2015-11-29 20:17 ` [U-Boot] [PATCH v2 04/26] dm: pci: Use driver model PCI API in auto-config Simon Glass
2015-12-03  9:15   ` Bin Meng
2015-12-14  3:45     ` Simon Glass
2015-11-29 20:17 ` [U-Boot] [PATCH v2 05/26] dm: pci: Add a driver-model version of pci_find_device() Simon Glass
2015-12-03  9:18   ` Bin Meng
2015-12-14  3:45     ` Simon Glass
2015-11-29 20:17 ` [U-Boot] [PATCH v2 06/26] dm: pci: scsi: Use driver-model PCI API Simon Glass
2015-12-03 10:03   ` Bin Meng
2015-12-14  3:45     ` Simon Glass
2015-11-29 20:17 ` [U-Boot] [PATCH v2 07/26] dm: pci: Add a driver-model version of pci_find_class() Simon Glass
2015-12-03 10:03   ` Bin Meng
2015-12-14  3:45     ` Simon Glass
2015-11-29 20:17 ` [U-Boot] [PATCH v2 08/26] dm: pci: Add a function to read a PCI BAR Simon Glass
2015-12-14  3:45   ` Simon Glass
2015-11-29 20:17 ` [U-Boot] [PATCH v2 09/26] dm: serial: Convert ns16550 driver to use driver model PCI API Simon Glass
2015-12-07 13:27   ` Bin Meng
2015-12-14  3:45     ` Simon Glass
2015-11-29 20:17 ` [U-Boot] [PATCH v2 10/26] dm: x86: ivybridge: Convert graphics init to use DM " Simon Glass
2015-12-07 10:34   ` Bin Meng
2015-12-14  3:45     ` Simon Glass
2015-11-29 20:17 ` [U-Boot] [PATCH v2 11/26] dm: Convert bios_interrupts " Simon Glass
2015-12-07 10:53   ` Bin Meng
2015-12-14  3:45     ` Simon Glass
2015-11-29 20:17 ` [U-Boot] [PATCH v2 12/26] dm: pci: video: Convert video and pci_rom " Simon Glass
2015-11-30  9:29   ` Anatolij Gustschin
2015-12-07 10:53   ` Bin Meng
2015-12-14  3:45     ` Simon Glass
2015-11-29 20:17 ` [U-Boot] [PATCH v2 13/26] dm: x86: pci: Adjust bios_run_on_x86() to use the " Simon Glass
2015-12-07 10:53   ` Bin Meng
2015-12-14  3:45     ` Simon Glass
2015-11-29 20:17 ` [U-Boot] [PATCH v2 14/26] dm: pci: Drop the old version of pci_find_device/s() Simon Glass
2015-12-07 10:58   ` Bin Meng
2015-12-14  3:45     ` Simon Glass
2015-11-29 20:18 ` [U-Boot] [PATCH v2 15/26] dm: pci: Drop the old version of pci_find_class() Simon Glass
2015-12-07 10:58   ` Bin Meng
2015-12-14  3:45     ` Simon Glass
2015-11-29 20:18 ` [U-Boot] [PATCH v2 16/26] dm: tegra: net: Convert tegra boards to driver model for Ethernet Simon Glass
2015-11-30 22:35   ` Joe Hershberger
2015-12-14  3:46     ` Simon Glass
2016-01-15 23:53       ` Stephen Warren
2016-01-18  3:58         ` Simon Glass
2016-01-18 17:27           ` Stephen Warren
2016-01-19  1:59             ` Simon Glass
2016-02-11 23:21       ` Stephen Warren
2016-02-12  0:10         ` Simon Glass
2016-02-12  0:45           ` Stephen Warren
2016-02-12 20:04             ` Simon Glass
2015-11-29 20:18 ` [U-Boot] [PATCH v2 17/26] dm: test: Convert PCI tests to use the DM PCI API Simon Glass
2015-12-14  3:46   ` Simon Glass
2015-11-29 20:18 ` [U-Boot] [PATCH v2 18/26] dm: pci: Add driver model API functions for address mapping Simon Glass
2015-12-07 11:14   ` Bin Meng
2015-12-14  3:46     ` Simon Glass
2015-11-29 20:18 ` [U-Boot] [PATCH v2 19/26] dm: net: Convert rtl8169 to use DM PCI API Simon Glass
2015-11-30 22:35   ` Joe Hershberger
2015-12-14  3:46     ` Simon Glass
2015-11-29 20:18 ` [U-Boot] [PATCH v2 20/26] dm: pci: Switch to DM API for PCI address mapping Simon Glass
2015-12-14  3:46   ` Simon Glass
2015-11-29 20:18 ` [U-Boot] [PATCH v2 21/26] dm: ahci: Convert to use new DM PCI API Simon Glass
2015-12-07 11:27   ` Bin Meng
2015-12-14  3:46     ` Simon Glass
2015-11-29 20:18 ` [U-Boot] [PATCH v2 22/26] dm: usb: Convert echi-pci " Simon Glass
2015-11-29 20:43   ` Marek Vasut
2015-12-14  3:46     ` Simon Glass
2015-11-29 20:18 ` [U-Boot] [PATCH v2 23/26] dm: Convert PCI MMC over to use " Simon Glass
2015-12-07 11:28   ` Bin Meng
2015-12-14  3:46     ` Simon Glass
2015-11-29 20:18 ` [U-Boot] [PATCH v2 24/26] pci: Tidy up comments in pci_bind_bus_devices() Simon Glass
2015-12-14  3:46   ` Simon Glass
2015-11-29 20:18 ` [U-Boot] [PATCH v2 25/26] dm: net: usb: Refactor mcs7830 driver ready for DM conversion Simon Glass
2015-12-14  3:46   ` Simon Glass
2015-11-29 20:18 ` [U-Boot] [PATCH v2 26/26] dm: net: usb: Convert mcs7830 driver to support driver model Simon Glass
2015-12-14  3:46   ` Simon Glass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox