Files
system76-coreboot/src/mainboard/asus/f2a85-m/mainboard.c
Elyes HAOUAS 02b05d1f6b mb/asus: Get rid of device_t
Use of device_t has been abandoned in ramstage.

Change-Id: I8fe817bb514c69a647c2208a0573a2c5fe98722d
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/26076
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-05-09 13:14:37 +00:00

46 lines
1.2 KiB
C

/*
* This file is part of the coreboot project.
*
* Copyright (C) 2012 Advanced Micro Devices, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <console/console.h>
#include <cpu/x86/msr.h>
#include <device/device.h>
/*************************************************
* enable the dedicated function in thatcher board.
*************************************************/
static void mainboard_enable(struct device *dev)
{
msr_t msr;
printk(BIOS_INFO, "Mainboard " CONFIG_MAINBOARD_PART_NUMBER " Enable.\n");
msr = rdmsr(0xC0011020);
msr.lo &= ~(1 << 28);
wrmsr(0xC0011020, msr);
msr = rdmsr(0xC0011022);
msr.lo &= ~(1 << 4);
msr.lo &= ~(1 << 13);
wrmsr(0xC0011022, msr);
msr = rdmsr(0xC0011023);
msr.lo &= ~(1 << 23);
wrmsr(0xC0011023, msr);
}
struct chip_operations mainboard_ops = {
.enable_dev = mainboard_enable,
};