summaryrefslogtreecommitdiff
path: root/src/mainboard/amd/dbm690t
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2009-02-12 13:39:36 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2009-02-12 13:39:36 +0000
commit6a208781b4c199a5673ab8429cccf32bee39112f (patch)
tree95d13930a60f23d4482a7fa3b7d9083f5cba7a7d /src/mainboard/amd/dbm690t
parent7dde1da9a7cbedcdd6d75a935c04f09f9b7cdc4c (diff)
downloadcoreboot-6a208781b4c199a5673ab8429cccf32bee39112f.tar.xz
Improve mainboard.c comments for DBM690T and Pistachio.
Fix reference to documentation. Use __FUNCTION__ instead of hardcoding function names in printk messages. No functional changes. I'm slowly getting to the point where adding another RS690 board is really easy and needs almost no changes to the existing target. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Myles Watson <mylesgw@gmail.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3938 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/mainboard/amd/dbm690t')
-rw-r--r--src/mainboard/amd/dbm690t/mainboard.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/mainboard/amd/dbm690t/mainboard.c b/src/mainboard/amd/dbm690t/mainboard.c
index b6493205bf..5a33efe756 100644
--- a/src/mainboard/amd/dbm690t/mainboard.c
+++ b/src/mainboard/amd/dbm690t/mainboard.c
@@ -49,8 +49,8 @@ unsigned long uma_memory_start, uma_memory_size;
/********************************************************
* dbm690t uses a BCM5789 as on-board NIC.
* It has a pin named LOW_POWER to enable it into LOW POWER state.
-* In order to run NIC, we should let it out of Low power state. This pin
-* is controlled by sb600 GPM3.
+* In order to run NIC, we should let it out of Low power state. This pin is
+* controlled by sb600 GPM3.
* RRG4.2.3 GPM as GPIO
* GPM pins can be used as GPIO. The GPM I/O functions is controlled by three registers:
* I/O C50, C51, C52, PM I/O94, 95, 96.
@@ -63,22 +63,27 @@ static void enable_onboard_nic()
printk_info("enable_onboard_nic.\n");
- outb(0x13, 0xC50);
+ /* set index register 0C50h to 13h (miscellaneous control) */
+ outb(0x13, 0xC50); /* CMIndex */
+ /* set CM data register 0C51h bits [7:6] to 01b to set Input/Out control */
byte = inb(0xC51);
byte &= 0x3F;
byte |= 0x40;
outb(byte, 0xC51);
+ /* set GPM port 0C52h bit 3 to 0 to enable output for GPM3 */
byte = inb(0xC52);
byte &= ~0x8;
outb(byte, 0xC52);
+ /* set CM data register 0C51h bits [7:6] to 10b to set Output state control */
byte = inb(0xC51);
byte &= 0x3F;
byte |= 0x80; /* 7:6=10 */
outb(byte, 0xC51);
+ /* set GPM port 0C52h bit 3 to 0 to output 0 on GPM3 */
byte = inb(0xC52);
byte &= ~0x8;
outb(byte, 0xC52);
@@ -204,15 +209,13 @@ void dbm690t_enable(device_t dev)
/* TOP_MEM: the top of DRAM below 4G */
msr = rdmsr(TOP_MEM);
- printk_info
- ("dbm690t_enable, TOP MEM: msr.lo = 0x%08x, msr.hi = 0x%08x\n",
- msr.lo, msr.hi);
+ printk_info("%s, TOP MEM: msr.lo = 0x%08x, msr.hi = 0x%08x\n",
+ __FUNCTION__, msr.lo, msr.hi);
/* TOP_MEM2: the top of DRAM above 4G */
msr2 = rdmsr(TOP_MEM2);
- printk_info
- ("dbm690t_enable, TOP MEM2: msr2.lo = 0x%08x, msr2.hi = 0x%08x\n",
- msr2.lo, msr2.hi);
+ printk_info("%s, TOP MEM2: msr2.lo = 0x%08x, msr2.hi = 0x%08x\n",
+ __FUNCTION__, msr2.lo, msr2.hi);
switch (msr.lo) {
case 0x10000000: /* 256M system memory */
@@ -233,8 +236,8 @@ void dbm690t_enable(device_t dev)
}
uma_memory_start = msr.lo - uma_memory_size; /* TOP_MEM1 */
- printk_info("dbm690t_enable: uma size 0x%08x, memory start 0x%08x\n",
- uma_memory_size, uma_memory_start);
+ printk_info("%s: uma size 0x%08x, memory start 0x%08x\n",
+ __FUNCTION__, uma_memory_size, uma_memory_start);
/* TODO: TOP_MEM2 */
#else