Changeset a8e1959 in rtems


Ignore:
Timestamp:
May 4, 2005, 7:38:49 PM (16 years ago)
Author:
Jennifer Averett <Jennifer.Averett@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
b3b6c41
Parents:
548ed3f
Message:

2005-05-04 Jennifer Averett <jennifer.averett@…>

  • libchip/network/dec21140.c, libchip/network/elnk.c: Consolidation of code as a result of the implementation of a common PCI interface.
Location:
c/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • c/src/ChangeLog

    r548ed3f ra8e1959  
     12005-05-04      Jennifer Averett <jennifer.averett@oarcorp.com>
     2
     3        * libchip/network/dec21140.c, libchip/network/elnk.c: Consolidation
     4        of code as a result of the implementation of a common PCI interface.
     5
    162005-05-04      Joel Sherrill <joel@OARcorp.com>
    27
  • c/src/libchip/network/dec21140.c

    r548ed3f ra8e1959  
    4949  #define DEC21140_SUPPORTED
    5050#endif
    51 
    5251#if defined(__PPC__) && (defined(mpc604) || defined(mpc750) || defined(mpc603e))
    5352  #define DEC21140_SUPPORTED
     
    5756#include <bsp.h>
    5857#include <rtems/pci.h>
    59 #if defined(__i386__)
    60 #include <pcibios.h>
    61 #endif
     58
    6259#if defined(__PPC__)
    6360#include <libcpu/byteorder.h>
     
    10121009   unsigned char cvalue;
    10131010#if defined(__i386__)
    1014    int          signature;
    10151011   unsigned int value;
    10161012   unsigned char interrupt;
     
    10501046        /* the 21143 chip must be enabled before it can be accessed */
    10511047#if defined(__i386__)
    1052         signature =  PCIB_DEVSIG_MAKE( pbus, pdev, pfun );
    1053         pcib_conf_write32( signature, 0x40, 0 );
     1048        pci_write_config_dword(pbus, pdev, pfun, 0x40, 0 );
    10541049#else
    10551050        pci_write_config_dword(pbus, pdev, pfun, 0x40, PCI_DEVICE_ID_DEC_21143);
     
    10681063   }
    10691064#endif
    1070 
    1071 #if defined(__i386__)
    1072    signature =  PCIB_DEVSIG_MAKE( pbus, pdev, pfun );
    1073 #endif
    1074 
    1075 
    10761065
    10771066   if ((unitNumber < 1) || (unitNumber > NDECDRIVER))
     
    11071096#if defined(__i386__)
    11081097
    1109    pcib_conf_read32(signature, 16, &value);
     1098   pci_read_config_dword(pbus, pdev, pfun, 16, &value);
    11101099   sc->port = value & ~IO_MASK;
    11111100
    1112    pcib_conf_read32(signature, 20, &value);
     1101   pci_read_config_dword(pbus, pdev, pfun, 20, &value);
    11131102   if (_CPU_is_paging_enabled())
    11141103      _CPU_map_phys_address((void **) &(sc->base),
     
    11191108      sc->base = (unsigned int *)(value & ~MEM_MASK);
    11201109
    1121    pcib_conf_read8(signature, 60, &interrupt);
     1110   pci_read_config_byte(pbus, pdev, pfun, 60, &interrupt);
    11221111   cvalue = interrupt;
    11231112#endif
     
    11541143   */
    11551144
    1156 #if defined(__PPC__)
    11571145   pci_write_config_word(pbus, pdev, pfun,
    1158 #endif
    1159 #if defined(__i386__)
    1160    pcib_conf_write16(signature,
    1161 #endif
    11621146      PCI_COMMAND,
    11631147      (uint16_t) ( PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER ) );
  • c/src/libchip/network/elnk.c

    r548ed3f ra8e1959  
    8484#if defined(ELNK_SUPPORTED)
    8585#include <bsp.h>
    86 #if defined(__i386__)
    87 #include <pcibios.h>
    88 #endif
     86#include <rtems/pci.h>
     87
    8988#if defined(__PPC__)
    90 #include <bsp/pci.h>
    9189#include <libcpu/byteorder.h>
    9290#include <libcpu/io.h>
     
    31393137   int          pbus, pdev, pfun;
    31403138#if defined(__i386__)
    3141    int          signature;
    31423139   unsigned int   value;
    31433140   unsigned char  interrupt;
     
    32493246      pdev = sysboards[unitNumber-1].pdev;
    32503247      pfun = sysboards[unitNumber-1].pfun;
    3251 #if defined(__i386__)
    3252       signature = PCIB_DEVSIG_MAKE(pbus,pdev,pfun);
    3253 #endif
    32543248   }
    32553249
     
    33193313
    33203314#if defined(__i386__)
    3321    pcib_conf_read32(signature, 16, &value);
     3315   pci_read_config_dword(pbus, pdev, pfun, 16, &value);
    33223316   sc->ioaddr = value & ~IO_MASK;
    33233317
    3324    pcib_conf_read8(signature, 60, &interrupt);
     3318   pci_read_config_byte(pbus, pdev, pfun, 60, &interrupt);
    33253319   cvalue = interrupt;
    33263320#endif
     
    33703364         chip only. */
    33713365#if defined(__i386__)
    3372       pcib_conf_read8(signature, 0x0d, &pci_latency);
     3366      pci_read_config_byte(pbus, pdev, pfun, 0x0d, &pci_latency);
    33733367#endif
    33743368#if defined(__PPC__)
     
    33793373         printk("etherlink : unit elnk%d Overriding PCI latency, timer (CFLT) setting of %d, new value is %d.\n", sc->xl_unit, pci_latency, new_latency );
    33803374#if defined(__i386__)
    3381          pcib_conf_write8(signature, 0x0d, new_latency);
     3375         pci_write_config_byte(pbus, pdev, pfun, 0x0d, new_latency);
    33823376#endif
    33833377#if defined(__PPC__)
Note: See TracChangeset for help on using the changeset viewer.