Pull sn_pci_legacy_read-write into release branch
authorTony Luck <tony.luck@intel.com>
Fri, 28 Oct 2005 20:23:50 +0000 (13:23 -0700)
committerTony Luck <tony.luck@intel.com>
Fri, 28 Oct 2005 20:23:50 +0000 (13:23 -0700)
1  2 
include/asm-ia64/sn/sn_sal.h

index 34f3127e44161ccf1ebbb93be06b99bdfa7a8475,b2d32837723f609572666afcb074bf9f4d4fcaa9..92df48a0412fbe748267449179f94a370cc1c618
@@@ -47,7 -47,6 +47,7 @@@
  #define  SN_SAL_CONSOLE_PUTB                     0x02000028
  #define  SN_SAL_CONSOLE_XMIT_CHARS               0x0200002a
  #define  SN_SAL_CONSOLE_READC                    0x0200002b
 +#define  SN_SAL_SYSCTL_OP                        0x02000030
  #define  SN_SAL_SYSCTL_MODID_GET                 0x02000031
  #define  SN_SAL_SYSCTL_GET                         0x02000032
  #define  SN_SAL_SYSCTL_IOBRICK_MODULE_GET          0x02000033
@@@ -68,7 -67,7 +68,7 @@@
  #define  SN_SAL_IOIF_INTERRUPT                           0x0200004a
  #define  SN_SAL_HWPERF_OP                        0x02000050   // lock
  #define  SN_SAL_IOIF_ERROR_INTERRUPT             0x02000051
+ #define  SN_SAL_IOIF_PCI_SAFE                    0x02000052
  #define  SN_SAL_IOIF_SLOT_ENABLE                 0x02000053
  #define  SN_SAL_IOIF_SLOT_DISABLE                0x02000054
  #define  SN_SAL_IOIF_GET_HUBDEV_INFO             0x02000055
  #define SAL_INTR_ALLOC                1
  #define SAL_INTR_FREE         2
  
 +/*
 + * operations available on the generic SN_SAL_SYSCTL_OP
 + * runtime service
 + */
 +#define SAL_SYSCTL_OP_IOBOARD         0x0001  /*  retrieve board type */
 +#define SAL_SYSCTL_OP_TIO_JLCK_RST      0x0002  /* issue TIO clock reset */
 +
  /*
   * IRouter (i.e. generalized system controller) operations
   */
@@@ -881,41 -873,6 +881,41 @@@ ia64_sn_sysctl_event_init(nasid_t nasid
          return (int) rv.v0;
  }
  
 +/*
 + * Ask the system controller on the specified nasid to reset
 + * the CX corelet clock.  Only valid on TIO nodes.
 + */
 +static inline int
 +ia64_sn_sysctl_tio_clock_reset(nasid_t nasid)
 +{
 +      struct ia64_sal_retval rv;
 +      SAL_CALL_REENTRANT(rv, SN_SAL_SYSCTL_OP, SAL_SYSCTL_OP_TIO_JLCK_RST,
 +                      nasid, 0, 0, 0, 0, 0);
 +      if (rv.status != 0)
 +              return (int)rv.status;
 +      if (rv.v0 != 0)
 +              return (int)rv.v0;
 +
 +      return 0;
 +}
 +
 +/*
 + * Get the associated ioboard type for a given nasid.
 + */
 +static inline int
 +ia64_sn_sysctl_ioboard_get(nasid_t nasid)
 +{
 +        struct ia64_sal_retval rv;
 +        SAL_CALL_REENTRANT(rv, SN_SAL_SYSCTL_OP, SAL_SYSCTL_OP_IOBOARD,
 +                        nasid, 0, 0, 0, 0, 0);
 +        if (rv.v0 != 0)
 +                return (int)rv.v0;
 +        if (rv.v1 != 0)
 +                return (int)rv.v1;
 +
 +        return 0;
 +}
 +
  /**
   * ia64_sn_get_fit_compt - read a FIT entry from the PROM header
   * @nasid: NASID of node to read