From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bin Meng Date: Thu, 3 Sep 2015 05:37:22 -0700 Subject: [U-Boot] [PATCH v4 00/11] x86: quark: Convert to driver model Message-ID: <1441283853-30868-1-git-send-email-bmeng.cn@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de This series converts to use driver model for PCI/USB/ETH on Intel Galileo board, as well as optimizing the boot time. Boot time performance degradation is observed with the conversion to use dm pci. Intel Quark SoC has a low end x86 processor with only 400MHz frequency and the most time consuming part is with MRC. Each MRC register programming requires indirect access via pci bus. With dm pci, accessing pci configuration space has some overhead. Unfortunately this single access overhead gets accumulated in the whole MRC process, and finally leads to twice boot time (25s) than before (12s). To speed up the boot, create an optimized version of pci config read/write routines without bothering to go through driver model. Now it only takes about 3 seconds to finish MRC, which is really fast (8 times faster than dm pci, or 4 times faster than before). The v2 series add complete PCIe root port and USB host support, which are the last 2 features on the Galileo board to enable. Tested with a Mini-PCIe card (probe only) and a USB flash disk. Simon, I reordered the patches so that the MRC optimizatin patch comes first. If you want to investigate driver model PCI overhead, you need to try the v1 patch series. Changes in v4: - Reorder via 'savedefconfig' - Reorder via 'savedefconfig' Changes in v3: - Change to use dm_pci_read_config32() Changes in v2: - Drop v1 patch: "x86: quark: Make host bridge (b.d.f=0.0.0) visible", as pci_skip_dev() is not needed with the conversion to dm pci. - Drop v1 patch: "dm: pci: Allow skipping device configuration", as full PCIe root port support has been added and there is no need to add such feature at this point. We can still add such capability to dm pci in the future whenever needed. - Reorder to put patch "Optimize MRC execution time" as the first one in v2, as this patch addressed the slow boot time issue which exists before dm pci conversion, although it significantly improves more after dm pci conversion :-) - Move qrk_pci_write_config_dword() and qrk_pci_read_config_dword() to arch/x86/cpu/quark/quark.c - Rewrite this commit's message (ie: not mentioning dm pci conversion) - New patch to avoid chicken and egg problem - New patch to enable PCIe controller on quark/galileo - Remove arch/x86/cpu/quark/pci.c completely - New patch to add USB PHY initialization support - Update commit message to remove "USB not working" statement, as in v2, full USB support has been added. - New patch to add an inline API to test if a device is on a PCI bus - Change to use device_is_on_pci_bus() - New patch to add PCIe/USB static register programming after memory init Bin Meng (11): x86: quark: Optimize MRC execution time x86: quark: Avoid chicken and egg problem x86: Enable PCIe controller on quark/galileo x86: Convert to use driver model pci on quark/galileo x86: quark: Add USB PHY initialization support x86: galileo: Convert to use CONFIG_DM_USB net: designware: Fix build warnings dm: pci: Add an inline API to test if a device is on a PCI bus net: designware: Add support to PCI designware devices x86: Convert to use driver model eth on quark/galileo x86: quark: Add PCIe/USB static register programming after memory init arch/x86/cpu/quark/Makefile | 1 - arch/x86/cpu/quark/msg_port.c | 44 +++---- arch/x86/cpu/quark/pci.c | 70 ----------- arch/x86/cpu/quark/quark.c | 212 +++++++++++++++++++++++++++----- arch/x86/dts/galileo.dts | 8 +- arch/x86/include/asm/arch-quark/quark.h | 107 ++++++++++++++++ board/intel/galileo/galileo.c | 56 +++++++++ configs/galileo_defconfig | 5 +- drivers/net/designware.c | 46 ++++++- drivers/pci/pci-uclass.c | 4 +- include/configs/galileo.h | 13 +- include/pci.h | 15 +++ 12 files changed, 433 insertions(+), 148 deletions(-) delete mode 100644 arch/x86/cpu/quark/pci.c -- 1.8.2.1