Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * This file is subject to the terms and conditions of the GNU General Public |
| 3 | * License. See the file "COPYING" in the main directory of this archive |
| 4 | * for more details. |
| 5 | * |
Mark Maule | 5b53ed1 | 2005-08-03 14:06:00 -0700 | [diff] [blame] | 6 | * Copyright (C) 1992 - 1997, 2000-2005 Silicon Graphics, Inc. All rights reserved. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | */ |
| 8 | #ifndef _ASM_IA64_SN_XTALK_HUBDEV_H |
| 9 | #define _ASM_IA64_SN_XTALK_HUBDEV_H |
| 10 | |
Prarit Bhargava | c13cf37 | 2005-07-06 15:26:51 -0700 | [diff] [blame] | 11 | #include "xtalk/xwidgetdev.h" |
| 12 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 | #define HUB_WIDGET_ID_MAX 0xf |
| 14 | #define DEV_PER_WIDGET (2*2*8) |
| 15 | #define IIO_ITTE_WIDGET_BITS 4 /* size of widget field */ |
| 16 | #define IIO_ITTE_WIDGET_MASK ((1<<IIO_ITTE_WIDGET_BITS)-1) |
| 17 | #define IIO_ITTE_WIDGET_SHIFT 8 |
| 18 | |
Mark Maule | 5b53ed1 | 2005-08-03 14:06:00 -0700 | [diff] [blame] | 19 | #define IIO_ITTE_WIDGET(itte) \ |
| 20 | (((itte) >> IIO_ITTE_WIDGET_SHIFT) & IIO_ITTE_WIDGET_MASK) |
| 21 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 22 | /* |
| 23 | * Use the top big window as a surrogate for the first small window |
| 24 | */ |
| 25 | #define SWIN0_BIGWIN HUB_NUM_BIG_WINDOW |
| 26 | #define IIO_NUM_ITTES 7 |
| 27 | #define HUB_NUM_BIG_WINDOW (IIO_NUM_ITTES - 1) |
| 28 | |
| 29 | struct sn_flush_device_list { |
| 30 | int sfdl_bus; |
| 31 | int sfdl_slot; |
| 32 | int sfdl_pin; |
| 33 | struct bar_list { |
| 34 | unsigned long start; |
| 35 | unsigned long end; |
| 36 | } sfdl_bar_list[6]; |
| 37 | unsigned long sfdl_force_int_addr; |
| 38 | unsigned long sfdl_flush_value; |
| 39 | volatile unsigned long *sfdl_flush_addr; |
Colin Ngam | 674c647 | 2005-08-03 13:35:00 -0700 | [diff] [blame] | 40 | uint32_t sfdl_persistent_busnum; |
| 41 | uint32_t sfdl_persistent_segment; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 42 | struct pcibus_info *sfdl_pcibus_info; |
| 43 | spinlock_t sfdl_flush_lock; |
| 44 | }; |
| 45 | |
| 46 | /* |
| 47 | * **widget_p - Used as an array[wid_num][device] of sn_flush_device_list. |
| 48 | */ |
| 49 | struct sn_flush_nasid_entry { |
| 50 | struct sn_flush_device_list **widget_p; /* Used as a array of wid_num */ |
| 51 | uint64_t iio_itte[8]; |
| 52 | }; |
| 53 | |
| 54 | struct hubdev_info { |
| 55 | geoid_t hdi_geoid; |
| 56 | short hdi_nasid; |
| 57 | short hdi_peer_nasid; /* Dual Porting Peer */ |
| 58 | |
| 59 | struct sn_flush_nasid_entry hdi_flush_nasid_list; |
| 60 | struct xwidget_info hdi_xwidget_info[HUB_WIDGET_ID_MAX + 1]; |
| 61 | |
| 62 | |
| 63 | void *hdi_nodepda; |
| 64 | void *hdi_node_vertex; |
Colin Ngam | 674c647 | 2005-08-03 13:35:00 -0700 | [diff] [blame] | 65 | uint32_t max_segment_number; |
| 66 | uint32_t max_pcibus_number; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 67 | }; |
| 68 | |
| 69 | extern void hubdev_init_node(nodepda_t *, cnodeid_t); |
| 70 | extern void hub_error_init(struct hubdev_info *); |
| 71 | extern void ice_error_init(struct hubdev_info *); |
| 72 | |
| 73 | |
| 74 | #endif /* _ASM_IA64_SN_XTALK_HUBDEV_H */ |