
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