svn commit: r205666 - in projects/altix/sys: dev/uart ia64/include
Marcel Moolenaar
marcel at FreeBSD.org
Fri Mar 26 03:02:32 UTC 2010
Author: marcel
Date: Fri Mar 26 03:02:31 2010
New Revision: 205666
URL: http://svn.freebsd.org/changeset/base/205666
Log:
Implement sgisn_probe() and move the SAL prodecure numbers to
<machine/sal.h>
Modified:
projects/altix/sys/dev/uart/uart_dev_sgisn.c
projects/altix/sys/ia64/include/sal.h
Modified: projects/altix/sys/dev/uart/uart_dev_sgisn.c
==============================================================================
--- projects/altix/sys/dev/uart/uart_dev_sgisn.c Fri Mar 26 02:29:15 2010 (r205665)
+++ projects/altix/sys/dev/uart/uart_dev_sgisn.c Fri Mar 26 03:02:31 2010 (r205666)
@@ -41,10 +41,6 @@ __FBSDID("$FreeBSD$");
#include "uart_if.h"
-#define SAL_SGISN_PUTC 0x02000021
-#define SAL_SGISN_GETC 0x02000022
-#define SAL_SGISN_POLL 0x02000026
-
/*
* Low-level UART interface.
*/
@@ -67,9 +63,10 @@ static struct uart_ops uart_sgisn_ops =
static int
sgisn_probe(struct uart_bas *bas)
{
+ struct ia64_sal_result result;
- /* XXX Check that we're running on the Altix 350 */
- return (0);
+ result = ia64_sal_entry(SAL_SGISN_INFO, 0, 0, 0, 0, 0, 0, 0);
+ return ((result.sal_status != 0) ? ENXIO : 0);
}
static void
Modified: projects/altix/sys/ia64/include/sal.h
==============================================================================
--- projects/altix/sys/ia64/include/sal.h Fri Mar 26 02:29:15 2010 (r205665)
+++ projects/altix/sys/ia64/include/sal.h Fri Mar 26 03:02:31 2010 (r205666)
@@ -114,6 +114,11 @@ struct sal_ap_wakeup_descriptor {
#define SAL_FREQ_BASE 0x01000012
#define SAL_UPDATE_PAL 0x01000020
+#define SAL_SGISN_INFO 0x0200001e
+#define SAL_SGISN_PUTC 0x02000021
+#define SAL_SGISN_GETC 0x02000022
+#define SAL_SGISN_POLL 0x02000026
+
/* SAL_SET_VECTORS event handler types */
#define SAL_OS_MCA 0
#define SAL_OS_INIT 1
More information about the svn-src-projects
mailing list