All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bin Meng <bmeng.cn@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 00/11] x86: quark: Convert to driver model
Date: Thu,  3 Sep 2015 05:37:22 -0700	[thread overview]
Message-ID: <1441283853-30868-1-git-send-email-bmeng.cn@gmail.com> (raw)

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

             reply	other threads:[~2015-09-03 12:37 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-03 12:37 Bin Meng [this message]
2015-09-03 12:37 ` [U-Boot] [PATCH v4 01/11] x86: quark: Optimize MRC execution time Bin Meng
2015-09-04  0:45   ` Simon Glass
2015-09-03 12:37 ` [U-Boot] [PATCH v4 02/11] x86: quark: Avoid chicken and egg problem Bin Meng
2015-09-04  0:45   ` Simon Glass
2015-09-03 12:37 ` [U-Boot] [PATCH v4 03/11] x86: Enable PCIe controller on quark/galileo Bin Meng
2015-09-04  0:46   ` Simon Glass
2015-09-03 12:37 ` [U-Boot] [PATCH v4 04/11] x86: Convert to use driver model pci " Bin Meng
2015-09-04  0:46   ` Simon Glass
2015-09-03 12:37 ` [U-Boot] [PATCH v4 05/11] x86: quark: Add USB PHY initialization support Bin Meng
2015-09-04  0:46   ` Simon Glass
2015-09-03 12:37 ` [U-Boot] [PATCH v4 06/11] x86: galileo: Convert to use CONFIG_DM_USB Bin Meng
2015-09-04  0:46   ` Simon Glass
2015-09-03 12:37 ` [U-Boot] [PATCH v4 07/11] net: designware: Fix build warnings Bin Meng
2015-09-04  0:46   ` Simon Glass
2015-09-03 12:37 ` [U-Boot] [PATCH v4 08/11] dm: pci: Add an inline API to test if a device is on a PCI bus Bin Meng
2015-09-10  3:58   ` Simon Glass
2015-09-10 20:41     ` Simon Glass
2015-09-11 10:24       ` Bin Meng
2015-09-03 12:37 ` [U-Boot] [PATCH v4 09/11] net: designware: Add support to PCI designware devices Bin Meng
2015-09-04  0:43   ` Simon Glass
2015-09-04  0:49     ` Bin Meng
2015-09-03 12:37 ` [U-Boot] [PATCH v4 10/11] x86: Convert to use driver model eth on quark/galileo Bin Meng
2015-09-03 12:37 ` [U-Boot] [PATCH v4 11/11] x86: quark: Add PCIe/USB static register programming after memory init Bin Meng
2015-09-10  3:58   ` Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1441283853-30868-1-git-send-email-bmeng.cn@gmail.com \
    --to=bmeng.cn@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.