public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 00/57] dm: x86: Convert ivybridge code to use driver model
@ 2015-12-08  3:38 Simon Glass
  2015-12-08  3:38 ` [U-Boot] [PATCH 01/57] dm: Add an init() method to the LPC uclass Simon Glass
                   ` (56 more replies)
  0 siblings, 57 replies; 125+ messages in thread
From: Simon Glass @ 2015-12-08  3:38 UTC (permalink / raw)
  To: u-boot

At present ivybridge is the only x86 implementation that includes a
reasonably full board init. This means there is a lot more code than with
a board that uses FSP (even then we don't have memory init or graphics init
code).

This code does not use proper drivers for the devices and so its use of
driver model is limited. This series refactors the code to improve this. In
particular it drops use of the old x86_pci_...() API in favour of
dm_pci_...(). The latter requires that each PCI device has a driver.

A few very minor driver model improvements are added to support this. Also a
Northbridge uclass is added - this could instead be done with the syscon, so
comments are well as to which is best.

A small amount of additional work will be needed to remove use of the
x86_pci_...() in arch/x86, but this series represents the bulk of it.


Simon Glass (57):
  dm: Add an init() method to the LPC uclass
  dm: core: Display the error number when driver binding fails
  dm: usb: Add a compatible string for PCI EHCI controller
  dm: syscon: Allow finding devices by driver data
  dm: pci: Convert bios_emu to use the driver model PCI API
  x86: ivybridge: Set up the LPC device using driver model
  x86: ivybridge: Move lpc_early_init() to probe()
  x86: ivybridge: Move more init to the probe() function
  x86: ivybridge: Set up the PCH init
  dm: x86: Add a northbridge uclass
  x86: ivybridge: Add a driver for the bd82x6x northbridge
  x86: ivybridge: Move northbridge init into the probe() method
  x86: ivybridge: Move LPC and PCH init into northbridge probe()
  x86: ivybridge: Rename lpc_init() to lpc_init_extra()
  x86: ivybridge: Add an init() method for the bd82x6x LPC
  x86: ivybridge: Move graphics init much later
  x86: ivybridge: Move sandybridge init to the lpc init() method
  x86: ivybridge: Move GPIO init to the LPC init() method
  x86: ivybridge: Use common CPU init code
  x86: ivybridge: Move CPU init code into the driver
  x86: ivybridge: Set up the thermal target correctly
  x86: ivybridge: Drop the dead MTRR code
  x86: ivybridge: Move early init code into northbridge.c
  x86: Make x86_init_cpus() static
  x86: Don't show an error when the MRC cache is up to date
  x86: Bring up northbridge, pch and lpc after the CPUs
  x86: ivybridge: Move northbridge and PCH init into drivers
  x86: ivybridge: Use driver model PCI API in bd82x6x_pci_init()
  x86: ivybridge: Use driver model PCI API in bd82x6x.c
  x86: ivybridge: Move northbridge setup to the northbridge driver
  ahci: Add an AHCI uclass
  x86: ivybridge: Do the SATA init before relocation
  x86: ivybridge: Drop the unused bd82x6x_init_extra()
  x86: ivybridge: Use the SATA driver to do the init
  x86: ivybridge: Use driver model PCI API in sata.c
  x86: ivybridge: Move lpc_enable() into gma.c
  x86: ivybridge: Move LPC init into LPC init() method
  x86: ivybridge: Drop the special PCI driver
  x86: ivybridge: Convert lpc init code to DM PCI API
  x86: Enable DM_USB for link and panther
  x86: i2c: Add a stub driver for Intel I2C/SMbus
  x86: ivybridge: Use the I2C driver to perform SMbus init
  x86: ivybridge: Convert enable_usb_bar() to use DM PCI API
  x86: ivybridge: Convert dram_init() to use DM PCI API
  x86: ivybridge: Convert sdram_initialise() to use DM PCI API
  x86: chromebook_link: Enable the syscon uclass
  x86: ivybridge: Convert SDRAM init to use driver model
  x86: ivybridge: Convert report_platform to DM PCI API
  x86: ivybridge: Convert pch.c to use DM PCI API
  x86: ivybridge: Move code from pch.c to bd82x6x.c
  x86: ivybridge: Sort out the calls to bridge_silicon_revision()
  x86: ivybridge: Convert EHCI init to use the DM PCI API
  x86: ivybridge: Drop XHCI support
  x86: ivybridge: Drop the SMM-locking code
  x86: Set up a shared syscon numbering schema
  x86: ivybridge: Use syscon for the GMA device
  x86: fdt: Drop the unused compatible strings in fdtdec

 arch/x86/cpu/cpu.c                                |  18 +-
 arch/x86/cpu/ivybridge/Makefile                   |   3 -
 arch/x86/cpu/ivybridge/bd82x6x.c                  | 247 +++++++++++------
 arch/x86/cpu/ivybridge/cpu.c                      | 159 ++++-------
 arch/x86/cpu/ivybridge/early_init.c               | 147 ----------
 arch/x86/cpu/ivybridge/early_me.c                 |  70 +++--
 arch/x86/cpu/ivybridge/gma.c                      | 114 ++++++--
 arch/x86/cpu/ivybridge/lpc.c                      | 315 ++++++++++++----------
 arch/x86/cpu/ivybridge/model_206ax.c              | 126 ++++-----
 arch/x86/cpu/ivybridge/northbridge.c              | 189 +++++++++++--
 arch/x86/cpu/ivybridge/pch.c                      | 123 ---------
 arch/x86/cpu/ivybridge/pci.c                      |  67 -----
 arch/x86/cpu/ivybridge/report_platform.c          |  11 +-
 arch/x86/cpu/ivybridge/sata.c                     | 127 ++++++---
 arch/x86/cpu/ivybridge/sdram.c                    |  64 +++--
 arch/x86/cpu/ivybridge/usb_ehci.c                 |  29 --
 arch/x86/cpu/ivybridge/usb_xhci.c                 |  32 ---
 arch/x86/dts/chromebook_link.dts                  |  83 +++++-
 arch/x86/include/asm/arch-ivybridge/bd82x6x.h     |  23 +-
 arch/x86/include/asm/arch-ivybridge/me.h          |  45 +++-
 arch/x86/include/asm/arch-ivybridge/pch.h         |  27 +-
 arch/x86/include/asm/arch-ivybridge/sandybridge.h |  13 +-
 arch/x86/include/asm/cpu.h                        |  11 +
 arch/x86/include/asm/u-boot-x86.h                 |   2 -
 arch/x86/lib/Makefile                             |   1 +
 arch/x86/lib/lpc-uclass.c                         |  11 +
 arch/x86/lib/mrccache.c                           |   6 +-
 arch/x86/lib/northbridge-uclass.c                 |  17 ++
 board/google/chromebook_link/link.c               |   8 -
 configs/chromebook_link_defconfig                 |   9 +
 configs/chromebox_panther_defconfig               |   2 +
 drivers/bios_emulator/atibios.c                   | 107 +++++++-
 drivers/bios_emulator/bios.c                      |  39 +++
 drivers/block/Makefile                            |   2 +-
 drivers/block/ahci-uclass.c                       |  14 +
 drivers/core/lists.c                              |   3 +-
 drivers/core/syscon-uclass.c                      |  31 ++-
 drivers/i2c/Kconfig                               |   7 +
 drivers/i2c/Makefile                              |   1 +
 drivers/i2c/intel_i2c.c                           |  75 ++++++
 drivers/pci/pci_rom.c                             |   9 +
 drivers/usb/host/ehci-pci.c                       |   5 +
 include/bios_emul.h                               |  19 +-
 include/dm/uclass-id.h                            |   2 +
 include/fdtdec.h                                  |   5 -
 include/lpc.h                                     |  32 +++
 include/syscon.h                                  |  14 +
 lib/fdtdec.c                                      |   5 -
 test/dm/syscon.c                                  |  17 ++
 49 files changed, 1444 insertions(+), 1042 deletions(-)
 delete mode 100644 arch/x86/cpu/ivybridge/early_init.c
 delete mode 100644 arch/x86/cpu/ivybridge/pch.c
 delete mode 100644 arch/x86/cpu/ivybridge/pci.c
 delete mode 100644 arch/x86/cpu/ivybridge/usb_ehci.c
 delete mode 100644 arch/x86/cpu/ivybridge/usb_xhci.c
 create mode 100644 arch/x86/lib/northbridge-uclass.c
 create mode 100644 drivers/block/ahci-uclass.c
 create mode 100644 drivers/i2c/intel_i2c.c
 create mode 100644 include/lpc.h

-- 
2.6.0.rc2.230.g3dd15c0

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

end of thread, other threads:[~2015-12-18  2:49 UTC | newest]

Thread overview: 125+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-08  3:38 [U-Boot] [PATCH 00/57] dm: x86: Convert ivybridge code to use driver model Simon Glass
2015-12-08  3:38 ` [U-Boot] [PATCH 01/57] dm: Add an init() method to the LPC uclass Simon Glass
2015-12-13 12:51   ` Bin Meng
2015-12-08  3:38 ` [U-Boot] [PATCH 02/57] dm: core: Display the error number when driver binding fails Simon Glass
2015-12-13 12:52   ` Bin Meng
2015-12-08  3:38 ` [U-Boot] [PATCH 03/57] dm: usb: Add a compatible string for PCI EHCI controller Simon Glass
2015-12-08  9:15   ` Marek Vasut
2015-12-13 12:52   ` Bin Meng
2015-12-08  3:38 ` [U-Boot] [PATCH 04/57] dm: syscon: Allow finding devices by driver data Simon Glass
2015-12-13 12:52   ` Bin Meng
2015-12-08  3:38 ` [U-Boot] [PATCH 05/57] dm: pci: Convert bios_emu to use the driver model PCI API Simon Glass
2015-12-13 12:52   ` Bin Meng
2015-12-08  3:38 ` [U-Boot] [PATCH 06/57] x86: ivybridge: Set up the LPC device using driver model Simon Glass
2015-12-13 12:52   ` Bin Meng
2015-12-15 18:57     ` Simon Glass
2015-12-17 10:00       ` Bin Meng
2015-12-18  2:49         ` Simon Glass
2015-12-08  3:38 ` [U-Boot] [PATCH 07/57] x86: ivybridge: Move lpc_early_init() to probe() Simon Glass
2015-12-13 12:52   ` Bin Meng
2015-12-08  3:38 ` [U-Boot] [PATCH 08/57] x86: ivybridge: Move more init to the probe() function Simon Glass
2015-12-13 12:52   ` Bin Meng
2015-12-08  3:38 ` [U-Boot] [PATCH 09/57] x86: ivybridge: Set up the PCH init Simon Glass
2015-12-13 12:52   ` Bin Meng
2015-12-08  3:38 ` [U-Boot] [PATCH 10/57] dm: x86: Add a northbridge uclass Simon Glass
2015-12-13 12:52   ` Bin Meng
2015-12-08  3:38 ` [U-Boot] [PATCH 11/57] x86: ivybridge: Add a driver for the bd82x6x northbridge Simon Glass
2015-12-13 12:53   ` Bin Meng
2015-12-08  3:38 ` [U-Boot] [PATCH 12/57] x86: ivybridge: Move northbridge init into the probe() method Simon Glass
2015-12-13 12:53   ` Bin Meng
2015-12-08  3:38 ` [U-Boot] [PATCH 13/57] x86: ivybridge: Move LPC and PCH init into northbridge probe() Simon Glass
2015-12-13 12:53   ` Bin Meng
2015-12-08  3:38 ` [U-Boot] [PATCH 14/57] x86: ivybridge: Rename lpc_init() to lpc_init_extra() Simon Glass
2015-12-13 12:53   ` Bin Meng
2015-12-08  3:38 ` [U-Boot] [PATCH 15/57] x86: ivybridge: Add an init() method for the bd82x6x LPC Simon Glass
2015-12-13 12:53   ` Bin Meng
2015-12-08  3:38 ` [U-Boot] [PATCH 16/57] x86: ivybridge: Move graphics init much later Simon Glass
2015-12-13 12:53   ` Bin Meng
2015-12-08  3:38 ` [U-Boot] [PATCH 17/57] x86: ivybridge: Move sandybridge init to the lpc init() method Simon Glass
2015-12-13 12:53   ` Bin Meng
2015-12-08  3:38 ` [U-Boot] [PATCH 18/57] x86: ivybridge: Move GPIO init to the LPC " Simon Glass
2015-12-13 12:53   ` Bin Meng
2015-12-08  3:38 ` [U-Boot] [PATCH 19/57] x86: ivybridge: Use common CPU init code Simon Glass
2015-12-13 12:53   ` Bin Meng
2015-12-08  3:38 ` [U-Boot] [PATCH 20/57] x86: ivybridge: Move CPU init code into the driver Simon Glass
2015-12-13 12:53   ` Bin Meng
2015-12-08  3:38 ` [U-Boot] [PATCH 21/57] x86: ivybridge: Set up the thermal target correctly Simon Glass
2015-12-13 12:53   ` Bin Meng
2015-12-08  3:38 ` [U-Boot] [PATCH 22/57] x86: ivybridge: Drop the dead MTRR code Simon Glass
2015-12-13 12:54   ` Bin Meng
2015-12-08  3:38 ` [U-Boot] [PATCH 23/57] x86: ivybridge: Move early init code into northbridge.c Simon Glass
2015-12-13 12:54   ` Bin Meng
2015-12-08  3:38 ` [U-Boot] [PATCH 24/57] x86: Make x86_init_cpus() static Simon Glass
2015-12-13 12:54   ` Bin Meng
2015-12-08  3:38 ` [U-Boot] [PATCH 25/57] x86: Don't show an error when the MRC cache is up to date Simon Glass
2015-12-13 12:54   ` Bin Meng
2015-12-08  3:38 ` [U-Boot] [PATCH 26/57] x86: Bring up northbridge, pch and lpc after the CPUs Simon Glass
2015-12-13 12:54   ` Bin Meng
2015-12-15 18:58     ` Simon Glass
2015-12-08  3:38 ` [U-Boot] [PATCH 27/57] x86: ivybridge: Move northbridge and PCH init into drivers Simon Glass
2015-12-13 12:54   ` Bin Meng
2015-12-08  3:38 ` [U-Boot] [PATCH 28/57] x86: ivybridge: Use driver model PCI API in bd82x6x_pci_init() Simon Glass
2015-12-13 12:54   ` Bin Meng
2015-12-08  3:38 ` [U-Boot] [PATCH 29/57] x86: ivybridge: Use driver model PCI API in bd82x6x.c Simon Glass
2015-12-13 12:54   ` Bin Meng
2015-12-08  3:38 ` [U-Boot] [PATCH 30/57] x86: ivybridge: Move northbridge setup to the northbridge driver Simon Glass
2015-12-13 12:54   ` Bin Meng
2015-12-08  3:38 ` [U-Boot] [PATCH 31/57] ahci: Add an AHCI uclass Simon Glass
2015-12-13 12:54   ` Bin Meng
2015-12-08  3:38 ` [U-Boot] [PATCH 32/57] x86: ivybridge: Do the SATA init before relocation Simon Glass
2015-12-13 12:55   ` Bin Meng
2015-12-08  3:38 ` [U-Boot] [PATCH 33/57] x86: ivybridge: Drop the unused bd82x6x_init_extra() Simon Glass
2015-12-13 12:55   ` Bin Meng
2015-12-08  3:38 ` [U-Boot] [PATCH 34/57] x86: ivybridge: Use the SATA driver to do the init Simon Glass
2015-12-13 12:55   ` Bin Meng
2015-12-08  3:38 ` [U-Boot] [PATCH 35/57] x86: ivybridge: Use driver model PCI API in sata.c Simon Glass
2015-12-13 12:55   ` Bin Meng
2015-12-08  3:38 ` [U-Boot] [PATCH 36/57] x86: ivybridge: Move lpc_enable() into gma.c Simon Glass
2015-12-13 12:55   ` Bin Meng
2015-12-08  3:38 ` [U-Boot] [PATCH 37/57] x86: ivybridge: Move LPC init into LPC init() method Simon Glass
2015-12-13 12:55   ` Bin Meng
2015-12-08  3:38 ` [U-Boot] [PATCH 38/57] x86: ivybridge: Drop the special PCI driver Simon Glass
2015-12-13 12:56   ` Bin Meng
2015-12-15 18:58     ` Simon Glass
2015-12-08  3:38 ` [U-Boot] [PATCH 39/57] x86: ivybridge: Convert lpc init code to DM PCI API Simon Glass
2015-12-13 12:56   ` Bin Meng
2015-12-08  3:38 ` [U-Boot] [PATCH 40/57] x86: Enable DM_USB for link and panther Simon Glass
2015-12-13 12:56   ` Bin Meng
2015-12-08  3:39 ` [U-Boot] [PATCH 41/57] x86: i2c: Add a stub driver for Intel I2C/SMbus Simon Glass
2015-12-08  5:45   ` Heiko Schocher
2015-12-13 12:56   ` Bin Meng
2015-12-08  3:39 ` [U-Boot] [PATCH 42/57] x86: ivybridge: Use the I2C driver to perform SMbus init Simon Glass
2015-12-08  5:48   ` Heiko Schocher
2015-12-11  2:05     ` Simon Glass
2015-12-13 12:56   ` Bin Meng
2015-12-08  3:39 ` [U-Boot] [PATCH 43/57] x86: ivybridge: Convert enable_usb_bar() to use DM PCI API Simon Glass
2015-12-13 12:56   ` Bin Meng
2015-12-15 18:58     ` Simon Glass
2015-12-08  3:39 ` [U-Boot] [PATCH 44/57] x86: ivybridge: Convert dram_init() " Simon Glass
2015-12-13 12:56   ` Bin Meng
2015-12-08  3:39 ` [U-Boot] [PATCH 45/57] x86: ivybridge: Convert sdram_initialise() " Simon Glass
2015-12-13 12:56   ` Bin Meng
2015-12-08  3:39 ` [U-Boot] [PATCH 46/57] x86: chromebook_link: Enable the syscon uclass Simon Glass
2015-12-13 12:56   ` Bin Meng
2015-12-08  3:39 ` [U-Boot] [PATCH 47/57] x86: ivybridge: Convert SDRAM init to use driver model Simon Glass
2015-12-13 12:57   ` Bin Meng
2015-12-08  3:39 ` [U-Boot] [PATCH 48/57] x86: ivybridge: Convert report_platform to DM PCI API Simon Glass
2015-12-13 12:57   ` Bin Meng
2015-12-08  3:39 ` [U-Boot] [PATCH 49/57] x86: ivybridge: Convert pch.c to use " Simon Glass
2015-12-13 12:57   ` Bin Meng
2015-12-08  3:39 ` [U-Boot] [PATCH 50/57] x86: ivybridge: Move code from pch.c to bd82x6x.c Simon Glass
2015-12-13 12:57   ` Bin Meng
2015-12-08  3:39 ` [U-Boot] [PATCH 51/57] x86: ivybridge: Sort out the calls to bridge_silicon_revision() Simon Glass
2015-12-13 12:57   ` Bin Meng
2015-12-08  3:39 ` [U-Boot] [PATCH 52/57] x86: ivybridge: Convert EHCI init to use the DM PCI API Simon Glass
2015-12-13 12:57   ` Bin Meng
2015-12-08  3:39 ` [U-Boot] [PATCH 53/57] x86: ivybridge: Drop XHCI support Simon Glass
2015-12-13 12:57   ` Bin Meng
2015-12-08  3:39 ` [U-Boot] [PATCH 54/57] x86: ivybridge: Drop the SMM-locking code Simon Glass
2015-12-13 12:57   ` Bin Meng
2015-12-08  3:39 ` [U-Boot] [PATCH 55/57] x86: Set up a shared syscon numbering schema Simon Glass
2015-12-13 12:57   ` Bin Meng
2015-12-08  3:39 ` [U-Boot] [PATCH 56/57] x86: ivybridge: Use syscon for the GMA device Simon Glass
2015-12-13 12:58   ` Bin Meng
2015-12-08  3:39 ` [U-Boot] [PATCH 57/57] x86: fdt: Drop the unused compatible strings in fdtdec Simon Glass
2015-12-13 12:58   ` Bin Meng

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