/*
    IODevTable.c, Copyright 1999 (c) by Claudio Jeker,
    Swiss Federal Institute of Technology,
    Computer Engineering and Networks Laboratory.
 
    TOPSY -- A Teachable Operating System.
             Implementation of a tiny and simple
             micro kernel for teaching purposes.
 
    For further information, please visit http://www.tik.ee.ethz.ch/~topsy
 
    This software is provided under the terms of the GNU General Public Licence.
 
    A full copy of the GNU GPL is provided in the file COPYING found in the 
    development root of Topsy.
*/
/*
        File:                  $Source: /home/ruf/cvs_Topsy/cvs/Topsy/IO/ia32/IODevTable.c,v $
        Author(s):             Claudio Jeker
        Affiliation:           ETH Zuerich, TIK
        Version:               $Revision: 2922 $
        Creation Date:         1999/04/08
        Last Date of Change:   $Date: 2007-03-19 17:48:52 +0100 (Mon, 19 Mär 2007) $      by: $Author: baderma $
*/

#include "IO.h"
#include "IODevice.h"
#include "IODevTable.h"

extern IODeviceDesc loopbackDesc;
extern IODeviceDesc ia32ConsDesc;

#ifdef CONFIG_PCI
extern IODevice pciFrameworkDesc;
extern IODeviceDesc am79c970Desc;
extern IODeviceDesc am79c970Desc2;
extern IODeviceDesc am79c97xDesc;
extern IODeviceDesc pciNetPerfTest;

#include "IOPci.h"
#include "IOPciAm79c97x.h"
#include "IOPciAm79c970.h"
#include "IOPciNetPerformanceTest.h"
#endif CONFIG_PCI

struct IODevTableEntry ioDeviceTable[] =
  {
    {
      TTY, TTYA, &ia32ConsDesc, 0
    },
    {LOOP, 1,   &loopbackDesc, 0},
#ifdef CONFIG_PCI
    {
      PCI,
      FRAME,
      &pciFrameworkDesc,
      0
    },
    {
      AM79C970,
      1,
      &am79c970Desc,
      1},
    {
      AM79C970,
      2,
      &am79c970Desc2,
      1},
    //	{AM79C970, 3, &am79c970Desc, 0},
    {
      AM79C97X,
      1,
      &am79c97xDesc,
      0},
    //	{PCI, PERF, &pciNetPerfTest},
#endif
    {
      0,
      0,
      0,
      0
    } /* termination */
  };

#ifdef CONFIG_PCI
/* IO_PCIDEVCOUNT defined in IOPci.h */
//static IOPciDeviceDesc ioPciDeviceTable[IO_PCIDEVCOUNT] = {
IOPciDeviceDesc ioPciDeviceTable[IO_PCIDEVCOUNT] = {
      { PCI_MATCH_VENDORID | PCI_MATCH_DEVICEID, // mask
        (InterruptHandler)am79c97x_interrupt,
        "", // name filled while scanning
        "", // className filled while scanning
        0, // bus
        0, // devfn
        0, // headerType
        0x1022, // vendorID
        0x2000, // deviceID
        0, // revisionID
        0, // classID
        0, // subClassID
        0, // progrInterfaceID
        0, // subsysVendorID
        0, // subsysDeviceID
        /* Rest is automatically filled with 0s */ },

      { PCI_MATCH_VENDORID | PCI_MATCH_DEVICEID, // mask
        (InterruptHandler)am79c970_interrupt,
        "", // name filled while scanning
        "", // className filled while scanning
        0, // bus
        0, // devfn
        0, // headerType
        0x1022, // vendorID
        0x2000, // deviceID
        0, // revisionID
        0, // classID
        0, // subClassID
        0, // progrInterfaceID
        0, // subsysVendorID
        0, // subsysDeviceID
        /* Rest is automatically filled with 0s */ },

      { PCI_MATCH_VENDORID | PCI_MATCH_DEVICEID, // mask
        (InterruptHandler)am79c970_interrupt,
        "", // name filled while scanning
        "", // className filled while scanning
        0, // bus
        0, // devfn
        0, // headerType
        0x1022, // vendorID
        0x2000, // deviceID
        0, // revisionID
        0, // classID
        0, // subClassID
        0, // progrInterfaceID
        0, // subsysVendorID
        0, // subsysDeviceID
        /* Rest is automatically filled with 0s */ }
    };
#endif CONFIG_PCI

