summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStefan Reinauer <reinauer@chromium.org>2012-09-07 10:53:56 -0700
committerStefan Reinauer <stefan.reinauer@coreboot.org>2012-11-09 19:03:51 +0100
commit4c8027abdd3492bc0507906ea3109c0420159ae0 (patch)
tree439e321782507057d47a4d6e0582f14f16ce321e /src
parentfa66eaefc2c1ef11e97ae638125f42c3044fe024 (diff)
Make register/value lists const
These can be stored in the code segment, since it's never changed. Change-Id: I8b3827838e08e6cc30678aad36c39249fbca0c38 Signed-off-by: Stefan Reinauer <reinauer@google.com> Reviewed-on: http://review.coreboot.org/1749 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Diffstat (limited to 'src')
-rw-r--r--src/northbridge/intel/sandybridge/gma.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/northbridge/intel/sandybridge/gma.c b/src/northbridge/intel/sandybridge/gma.c
index c2bb2eae21..8c09571139 100644
--- a/src/northbridge/intel/sandybridge/gma.c
+++ b/src/northbridge/intel/sandybridge/gma.c
@@ -32,7 +32,7 @@ struct gt_powermeter {
u32 value;
};
-struct gt_powermeter snb_pm_gt1[] = {
+static const struct gt_powermeter snb_pm_gt1[] = {
{ 0xa200, 0xcc000000 },
{ 0xa204, 0x07000040 },
{ 0xa208, 0x0000fe00 },
@@ -55,7 +55,7 @@ struct gt_powermeter snb_pm_gt1[] = {
{ 0 }
};
-struct gt_powermeter snb_pm_gt2[] = {
+static const struct gt_powermeter snb_pm_gt2[] = {
{ 0xa200, 0x330000a6 },
{ 0xa204, 0x402d0031 },
{ 0xa208, 0x00165f83 },
@@ -78,7 +78,7 @@ struct gt_powermeter snb_pm_gt2[] = {
{ 0 }
};
-struct gt_powermeter ivb_pm_gt1[] = {
+static const struct gt_powermeter ivb_pm_gt1[] = {
{ 0xa800, 0x00000000 },
{ 0xa804, 0x00021c00 },
{ 0xa808, 0x00000403 },
@@ -134,7 +134,7 @@ struct gt_powermeter ivb_pm_gt1[] = {
{ 0 }
};
-struct gt_powermeter ivb_pm_gt2[] = {
+static const struct gt_powermeter ivb_pm_gt2[] = {
{ 0xa800, 0x10000000 },
{ 0xa804, 0x00033800 },
{ 0xa808, 0x00000902 },
@@ -190,7 +190,7 @@ struct gt_powermeter ivb_pm_gt2[] = {
{ 0 }
};
-struct gt_powermeter ivb_pm_gt2_17w[] = {
+static const struct gt_powermeter ivb_pm_gt2_17w[] = {
{ 0xa800, 0x20000000 },
{ 0xa804, 0x000e3800 },
{ 0xa808, 0x00000806 },
@@ -246,7 +246,7 @@ struct gt_powermeter ivb_pm_gt2_17w[] = {
{ 0 }
};
-struct gt_powermeter ivb_pm_gt2_35w[] = {
+static const struct gt_powermeter ivb_pm_gt2_35w[] = {
{ 0xa800, 0x00000000 },
{ 0xa804, 0x00030400 },
{ 0xa808, 0x00000806 },
@@ -338,7 +338,7 @@ static inline void gtt_write(u32 reg, u32 data)
write32(gtt_res->base + reg, data);
}
-static inline void gtt_write_powermeter(struct gt_powermeter *pm)
+static inline void gtt_write_powermeter(const struct gt_powermeter *pm)
{
for (; pm && pm->reg; pm++)
gtt_write(pm->reg, pm->value);