public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Kumar Gala <galak@kernel.crashing.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] fdt: Fix fdt_pci_dma_ranges handling of 64-bit ranges
Date: Wed,  5 Aug 2009 09:03:54 -0500	[thread overview]
Message-ID: <1249481034-21936-1-git-send-email-galak@kernel.crashing.org> (raw)

If the size of a region equal to 4G it can't be represnted in a 32-bit
BAR so we should have marked that case as MEM64.

Additionally bump the number of inbound windows up to 4 to handle the
fact that Freescale PPCs that have an implicit window for CCSRBAR.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
 common/fdt_support.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/fdt_support.c b/common/fdt_support.c
index fc077e8..89164a1 100644
--- a/common/fdt_support.c
+++ b/common/fdt_support.c
@@ -625,7 +625,7 @@ int fdt_resize(void *blob)
 }
 
 #ifdef CONFIG_PCI
-#define CONFIG_SYS_PCI_NR_INBOUND_WIN 3
+#define CONFIG_SYS_PCI_NR_INBOUND_WIN 4
 
 #define FDT_PCI_PREFETCH	(0x40000000)
 #define FDT_PCI_MEM32		(0x02000000)
@@ -655,7 +655,7 @@ int fdt_pci_dma_ranges(void *blob, int phb_off, struct pci_controller *hose) {
 		size = (u64)hose->regions[r].size;
 
 		dma_range[0] = 0;
-		if (size > 0x100000000ull)
+		if (size >= 0x100000000ull)
 			dma_range[0] |= FDT_PCI_MEM64;
 		else
 			dma_range[0] |= FDT_PCI_MEM32;
-- 
1.6.0.6

             reply	other threads:[~2009-08-05 14:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-05 14:03 Kumar Gala [this message]
2009-08-07 13:31 ` [U-Boot] [PATCH] fdt: Fix fdt_pci_dma_ranges handling of 64-bit ranges Kumar Gala
2009-08-09 21:28 ` Wolfgang Denk
2009-08-09 22:54   ` Jerry Van Baren

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=1249481034-21936-1-git-send-email-galak@kernel.crashing.org \
    --to=galak@kernel.crashing.org \
    --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