Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Mar 2010 03:02:31 +0000 (UTC)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r205666 - in projects/altix/sys: dev/uart ia64/include
Message-ID:  <201003260302.o2Q32VLX015858@svn.freebsd.org>

index | next in thread | raw e-mail

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


help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003260302.o2Q32VLX015858>