public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 00/55] dm: x86: Convert ivybridge code to use driver model
@ 2016-01-17 23:11 Simon Glass
  2016-01-17 23:11 ` [U-Boot] [PATCH v2 01/55] dm: core: Display the error number when driver binding fails Simon Glass
                   ` (54 more replies)
  0 siblings, 55 replies; 130+ messages in thread
From: Simon Glass @ 2016-01-17 23:11 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.

Changes in v2:
- Fix -EEPFNOSUPPORT typo
- Add missing of_match member init so that ehci_pci_ids[] is used
- Add missing 'given' word
- Drop unnecessary/incorrect non-DM code in dm_pci_run_vga_bios()
- Drop unused 'gen-dec' device tree property
- Drop the init() method in the PCH
- Rename this commit from 'x86: ivybridge: Set up the PCH init'
- Drop unnecessary DECLARE_GLOBAL_DATA_PTR
- Drop explicit PCH probe
- Drop LPC init method
- Rename patch from 'Add an init() method for the bd82x6x LPC'
- Update to drop LPC init method and use probe() instead
- Fix 'baords' typo in the commit message
- Add a comment as to why we are initing the devices again
- Drop northbridge_enable()
- Rename from 'Move northbridge setup to the northbridge driver'
- Drop this unnecessary init
- Rename the AHCI uclass to DISK
- Update to use the disk uclass
- Update to use the disk uclass
- Drop unnecessary IRQ and command register init
- Update to use LPC probe() method instead of init()
- Drop the special compatible string in chromebook_link.dts
- Expand the Kconfig help a little
- Avoid needing the pch device to set up the USB bar
- Fix incorrect bits in bridge_silicon_revision() comment
- Rename from 'Convert EHCI init to use the DM PCI API'
- Drop this init
- Fix the USB PCI address in the device tree
- Enable SYSCON and REGMAP for panther to avoid a build error
- Drop bd82x6x_pci_init() function and associated DM-conversion patch
- Drop LPC init method an 'Add an init() method to the LPC uclass' patch

Simon Glass (55):
  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: Rename bd82x6x_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: Probe the LPC in CPU init
  x86: ivybridge: Move graphics init much later
  x86: ivybridge: Move sandybridge init to the lpc probe() 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.c
  x86: ivybridge: Drop unnecessary northbridge setup
  ahci: Add a disk-controller 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 the LPC probe() 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: Drop special EHCI init
  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                                |  22 +-
 arch/x86/cpu/ivybridge/Makefile                   |   5 -
 arch/x86/cpu/ivybridge/bd82x6x.c                  | 217 ++++++++++------
 arch/x86/cpu/ivybridge/cpu.c                      | 146 +++--------
 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                      | 301 ++++++++++++----------
 arch/x86/cpu/ivybridge/model_206ax.c              | 126 ++++-----
 arch/x86/cpu/ivybridge/northbridge.c              | 126 ++++++---
 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                     | 132 ++++++----
 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                  |  86 ++++++-
 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/mrccache.c                           |   6 +-
 arch/x86/lib/northbridge-uclass.c                 |  15 ++
 board/google/chromebook_link/link.c               |   8 -
 configs/chromebook_link_defconfig                 |   9 +
 configs/chromebox_panther_defconfig               |   4 +
 drivers/bios_emulator/atibios.c                   | 109 +++++++-
 drivers/bios_emulator/bios.c                      |  39 +++
 drivers/block/Kconfig                             |   9 +
 drivers/block/Makefile                            |   1 +
 drivers/block/disk-uclass.c                       |  14 +
 drivers/core/lists.c                              |   3 +-
 drivers/core/syscon-uclass.c                      |  31 ++-
 drivers/i2c/Kconfig                               |   9 +
 drivers/i2c/Makefile                              |   1 +
 drivers/i2c/intel_i2c.c                           |  75 ++++++
 drivers/pci/pci_rom.c                             |   6 +-
 drivers/usb/host/ehci-pci.c                       |   6 +
 include/bios_emul.h                               |  19 +-
 include/dm/uclass-id.h                            |   2 +
 include/fdtdec.h                                  |   5 -
 include/syscon.h                                  |  14 +
 lib/fdtdec.c                                      |   5 -
 test/dm/syscon.c                                  |  17 ++
 48 files changed, 1288 insertions(+), 1059 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/disk-uclass.c
 create mode 100644 drivers/i2c/intel_i2c.c

-- 
2.6.0.rc2.230.g3dd15c0

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

end of thread, other threads:[~2016-01-21  8:04 UTC | newest]

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

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