From f7da69c7a9604389cae544fe9f5d51f4f0847bf0 Mon Sep 17 00:00:00 2001 From: Carl-Daniel Hailfinger Date: Wed, 20 Aug 2008 15:10:23 +0000 Subject: [PATCH] Fix GeodeLX init variables in stage1 to be const. Real global variables have to use the special framework or they won't work. Found by my section correctness checker. Error message was: CHECK stage0 (non-empty .data sections) build/northbridge/amd/geodelx/geodelxinit.o: geode_link_priority_table clock_gating_default Signed-off-by: Carl-Daniel Hailfinger Acked-by: Stefan Reinauer git-svn-id: svn://coreboot.org/repository/coreboot-v3@790 f3766cd6-281f-0410-b1cd-43a5c92072e9 --- northbridge/amd/geodelx/geodelxinit.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/northbridge/amd/geodelx/geodelxinit.c b/northbridge/amd/geodelx/geodelxinit.c index 8bd59f306c..e875d9fbd4 100644 --- a/northbridge/amd/geodelx/geodelxinit.c +++ b/northbridge/amd/geodelx/geodelxinit.c @@ -25,7 +25,7 @@ #include #include "geodelink.h" -static struct msrinit clock_gating_default[] = { +static const struct msrinit clock_gating_default[] = { {GLIU0_GLD_MSR_PM, {.hi = 0x00,.lo = 0x0005}}, {MC_GLD_MSR_PM, {.hi = 0x00,.lo = 0x0001}}, {VG_GLD_MSR_PM, {.hi = 0x00,.lo = 0x0015}}, @@ -41,7 +41,7 @@ static struct msrinit clock_gating_default[] = { }; /** GeodeLink priority table. */ -static struct msrinit geode_link_priority_table[] = { +static const struct msrinit geode_link_priority_table[] = { {CPU_GLD_MSR_CONFIG, {.hi = 0x00,.lo = 0x0220}}, {DF_GLD_MSR_MASTER_CONF, {.hi = 0x00,.lo = 0x0000}}, {VG_GLD_MSR_CONFIG, {.hi = 0x00,.lo = 0x0720}}, @@ -417,7 +417,7 @@ static void GLPCI_init(void) static void clock_gating_init(void) { struct msr msr; - struct msrinit *gating = clock_gating_default; + const struct msrinit *gating = clock_gating_default; for (; gating->msrnum != 0xffffffff; gating++) { msr = rdmsr(gating->msrnum); @@ -433,7 +433,7 @@ static void clock_gating_init(void) static void geode_link_priority(void) { struct msr msr; - struct msrinit *prio = geode_link_priority_table; + const struct msrinit *prio = geode_link_priority_table; for (; prio->msrnum != 0xffffffff; prio++) { msr = rdmsr(prio->msrnum);