public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 4/6] pci: tegra: introduce weak tegra_pcie_board_port_reset() function
Date: Wed, 9 Aug 2017 08:18:58 +0000	[thread overview]
Message-ID: <1502266736.27304.3.camel@toradex.com> (raw)
In-Reply-To: <e27b76f7-1367-6d2d-dc06-ee69e06020c8@wwwdotorg.org>

On Tue, 2017-08-08 at 10:09 -0600, Stephen Warren wrote:
> On 08/08/2017 06:42 AM, Marcel Ziswiler wrote:
> > From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> > 
> > Introduce a weak tegra_pcie_board_port_reset() function by default
> > calling the existing tegra_pcie_port_reset() function. Additionally
> > add
> > a tegra_pcie_port_index_of_port() function to retrieve the specific
> > PCIe
> > port index if required. This allows overriding the PCIe port reset
> > functionality from board specific code as e.g. required for Apalis
> > T30
> > and Apalis TK1.
> > diff --git a/include/pci_tegra.h b/include/pci_tegra.h
> > +int tegra_pcie_port_index_of_port(void *port);
> > +
> > +void tegra_pcie_port_reset(void *port);
> 
> The parameter to these functions should be "struct tegra_pcie_port 
> *port" for type-safety and to avoid all the casts in the
> implementation. 
> Since this is a pointer, it doesn't matter that the board-level
> callers 
> don't have the full type defined since they don't dereference the 
> pointer, just pass it around. All you need to do is add the following
> to 
> the header before the function prototypes:
> 
> struct tegra_pcie_port;

Yes, thanks. Of course that makes more sense. I will do that in a v3.

  reply	other threads:[~2017-08-09  8:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-08 12:42 [U-Boot] [PATCH v2 0/6] fix apalis-tk1 pcie gigabit ethernet operation Marcel Ziswiler
2017-08-08 12:42 ` [U-Boot] [PATCH v2 1/6] configs: apalis-tk1: fix boot failure using ext4 rootfs Marcel Ziswiler
2017-08-08 12:42 ` [U-Boot] [PATCH v2 2/6] apalis-tk1: add missing as3722 gpio0 configuration Marcel Ziswiler
2017-08-08 12:42 ` [U-Boot] [PATCH v2 3/6] power: as3722: fix ldo_get/set_enable for ldo index bigger than 7 Marcel Ziswiler
2017-08-13 21:35   ` Simon Glass
2017-08-08 12:42 ` [U-Boot] [PATCH v2 4/6] pci: tegra: introduce weak tegra_pcie_board_port_reset() function Marcel Ziswiler
2017-08-08 16:09   ` Stephen Warren
2017-08-09  8:18     ` Marcel Ziswiler [this message]
2017-08-08 12:42 ` [U-Boot] [PATCH v2 5/6] power: as3722: add as3722_ldo_set_voltage signature to header file Marcel Ziswiler
2017-08-08 12:42 ` [U-Boot] [PATCH v2 6/6] apalis-tk1: fix pcie reset for reliable gigabit ethernet operation Marcel Ziswiler

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=1502266736.27304.3.camel@toradex.com \
    --to=marcel.ziswiler@toradex.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