public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] pci: restore initialization for DM_PCI
Date: Fri, 22 Jan 2016 16:49:59 +0100	[thread overview]
Message-ID: <20160122154959.GA19357@ulmo.nvidia.com> (raw)
In-Reply-To: <1453419333-3840-1-git-send-email-swarren@wwwdotorg.org>

On Thu, Jan 21, 2016 at 04:35:33PM -0700, Stephen Warren wrote:
> From: Stephen Warren <swarren@nvidia.com>
> 
> PCI controllers should be enumerated at startup so that PCI devices
> such as Ethernet controllers are available at startup. Fix board_init_r()
> not to skip calling pci_init() when CONFIG_DM_PCI is defined, and provide
> an implementation of pci_init() for the DM case.
> 
> Fixes: 96350f729c42 ("dm: tegra: net: Convert tegra boards to driver model
> for Ethernet")
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> ---
> I'm not sure if relying on the side-effects of calling
> uclass_{first,ext}_device is the correct approach; is there a more explicit
> way to probe all PCI controllers?
> 
> Arguably, perhaps we should introduce a "pci start" command instead of
> this change to be consistent with e.g. USB. However, that would be a
> regression relative to earlier versions of U-Boot.

I think a command should work fine. Given that some boards might rely on
the existing behaviour, perhaps this could be controlled via a
configuration option. Another alternative might be to move the call to
pci_init() into board files. Then boards can choose to integrate the new
"pci start" command into their boot commands and remove the pci_init()
call at that point to preserve compatibility.

> ---
>  common/board_r.c         |  2 --
>  drivers/pci/pci-uclass.c | 15 +++++++++++++++
>  2 files changed, 15 insertions(+), 2 deletions(-)

Either way, this change restores network support on Jetson TK1, so

Tested-by: Thierry Reding <treding@nvidia.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160122/2927e641/attachment.sig>

      parent reply	other threads:[~2016-01-22 15:49 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-21 23:35 [U-Boot] [PATCH] pci: restore initialization for DM_PCI Stephen Warren
2016-01-22  0:30 ` Tom Rini
2016-01-22  1:39 ` Bin Meng
2016-01-22  3:36   ` Simon Glass
2016-01-22  3:53     ` Bin Meng
2016-01-22  4:03       ` Simon Glass
2016-01-22  4:06         ` Bin Meng
2016-01-22  4:17           ` Simon Glass
2016-01-22 19:38         ` Stephen Warren
2016-01-22 20:32           ` Simon Glass
2016-01-22 21:48             ` Stephen Warren
2016-01-22 21:50               ` Simon Glass
2016-01-22 21:58                 ` Stephen Warren
2016-01-22 22:00                   ` Simon Glass
2016-01-25 17:11                     ` Stephen Warren
2016-01-26  0:57                       ` Simon Glass
2016-01-24 12:23               ` Bin Meng
2016-01-22 19:35   ` Stephen Warren
2016-01-22 15:49 ` Thierry Reding [this message]

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=20160122154959.GA19357@ulmo.nvidia.com \
    --to=thierry.reding@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox