| Mark Maule | 48b1dcc | 2005-11-17 15:50:01 -0600 | [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 |  * | 
 | 6 |  * Copyright (c) 2003-2005 Silicon Graphics, Inc. All rights reserved. | 
 | 7 |  */ | 
| Mark Maule | c9221da | 2005-08-03 14:07:00 -0700 | [diff] [blame] | 8 |  | 
 | 9 | #ifndef _ASM_IA64_SN_CE_PROVIDER_H | 
 | 10 | #define _ASM_IA64_SN_CE_PROVIDER_H | 
 | 11 |  | 
 | 12 | #include <asm/sn/pcibus_provider_defs.h> | 
 | 13 | #include <asm/sn/tioce.h> | 
 | 14 |  | 
 | 15 | /* | 
 | 16 |  * Common TIOCE structure shared between the prom and kernel | 
 | 17 |  * | 
 | 18 |  * DO NOT CHANGE THIS STRUCT WITHOUT MAKING CORRESPONDING CHANGES TO THE | 
 | 19 |  * PROM VERSION. | 
 | 20 |  */ | 
 | 21 | struct tioce_common { | 
 | 22 | 	struct pcibus_bussoft	ce_pcibus;	/* common pciio header */ | 
 | 23 |  | 
| Prarit Bhargava | 53493dc | 2006-01-16 19:54:40 -0800 | [diff] [blame] | 24 | 	u32		ce_rev; | 
 | 25 | 	u64		ce_kernel_private; | 
 | 26 | 	u64		ce_prom_private; | 
| Mark Maule | c9221da | 2005-08-03 14:07:00 -0700 | [diff] [blame] | 27 | }; | 
 | 28 |  | 
 | 29 | struct tioce_kernel { | 
 | 30 | 	struct tioce_common	*ce_common; | 
 | 31 | 	spinlock_t		ce_lock; | 
 | 32 | 	struct list_head	ce_dmamap_list; | 
 | 33 |  | 
| Prarit Bhargava | 53493dc | 2006-01-16 19:54:40 -0800 | [diff] [blame] | 34 | 	u64		ce_ate40_shadow[TIOCE_NUM_M40_ATES]; | 
 | 35 | 	u64		ce_ate3240_shadow[TIOCE_NUM_M3240_ATES]; | 
 | 36 | 	u32		ce_ate3240_pagesize; | 
| Mark Maule | c9221da | 2005-08-03 14:07:00 -0700 | [diff] [blame] | 37 |  | 
| Prarit Bhargava | 53493dc | 2006-01-16 19:54:40 -0800 | [diff] [blame] | 38 | 	u8			ce_port1_secondary; | 
| Mark Maule | c9221da | 2005-08-03 14:07:00 -0700 | [diff] [blame] | 39 |  | 
 | 40 | 	/* per-port resources */ | 
 | 41 | 	struct { | 
 | 42 | 		int 		dirmap_refcnt; | 
| Prarit Bhargava | 53493dc | 2006-01-16 19:54:40 -0800 | [diff] [blame] | 43 | 		u64	dirmap_shadow; | 
| Mark Maule | c9221da | 2005-08-03 14:07:00 -0700 | [diff] [blame] | 44 | 	} ce_port[TIOCE_NUM_PORTS]; | 
 | 45 | }; | 
 | 46 |  | 
 | 47 | struct tioce_dmamap { | 
 | 48 | 	struct list_head	ce_dmamap_list;	/* headed by tioce_kernel */ | 
| Prarit Bhargava | 53493dc | 2006-01-16 19:54:40 -0800 | [diff] [blame] | 49 | 	u32		refcnt; | 
| Mark Maule | c9221da | 2005-08-03 14:07:00 -0700 | [diff] [blame] | 50 |  | 
| Prarit Bhargava | 53493dc | 2006-01-16 19:54:40 -0800 | [diff] [blame] | 51 | 	u64		nbytes;		/* # bytes mapped */ | 
| Mark Maule | c9221da | 2005-08-03 14:07:00 -0700 | [diff] [blame] | 52 |  | 
| Prarit Bhargava | 53493dc | 2006-01-16 19:54:40 -0800 | [diff] [blame] | 53 | 	u64		ct_start;	/* coretalk start address */ | 
 | 54 | 	u64		pci_start;	/* bus start address */ | 
| Mark Maule | c9221da | 2005-08-03 14:07:00 -0700 | [diff] [blame] | 55 |  | 
| Al Viro | a9f627c | 2006-10-10 22:46:27 +0100 | [diff] [blame] | 56 | 	u64		__iomem *ate_hw;/* hw ptr of first ate in map */ | 
| Prarit Bhargava | 53493dc | 2006-01-16 19:54:40 -0800 | [diff] [blame] | 57 | 	u64		*ate_shadow;	/* shadow ptr of firat ate */ | 
 | 58 | 	u16		ate_count;	/* # ate's in the map */ | 
| Mark Maule | c9221da | 2005-08-03 14:07:00 -0700 | [diff] [blame] | 59 | }; | 
 | 60 |  | 
 | 61 | extern int tioce_init_provider(void); | 
 | 62 |  | 
 | 63 | #endif  /* __ASM_IA64_SN_CE_PROVIDER_H */ |