f29f486896393aa808bd123607523aaac505c8d7
[coreboot.git] / src / mainboard / tyan / s2885 / mainboard.c
1 #include <console/console.h>
2 #include <device/device.h>
3 #include <device/pci.h>
4 #include <device/pci_ids.h>
5 #include <device/pci_ops.h>
6 #include "../../../northbridge/amd/amdk8/northbridge.h"
7 #include "chip.h"
8
9 unsigned long initial_apicid[CONFIG_MAX_CPUS] =
10 {
11         0, 1
12 };
13
14 static struct device_operations mainboard_operations = {
15         .read_resources   = root_dev_read_resources,
16         .set_resources    = root_dev_set_resources,
17         .enable_resources = enable_childrens_resources,
18         .init             = 0,
19         .scan_bus         = amdk8_scan_root_bus,
20         .enable           = 0,
21 };
22
23 static void enumerate(struct chip *chip)
24 {
25         struct chip *child;
26
27         if (chip->control && chip->control->name) {
28                 printk_debug("Enumerating: %s\n", chip->control->name);
29         }
30
31         /* update device operation for dynamic root */
32         dev_root.ops = &mainboard_operations;
33         chip->dev = &dev_root;
34         chip->bus = 0;
35         for (child = chip->children; child; child = child->next) {
36                 child->bus = &dev_root.link[0];
37         }
38 }
39
40 struct chip_control mainboard_tyan_s2885_control = {
41         .enumerate = enumerate,
42         .name      = "Tyan s2885 mainboard ",
43 };