Path: blob/master/arch/ia64/sn/include/xtalk/hubdev.h
10820 views
/*1* This file is subject to the terms and conditions of the GNU General Public2* License. See the file "COPYING" in the main directory of this archive3* for more details.4*5* Copyright (C) 1992 - 1997, 2000-2005 Silicon Graphics, Inc. All rights reserved.6*/7#ifndef _ASM_IA64_SN_XTALK_HUBDEV_H8#define _ASM_IA64_SN_XTALK_HUBDEV_H910#include "xtalk/xwidgetdev.h"1112#define HUB_WIDGET_ID_MAX 0xf13#define DEV_PER_WIDGET (2*2*8)14#define IIO_ITTE_WIDGET_BITS 4 /* size of widget field */15#define IIO_ITTE_WIDGET_MASK ((1<<IIO_ITTE_WIDGET_BITS)-1)16#define IIO_ITTE_WIDGET_SHIFT 81718#define IIO_ITTE_WIDGET(itte) \19(((itte) >> IIO_ITTE_WIDGET_SHIFT) & IIO_ITTE_WIDGET_MASK)2021/*22* Use the top big window as a surrogate for the first small window23*/24#define SWIN0_BIGWIN HUB_NUM_BIG_WINDOW25#define IIO_NUM_ITTES 726#define HUB_NUM_BIG_WINDOW (IIO_NUM_ITTES - 1)2728/* This struct is shared between the PROM and the kernel.29* Changes to this struct will require corresponding changes to the kernel.30*/31struct sn_flush_device_common {32int sfdl_bus;33int sfdl_slot;34int sfdl_pin;35struct common_bar_list {36unsigned long start;37unsigned long end;38} sfdl_bar_list[6];39unsigned long sfdl_force_int_addr;40unsigned long sfdl_flush_value;41volatile unsigned long *sfdl_flush_addr;42u32 sfdl_persistent_busnum;43u32 sfdl_persistent_segment;44struct pcibus_info *sfdl_pcibus_info;45};4647/* This struct is kernel only and is not used by the PROM */48struct sn_flush_device_kernel {49spinlock_t sfdl_flush_lock;50struct sn_flush_device_common *common;51};5253/* 01/16/06 This struct is the old PROM/kernel struct and needs to be included54* for older official PROMs to function on the new kernel base. This struct55* will be removed when the next official PROM release occurs. */5657struct sn_flush_device_war {58struct sn_flush_device_common common;59u32 filler; /* older PROMs expect the default size of a spinlock_t */60};6162/*63* **widget_p - Used as an array[wid_num][device] of sn_flush_device_kernel.64*/65struct sn_flush_nasid_entry {66struct sn_flush_device_kernel **widget_p; // Used as an array of wid_num67u64 iio_itte[8];68};6970struct hubdev_info {71geoid_t hdi_geoid;72short hdi_nasid;73short hdi_peer_nasid; /* Dual Porting Peer */7475struct sn_flush_nasid_entry hdi_flush_nasid_list;76struct xwidget_info hdi_xwidget_info[HUB_WIDGET_ID_MAX + 1];777879void *hdi_nodepda;80void *hdi_node_vertex;81u32 max_segment_number;82u32 max_pcibus_number;83};8485extern void hubdev_init_node(nodepda_t *, cnodeid_t);86extern void hub_error_init(struct hubdev_info *);87extern void ice_error_init(struct hubdev_info *);888990#endif /* _ASM_IA64_SN_XTALK_HUBDEV_H */919293