Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * This file is subject to the terms and conditions of the GNU General Public
0003  * License.  See the file "COPYING" in the main directory of this archive
0004  * for more details.
0005  *
0006  * This file has definitions for the hub and snac interfaces.
0007  *
0008  * Copyright (C) 1992 - 1997, 1999, 2000 Silcon Graphics, Inc.
0009  * Copyright (C) 1999, 2000 Ralf Baechle (ralf@gnu.org)
0010  */
0011 #ifndef _ASM_SGI_SN_AGENT_H
0012 #define _ASM_SGI_SN_AGENT_H
0013 
0014 #include <asm/sn/addrs.h>
0015 #include <asm/sn/arch.h>
0016 
0017 #if defined(CONFIG_SGI_IP27)
0018 #include <asm/sn/sn0/hub.h>
0019 #elif defined(CONFIG_SGI_IP35)
0020 #include <asm/sn/sn1/hub.h>
0021 #endif  /* !CONFIG_SGI_IP27 && !CONFIG_SGI_IP35 */
0022 
0023 /*
0024  * NIC register macros
0025  */
0026 
0027 #if defined(CONFIG_SGI_IP27)
0028 #define HUB_NIC_ADDR(_cpuid)                           \
0029     REMOTE_HUB_ADDR(cpu_to_node(_cpuid),                   \
0030         MD_MLAN_CTL)
0031 #endif
0032 
0033 #define SET_HUB_NIC(_my_cpuid, _val)                       \
0034     (HUB_S(HUB_NIC_ADDR(_my_cpuid), (_val)))
0035 
0036 #define SET_MY_HUB_NIC(_v)                         \
0037     SET_HUB_NIC(cpuid(), (_v))
0038 
0039 #define GET_HUB_NIC(_my_cpuid)                         \
0040     (HUB_L(HUB_NIC_ADDR(_my_cpuid)))
0041 
0042 #define GET_MY_HUB_NIC()                           \
0043     GET_HUB_NIC(cpuid())
0044 
0045 #endif /* _ASM_SGI_SN_AGENT_H */