zero warnings days...
[coreboot.git] / src / mainboard / asus / m2v-mx_se / mainboard.c
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2007 Rudolf Marek <r.marek@assembler.cz>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; version 2 of the License.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
18  */
19
20 #include <device/device.h>
21 #include <device/pci.h>
22 #include <device/pci_ids.h>
23 #include <boot/tables.h>
24 #include <southbridge/via/k8t890/k8t890.h>
25 #include "chip.h"
26
27 int add_mainboard_resources(struct lb_memory *mem)
28 {
29         device_t dev;
30
31         dev = dev_find_device(PCI_VENDOR_ID_VIA,
32                               PCI_DEVICE_ID_VIA_K8M890CE_5, 0);
33         if (dev) {
34                 struct resource *res =
35                         find_resource(dev, K8T890_MMCONFIG_MBAR);
36                 if (res)
37                         lb_add_memory_range(mem, LB_MEM_RESERVED, res->base,
38                                             res->size);
39         }
40
41 #if CONFIG_HAVE_ACPI_RESUME == 1
42         lb_add_memory_range(mem, LB_MEM_RESERVED,
43                 CONFIG_RAMBASE, ((CONFIG_RAMTOP) - CONFIG_RAMBASE));
44         lb_add_memory_range(mem, LB_MEM_RESERVED,
45                 CONFIG_DCACHE_RAM_BASE, CONFIG_DCACHE_RAM_SIZE);
46 #endif
47         return 0;
48 }
49
50 struct chip_operations mainboard_ops = {
51         CHIP_NAME("ASUS M2V-MX SE Mainboard")
52 };