* [U-Boot] [PATCH u-boot-marvell 1/1] pci: pci_mvebu: set BAR0 after memory space is set
@ 2019-08-07 13:01 Marek Behún
2019-08-09 3:51 ` Chris Packham
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Marek Behún @ 2019-08-07 13:01 UTC (permalink / raw)
To: u-boot
The non-DM version of this driver used to set BAR0 register after the
calls to pci_set_region.
I found out that for some strange reason the ath10k driver in kernel
fails to work if this is done the other way around.
I know that Linux's driver should not depend on how U-Boot does things,
but for some strange reason it does and this seems to be the simplest
solution. Fix it since it caused regressions on Omnia.
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Cc: Stefan Roese <sr@denx.de>
Cc: Dirk Eibach <dirk.eibach@gdsys.cc>
Cc: Mario Six <mario.six@gdsys.cc>
Cc: Chris Packham <chris.packham@alliedtelesis.co.nz>
Cc: Phil Sutter <phil@nwl.cc>
Cc: VlaoMao <vlaomao@gmail.com>
---
drivers/pci/pci_mvebu.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/pci/pci_mvebu.c b/drivers/pci/pci_mvebu.c
index e21dc10c2f..f9b08f38a1 100644
--- a/drivers/pci/pci_mvebu.c
+++ b/drivers/pci/pci_mvebu.c
@@ -313,10 +313,6 @@ static int mvebu_pcie_probe(struct udevice *dev)
reg |= BIT(10); /* disable interrupts */
writel(reg, pcie->base + PCIE_CMD_OFF);
- /* Set BAR0 to internal registers */
- writel(SOC_REGS_PHY_BASE, pcie->base + PCIE_BAR_LO_OFF(0));
- writel(0, pcie->base + PCIE_BAR_HI_OFF(0));
-
/* PCI memory space */
pci_set_region(hose->regions + 0, pcie->mem.start,
pcie->mem.start, PCIE_MEM_SIZE, PCI_REGION_MEM);
@@ -326,6 +322,10 @@ static int mvebu_pcie_probe(struct udevice *dev)
PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
hose->region_count = 2;
+ /* Set BAR0 to internal registers */
+ writel(SOC_REGS_PHY_BASE, pcie->base + PCIE_BAR_LO_OFF(0));
+ writel(0, pcie->base + PCIE_BAR_HI_OFF(0));
+
bus++;
return 0;
--
2.21.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH u-boot-marvell 1/1] pci: pci_mvebu: set BAR0 after memory space is set
2019-08-07 13:01 [U-Boot] [PATCH u-boot-marvell 1/1] pci: pci_mvebu: set BAR0 after memory space is set Marek Behún
@ 2019-08-09 3:51 ` Chris Packham
2019-08-09 8:57 ` Stefan Roese
2019-08-12 12:03 ` Stefan Roese
2 siblings, 0 replies; 4+ messages in thread
From: Chris Packham @ 2019-08-09 3:51 UTC (permalink / raw)
To: u-boot
Hi Marek,
On Thu, Aug 8, 2019 at 1:02 AM Marek Behún <marek.behun@nic.cz> wrote:
>
> The non-DM version of this driver used to set BAR0 register after the
> calls to pci_set_region.
> I found out that for some strange reason the ath10k driver in kernel
> fails to work if this is done the other way around.
> I know that Linux's driver should not depend on how U-Boot does things,
> but for some strange reason it does and this seems to be the simplest
> solution. Fix it since it caused regressions on Omnia.
>
> Signed-off-by: Marek Behún <marek.behun@nic.cz>
> Cc: Stefan Roese <sr@denx.de>
> Cc: Dirk Eibach <dirk.eibach@gdsys.cc>
> Cc: Mario Six <mario.six@gdsys.cc>
> Cc: Chris Packham <chris.packham@alliedtelesis.co.nz>
> Cc: Phil Sutter <phil@nwl.cc>
> Cc: VlaoMao <vlaomao@gmail.com>
Tested-by: Chris Packham <judge.packham@gmail.com>
> ---
> drivers/pci/pci_mvebu.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/pci/pci_mvebu.c b/drivers/pci/pci_mvebu.c
> index e21dc10c2f..f9b08f38a1 100644
> --- a/drivers/pci/pci_mvebu.c
> +++ b/drivers/pci/pci_mvebu.c
> @@ -313,10 +313,6 @@ static int mvebu_pcie_probe(struct udevice *dev)
> reg |= BIT(10); /* disable interrupts */
> writel(reg, pcie->base + PCIE_CMD_OFF);
>
> - /* Set BAR0 to internal registers */
> - writel(SOC_REGS_PHY_BASE, pcie->base + PCIE_BAR_LO_OFF(0));
> - writel(0, pcie->base + PCIE_BAR_HI_OFF(0));
> -
> /* PCI memory space */
> pci_set_region(hose->regions + 0, pcie->mem.start,
> pcie->mem.start, PCIE_MEM_SIZE, PCI_REGION_MEM);
> @@ -326,6 +322,10 @@ static int mvebu_pcie_probe(struct udevice *dev)
> PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
> hose->region_count = 2;
>
> + /* Set BAR0 to internal registers */
> + writel(SOC_REGS_PHY_BASE, pcie->base + PCIE_BAR_LO_OFF(0));
> + writel(0, pcie->base + PCIE_BAR_HI_OFF(0));
> +
> bus++;
>
> return 0;
> --
> 2.21.0
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH u-boot-marvell 1/1] pci: pci_mvebu: set BAR0 after memory space is set
2019-08-07 13:01 [U-Boot] [PATCH u-boot-marvell 1/1] pci: pci_mvebu: set BAR0 after memory space is set Marek Behún
2019-08-09 3:51 ` Chris Packham
@ 2019-08-09 8:57 ` Stefan Roese
2019-08-12 12:03 ` Stefan Roese
2 siblings, 0 replies; 4+ messages in thread
From: Stefan Roese @ 2019-08-09 8:57 UTC (permalink / raw)
To: u-boot
On 07.08.19 15:01, Marek Behún wrote:
> The non-DM version of this driver used to set BAR0 register after the
> calls to pci_set_region.
> I found out that for some strange reason the ath10k driver in kernel
> fails to work if this is done the other way around.
> I know that Linux's driver should not depend on how U-Boot does things,
> but for some strange reason it does and this seems to be the simplest
> solution. Fix it since it caused regressions on Omnia.
>
> Signed-off-by: Marek Behún <marek.behun@nic.cz>
> Cc: Stefan Roese <sr@denx.de>
> Cc: Dirk Eibach <dirk.eibach@gdsys.cc>
> Cc: Mario Six <mario.six@gdsys.cc>
> Cc: Chris Packham <chris.packham@alliedtelesis.co.nz>
> Cc: Phil Sutter <phil@nwl.cc>
> Cc: VlaoMao <vlaomao@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Thanks,
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH u-boot-marvell 1/1] pci: pci_mvebu: set BAR0 after memory space is set
2019-08-07 13:01 [U-Boot] [PATCH u-boot-marvell 1/1] pci: pci_mvebu: set BAR0 after memory space is set Marek Behún
2019-08-09 3:51 ` Chris Packham
2019-08-09 8:57 ` Stefan Roese
@ 2019-08-12 12:03 ` Stefan Roese
2 siblings, 0 replies; 4+ messages in thread
From: Stefan Roese @ 2019-08-12 12:03 UTC (permalink / raw)
To: u-boot
On 07.08.19 15:01, Marek Behún wrote:
> The non-DM version of this driver used to set BAR0 register after the
> calls to pci_set_region.
> I found out that for some strange reason the ath10k driver in kernel
> fails to work if this is done the other way around.
> I know that Linux's driver should not depend on how U-Boot does things,
> but for some strange reason it does and this seems to be the simplest
> solution. Fix it since it caused regressions on Omnia.
>
> Signed-off-by: Marek Behún <marek.behun@nic.cz>
> Cc: Stefan Roese <sr@denx.de>
> Cc: Dirk Eibach <dirk.eibach@gdsys.cc>
> Cc: Mario Six <mario.six@gdsys.cc>
> Cc: Chris Packham <chris.packham@alliedtelesis.co.nz>
> Cc: Phil Sutter <phil@nwl.cc>
> Cc: VlaoMao <vlaomao@gmail.com>
Applied to:
u-boot-marvell/master.
Thanks,
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-08-12 12:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-07 13:01 [U-Boot] [PATCH u-boot-marvell 1/1] pci: pci_mvebu: set BAR0 after memory space is set Marek Behún
2019-08-09 3:51 ` Chris Packham
2019-08-09 8:57 ` Stefan Roese
2019-08-12 12:03 ` Stefan Roese
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.