aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ia64/sn/sn_sal.h
diff options
context:
space:
mode:
authorTony Luck <tony.luck@intel.com>2005-10-28 11:14:47 -0700
committerTony Luck <tony.luck@intel.com>2005-10-28 11:14:47 -0700
commit9189674026e86e624b1ef1b4eb430e9ad19f9641 (patch)
treed93acb6c3b2c127e997c132db61025a5653260ec /include/asm-ia64/sn/sn_sal.h
parent72ab373a5688a78cbdaf3bf96012e597d5399bb7 (diff)
parent25732ad493b22b7d9f0d250c5a9ad17219f96a47 (diff)
downloadkernel_samsung_smdk4412-9189674026e86e624b1ef1b4eb430e9ad19f9641.zip
kernel_samsung_smdk4412-9189674026e86e624b1ef1b4eb430e9ad19f9641.tar.gz
kernel_samsung_smdk4412-9189674026e86e624b1ef1b4eb430e9ad19f9641.tar.bz2
Pull altix-fpga-reset into release branch
Diffstat (limited to 'include/asm-ia64/sn/sn_sal.h')
-rw-r--r--include/asm-ia64/sn/sn_sal.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/include/asm-ia64/sn/sn_sal.h b/include/asm-ia64/sn/sn_sal.h
index fea35b3..34f3127 100644
--- a/include/asm-ia64/sn/sn_sal.h
+++ b/include/asm-ia64/sn/sn_sal.h
@@ -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
@@ -101,6 +102,13 @@
#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
*/
#define SAL_IROUTER_OPEN 0 /* open a subchannel */
@@ -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