linux-old/include/asm-parisc/hardware.h
<<
>>
Prefs
   1#ifndef _PARISC_HP_MACHINES_H_ 
   2#define _PARISC_HP_MACHINES_H_ 
   3
   4struct hp_hardware {
   5        unsigned short hw_type:5;               /* HPHW_xxx */
   6        unsigned short hversion;
   7        unsigned long  sversion:28;
   8        unsigned short opt;
   9        char *name; 
  10};
  11
  12struct hp_device {
  13        unsigned short hw_type:5;       /* HPHW_xxx */
  14        unsigned short hversion;        /* HP-UX uses  hv_model:12 */
  15        unsigned int   sversion;        /* HP-UX uses sv_model:20 sv_opt:8 */
  16        unsigned short opt;
  17        unsigned int hversion_rev;
  18        unsigned int sversion_rev;
  19        struct hp_hardware * reference;  /* This is a pointer to the
  20                                            reference */
  21        unsigned int managed; /* this is if the device has a driver for it */
  22        void * hpa;
  23
  24#ifdef __LP64__
  25        /* parms for pdc_pat_cell_module() call */
  26        unsigned long  pcell_loc;       /* Physical Cell location */
  27        unsigned long  mod_index;       /* PAT specific - Misc Module info */
  28
  29        /* generic info returned from pdc_pat_cell_module() */
  30        unsigned long  mod_info;        /* PAT specific - Misc Module info */
  31        unsigned long  pmod_loc;        /* physical Module location */
  32        unsigned long  mod_path;        /* Module HW path */
  33#endif
  34};
  35
  36enum cpu_type {
  37        pcx     = 0, /* pa7000          pa 1.0  */
  38        pcxs    = 1, /* pa7000          pa 1.1a */
  39        pcxt    = 2, /* pa7100          pa 1.1b */
  40        pcxt_   = 3, /* pa7200  (t')    pa 1.1c */
  41        pcxl    = 4, /* pa7100lc        pa 1.1d */
  42        pcxl2   = 5, /* pa7300lc        pa 1.1e */
  43        pcxu    = 6, /* pa8000          pa 2.0  */
  44        pcxu_   = 7, /* pa8200  (u+)    pa 2.0  */
  45        pcxw    = 8, /* pa8500          pa 2.0  */
  46        pcxw_   = 9  /* pa8600  (w+)    pa 2.0  */
  47};
  48
  49extern char *cpu_name_version[][2]; /* mapping from enum cpu_type to strings */
  50
  51struct pa_iodc_driver {
  52        unsigned short hw_type:5;               /* HPHW_xxx */
  53        unsigned short hversion;
  54        unsigned short hversion_rev;
  55        unsigned long  sversion:28;
  56        unsigned short sversion_rev;
  57        unsigned short opt;
  58        unsigned int check;  /* Components that are significant */
  59        char *name; 
  60        char *version; 
  61        int (* callback)(struct hp_device *d, struct pa_iodc_driver *dri);
  62};
  63
  64#define DRIVER_CHECK_HWTYPE          1
  65#define DRIVER_CHECK_HVERSION        2
  66#define DRIVER_CHECK_SVERSION        4
  67#define DRIVER_CHECK_OPT             8
  68/* The following two are useless right now */
  69#define DRIVER_CHECK_HVERSION_REV   16
  70#define DRIVER_CHECK_SVERSION_REV   32
  71#define DRIVER_CHECK_EVERYTHING     63
  72
  73
  74#define HPHW_NPROC     0 
  75#define HPHW_MEMORY    1       
  76#define HPHW_B_DMA     2
  77#define HPHW_OBSOLETE  3
  78#define HPHW_A_DMA     4
  79#define HPHW_A_DIRECT  5
  80#define HPHW_OTHER     6
  81#define HPHW_BCPORT    7
  82#define HPHW_CIO       8
  83#define HPHW_CONSOLE   9
  84#define HPHW_FIO       10
  85#define HPHW_BA        11
  86#define HPHW_IOA       12
  87#define HPHW_BRIDGE    13
  88#define HPHW_FABRIC    14
  89#define HPHW_FAULTY    31
  90
  91extern struct hp_hardware hp_hardware_list[];
  92
  93char *parisc_getHWtype( unsigned short hw_type );
  94
  95/* Attention: first hversion, then sversion...! */
  96char *parisc_getHWdescription(  unsigned short hw_type,
  97                                unsigned long hversion,  /* have to be long ! */
  98                                unsigned long sversion );
  99
 100enum cpu_type parisc_get_cpu_type( unsigned long hversion );
 101
 102extern int register_driver(struct pa_iodc_driver *driver);
 103#endif
 104
lxr.linux.no kindly hosted by Redpill Linpro AS, provider of Linux consulting and operations services since 1995.