summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2007-07-12 15:56:02 +0000
committerStefan Reinauer <stepan@openbios.org>2007-07-12 15:56:02 +0000
commit6cf687783bc9c54146cf85ce5e526e63ab7047fb (patch)
treef12bed043cff17b88b72d8e867fcdc70eec0fd76
parent3fa1363ee5d7a1400203bd1486f8e80a8cacc992 (diff)
some agami i2c merges
Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2735 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
-rw-r--r--src/mainboard/agami/aruma/Config.lb80
-rw-r--r--src/mainboard/agami/aruma/Options.lb8
-rw-r--r--src/mainboard/agami/aruma/cache_as_ram_auto.c4
-rw-r--r--src/mainboard/agami/aruma/mainboard.c29
4 files changed, 66 insertions, 55 deletions
diff --git a/src/mainboard/agami/aruma/Config.lb b/src/mainboard/agami/aruma/Config.lb
index 2f9b4af7c8..c8cdcd8bd5 100644
--- a/src/mainboard/agami/aruma/Config.lb
+++ b/src/mainboard/agami/aruma/Config.lb
@@ -241,9 +241,7 @@ end
dir /pc80
-if CONFIG_CHIP_NAME
- config chip.h
-end
+config chip.h
# config for agami/aruma
chip northbridge/amd/amdk8/root_complex
@@ -323,42 +321,52 @@ chip northbridge/amd/amdk8/root_complex
device pci 1.1 on end
device pci 1.2 on end
device pci 1.3 on
- chip drivers/generic/generic
- #phillips pca9545 smbus mux
- device i2c 70 on
- # analog_devices adm1026
- chip drivers/generic/generic
- device i2c 2c on end
+ chip drivers/i2c/i2cmux2 # pca9545 smbus mux
+ device i2c 71 on #pca9545 channel0
+ chip drivers/i2c/adm1026
+ device i2c 2d on end
+ end
+ end
+ device i2c 71 on #pca9545 channel1
+ chip drivers/generic/generic # fan board / pstray behind another mux
+ device i2c 2d on end
+ end
+ end
+ end
+ chip drivers/i2c/i2cmux2 # pca9543 smbus mux
+ device i2c 73 on #pca9543 channel0
+ chip drivers/generic/generic #dimm 0-0-0
+ device i2c 50 on end
+ end
+ chip drivers/generic/generic #dimm 0-0-1
+ device i2c 51 on end
+ end
+ chip drivers/generic/generic #dimm 0-1-0
+ device i2c 52 on end
+ end
+ chip drivers/generic/generic #dimm 0-1-1
+ device i2c 53 on end
+ end
+ end
+
+ device i2c 73 on #pca9543 channel1
+ chip drivers/generic/generic #dimm 1-0-0
+ device i2c 50 on end
end
+ chip drivers/generic/generic #dimm 1-0-1
+ device i2c 51 on end
+ end
+ chip drivers/generic/generic #dimm 1-1-0
+ device i2c 52 on end
+ end
+ chip drivers/generic/generic #dimm 1-1-1
+ device i2c 53 on end
+ end
end
- device i2c 70 on end
- device i2c 70 on end
- device i2c 70 on end
+ end # chip end
+ chip drivers/generic/generic # ICS950405AF
+ device i2c 69 on end
end
-# chip drivers/generic/generic #dimm 0-0-0
-# device i2c 50 on end
-# end
-# chip drivers/generic/generic #dimm 0-0-1
-# device i2c 51 on end
-# end
-# chip drivers/generic/generic #dimm 0-1-0
-# device i2c 52 on end
-# end
-# chip drivers/generic/generic #dimm 0-1-1
-# device i2c 53 on end
-# end
-# chip drivers/generic/generic #dimm 1-0-0
-# device i2c 54 on end
-# end
-# chip drivers/generic/generic #dimm 1-0-1
-# device i2c 55 on end
-# end
-# chip drivers/generic/generic #dimm 1-1-0
-# device i2c 56 on end
-# end
-# chip drivers/generic/generic #dimm 1-1-1
-# device i2c 57 on end
-# end
end
device pci 1.5 off end
device pci 1.6 on end
diff --git a/src/mainboard/agami/aruma/Options.lb b/src/mainboard/agami/aruma/Options.lb
index 41d5b0c045..d8eb1b9501 100644
--- a/src/mainboard/agami/aruma/Options.lb
+++ b/src/mainboard/agami/aruma/Options.lb
@@ -93,6 +93,14 @@ default ROM_SIZE=524288
# 256k
default FALLBACK_SIZE=0x40000
+
+##
+## Set this.
+##
+
+default CONFIG_CHIP_NAME=1
+
+
##
## Build code for the fallback boot
##
diff --git a/src/mainboard/agami/aruma/cache_as_ram_auto.c b/src/mainboard/agami/aruma/cache_as_ram_auto.c
index de0d73e2c0..34379b58bd 100644
--- a/src/mainboard/agami/aruma/cache_as_ram_auto.c
+++ b/src/mainboard/agami/aruma/cache_as_ram_auto.c
@@ -257,6 +257,10 @@ void real_main(unsigned long bist, unsigned long cpu_init_detectedx)
memreset_setup();
sdram_initialize(nodes, ctrl);
+ /* Reset SMBus switches to access the ADM1026 */
+ smbus_send_byte(SMBUS_SWITCH1, 0x0);
+ smbus_send_byte(SMBUS_SWITCH2, 0x0);
+
post_cache_as_ram();
}
diff --git a/src/mainboard/agami/aruma/mainboard.c b/src/mainboard/agami/aruma/mainboard.c
index 3a4a42e906..c73761ad65 100644
--- a/src/mainboard/agami/aruma/mainboard.c
+++ b/src/mainboard/agami/aruma/mainboard.c
@@ -97,7 +97,7 @@ static unsigned int scan_root_bus(device_t root, unsigned int max)
}
#endif
-#if 0
+#if 1
static void handle_smbus_error(int value, const char *msg)
{
if (value >= 0) {
@@ -118,7 +118,7 @@ static void handle_smbus_error(int value, const char *msg)
}
}
-#define ADM1026_DEVICE 0x2c /* 0x2e or 0x2d */
+#define ADM1026_DEVICE 0x2d /* 0x2e or 0x2c */
#define ADM1026_REG_CONFIG1 0x00
#define CFG1_MONITOR 0x01
#define CFG1_INT_ENABLE 0x02
@@ -235,7 +235,7 @@ static void verify_cpu_voltages(device_t dev)
cpu_volts, delta);
}
-#define SMBUS_MUX 0x70
+#define SMBUS_MUX 0x71
static void do_verify_cpu_voltages(void)
{
@@ -250,7 +250,7 @@ static void do_verify_cpu_voltages(void)
if (!smbus_dev) {
die("SMBUS controller not found\n");
}
-
+
/* Find the smbus mux */
mux_path.type = DEVICE_PATH_I2C;
mux_path.u.i2c.device = SMBUS_MUX;
@@ -309,31 +309,22 @@ static void mainboard_init(device_t dev)
{
root_dev_init(dev);
- do_verify_cpu_voltages();
+ printk_info("Initializing mainboard components... ");
+ // do_verify_cpu_voltages();
+ printk_info("ok\n");
printk_info("Initializing mainboard specific functions... ");
fixup_aruma();
printk_info("ok\n");
}
-static struct device_operations mainboard_operations = {
- .read_resources = root_dev_read_resources,
- .set_resources = root_dev_set_resources,
- .enable_resources = root_dev_enable_resources,
- .init = mainboard_init,
-#if !DEBUG
- .scan_bus = root_dev_scan_bus,
-#else
- .scan_bus = scan_root_bus,
-#endif
- .enable = 0,
-};
-
static void enable_dev(struct device *dev)
{
- dev->ops = &mainboard_operations;
+ dev->ops->init = mainboard_init;
}
+
struct chip_operations mainboard_agami_aruma_ops = {
+ CHIP_NAME("AGAMI Aruma Mainboard")
.enable_dev = enable_dev,
};