summaryrefslogtreecommitdiff
path: root/src/northbridge/intel
diff options
context:
space:
mode:
Diffstat (limited to 'src/northbridge/intel')
-rw-r--r--src/northbridge/intel/i855/debug.c56
-rw-r--r--src/northbridge/intel/i855/raminit.c10
-rw-r--r--src/northbridge/intel/i855/raminit.h2
3 files changed, 8 insertions, 60 deletions
diff --git a/src/northbridge/intel/i855/debug.c b/src/northbridge/intel/i855/debug.c
index 40da896589..c353776c12 100644
--- a/src/northbridge/intel/i855/debug.c
+++ b/src/northbridge/intel/i855/debug.c
@@ -18,24 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/*
- * generic K8 debug code, used by mainboard specific romstage.c
- *
- */
-#if 1
-/*
-static void print_debug_pci_dev(unsigned dev)
-{
- print_debug("PCI: ");
- print_debug_hex8((dev >> 16) & 0xff);
- print_debug_char(':');
- print_debug_hex8((dev >> 11) & 0x1f);
- print_debug_char('.');
- print_debug_hex8((dev >> 8) & 7);
-}
-*/
-
-
static void print_debug_pci_dev(unsigned dev)
{
print_debug("PCI: ");
@@ -46,7 +28,7 @@ static void print_debug_pci_dev(unsigned dev)
print_debug_hex8((dev >> 12) & 0x07);
}
-static void print_pci_devices(void)
+static inline void print_pci_devices(void)
{
device_t dev;
for(dev = PCI_DEV(0, 0, 0);
@@ -85,7 +67,7 @@ static void dump_pci_device(unsigned dev)
}
}
-static void dump_pci_devices(void)
+static inline void dump_pci_devices(void)
{
device_t dev;
for(dev = PCI_DEV(0, 0, 0);
@@ -102,7 +84,7 @@ static void dump_pci_devices(void)
}
}
-static void dump_spd_registers(const struct mem_controller *ctrl)
+static inline void dump_spd_registers(const struct mem_controller *ctrl)
{
int i;
print_debug("\n");
@@ -134,37 +116,10 @@ static void dump_spd_registers(const struct mem_controller *ctrl)
}
print_debug("\n");
}
-#if 0
- device = ctrl->channel1[i];
- if (device) {
- int j;
- print_debug("dimm: ");
- print_debug_hex8(i);
- print_debug(".1: ");
- print_debug_hex8(device);
- for(j = 0; j < 256; j++) {
- int status;
- unsigned char byte;
- if ((j & 0xf) == 0) {
- print_debug("\n");
- print_debug_hex8(j);
- print_debug(": ");
- }
- status = smbus_read_byte(device, j);
- if (status < 0) {
- print_debug("bad device\n");
- break;
- }
- byte = status & 0xff;
- print_debug_hex8(byte);
- print_debug_char(' ');
- }
- print_debug("\n");
- }
-#endif
}
}
-static void dump_smbus_registers(void)
+
+static inline void dump_smbus_registers(void)
{
int i;
print_debug("\n");
@@ -194,4 +149,3 @@ static void dump_smbus_registers(void)
print_debug("\n");
}
}
-#endif
diff --git a/src/northbridge/intel/i855/raminit.c b/src/northbridge/intel/i855/raminit.c
index 136266da2c..5d71a27ca1 100644
--- a/src/northbridge/intel/i855/raminit.c
+++ b/src/northbridge/intel/i855/raminit.c
@@ -19,6 +19,7 @@
*/
#include <sdram_mode.h>
+#include <delay.h>
#define dumpnorth() dump_pci_device(PCI_DEV(0, 0, 1))
#define VG85X_MODE (SDRAM_BURST_4 | SDRAM_BURST_INTERLEAVED | SDRAM_CAS_2_5)
@@ -85,20 +86,11 @@ static void spd_set_dram_throttle_control(const struct mem_controller *ctrl)
pci_write_config32(ctrl->d0, 0xa0, dtc_reg);
}
-void udelay(int usecs)
-{
- int i;
- for(i = 0; i < usecs; i++)
- outb(i & 0xff, 0x80);
-}
-
#define delay() udelay(200)
/* if ram still doesn't work do this function */
static void spd_set_undocumented_registers(const struct mem_controller *ctrl)
{
- uint16_t word;
-
/* 0:0.0 */
/*
pci_write_config32(PCI_DEV(0, 0, 0), 0x10, 0xe0000008);
diff --git a/src/northbridge/intel/i855/raminit.h b/src/northbridge/intel/i855/raminit.h
index a312ee511f..dbd0be6927 100644
--- a/src/northbridge/intel/i855/raminit.h
+++ b/src/northbridge/intel/i855/raminit.h
@@ -28,5 +28,7 @@ struct mem_controller {
uint16_t channel0[DIMM_SOCKETS];
};
+void sdram_initialize(int controllers, const struct mem_controller *ctrl);
+
#endif /* RAMINIT_H */