xtalk_private.h
上传用户:lgb322
上传日期:2013-02-24
资源大小:30529k
文件大小:3k
源码类别:

嵌入式Linux

开发平台:

Unix_Linux

  1. /* $Id$
  2.  *
  3.  * This file is subject to the terms and conditions of the GNU General Public
  4.  * License.  See the file "COPYING" in the main directory of this archive
  5.  * for more details.
  6.  *
  7.  * Copyright (C) 1992 - 1997, 2000 Silicon Graphics, Inc.
  8.  * Copyright (C) 2000 by Colin Ngam
  9.  */
  10. #ifndef _ASM_SN_XTALK_XTALK_PRIVATE_H
  11. #define _ASM_SN_XTALK_XTALK_PRIVATE_H
  12. #include <asm/sn/ioerror.h>        /* for error function and arg types */
  13. /*
  14.  * xtalk_private.h -- private definitions for xtalk
  15.  * crosstalk drivers should NOT include this file.
  16.  */
  17. /*
  18.  * All Crosstalk providers set up PIO using this information.
  19.  */
  20. struct xtalk_piomap_s {
  21.     devfs_handle_t            xp_dev; /* a requestor of this mapping */
  22.     xwidgetnum_t            xp_target; /* target (node's widget number) */
  23.     iopaddr_t               xp_xtalk_addr; /* which crosstalk addr is mapped */
  24.     size_t                  xp_mapsz; /* size of this mapping */
  25.     caddr_t                 xp_kvaddr; /* kernel virtual address to use */
  26. };
  27. /*
  28.  * All Crosstalk providers set up DMA using this information.
  29.  */
  30. struct xtalk_dmamap_s {
  31.     devfs_handle_t            xd_dev; /* a requestor of this mapping */
  32.     xwidgetnum_t            xd_target; /* target (node's widget number) */
  33. };
  34. /*
  35.  * All Crosstalk providers set up interrupts using this information.
  36.  */
  37. struct xtalk_intr_s {
  38.     devfs_handle_t            xi_dev; /* requestor of this intr */
  39.     xwidgetnum_t            xi_target; /* master's widget number */
  40.     xtalk_intr_vector_t     xi_vector; /* 8-bit interrupt vector */
  41.     iopaddr_t               xi_addr; /* xtalk address to generate intr */
  42.     void                   *xi_sfarg; /* argument for setfunc */
  43.     xtalk_intr_setfunc_t    xi_setfunc; /* device's setfunc routine */
  44. };
  45. /*
  46.  * Xtalk interrupt handler structure access functions
  47.  */
  48. #define xtalk_intr_arg(xt) ((xt)->xi_sfarg)
  49. #define xwidget_hwid_is_sn0_xswitch(_hwid)
  50. (((_hwid)->part_num == XBOW_WIDGET_PART_NUM ) &&  
  51.  ((_hwid)->mfg_num == XBOW_WIDGET_MFGR_NUM ))
  52. #define xwidget_hwid_is_sn1_xswitch(_hwid)
  53. (((_hwid)->part_num == XXBOW_WIDGET_PART_NUM ) &&  
  54.  ((_hwid)->mfg_num == XXBOW_WIDGET_MFGR_NUM ))
  55. #define xwidget_hwid_is_xswitch(_hwid)
  56. (xwidget_hwid_is_sn0_xswitch(_hwid) ||
  57. xwidget_hwid_is_sn1_xswitch(_hwid))
  58. /* common iograph info for all widgets,
  59.  * stashed in FASTINFO of widget connection points.
  60.  */
  61. struct xwidget_info_s {
  62.     char                   *w_fingerprint;
  63.     devfs_handle_t            w_vertex; /* back pointer to vertex */
  64.     xwidgetnum_t            w_id; /* widget id */
  65.     struct xwidget_hwid_s   w_hwid; /* hardware identification (part/rev/mfg) */
  66.     devfs_handle_t            w_master; /* CACHED widget's master */
  67.     xwidgetnum_t            w_masterid; /* CACHED widget's master's widgetnum */
  68.     error_handler_f        *w_efunc; /* error handling function */
  69.     error_handler_arg_t     w_einfo; /* first parameter for efunc */
  70.     char    *w_name; /* canonical hwgraph name */
  71. };
  72. extern char             widget_info_fingerprint[];
  73. #endif /* _ASM_SN_XTALK_XTALK_PRIVATE_H */