From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcel Ziswiler Date: Wed, 9 Aug 2017 20:20:27 +0000 Subject: [U-Boot] [PATCH v3 4/6] pci: tegra: introduce weak tegra_pcie_board_port_reset() function In-Reply-To: References: <20170809153116.9143-1-marcel@ziswiler.com> <20170809153116.9143-5-marcel@ziswiler.com> Message-ID: <1502310025.27304.19.camel@toradex.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: u-boot@lists.denx.de On Wed, 2017-08-09 at 12:47 -0600, Stephen Warren wrote: > On 08/09/2017 09:31 AM, Marcel Ziswiler wrote: > > From: Marcel Ziswiler > > > > 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/drivers/pci/pci_tegra.c b/drivers/pci/pci_tegra.c > > -static void tegra_pcie_port_reset(struct tegra_pcie_port *port) > > +void tegra_pcie_port_reset(struct tegra_pcie_port *port) > >   { > >    unsigned long ctrl = tegra_pcie_port_get_pex_ctrl(port); > >    unsigned long value; > >    > >    /* pulse reset signel */ > > - value = afi_readl(port->pcie, ctrl); > > + value = afi_readl(((struct tegra_pcie_port *)port)->pcie, > > ctrl); > > You don't need to add these casts any more. Argh, yeah you are right. I could have sworn I double/triple checked it all. Just sent out a v4 with this now.