Patchwork [03/16] Port persimmon r6574 to e350m1: MMCONF size

login
register
about
Submitter mbuschman@lucidmachines.com
Date 2011-06-04 06:10:31
Message ID <1307167844-13392-3-git-send-email-mbuschman@lucidmachines.com>
Download mbox | patch
Permalink /patch/3024/
State Accepted
Commit r6623
Headers show

Comments

mbuschman@lucidmachines.com - 2011-06-04 06:10:31
From: Scott Duplichan <scott@notabs.org>

Size mmconf according to CONFIG_MMCONF_BUS_NUMBER.

Signed-off-by: Marshall Buschman <mbuschman@lucidmachines.com>
---
 src/mainboard/asrock/e350m1/agesawrapper.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Patch

diff --git a/src/mainboard/asrock/e350m1/agesawrapper.c b/src/mainboard/asrock/e350m1/agesawrapper.c
index e946a3b..4e3819a 100644
--- a/src/mainboard/asrock/e350m1/agesawrapper.c
+++ b/src/mainboard/asrock/e350m1/agesawrapper.c
@@ -138,7 +138,8 @@  agesawrapper_amdinitmmio (
    Set the MMIO Configuration Base Address and Bus Range onto MMIO configuration base
    Address MSR register.
   */
-  MsrReg = CONFIG_MMCONF_BASE_ADDRESS | (8 << 2) | 1;
+
+  MsrReg = CONFIG_MMCONF_BASE_ADDRESS | (LibAmdBitScanReverse (CONFIG_MMCONF_BUS_NUMBER) << 2) | 1;
   LibAmdMsrWrite (0xC0010058, &MsrReg, &StdHeader);
   
   /*