Author: hailfinger Date: 2008-08-20 17:10:23 +0200 (Wed, 20 Aug 2008) New Revision: 790
Modified: coreboot-v3/northbridge/amd/geodelx/geodelxinit.c Log: 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 c-d.hailfinger.devel.2006@gmx.net Acked-by: Stefan Reinauer stepan@coresystems.de
Modified: coreboot-v3/northbridge/amd/geodelx/geodelxinit.c =================================================================== --- coreboot-v3/northbridge/amd/geodelx/geodelxinit.c 2008-08-18 21:11:05 UTC (rev 789) +++ coreboot-v3/northbridge/amd/geodelx/geodelxinit.c 2008-08-20 15:10:23 UTC (rev 790) @@ -25,7 +25,7 @@ #include <amd_geodelx.h> #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 @@ };
/** 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 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 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);