2007-06-21 01:45:44 +02:00
|
|
|
/*
|
2008-01-18 11:35:56 +01:00
|
|
|
* This file is part of the coreboot project.
|
2007-06-21 01:45:44 +02:00
|
|
|
*
|
|
|
|
* Copyright (C) 2007 Advanced Micro Devices
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2013-02-20 13:21:20 +01:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2007-06-21 01:45:44 +02:00
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2013-02-23 18:37:27 +01:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
2007-06-21 01:45:44 +02:00
|
|
|
*/
|
|
|
|
|
2006-07-28 18:06:16 +02:00
|
|
|
#include <console/console.h>
|
|
|
|
#include <device/device.h>
|
|
|
|
#include <device/pci.h>
|
|
|
|
#include <device/pci_ids.h>
|
|
|
|
#include <device/pci_ops.h>
|
|
|
|
#include <arch/io.h>
|
2006-09-19 21:30:11 +02:00
|
|
|
#include <cpu/x86/msr.h>
|
|
|
|
#include <cpu/amd/lxdef.h>
|
2010-09-25 18:17:20 +02:00
|
|
|
#include "southbridge/amd/cs5536/cs5536.h"
|
2006-07-28 18:06:16 +02:00
|
|
|
|
2010-04-07 04:30:57 +02:00
|
|
|
static void init_gpio(void)
|
2006-08-03 18:48:18 +02:00
|
|
|
{
|
2006-09-19 21:30:11 +02:00
|
|
|
msr_t msr;
|
2010-03-22 12:42:32 +01:00
|
|
|
printk(BIOS_DEBUG, "Checking GPIO module...\n");
|
2006-09-19 21:30:11 +02:00
|
|
|
|
2007-06-21 01:45:44 +02:00
|
|
|
msr = rdmsr(MDD_LBAR_GPIO);
|
2010-03-22 12:42:32 +01:00
|
|
|
printk(BIOS_DEBUG, "DIVIL_LBAR_GPIO set to 0x%08x 0x%08x\n", msr.hi, msr.lo);
|
2006-09-19 21:30:11 +02:00
|
|
|
}
|
2006-07-28 18:06:16 +02:00
|
|
|
|
2006-09-19 21:30:11 +02:00
|
|
|
static void init(struct device *dev)
|
|
|
|
{
|
|
|
|
// BOARD-SPECIFIC INIT
|
2010-03-22 12:42:32 +01:00
|
|
|
printk(BIOS_DEBUG, "ARTECGROUP DBE61 ENTER %s\n", __func__);
|
2006-07-28 18:06:16 +02:00
|
|
|
|
2006-09-19 21:30:11 +02:00
|
|
|
init_gpio();
|
2006-08-03 18:48:18 +02:00
|
|
|
|
2010-03-22 12:42:32 +01:00
|
|
|
printk(BIOS_DEBUG, "ARTECGROUP DBE61 EXIT %s\n", __func__);
|
2006-07-28 18:06:16 +02:00
|
|
|
}
|
|
|
|
|
2013-02-23 21:31:23 +01:00
|
|
|
static void mainboard_enable(struct device *dev)
|
2006-07-28 18:06:16 +02:00
|
|
|
{
|
|
|
|
dev->ops->init = init;
|
|
|
|
}
|
|
|
|
|
2009-02-18 21:41:57 +01:00
|
|
|
struct chip_operations mainboard_ops = {
|
2013-02-23 21:31:23 +01:00
|
|
|
.enable_dev = mainboard_enable,
|
2006-07-28 18:06:16 +02:00
|
|
|
};
|