mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
multiple links. The way this was done in v2 was a big confusing; this way is less so. The changes are easy. Getting them right has been hard :-) First, for a k8 north that has three links, you can name each one as follows: pci0@18,0 pci1@18,0 pci2@18,0 We have to have the same pcidevfn on these because that is how the k8 works. But the unit numbers (pci0, pci1, etc.) distinguish them. The dts will properly generate a "v3 device code" compatible static tree that puts the links in the right place in the data structure. The changes to dts are trivial. As before, dts nodes with children are understood to be a bridge. But what if there is a dts entry like this: pci1@18,0 {/config/("northbridge/amd/k8/pci");}; This entry has no children in the dts. How does dt compiler know it is a bridge? It can not know unless we add information to the dts for that northbridge part. To ensure that all bridge devices are detected, we support the following: if a dts node for a device has a bridge property, e.g.: { device_operations = "k8_ops"; bridge; }; The dt compiler will treat it as a bridge whether it has children or not. Why would a device not have children? Because it might be attached to a pci or other socket, and we don't know at build time if the socket is empty, or what might be in the socket. This code has been tested on dbe62 and k8 simnow, and works on each. It is minimal in size and it does what we need. I hope it resolves our discussion for now. We might want to improve or change the device code later but, at this point, forward motion is important -- I'm on a deadline for a very important demo Oct. 22! Also included in this patch are new debug prints in k8 north. Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> git-svn-id: svn://coreboot.org/repository/coreboot-v3@865 f3766cd6-281f-0410-b1cd-43a5c92072e9
81 lines
2.7 KiB
C
81 lines
2.7 KiB
C
/*
|
|
* This file is part of the coreboot project.
|
|
*
|
|
* Copyright (C) 2007 Advanced Micro Devices, Inc.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*
|
|
* 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.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*/
|
|
|
|
#include <pirq_routing.h>
|
|
|
|
/* Number of slots and devices in the PIR table */
|
|
#define SLOT_COUNT 4
|
|
|
|
/* Platform IRQs */
|
|
#define PIRQA 10
|
|
#define PIRQB 11
|
|
#define PIRQC 10
|
|
#define PIRQD 11
|
|
|
|
/* Map */
|
|
#define M_PIRQA (1 << PIRQA) /* Bitmap of supported IRQs */
|
|
#define M_PIRQB (1 << PIRQB) /* Bitmap of supported IRQs */
|
|
#define M_PIRQC (1 << PIRQC) /* Bitmap of supported IRQs */
|
|
#define M_PIRQD (1 << PIRQD) /* Bitmap of supported IRQs */
|
|
|
|
/* Link */
|
|
#define L_PIRQA 1 /* Means Slot INTx# Connects To Chipset INTA# */
|
|
#define L_PIRQB 2 /* Means Slot INTx# Connects To Chipset INTB# */
|
|
#define L_PIRQC 3 /* Means Slot INTx# Connects To Chipset INTC# */
|
|
#define L_PIRQD 4 /* Means Slot INTx# Connects To Chipset INTD# */
|
|
|
|
/*
|
|
* AMD DB800 interrupt wiring.
|
|
*
|
|
* Devices are:
|
|
*
|
|
* FIXME
|
|
*
|
|
*/
|
|
|
|
const struct irq_routing_table intel_irq_routing_table = {
|
|
PIRQ_SIGNATURE,
|
|
PIRQ_VERSION,
|
|
32 + 16 * SLOT_COUNT, /* Max. number of devices on the bus */
|
|
0x00, /* Where the interrupt router lies (bus) */
|
|
(0x0F << 3) | 0x0, /* Where the interrupt router lies (dev) */
|
|
0x00, /* IRQs devoted exclusively to PCI usage */
|
|
0x100B, /* Vendor */
|
|
0x002B, /* Device */
|
|
0, /* Crap (miniport) */
|
|
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, /* u8 rfu[11] */
|
|
0x00, /* Checksum */
|
|
{
|
|
/* If you change the number of entries, change IRQ_SLOT_COUNT above! */
|
|
|
|
/* bus, dev|fn, {link, bitmap}, {link, bitmap}, {link, bitmap}, {link, bitmap}, slot, rfu */
|
|
|
|
/* CPU */
|
|
{0x00, (0x01 << 3) | 0x0, {{L_PIRQA, M_PIRQA}, {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00}}, 0x0, 0x0},
|
|
|
|
/* Chipset slots -- f.3 wires to B, and f.4 and f.5 wires to D. */
|
|
{0x00, (0x0F << 3) | 0x0, {{L_PIRQA, M_PIRQA}, {L_PIRQB, M_PIRQB}, {L_PIRQC, M_PIRQC}, {L_PIRQD, M_PIRQD}}, 0x0, 0x0},
|
|
|
|
/* On-board ethernet */
|
|
{0x00, (0x0D << 3) | 0x0, {{L_PIRQB, M_PIRQB}, {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00}}, 0x0, 0x0},
|
|
|
|
/* PCI (slot 1) */
|
|
{0x00, (0x0E << 3) | 0x0, {{L_PIRQC, M_PIRQC}, {L_PIRQD, M_PIRQD}, {L_PIRQA, M_PIRQA}, {L_PIRQB, M_PIRQB}}, 0x1, 0x0},
|
|
}
|
|
};
|