patch-2.4.21 linux-2.4.21/include/asm-ia64/sn/klconfig.h

Next file: linux-2.4.21/include/asm-ia64/sn/ksys/elsc.h
Previous file: linux-2.4.21/include/asm-ia64/sn/klclock.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.20/include/asm-ia64/sn/klconfig.h linux-2.4.21/include/asm-ia64/sn/klconfig.h
@@ -55,6 +55,10 @@
 #include <asm/sn/sn2/shub_md.h>
 #endif
 
+#ifdef CONFIG_IA64_SGI_SN2
+#include <asm/sn/geo.h>
+#endif
+
 #define KLCFGINFO_MAGIC	0xbeedbabe
 
 typedef s32 klconf_off_t;
@@ -335,8 +339,8 @@
 
 #define KLCLASS_IOBRICK	0x70		/* IP35 iobrick */
 
-#define KLCLASS_MAX	7		/* Bump this if a new CLASS is added */
-#define KLTYPE_MAX	10		/* Bump this if a new CLASS is added */
+#define KLCLASS_MAX	8		/* Bump this if a new CLASS is added */
+#define KLTYPE_MAX	11		/* Bump this if a new CLASS is added */
 
 #define KLCLASS_UNKNOWN	0xf0
 
@@ -353,7 +357,7 @@
 #define KLTYPE_WEIRDCPU (KLCLASS_CPU | 0x0)
 #define KLTYPE_SNIA	(KLCLASS_CPU | 0x1)
 
-#define KLTYPE_WEIRDIO	(KLCLASS_IO  | 0x0)
+#define KLTYPE_WEIRDIO	(KLCLASS_IOBRICK  | 0x0)
 #define KLTYPE_BASEIO	(KLCLASS_IO  | 0x1) /* IOC3, SuperIO, Bridge, SCSI */
 #define KLTYPE_IO6	KLTYPE_BASEIO       /* Additional name */
 #define KLTYPE_4CHSCSI	(KLCLASS_IO  | 0x2)
@@ -433,7 +437,11 @@
  	unsigned char 	brd_flags;        /* Enabled, Disabled etc */
 	unsigned char 	brd_slot;         /* slot number */
 	unsigned short	brd_debugsw;      /* Debug switches */
+#ifdef CONFIG_IA64_SGI_SN2
+	geoid_t		brd_geoid;	  /* geo id */
+#else
 	moduleid_t	brd_module;       /* module to which it belongs */
+#endif
 	partid_t 	brd_partition;    /* Partition number */
         unsigned short 	brd_diagval;      /* diagnostic value */
         unsigned short 	brd_diagparm;     /* diagnostic parameter */
@@ -448,6 +456,9 @@
 	confidence_t	brd_confidence;	  /* confidence that the board is bad */
 	nasid_t		brd_owner;        /* who owns this board */
 	unsigned char 	brd_nic_flags;    /* To handle 8 more NICs */
+#ifdef CONFIG_IA64_SGI_SN2
+	char		pad[32];	  /* future expansion */
+#endif
 	char		brd_name[32];
 } lboard_t;
 
@@ -570,6 +581,10 @@
 #define KLSTRUCT_USB		34
 #define KLSTRUCT_USBKBD		35
 #define KLSTRUCT_USBMS		36
+#define KLSTRUCT_SCSI_CTLR	37
+#define KLSTRUCT_PEBRICK	38
+#define KLSTRUCT_GIGE           39
+#define KLSTRUCT_IDE		40
 
 /*
  * These are the indices of various components within a lboard structure.
@@ -611,6 +626,9 @@
 	nasid_t		port_nasid;
 	unsigned char	port_flag;
 	klconf_off_t	port_offset;
+#ifdef CONFIG_IA64_SGI_SN2
+	short		port_num;
+#endif
 } klport_t;
 
 typedef struct klcpu_s {                          /* CPU */
@@ -620,6 +638,9 @@
     	unsigned short 	cpu_speed;	/* Speed in MHZ */
     	unsigned short 	cpu_scachesz;	/* secondary cache size in MB */
     	unsigned short 	cpu_scachespeed;/* secondary cache speed in MHz */
+#ifdef CONFIG_IA64_SGI_SN2
+	unsigned long	pad;
+#endif
 } klcpu_t ;
 
 #define CPU_STRUCT_VERSION   2
@@ -627,16 +648,28 @@
 typedef struct klhub_s {			/* HUB */
 	klinfo_t 	hub_info;
 	uint 		hub_flags;		/* PCFG_HUB_xxx flags */
+#ifdef CONFIG_IA64_SGI_SN2
+#define MAX_NI_PORTS                    2
+	klport_t	hub_port[MAX_NI_PORTS + 1];/* hub is connected to this */
+#else
 	klport_t	hub_port;		/* hub is connected to this */
+#endif
 	nic_t		hub_box_nic;		/* nic of containing box */
 	klconf_off_t	hub_mfg_nic;		/* MFG NIC string */
 	u64		hub_speed;		/* Speed of hub in HZ */
+#ifdef CONFIG_IA64_SGI_SN2
+	moduleid_t	hub_io_module;		/* attached io module */
+	unsigned long	pad;
+#endif
 } klhub_t ;
 
 typedef struct klhub_uart_s {			/* HUB */
 	klinfo_t 	hubuart_info;
 	uint 		hubuart_flags;		/* PCFG_HUB_xxx flags */
 	nic_t		hubuart_box_nic;	/* nic of containing box */
+#ifdef CONFIG_IA64_SGI_SN2
+	unsigned long	pad;
+#endif
 } klhub_uart_t ;
 
 #define MEMORY_STRUCT_VERSION   2
@@ -647,6 +680,9 @@
 	short		membnk_dimm_select; /* bank to physical addr mapping*/
 	short		membnk_bnksz[MD_MEM_BANKS]; /* Memory bank sizes */
 	short		membnk_attr;
+#ifdef CONFIG_IA64_SGI_SN2
+	unsigned long	pad;
+#endif
 } klmembnk_t ;
 
 #define KLCONFIG_MEMBNK_SIZE(_info, _bank)	\
@@ -665,6 +701,9 @@
               char snum_str[MAX_SERIAL_NUM_SIZE];
               unsigned long long       snum_int;
       } snum;
+#ifdef CONFIG_IA64_SGI_SN2
+      unsigned long   pad;
+#endif
 } klmod_serial_num_t;
 
 /* Macros needed to access serial number structure in lboard_t.
@@ -682,6 +721,9 @@
     	klport_t	xbow_port_info[MAX_XBOW_LINKS] ; /* Module number */
         int		xbow_master_hub_link;
         /* type of brd connected+component struct ptr+flags */
+#ifdef CONFIG_IA64_SGI_SN2
+	unsigned long	pad;
+#endif
 } klxbow_t ;
 
 #define MAX_PCI_SLOTS 8
@@ -700,6 +742,9 @@
     	pci_t    	pci_specific  ;    /* PCI Board config info */
 	klpci_device_t	bri_devices[MAX_PCI_DEVS] ;	/* PCI IDs */
 	klconf_off_t	bri_mfg_nic ;
+#ifdef CONFIG_IA64_SGI_SN2
+	unsigned long	pad;
+#endif
 } klbri_t ;
 
 #define MAX_IOC3_TTY	2
@@ -713,6 +758,9 @@
 	klinfo_t	ioc3_enet ;
 	klconf_off_t	ioc3_enet_off ;
 	klconf_off_t	ioc3_kbd_off ;
+#ifdef CONFIG_IA64_SGI_SN2
+	unsigned long	pad;
+#endif
 } klioc3_t ;
 
 #define MAX_VME_SLOTS 8
@@ -721,12 +769,18 @@
 	klinfo_t 	vmeb_info ;
 	vmeb_t		vmeb_specific ;
     	klconf_off_t   	vmeb_brdinfo[MAX_VME_SLOTS]   ;    /* VME Board config info */
+#ifdef CONFIG_IA64_SGI_SN2
+	unsigned long	pad;
+#endif
 } klvmeb_t ;
 
 typedef struct klvmed_s {                          /* VME DEVICE - VME BOARD */
 	klinfo_t	vmed_info ;
 	vmed_t		vmed_specific ;
     	klconf_off_t   	vmed_brdinfo[MAX_VME_SLOTS]   ;    /* VME Board config info */
+#ifdef CONFIG_IA64_SGI_SN2
+	unsigned long	pad;
+#endif
 } klvmed_t ;
 
 #define ROUTER_VECTOR_VERS	2
@@ -739,6 +793,9 @@
     	klport_t 	rou_port[MAX_ROUTER_PORTS + 1] ; /* array index 1 to 6 */
 	klconf_off_t	rou_mfg_nic ;     /* MFG NIC string */
 	u64	rou_vector;	  /* vector from master node */
+#ifdef CONFIG_IA64_SGI_SN2
+	unsigned long   pad;
+#endif
 } klrou_t ;
 
 /*
@@ -763,16 +820,25 @@
 	graphics_t	gfx_specific;
 	klconf_off_t    pad0;		/* for compatibility with older proms */
 	klconf_off_t    gfx_mfg_nic;
+#ifdef CONFIG_IA64_SGI_SN2
+	unsigned long	pad;
+#endif
 } klgfx_t;
 
 typedef struct klxthd_s {   
 	klinfo_t 	xthd_info ;
 	klconf_off_t	xthd_mfg_nic ;        /* MFG NIC string */
+#ifdef CONFIG_IA64_SGI_SN2
+	unsigned long	pad;
+#endif
 } klxthd_t ;
 
 typedef struct kltpu_s {                     /* TPU board */
 	klinfo_t 	tpu_info ;
 	klconf_off_t	tpu_mfg_nic ;        /* MFG NIC string */
+#ifdef CONFIG_IA64_SGI_SN2
+	unsigned long	pad;
+#endif
 } kltpu_t ;
 
 typedef struct klgsn_s {                     /* GSN board */
@@ -789,36 +855,64 @@
  * that as the size to be klmalloced.
  */
 
-typedef struct klscsi_s {                          /* SCSI Controller */
+typedef struct klscsi_s {                          /* SCSI Bus */
 	klinfo_t 	scsi_info ;
     	scsi_t       	scsi_specific   ; 
 	unsigned char 	scsi_numdevs ;
 	klconf_off_t	scsi_devinfo[MAX_SCSI_DEVS] ; 
+#ifdef CONFIG_IA64_SGI_SN2
+	unsigned long	pad;
+#endif
 } klscsi_t ;
 
+typedef struct klscctl_s {                          /* SCSI Controller */
+	klinfo_t 	scsi_info ;
+	uint		type;
+	uint		scsi_buscnt;                        /* # busses this cntlr */
+	void		*scsi_bus[2];                       /* Pointer to 2 klscsi_t's */
+#ifdef CONFIG_IA64_SGI_SN2
+	unsigned long	pad;
+#endif
+} klscctl_t ;
+
 typedef struct klscdev_s {                          /* SCSI device */
 	klinfo_t 	scdev_info ;
 	struct scsidisk_data *scdev_cfg ; /* driver fills up this */
+#ifdef CONFIG_IA64_SGI_SN2
+	unsigned long	pad;
+#endif
 } klscdev_t ;
 
 typedef struct klttydev_s {                          /* TTY device */
 	klinfo_t 	ttydev_info ;
 	struct terminal_data *ttydev_cfg ; /* driver fills up this */
+#ifdef CONFIG_IA64_SGI_SN2
+	unsigned long	pad;
+#endif
 } klttydev_t ;
 
 typedef struct klenetdev_s {                          /* ENET device */
 	klinfo_t 	enetdev_info ;
 	struct net_data *enetdev_cfg ; /* driver fills up this */
+#ifdef CONFIG_IA64_SGI_SN2
+	unsigned long	pad;
+#endif
 } klenetdev_t ;
 
 typedef struct klkbddev_s {                          /* KBD device */
 	klinfo_t 	kbddev_info ;
 	struct keyboard_data *kbddev_cfg ; /* driver fills up this */
+#ifdef CONFIG_IA64_SGI_SN2
+	unsigned long	pad;
+#endif
 } klkbddev_t ;
 
 typedef struct klmsdev_s {                          /* mouse device */
         klinfo_t        msdev_info ;
         void 		*msdev_cfg ; 
+#ifdef CONFIG_IA64_SGI_SN2
+	unsigned long	pad;
+#endif
 } klmsdev_t ;
 
 #define MAX_FDDI_DEVS 10 /* XXX Is this true */
@@ -827,11 +921,17 @@
 	klinfo_t 	fddi_info ;
     	fddi_t        	fddi_specific ;       
 	klconf_off_t	fddi_devinfo[MAX_FDDI_DEVS] ;
+#ifdef CONFIG_IA64_SGI_SN2
+	unsigned long	pad;
+#endif
 } klfddi_t ;
 
 typedef struct klmio_s {                          /* MIO */
 	klinfo_t 	mio_info ;
     	mio_t       	mio_specific   ; 
+#ifdef CONFIG_IA64_SGI_SN2
+	unsigned long	pad;
+#endif
 } klmio_t ;
 
 /*
@@ -842,6 +942,9 @@
 	klinfo_t	usb_info;	/* controller info */
 	void		*usb_bus;	/* handle to usb_bus_t */
 	uint64_t	usb_controller;	/* ptr to controller info */
+#ifdef CONFIG_IA64_SGI_SN2
+	unsigned long	pad;
+#endif
 } klusb_t ; 
 
 typedef union klcomp_s {
@@ -856,6 +959,7 @@
 	klrou_t		kc_rou;
 	klgfx_t		kc_gfx;
 	klscsi_t	kc_scsi;
+	klscctl_t	kc_scsi_ctl;
 	klscdev_t	kc_scsi_dev;
 	klfddi_t	kc_fddi;
 	klmio_t		kc_mio;
@@ -929,26 +1033,38 @@
 extern lboard_t *find_gfxpipe(int pipenum);
 extern void setup_gfxpipe_link(devfs_handle_t vhdl,int pipenum);
 extern lboard_t *find_lboard_class(lboard_t *start, unsigned char brd_class);
+#ifdef CONFIG_IA64_SGI_SN2
+extern lboard_t *find_lboard_module_class(lboard_t *start, geoid_t geoid,
+						unsigned char brd_class);
+#else
 extern lboard_t *find_lboard_module_class(lboard_t *start, moduleid_t mod,
                                                unsigned char brd_class);
+#endif
 extern lboard_t *find_nic_lboard(lboard_t *, nic_t);
 extern lboard_t *find_nic_type_lboard(nasid_t, unsigned char, nic_t);
+#ifdef CONFIG_IA64_SGI_SN2
+extern lboard_t *find_lboard_modslot(lboard_t *start, geoid_t geoid);
+extern lboard_t *find_lboard_module(lboard_t *start, geoid_t geoid);
+extern lboard_t *get_board_name(nasid_t nasid, geoid_t geoid, slotid_t slot, char *name);
+#else
 extern lboard_t *find_lboard_modslot(lboard_t *start, moduleid_t mod, slotid_t slot);
 extern lboard_t *find_lboard_module(lboard_t *start, moduleid_t mod);
 extern lboard_t *get_board_name(nasid_t nasid, moduleid_t mod, slotid_t slot, char *name);
+#endif
 extern int	config_find_nic_router(nasid_t, nic_t, lboard_t **, klrou_t**);
 extern int	config_find_nic_hub(nasid_t, nic_t, lboard_t **, klhub_t**);
 extern int	config_find_xbow(nasid_t, lboard_t **, klxbow_t**);
 extern int 	update_klcfg_cpuinfo(nasid_t, int);
 extern void 	board_to_path(lboard_t *brd, char *path);
+#ifdef CONFIG_IA64_SGI_SN2
 extern moduleid_t get_module_id(nasid_t nasid);
+#endif
 extern void 	nic_name_convert(char *old_name, char *new_name);
 extern int 	module_brds(nasid_t nasid, lboard_t **module_brds, int n);
 extern lboard_t *brd_from_key(uint64_t key);
 extern void 	device_component_canonical_name_get(lboard_t *,klinfo_t *,
 						    char *);
 extern int	board_serial_number_get(lboard_t *,char *);
-extern int	is_master_baseio(nasid_t,moduleid_t,slotid_t);
 extern nasid_t	get_actual_nasid(lboard_t *brd) ;
 extern net_vec_t klcfg_discover_route(lboard_t *, lboard_t *, int);
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)