linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL] PCI: tegra: Changes for v4.8-rc1
@ 2016-07-01 15:00 Thierry Reding
  2016-07-26 20:06 ` Bjorn Helgaas
  2016-07-26 20:08 ` Bjorn Helgaas
  0 siblings, 2 replies; 5+ messages in thread
From: Thierry Reding @ 2016-07-01 15:00 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-pci, linux-tegra

Hi Bjorn,

The following changes since commit 1a695a905c18548062509178b98bc91e67510864:

  Linux 4.7-rc1 (2016-05-29 09:29:24 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git tags/tegra-for-4.8-pci

for you to fetch changes up to 0f32700faed919946e21e9d1dc4d74ae8f1b1226:

  PCI: tegra: Correctly program PADS_REFCLK_CFG* registers (2016-06-30 15:30:16 +0200)

There's a minor conflict between this and your pci/host-request-windows
branch, let me know if you'd like me to rebase on top of that.

Thierry

----------------------------------------------------------------
PCI: tegra: Changes for v4.8-rc1

A couple of cleanups and preparation work for 64-bit ARM support, as
well as fixes for writing the PADS_REFCLK_CFG* registers.

----------------------------------------------------------------
Stephen Warren (2):
      PCI: tegra: Actually program PADS_REFCLK_CFG* on recent SoCs
      PCI: tegra: Correctly program PADS_REFCLK_CFG* registers

Thierry Reding (3):
      PCI: tegra: Make register definitions consistent
      PCI: tegra: Use pci_remap_iospace()
      PCI: tegra: Stop setting pcibios_min_mem

 drivers/pci/host/pci-tegra.c | 54 ++++++++++++++++++++------------------------
 1 file changed, 25 insertions(+), 29 deletions(-)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [GIT PULL] PCI: tegra: Changes for v4.8-rc1
  2016-07-01 15:00 [GIT PULL] PCI: tegra: Changes for v4.8-rc1 Thierry Reding
@ 2016-07-26 20:06 ` Bjorn Helgaas
  2016-07-28 14:18   ` Thierry Reding
  2016-07-26 20:08 ` Bjorn Helgaas
  1 sibling, 1 reply; 5+ messages in thread
From: Bjorn Helgaas @ 2016-07-26 20:06 UTC (permalink / raw)
  To: Thierry Reding; +Cc: Bjorn Helgaas, linux-pci, linux-tegra

On Fri, Jul 01, 2016 at 05:00:56PM +0200, Thierry Reding wrote:
> Hi Bjorn,
> 
> The following changes since commit 1a695a905c18548062509178b98bc91e67510864:
> 
>   Linux 4.7-rc1 (2016-05-29 09:29:24 -0700)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git tags/tegra-for-4.8-pci
> 
> for you to fetch changes up to 0f32700faed919946e21e9d1dc4d74ae8f1b1226:
> 
>   PCI: tegra: Correctly program PADS_REFCLK_CFG* registers (2016-06-30 15:30:16 +0200)
> 
> There's a minor conflict between this and your pci/host-request-windows
> branch, let me know if you'd like me to rebase on top of that.
> 
> Thierry
> 
> ----------------------------------------------------------------
> PCI: tegra: Changes for v4.8-rc1
> 
> A couple of cleanups and preparation work for 64-bit ARM support, as
> well as fixes for writing the PADS_REFCLK_CFG* registers.
> 
> ----------------------------------------------------------------
> Stephen Warren (2):
>       PCI: tegra: Actually program PADS_REFCLK_CFG* on recent SoCs

I don't see this patch on the list.  I'll attach it below for
completeness.

I don't think the original changelog is quite right; I don't see
tegra_xusb_phy_enable() being involved at all.  I replaced it with the
following:

    PCI: tegra: Program PADS_REFCLK_CFG* always, not just on legacy SoCs
    
    tegra_pcie_phy_power_on() calls tegra_pcie_phy_enable() only for legacy
    SoCs.  However, part of tegra_pcie_phy_enable() needs to happen in all
    cases.  Move that code up one level into tegra_pcie_phy_power_on().


Here's the original commit from your git tree:

commit 0ad9be61b5af
Author: Stephen Warren <swarren@nvidia.com>
Date:   Fri Jun 24 08:37:03 2016 -0600

    PCI: tegra: Actually program PADS_REFCLK_CFG* on recent SoCs
    
    On recent SoCs, tegra_pcie_phy_enable() isn't called; but instead
    tegra_pcie_enable_controller() calls tegra_xusb_phy_enable(). However,
    part of tegra_pcie_phy_enable() needs to happen in all cases. Move that
    code up one level into tegra_pcie_phy_power_on().
    
    Signed-off-by: Stephen Warren <swarren@nvidia.com>
    Reviewed-by: Simon Glass <sjg@chromium.org>
    Signed-off-by: Thierry Reding <treding@nvidia.com>

diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
index bbf77a4..8cac1a0 100644
--- a/drivers/pci/host/pci-tegra.c
+++ b/drivers/pci/host/pci-tegra.c
@@ -838,12 +838,6 @@ static int tegra_pcie_phy_enable(struct tegra_pcie *pcie)
 	value |= PADS_PLL_CTL_RST_B4SM;
 	pads_writel(pcie, value, soc->pads_pll_ctl);
 
-	/* Configure the reference clock driver */
-	value = PADS_REFCLK_CFG_VALUE | (PADS_REFCLK_CFG_VALUE << 16);
-	pads_writel(pcie, value, PADS_REFCLK_CFG0);
-	if (soc->num_ports > 2)
-		pads_writel(pcie, PADS_REFCLK_CFG_VALUE, PADS_REFCLK_CFG1);
-
 	/* wait for the PLL to lock */
 	err = tegra_pcie_pll_wait(pcie, 500);
 	if (err < 0) {
@@ -927,7 +921,9 @@ static int tegra_pcie_port_phy_power_off(struct tegra_pcie_port *port)
 
 static int tegra_pcie_phy_power_on(struct tegra_pcie *pcie)
 {
+	const struct tegra_pcie_soc_data *soc = pcie->soc_data;
 	struct tegra_pcie_port *port;
+	u32 value;
 	int err;
 
 	if (pcie->legacy_phy) {
@@ -952,6 +948,13 @@ static int tegra_pcie_phy_power_on(struct tegra_pcie *pcie)
 		}
 	}
 
+	/* Configure the reference clock driver */
+	value = PADS_REFCLK_CFG_VALUE | (PADS_REFCLK_CFG_VALUE << 16);
+	pads_writel(pcie, value, PADS_REFCLK_CFG0);
+
+	if (soc->num_ports > 2)
+		pads_writel(pcie, PADS_REFCLK_CFG_VALUE, PADS_REFCLK_CFG1);
+
 	return 0;
 }
 

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [GIT PULL] PCI: tegra: Changes for v4.8-rc1
  2016-07-01 15:00 [GIT PULL] PCI: tegra: Changes for v4.8-rc1 Thierry Reding
  2016-07-26 20:06 ` Bjorn Helgaas
@ 2016-07-26 20:08 ` Bjorn Helgaas
  1 sibling, 0 replies; 5+ messages in thread
From: Bjorn Helgaas @ 2016-07-26 20:08 UTC (permalink / raw)
  To: Thierry Reding; +Cc: Bjorn Helgaas, linux-pci, linux-tegra

On Fri, Jul 01, 2016 at 05:00:56PM +0200, Thierry Reding wrote:
> Hi Bjorn,
> 
> The following changes since commit 1a695a905c18548062509178b98bc91e67510864:
> 
>   Linux 4.7-rc1 (2016-05-29 09:29:24 -0700)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git tags/tegra-for-4.8-pci
> 
> for you to fetch changes up to 0f32700faed919946e21e9d1dc4d74ae8f1b1226:
> 
>   PCI: tegra: Correctly program PADS_REFCLK_CFG* registers (2016-06-30 15:30:16 +0200)
> 
> There's a minor conflict between this and your pci/host-request-windows
> branch, let me know if you'd like me to rebase on top of that.
> 
> Thierry
> 
> ----------------------------------------------------------------
> PCI: tegra: Changes for v4.8-rc1
> 
> A couple of cleanups and preparation work for 64-bit ARM support, as
> well as fixes for writing the PADS_REFCLK_CFG* registers.
> 
> ----------------------------------------------------------------
> Stephen Warren (2):
>       PCI: tegra: Actually program PADS_REFCLK_CFG* on recent SoCs
>       PCI: tegra: Correctly program PADS_REFCLK_CFG* registers
> 
> Thierry Reding (3):
>       PCI: tegra: Make register definitions consistent
>       PCI: tegra: Use pci_remap_iospace()
>       PCI: tegra: Stop setting pcibios_min_mem

I applied these with the changelog updates I mentioned to
pci/host-tegra for v4.8, thanks!

Bjorn

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [GIT PULL] PCI: tegra: Changes for v4.8-rc1
  2016-07-26 20:06 ` Bjorn Helgaas
@ 2016-07-28 14:18   ` Thierry Reding
  2016-07-28 15:59     ` Stephen Warren
  0 siblings, 1 reply; 5+ messages in thread
From: Thierry Reding @ 2016-07-28 14:18 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: Bjorn Helgaas, linux-pci, linux-tegra

[-- Attachment #1: Type: text/plain, Size: 2872 bytes --]

On Tue, Jul 26, 2016 at 03:06:41PM -0500, Bjorn Helgaas wrote:
> On Fri, Jul 01, 2016 at 05:00:56PM +0200, Thierry Reding wrote:
> > Hi Bjorn,
> > 
> > The following changes since commit 1a695a905c18548062509178b98bc91e67510864:
> > 
> >   Linux 4.7-rc1 (2016-05-29 09:29:24 -0700)
> > 
> > are available in the git repository at:
> > 
> >   git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git tags/tegra-for-4.8-pci
> > 
> > for you to fetch changes up to 0f32700faed919946e21e9d1dc4d74ae8f1b1226:
> > 
> >   PCI: tegra: Correctly program PADS_REFCLK_CFG* registers (2016-06-30 15:30:16 +0200)
> > 
> > There's a minor conflict between this and your pci/host-request-windows
> > branch, let me know if you'd like me to rebase on top of that.
> > 
> > Thierry
> > 
> > ----------------------------------------------------------------
> > PCI: tegra: Changes for v4.8-rc1
> > 
> > A couple of cleanups and preparation work for 64-bit ARM support, as
> > well as fixes for writing the PADS_REFCLK_CFG* registers.
> > 
> > ----------------------------------------------------------------
> > Stephen Warren (2):
> >       PCI: tegra: Actually program PADS_REFCLK_CFG* on recent SoCs
> 
> I don't see this patch on the list.  I'll attach it below for
> completeness.
> 
> I don't think the original changelog is quite right; I don't see
> tegra_xusb_phy_enable() being involved at all.  I replaced it with the
> following:
> 
>     PCI: tegra: Program PADS_REFCLK_CFG* always, not just on legacy SoCs
>     
>     tegra_pcie_phy_power_on() calls tegra_pcie_phy_enable() only for legacy
>     SoCs.  However, part of tegra_pcie_phy_enable() needs to happen in all
>     cases.  Move that code up one level into tegra_pcie_phy_power_on().
> 
> 
> Here's the original commit from your git tree:
> 
> commit 0ad9be61b5af
> Author: Stephen Warren <swarren@nvidia.com>
> Date:   Fri Jun 24 08:37:03 2016 -0600
> 
>     PCI: tegra: Actually program PADS_REFCLK_CFG* on recent SoCs
>     
>     On recent SoCs, tegra_pcie_phy_enable() isn't called; but instead
>     tegra_pcie_enable_controller() calls tegra_xusb_phy_enable(). However,
>     part of tegra_pcie_phy_enable() needs to happen in all cases. Move that
>     code up one level into tegra_pcie_phy_power_on().
>     
>     Signed-off-by: Stephen Warren <swarren@nvidia.com>
>     Reviewed-by: Simon Glass <sjg@chromium.org>
>     Signed-off-by: Thierry Reding <treding@nvidia.com>

Yeah, that's fine. Thanks. FWIW, the reason why you don't see this on
the list is probably because it is the same patch that was merged into
U-Boot a few days earlier, which is also the reason why the commit
message isn't quite right. I thought I had sanitized it, but evidently
had missed the function name change.

Thanks for picking this up anyway,
Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [GIT PULL] PCI: tegra: Changes for v4.8-rc1
  2016-07-28 14:18   ` Thierry Reding
@ 2016-07-28 15:59     ` Stephen Warren
  0 siblings, 0 replies; 5+ messages in thread
From: Stephen Warren @ 2016-07-28 15:59 UTC (permalink / raw)
  To: Thierry Reding, Bjorn Helgaas; +Cc: Bjorn Helgaas, linux-pci, linux-tegra

On 07/28/2016 08:18 AM, Thierry Reding wrote:
> On Tue, Jul 26, 2016 at 03:06:41PM -0500, Bjorn Helgaas wrote:
>> On Fri, Jul 01, 2016 at 05:00:56PM +0200, Thierry Reding wrote:
>>> Hi Bjorn,
>>>
>>> The following changes since commit 1a695a905c18548062509178b98bc91e67510864:
>>>
>>>   Linux 4.7-rc1 (2016-05-29 09:29:24 -0700)
>>>
>>> are available in the git repository at:
>>>
>>>   git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git tags/tegra-for-4.8-pci
>>>
>>> for you to fetch changes up to 0f32700faed919946e21e9d1dc4d74ae8f1b1226:
>>>
>>>   PCI: tegra: Correctly program PADS_REFCLK_CFG* registers (2016-06-30 15:30:16 +0200)
>>>
>>> There's a minor conflict between this and your pci/host-request-windows
>>> branch, let me know if you'd like me to rebase on top of that.
>>>
>>> Thierry
>>>
>>> ----------------------------------------------------------------
>>> PCI: tegra: Changes for v4.8-rc1
>>>
>>> A couple of cleanups and preparation work for 64-bit ARM support, as
>>> well as fixes for writing the PADS_REFCLK_CFG* registers.
>>>
>>> ----------------------------------------------------------------
>>> Stephen Warren (2):
>>>       PCI: tegra: Actually program PADS_REFCLK_CFG* on recent SoCs
>>
>> I don't see this patch on the list.  I'll attach it below for
>> completeness.
>>
>> I don't think the original changelog is quite right; I don't see
>> tegra_xusb_phy_enable() being involved at all.  I replaced it with the
>> following:
>>
>>     PCI: tegra: Program PADS_REFCLK_CFG* always, not just on legacy SoCs
>>
>>     tegra_pcie_phy_power_on() calls tegra_pcie_phy_enable() only for legacy
>>     SoCs.  However, part of tegra_pcie_phy_enable() needs to happen in all
>>     cases.  Move that code up one level into tegra_pcie_phy_power_on().
>>
>>
>> Here's the original commit from your git tree:
>>
>> commit 0ad9be61b5af
>> Author: Stephen Warren <swarren@nvidia.com>
>> Date:   Fri Jun 24 08:37:03 2016 -0600
>>
>>     PCI: tegra: Actually program PADS_REFCLK_CFG* on recent SoCs
>>
>>     On recent SoCs, tegra_pcie_phy_enable() isn't called; but instead
>>     tegra_pcie_enable_controller() calls tegra_xusb_phy_enable(). However,
>>     part of tegra_pcie_phy_enable() needs to happen in all cases. Move that
>>     code up one level into tegra_pcie_phy_power_on().
>>
>>     Signed-off-by: Stephen Warren <swarren@nvidia.com>
>>     Reviewed-by: Simon Glass <sjg@chromium.org>
>>     Signed-off-by: Thierry Reding <treding@nvidia.com>
>
> Yeah, that's fine. Thanks. FWIW, the reason why you don't see this on
> the list is probably because it is the same patch that was merged into
> U-Boot a few days earlier, which is also the reason why the commit
> message isn't quite right. I thought I had sanitized it, but evidently
> had missed the function name change.

Oops. Looks like I sent it to the Tegra and ARM mailing lists and forgot 
the PCI mailing list:-( Sorry.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-07-28 15:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-01 15:00 [GIT PULL] PCI: tegra: Changes for v4.8-rc1 Thierry Reding
2016-07-26 20:06 ` Bjorn Helgaas
2016-07-28 14:18   ` Thierry Reding
2016-07-28 15:59     ` Stephen Warren
2016-07-26 20:08 ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).