From: Donald White <dbwhite@asu.edu>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Patch to drivers/pci.c
Date: Wed, 21 May 2003 23:30:41 -0700 [thread overview]
Message-ID: <3ECC6E91.7070901@asu.edu> (raw)
Following is a patch to drivers/pci.c. It fixes the calculation of the base address
in pci_hose_config_device().
diff -urN u-boot-0.3.0/drivers/pci.c u-boot-0.3.0-zpc1900/drivers/pci.c
--- u-boot-0.3.0/drivers/pci.c Thu Feb 27 17:19:49 2003
+++ u-boot-0.3.0-zpc1900/drivers/pci.c Tue May 20 20:51:35 2003
@@ -329,9 +329,12 @@
if (bar_response & PCI_BASE_ADDRESS_SPACE)
{
bar_size = ~(bar_response & PCI_BASE_ADDRESS_IO_MASK) + 1;
- bar_value = io;
+ /* round up region base address to a multiple of size */
io = ((io - 1) | (bar_size - 1)) + 1;
+ bar_value = io;
+ /* compute new region base address */
+ io = io + bar_size;
}
else
{
@@ -340,9 +343,12 @@
found_mem64 = 1;
bar_size = ~(bar_response & PCI_BASE_ADDRESS_MEM_MASK) + 1;
- bar_value = mem;
+ /* round up region base address to multiple of size */
mem = ((mem - 1) | (bar_size - 1)) + 1;
+ bar_value = mem;
+ /* compute new region base address */
+ mem = mem + bar_size;
}
/* Write it out and update our limit */
next reply other threads:[~2003-05-22 6:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-22 6:30 Donald White [this message]
2003-05-27 8:42 ` [U-Boot-Users] Patch to drivers/pci.c Wolfgang Denk
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=3ECC6E91.7070901@asu.edu \
--to=dbwhite@asu.edu \
--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 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.