intel/e7501: Remove unused northbridge code
No boards left in the tree for this northbridge. Change-Id: Id45da11b9d78cbd6bd50acb5a3c6c3c270f9020e Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/17281 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
8160a2f63d
commit
f338fa1f31
|
@ -1,4 +0,0 @@
|
|||
config NORTHBRIDGE_INTEL_E7501
|
||||
bool
|
||||
select HAVE_DEBUG_RAM_SETUP
|
||||
select LATE_CBMEM_INIT
|
|
@ -1,5 +0,0 @@
|
|||
ifeq ($(CONFIG_NORTHBRIDGE_INTEL_E7501),y)
|
||||
|
||||
ramstage-y += northbridge.c
|
||||
|
||||
endif
|
|
@ -1,175 +0,0 @@
|
|||
/*
|
||||
* generic debug code, used by mainboard specific romstage.c
|
||||
*
|
||||
*/
|
||||
#if 1
|
||||
static void print_debug_pci_dev(unsigned dev)
|
||||
{
|
||||
printk(BIOS_DEBUG, "PCI: %02x:%02x.%x",
|
||||
(dev >> 16) & 0xff, (dev >> 11) & 0x1f, (dev >> 8) & 7);
|
||||
}
|
||||
|
||||
static inline void print_pci_devices(void)
|
||||
{
|
||||
device_t dev;
|
||||
for (dev = PCI_DEV(0, 0, 0);
|
||||
dev <= PCI_DEV(0xff, 0x1f, 0x7);
|
||||
dev += PCI_DEV(0,0,1)) {
|
||||
uint32_t id;
|
||||
id = pci_read_config32(dev, PCI_VENDOR_ID);
|
||||
if (((id & 0xffff) == 0x0000) || ((id & 0xffff) == 0xffff) ||
|
||||
(((id >> 16) & 0xffff) == 0xffff) ||
|
||||
(((id >> 16) & 0xffff) == 0x0000)) {
|
||||
continue;
|
||||
}
|
||||
print_debug_pci_dev(dev);
|
||||
printk(BIOS_DEBUG, "\n");
|
||||
}
|
||||
}
|
||||
|
||||
static void dump_pci_device(unsigned dev)
|
||||
{
|
||||
int i;
|
||||
print_debug_pci_dev(dev);
|
||||
|
||||
for (i = 0; i < 256; i++) {
|
||||
unsigned char val;
|
||||
if ((i & 0x0f) == 0)
|
||||
printk(BIOS_DEBUG, "\n%02x:",i);
|
||||
val = pci_read_config8(dev, i);
|
||||
printk(BIOS_DEBUG, " %02x", val);
|
||||
}
|
||||
printk(BIOS_DEBUG, "\n");
|
||||
}
|
||||
|
||||
static inline void dump_pci_devices(void)
|
||||
{
|
||||
device_t dev;
|
||||
for (dev = PCI_DEV(0, 0, 0);
|
||||
dev <= PCI_DEV(0xff, 0x1f, 0x7);
|
||||
dev += PCI_DEV(0,0,1)) {
|
||||
uint32_t id;
|
||||
id = pci_read_config32(dev, PCI_VENDOR_ID);
|
||||
if (((id & 0xffff) == 0x0000) || ((id & 0xffff) == 0xffff) ||
|
||||
(((id >> 16) & 0xffff) == 0xffff) ||
|
||||
(((id >> 16) & 0xffff) == 0x0000)) {
|
||||
continue;
|
||||
}
|
||||
dump_pci_device(dev);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void dump_pci_devices_on_bus(unsigned busn)
|
||||
{
|
||||
device_t dev;
|
||||
for (dev = PCI_DEV(busn, 0, 0);
|
||||
dev <= PCI_DEV(busn, 0x1f, 0x7);
|
||||
dev += PCI_DEV(0,0,1)) {
|
||||
uint32_t id;
|
||||
id = pci_read_config32(dev, PCI_VENDOR_ID);
|
||||
if (((id & 0xffff) == 0x0000) || ((id & 0xffff) == 0xffff) ||
|
||||
(((id >> 16) & 0xffff) == 0xffff) ||
|
||||
(((id >> 16) & 0xffff) == 0x0000)) {
|
||||
continue;
|
||||
}
|
||||
dump_pci_device(dev);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void dump_spd_registers(const struct mem_controller *ctrl)
|
||||
{
|
||||
int i;
|
||||
printk(BIOS_DEBUG, "\n");
|
||||
for (i = 0; i < 4; i++) {
|
||||
unsigned device;
|
||||
device = ctrl->channel0[i];
|
||||
if (device) {
|
||||
int j;
|
||||
printk(BIOS_DEBUG, "dimm: %02x.0: %02x", i, device);
|
||||
for (j = 0; j < 128; j++) {
|
||||
int status;
|
||||
unsigned char byte;
|
||||
if ((j & 0xf) == 0)
|
||||
printk(BIOS_DEBUG, "\n%02x: ", j);
|
||||
status = smbus_read_byte(device, j);
|
||||
if (status < 0) {
|
||||
break;
|
||||
}
|
||||
byte = status & 0xff;
|
||||
printk(BIOS_DEBUG, "%02x ", byte);
|
||||
}
|
||||
printk(BIOS_DEBUG, "\n");
|
||||
}
|
||||
device = ctrl->channel1[i];
|
||||
if (device) {
|
||||
int j;
|
||||
printk(BIOS_DEBUG, "dimm: %02x.1: %02x", i, device);
|
||||
for (j = 0; j < 128; j++) {
|
||||
int status;
|
||||
unsigned char byte;
|
||||
if ((j & 0xf) == 0)
|
||||
printk(BIOS_DEBUG, "\n%02x: ", j);
|
||||
status = smbus_read_byte(device, j);
|
||||
if (status < 0) {
|
||||
break;
|
||||
}
|
||||
byte = status & 0xff;
|
||||
printk(BIOS_DEBUG, "%02x ", byte);
|
||||
}
|
||||
printk(BIOS_DEBUG, "\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
static inline void dump_smbus_registers(void)
|
||||
{
|
||||
unsigned device;
|
||||
printk(BIOS_DEBUG, "\n");
|
||||
for (device = 1; device < 0x80; device++) {
|
||||
int j;
|
||||
if ( smbus_read_byte(device, 0) < 0 ) continue;
|
||||
printk(BIOS_DEBUG, "smbus: %02x", device);
|
||||
for (j = 0; j < 256; j++) {
|
||||
int status;
|
||||
unsigned char byte;
|
||||
status = smbus_read_byte(device, j);
|
||||
if (status < 0) {
|
||||
break;
|
||||
}
|
||||
if ((j & 0xf) == 0)
|
||||
printk(BIOS_DEBUG, "\n%02x: ",j);
|
||||
byte = status & 0xff;
|
||||
printk(BIOS_DEBUG, "%02x ", byte);
|
||||
}
|
||||
printk(BIOS_DEBUG, "\n");
|
||||
}
|
||||
}
|
||||
|
||||
static inline void dump_io_resources(unsigned port)
|
||||
{
|
||||
int i;
|
||||
printk(BIOS_DEBUG, "%04x:\n", port);
|
||||
for (i = 0; i < 256; i++) {
|
||||
uint8_t val;
|
||||
if ((i & 0x0f) == 0)
|
||||
printk(BIOS_DEBUG, "%02x:", i);
|
||||
val = inb(port);
|
||||
printk(BIOS_DEBUG, " %02x",val);
|
||||
if ((i & 0x0f) == 0x0f) {
|
||||
printk(BIOS_DEBUG, "\n");
|
||||
}
|
||||
port++;
|
||||
}
|
||||
}
|
||||
|
||||
static inline void dump_mem(unsigned start, unsigned end)
|
||||
{
|
||||
unsigned i;
|
||||
printk(BIOS_DEBUG, "dump_mem:");
|
||||
for (i = start; i < end; i++) {
|
||||
if ((i & 0xf)==0)
|
||||
printk(BIOS_DEBUG, "\n%08x:", i);
|
||||
printk(BIOS_DEBUG, " %02x", (unsigned char)*((unsigned char *)i));
|
||||
}
|
||||
printk(BIOS_DEBUG, "\n");
|
||||
}
|
||||
#endif
|
|
@ -1,80 +0,0 @@
|
|||
/*
|
||||
* This file is part of the coreboot project.
|
||||
*
|
||||
* Copyright (C) 2005 Digital Design Corporation
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
/*
|
||||
* e7501.h: PCI configuration space for the Intel E7501 memory controller
|
||||
*/
|
||||
|
||||
#ifndef NORTHBRIDGE_INTEL_E7501_E7501_H
|
||||
#define NORTHBRIDGE_INTEL_E7501_E7501_H
|
||||
|
||||
/************ D0:F0 ************/
|
||||
// Register offsets
|
||||
#define MAYBE_SMRBASE 0x14 /* System Memory RCOMP Base Address Register, 32 bit? (if similar to 855PM) */
|
||||
#define MCHCFGNS 0x52 /* MCH (scrubber) configuration register, 16 bit */
|
||||
#define DRB_ROW_0 0x60 /* DRAM Row Boundary register, 8 bit */
|
||||
#define DRB_ROW_1 0x61
|
||||
#define DRB_ROW_2 0x62
|
||||
#define DRB_ROW_3 0x63
|
||||
#define DRB_ROW_4 0x64
|
||||
#define DRB_ROW_5 0x65
|
||||
#define DRB_ROW_6 0x66
|
||||
#define DRB_ROW_7 0x67
|
||||
|
||||
#define DRA 0x70 /* DRAM Row Attributes registers, 4 x 8 bit */
|
||||
#define DRT 0x78 /* DRAM Timing register, 32 bit */
|
||||
#define DRC 0x7C /* DRAM Controller Mode register, 32 bit */
|
||||
#define MAYBE_DRDCTL 0x80 /* DRAM Read Timing Control register, 16 bit? (if similar to 855PM) */
|
||||
#define CKDIS 0x8C /* Clock disable register, 8 bit */
|
||||
#define TOLM 0xC4 /* Top of Low Memory register, 16 bit */
|
||||
#define REMAPBASE 0xC6 /* Remap Base Address register, 16 bit */
|
||||
#define REMAPLIMIT 0xC8 /* Remap Limit Address register, 16 bit */
|
||||
#define SKPD 0xDE /* Scratchpad register, 16 bit */
|
||||
#define MAYBE_MCHTST 0xF4 /* MCH Test Register, 32 bit? (if similar to 855PM) */
|
||||
|
||||
// CAS# Latency bits in the DRAM Timing (DRT) register
|
||||
#define DRT_CAS_2_5 (0<<4)
|
||||
#define DRT_CAS_2_0 (1<<4)
|
||||
#define DRT_CAS_MASK (3<<4)
|
||||
|
||||
// Mode Select (SMS) bits in the DRAM Controller Mode (DRC) register
|
||||
#define RAM_COMMAND_NOP (1<<4)
|
||||
#define RAM_COMMAND_PRECHARGE (2<<4)
|
||||
#define RAM_COMMAND_MRS (3<<4)
|
||||
#define RAM_COMMAND_EMRS (4<<4)
|
||||
#define RAM_COMMAND_CBR (6<<4)
|
||||
#define RAM_COMMAND_NORMAL (7<<4)
|
||||
|
||||
|
||||
// RCOMP Memory Map offsets
|
||||
// Conjecture based on apparent similarity between E7501 and 855PM
|
||||
// Intel doc. 252613-003 describes these for 855PM
|
||||
|
||||
#define MAYBE_SMRCTL 0x20 /* System Memory RCOMP Control Register? */
|
||||
#define MAYBE_DQCMDSTR 0x30 /* Strength control for DQ and CMD signal groups? */
|
||||
#define MAYBE_CKESTR 0x31 /* Strength control for CKE signal group? */
|
||||
#define MAYBE_CSBSTR 0x32 /* Strength control for CS# signal group? */
|
||||
#define MAYBE_CKSTR 0x33 /* Strength control for CK signal group? */
|
||||
#define MAYBE_RCVENSTR 0x34 /* Strength control for RCVEnOut# signal group? */
|
||||
|
||||
/************ D0:F1 ************/
|
||||
// Register offsets
|
||||
#define FERR_GLOBAL 0x40 /* First global error register, 32 bits */
|
||||
#define NERR_GLOBAL 0x44 /* Next global error register, 32 bits */
|
||||
#define DRAM_FERR 0x80 /* DRAM first error register, 8 bits */
|
||||
#define DRAM_NERR 0x82 /* DRAM next error register, 8 bits */
|
||||
|
||||
#endif /* NORTHBRIDGE_INTEL_E7501_E7501_H */
|
|
@ -1,140 +0,0 @@
|
|||
#include <console/console.h>
|
||||
#include <arch/io.h>
|
||||
#include <stdint.h>
|
||||
#include <device/device.h>
|
||||
#include <device/pci.h>
|
||||
#include <arch/acpi.h>
|
||||
#include <cpu/cpu.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <cbmem.h>
|
||||
|
||||
#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES)
|
||||
|
||||
unsigned long acpi_fill_mcfg(unsigned long current)
|
||||
{
|
||||
/* Just a dummy */
|
||||
return current;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
static void pci_domain_set_resources(device_t dev)
|
||||
{
|
||||
device_t mc_dev;
|
||||
uint32_t pci_tolm;
|
||||
|
||||
pci_tolm = find_pci_tolm(dev->link_list);
|
||||
mc_dev = dev->link_list->children;
|
||||
if (mc_dev) {
|
||||
/* Figure out which areas are/should be occupied by RAM.
|
||||
* This is all computed in kilobytes and converted to/from
|
||||
* the memory controller right at the edges.
|
||||
* Having different variables in different units is
|
||||
* too confusing to get right. Kilobytes are good up to
|
||||
* 4 Terabytes of RAM...
|
||||
*/
|
||||
uint16_t tolm_r, remapbase_r, remaplimit_r;
|
||||
unsigned long tomk, tolmk;
|
||||
unsigned long remapbasek, remaplimitk;
|
||||
int idx;
|
||||
|
||||
/* Get the value of the highest DRB. This tells the end of
|
||||
* the physical memory. The units are ticks of 64MB
|
||||
* i.e. 1 means 64MB.
|
||||
*/
|
||||
tomk = ((unsigned long)pci_read_config8(mc_dev, 0x67)) << 16;
|
||||
/* Compute the top of Low memory */
|
||||
tolmk = pci_tolm >> 10;
|
||||
if (tolmk >= tomk) {
|
||||
/* The PCI hole does not overlap memory
|
||||
* we won't use the remap window.
|
||||
*/
|
||||
tolmk = tomk;
|
||||
remapbasek = 0x3ff << 16;
|
||||
remaplimitk = 0 << 16;
|
||||
}
|
||||
else {
|
||||
/* The PCI memory hole overlaps memory
|
||||
* setup the remap window.
|
||||
*/
|
||||
/* Find the bottom of the remap window
|
||||
* is it above 4G?
|
||||
*/
|
||||
remapbasek = 4*1024*1024;
|
||||
if (tomk > remapbasek) {
|
||||
remapbasek = tomk;
|
||||
}
|
||||
/* Find the limit of the remap window */
|
||||
remaplimitk = (remapbasek + (4*1024*1024 - tolmk) - (1 << 16));
|
||||
}
|
||||
/* Write the RAM configuration registers,
|
||||
* preserving the reserved bits.
|
||||
*/
|
||||
tolm_r = pci_read_config16(mc_dev, 0xc4);
|
||||
tolm_r = ((tolmk >> 17) << 11) | (tolm_r & 0x7ff);
|
||||
pci_write_config16(mc_dev, 0xc4, tolm_r);
|
||||
|
||||
remapbase_r = pci_read_config16(mc_dev, 0xc6);
|
||||
remapbase_r = (remapbasek >> 16) | (remapbase_r & 0xfc00);
|
||||
pci_write_config16(mc_dev, 0xc6, remapbase_r);
|
||||
|
||||
remaplimit_r = pci_read_config16(mc_dev, 0xc8);
|
||||
remaplimit_r = (remaplimitk >> 16) | (remaplimit_r & 0xfc00);
|
||||
pci_write_config16(mc_dev, 0xc8, remaplimit_r);
|
||||
|
||||
/* Report the memory regions */
|
||||
idx = 10;
|
||||
ram_resource(dev, idx++, 0, 640);
|
||||
ram_resource(dev, idx++, 768, tolmk - 768);
|
||||
if (tomk > 4*1024*1024) {
|
||||
ram_resource(dev, idx++, 4096*1024, tomk - 4*1024*1024);
|
||||
}
|
||||
if (remaplimitk >= remapbasek) {
|
||||
ram_resource(dev, idx++, remapbasek,
|
||||
(remaplimitk + 64*1024) - remapbasek);
|
||||
}
|
||||
|
||||
set_top_of_ram(tolmk * 1024);
|
||||
}
|
||||
assign_resources(dev->link_list);
|
||||
}
|
||||
|
||||
static struct device_operations pci_domain_ops = {
|
||||
.read_resources = pci_domain_read_resources,
|
||||
.set_resources = pci_domain_set_resources,
|
||||
.enable_resources = NULL,
|
||||
.init = NULL,
|
||||
.scan_bus = pci_domain_scan_bus,
|
||||
.ops_pci_bus = pci_bus_default_ops,
|
||||
};
|
||||
|
||||
static void cpu_bus_init(device_t dev)
|
||||
{
|
||||
initialize_cpus(dev->link_list);
|
||||
}
|
||||
|
||||
static struct device_operations cpu_bus_ops = {
|
||||
.read_resources = DEVICE_NOOP,
|
||||
.set_resources = DEVICE_NOOP,
|
||||
.enable_resources = DEVICE_NOOP,
|
||||
.init = cpu_bus_init,
|
||||
.scan_bus = 0,
|
||||
};
|
||||
|
||||
static void enable_dev(struct device *dev)
|
||||
{
|
||||
/* Set the operations if it is a special bus type */
|
||||
if (dev->path.type == DEVICE_PATH_DOMAIN) {
|
||||
dev->ops = &pci_domain_ops;
|
||||
}
|
||||
else if (dev->path.type == DEVICE_PATH_CPU_CLUSTER) {
|
||||
dev->ops = &cpu_bus_ops;
|
||||
}
|
||||
}
|
||||
|
||||
struct chip_operations northbridge_intel_e7501_ops = {
|
||||
CHIP_NAME("Intel E7501 Northbridge")
|
||||
.enable_dev = enable_dev,
|
||||
};
|
File diff suppressed because it is too large
Load Diff
|
@ -1,20 +0,0 @@
|
|||
#ifndef RAMINIT_H
|
||||
#define RAMINIT_H
|
||||
|
||||
#define MAX_DIMM_SOCKETS_PER_CHANNEL 4
|
||||
#define MAX_NUM_CHANNELS 2
|
||||
#define MAX_DIMM_SOCKETS (MAX_NUM_CHANNELS * MAX_DIMM_SOCKETS_PER_CHANNEL)
|
||||
|
||||
struct mem_controller {
|
||||
device_t d0, d0f1; // PCI bus/device/fcns of E7501 memory controller
|
||||
|
||||
// SMBus addresses of DIMM slots for each channel,
|
||||
// in order from closest to MCH to furthest away
|
||||
// 0 == not present
|
||||
uint16_t channel0[MAX_DIMM_SOCKETS_PER_CHANNEL];
|
||||
uint16_t channel1[MAX_DIMM_SOCKETS_PER_CHANNEL];
|
||||
};
|
||||
|
||||
void sdram_initialize(int controllers, const struct mem_controller *ctrl);
|
||||
|
||||
#endif /* RAMINIT_H */
|
|
@ -1,18 +0,0 @@
|
|||
/* Convert to C by yhlu */
|
||||
#define MCH_DRC 0x7c
|
||||
#define DRC_DONE (1 << 29)
|
||||
/* If I have already booted once skip a bunch of initialization */
|
||||
/* To see if I have already booted I check to see if memory
|
||||
* has been enabled.
|
||||
*/
|
||||
static int bios_reset_detected(void) {
|
||||
uint32_t dword;
|
||||
|
||||
dword = pci_read_config32(PCI_DEV(0, 0, 0), MCH_DRC);
|
||||
|
||||
if ( (dword & DRC_DONE) != 0 ) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue