[PATCH 025/111] GRPCI: fix target BAR1 initialization
Daniel Hellstrom
daniel at gaisler.com
Thu Feb 26 16:38:27 UTC 2015
---
c/src/lib/libbsp/sparc/shared/pci/grpci.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/c/src/lib/libbsp/sparc/shared/pci/grpci.c b/c/src/lib/libbsp/sparc/shared/pci/grpci.c
index f496405..0b781d3 100644
--- a/c/src/lib/libbsp/sparc/shared/pci/grpci.c
+++ b/c/src/lib/libbsp/sparc/shared/pci/grpci.c
@@ -442,7 +442,7 @@ int grpci_hw_init(struct grpci_priv *priv)
priv->bar1_size = (~(addr & ~0xf)) + 1;
/* and map system RAM at pci address 0x40000000 */
- priv->bar1_pci_adr &= priv->bar1_size - 1; /* Fix alignment of BAR1 */
+ priv->bar1_pci_adr &= ~(priv->bar1_size - 1); /* Fix alignment of BAR1 */
grpci_cfg_w32(host, PCI_BASE_ADDRESS_1, priv->bar1_pci_adr);
priv->regs->page1 = priv->bar1_pci_adr;
--
1.7.0.4
More information about the devel
mailing list