Changeset 1f018e4 in libbsdport


Ignore:
Timestamp:
Apr 23, 2009, 4:31:42 AM (10 years ago)
Author:
Till Straumann <strauman@…>
Branches:
master
Children:
b2b1e46
Parents:
c1a7644
Message:
  • added le32enc()
  • added definition of PCIR_CACHELNSZ
  • added definition of PCIM_CMD_MWRICEN
  • added pci_get_revid()
  • moved mii_mediachg() macro-stub to libbsdport_post.h
  • added definition for 'bootverbose'
File:
1 edited

Legend:

Unmodified
Added
Removed
  • bsd_eth_drivers/libbsdport/libbsdport.h

    rc1a7644 r1f018e4  
    129129#endif
    130130
     131static __inline void
     132le32enc(void *pp, uint32_t u)
     133{
     134  unsigned char *p = (unsigned char *)pp;
     135
     136  p[0] = u & 0xff;
     137  p[1] = (u >> 8) & 0xff;
     138  p[2] = (u >> 16) & 0xff;
     139  p[3] = (u >> 24) & 0xff;
     140}
     141
    131142#include <mutex.h>
    132143#include <callout.h>
     
    176187#endif
    177188
     189#ifndef PCIR_CACHELNSZ
     190#define PCIR_CACHELNSZ PCI_CACHE_LINE_SIZE
     191#endif
     192
    178193#ifndef PCIM_PSTAT_PME
    179194#define PCIM_PSTAT_PME       0x8000
     
    182197#ifndef PCIM_PSTAT_PMEENABLE
    183198#define PCIM_PSTAT_PMEENABLE 0x0100
     199#endif
     200
     201#ifndef PCIM_CMD_MWRICEN
     202#define PCIM_CMD_MWRICEN PCI_COMMAND_INVALIDATE
    184203#endif
    185204
     
    258277{
    259278        return pci_read_config(dev, PCIR_SUBDEV_0, 2);
     279}
     280
     281static inline uint8_t
     282pci_get_revid(device_t dev)
     283{
     284  return pci_read_config(dev, PCIR_REVID, 1);
    260285}
    261286
     
    363388#define MODULE_DEPEND(x1,x2,x3,x4,x5)
    364389
    365 #define mii_mediachg(mii) do {} while (0)
    366 
    367390void *
    368391real_libc_malloc(size_t);
     
    371394real_libc_free(void*);
    372395
    373 #endif
     396extern int libbsdport_bootverbose;
     397/* Try not to pollute global namespace */
     398#define bootverbose libbsdport_bootverbose
     399
     400#endif
Note: See TracChangeset for help on using the changeset viewer.