mb: Replace MSR addresses with macros
Change-Id: I020431ba8eb61f5ce256088b919c049985331d64 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/29069 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
parent
400ce55566
commit
39db144743
|
@ -16,6 +16,7 @@
|
|||
#include <console/console.h>
|
||||
#include <device/device.h>
|
||||
#include <cpu/x86/msr.h>
|
||||
#include <cpu/amd/msr.h>
|
||||
|
||||
/*************************************************
|
||||
* enable the dedicated function in thatcher board.
|
||||
|
@ -26,18 +27,18 @@ static void mainboard_enable(struct device *dev)
|
|||
|
||||
printk(BIOS_INFO, "Mainboard " CONFIG_MAINBOARD_PART_NUMBER " Enable.\n");
|
||||
|
||||
msr = rdmsr(0xC0011020);
|
||||
msr = rdmsr(LS_CFG_MSR);
|
||||
msr.lo &= ~(1 << 28);
|
||||
wrmsr(0xC0011020, msr);
|
||||
wrmsr(LS_CFG_MSR, msr);
|
||||
|
||||
msr = rdmsr(0xC0011022);
|
||||
msr = rdmsr(DC_CFG_MSR);
|
||||
msr.lo &= ~(1 << 4);
|
||||
msr.lo &= ~(1 << 13);
|
||||
wrmsr(0xC0011022, msr);
|
||||
wrmsr(DC_CFG_MSR, msr);
|
||||
|
||||
msr = rdmsr(0xC0011023);
|
||||
msr = rdmsr(BU_CFG_MSR);
|
||||
msr.lo &= ~(1 << 23);
|
||||
wrmsr(0xC0011023, msr);
|
||||
wrmsr(BU_CFG_MSR, msr);
|
||||
}
|
||||
|
||||
struct chip_operations mainboard_ops = {
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
#include <console/console.h>
|
||||
#include <cpu/x86/msr.h>
|
||||
#include <cpu/amd/msr.h>
|
||||
#include <device/device.h>
|
||||
|
||||
/*************************************************
|
||||
|
@ -26,18 +27,18 @@ static void mainboard_enable(struct device *dev)
|
|||
|
||||
printk(BIOS_INFO, "Mainboard " CONFIG_MAINBOARD_PART_NUMBER " Enable.\n");
|
||||
|
||||
msr = rdmsr(0xC0011020);
|
||||
msr = rdmsr(LS_CFG_MSR);
|
||||
msr.lo &= ~(1 << 28);
|
||||
wrmsr(0xC0011020, msr);
|
||||
wrmsr(LS_CFG_MSR, msr);
|
||||
|
||||
msr = rdmsr(0xC0011022);
|
||||
msr = rdmsr(DC_CFG_MSR);
|
||||
msr.lo &= ~(1 << 4);
|
||||
msr.lo &= ~(1 << 13);
|
||||
wrmsr(0xC0011022, msr);
|
||||
wrmsr(DC_CFG_MSR, msr);
|
||||
|
||||
msr = rdmsr(0xC0011023);
|
||||
msr = rdmsr(BU_CFG_MSR);
|
||||
msr.lo &= ~(1 << 23);
|
||||
wrmsr(0xC0011023, msr);
|
||||
wrmsr(BU_CFG_MSR, msr);
|
||||
}
|
||||
|
||||
struct chip_operations mainboard_ops = {
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
#include <console/console.h>
|
||||
#include <cpu/x86/msr.h>
|
||||
#include <cpu/amd/msr.h>
|
||||
#include <device/device.h>
|
||||
|
||||
/*************************************************
|
||||
|
@ -26,18 +27,18 @@ static void mainboard_enable(struct device *dev)
|
|||
|
||||
printk(BIOS_INFO, "Mainboard " CONFIG_MAINBOARD_PART_NUMBER " Enable.\n");
|
||||
|
||||
msr = rdmsr(0xC0011020);
|
||||
msr = rdmsr(LS_CFG_MSR);
|
||||
msr.lo &= ~(1 << 28);
|
||||
wrmsr(0xC0011020, msr);
|
||||
wrmsr(LS_CFG_MSR, msr);
|
||||
|
||||
msr = rdmsr(0xC0011022);
|
||||
msr = rdmsr(DC_CFG_MSR);
|
||||
msr.lo &= ~(1 << 4);
|
||||
msr.lo &= ~(1 << 13);
|
||||
wrmsr(0xC0011022, msr);
|
||||
wrmsr(DC_CFG_MSR, msr);
|
||||
|
||||
msr = rdmsr(0xC0011023);
|
||||
msr = rdmsr(BU_CFG_MSR);
|
||||
msr.lo &= ~(1 << 23);
|
||||
wrmsr(0xC0011023, msr);
|
||||
wrmsr(BU_CFG_MSR, msr);
|
||||
}
|
||||
|
||||
struct chip_operations mainboard_ops = {
|
||||
|
|
Loading…
Reference in New Issue