/*
* PReP pci functions.
* Originally by Gary Thomas
* rewritten and updated by Cort Dougan (cort@cs.nmt.edu)
*
* The motherboard routes/maps will disappear shortly. -- Cort
*/
#include <linux/types.h>
#include <linux/pci.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <asm/sections.h>
#include <asm/byteorder.h>
#include <asm/io.h>
#include <asm/ptrace.h>
#include <asm/prom.h>
#include <asm/pci-bridge.h>
#include <asm/residual.h>
#include <asm/irq.h>
#include <asm/machdep.h>
#include <asm/open_pic.h>
extern void (*setup_ibm_pci)(char *irq_lo, char *irq_hi);
/* Which PCI interrupt line does a given device [slot] use? */
/* Note: This really should be two dimensional based in slot/pin used */
static unsigned char *Motherboard_map;
unsigned char *Motherboard_map_name;
/* How is the 82378 PIRQ mapping setup? */
static unsigned char *Motherboard_routes;
static void (*Motherboard_non0)(struct pci_dev *);
static void Powerplus_Map_Non0(struct pci_dev *);
/* Used for Motorola to store system config register */
static unsigned long *ProcInfo;
/* Tables for known hardware */
/* Motorola PowerStackII - Utah */
static char Utah_pci_IRQ_map[23] =
{
0, /* Slot 0 - unused */
0, /* Slot 1 - unused */
5, /* Slot 2 - SCSI - NCR825A */
0, /* Slot 3 - unused */
3, /* Slot 4 - Ethernet - DEC2114x */
0, /* Slot 5 - unused */
2, /* Slot 6 - PCI Card slot #1 */
3, /* Slot 7 - PCI Card slot #2 */
5, /* Slot 8 - PCI Card slot #3 */
5, /* Slot 9 - PCI Bridge */
/* added here in case we ever support PCI bridges */
/* Secondary PCI bus cards are at slot-9,6 & slot-9,7 */
0, /* Slot 10 - unused */
0, /* Slot 11 - unused */
5, /* Slot 12 - SCSI - NCR825A */
0, /* Slot 13 - unused */
3, /* Slot 14 - enet */
0, /* Slot 15 - unused */
2, /* Slot 16 - unused */
3, /* Slot 17 - unused */
5, /* Slot 18 - unused */
0, /* Slot 19 - unused */
0, /* Slot 20 - unused */
0, /* Slot 21 - unused */
0, /* Slot 22 - unused */
};
static char Utah_pci_IRQ_routes[] =
{
0, /* Line 0 - Unused */
9, /* Line 1 */
10, /* Line 2 */
11, /* Line 3 */
14, /* Line 4 */
15, /* Line 5 */
};
/* Motorola PowerStackII - Omaha */
/* no integrated SCSI or ethernet */
static char Omaha_pci_IRQ_map[23] =
{
0, /* Slot 0 - unused */
0, /* Slot 1 - unused */
3,