From 0ac6b41e70b2df365f8579c6e14214c42ab4c91b Mon Sep 17 00:00:00 2001 From: Eric Biederman Date: Tue, 2 Sep 2003 17:16:48 +0000 Subject: - 1.1.4 Major restructuring of hypertransport handling. Major rewerite of superio/NSC/pc87360 as a proof of concept for handling superio resources dynamically Updates to hard_reset handling when resetting because of the need to change hypertransport link speeds and widths. (a) No longer assume the boot is good just because we get to a hard reset point. (b) Set a flag to indicate that the BIOS triggered the reset so we don't decrement the boot counter. Updates to arima/hdama mptable so it tracks the new bus numbers git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1097 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/mainboard/arima/hdama/mainboard.c | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) (limited to 'src/mainboard/arima/hdama/mainboard.c') diff --git a/src/mainboard/arima/hdama/mainboard.c b/src/mainboard/arima/hdama/mainboard.c index 4f40e393b2..c5812ece3f 100644 --- a/src/mainboard/arima/hdama/mainboard.c +++ b/src/mainboard/arima/hdama/mainboard.c @@ -1,3 +1,4 @@ + #include #include #include @@ -6,6 +7,7 @@ #include #include +#include "../../../northbridge/amd/amdk8/northbridge.h" #include "chip.h" @@ -14,22 +16,27 @@ unsigned long initial_apicid[CONFIG_MAX_CPUS] = 0, 1, }; -static void -enable(struct chip *chip, enum chip_pass pass) -{ - - struct mainboard_arima_hdama_config *conf = - (struct mainboard_arima_hdama_config *)chip->chip_info; - - switch (pass) { - default: break; - case CONF_PASS_PRE_BOOT: - break; - } +static struct device_operations mainboard_operations = { + .read_resources = root_dev_read_resources, + .set_resources = root_dev_set_resources, + .enable_resources = enable_childrens_resources, + .init = 0, + .scan_bus = amdk8_scan_root_bus, + .enable = 0, +}; +static void enumerate(struct chip *chip) +{ + struct chip *child; + dev_root.ops = &mainboard_operations; + chip->dev = &dev_root; + chip->bus = 0; + for(child = chip->children; child; child = child->next) { + child->bus = &dev_root.link[0]; + } } struct chip_control mainboard_arima_hdama_control = { - enable: enable, - name: "Arima HDAMA mainboard " + .enumerate = enumerate, + .name = "Arima HDAMA mainboard ", }; -- cgit v1.2.3