1 /* $Id: ptifddi.h,v 1.3 1999/08/20 00:31:08 davem Exp $
2  * ptifddi.c: Defines for Performance Technologies FDDI sbus cards.
3  *
4  * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
5  */
6 
7 #ifndef _PTIFDDI_H
8 #define _PTIFDDI_H
9 
10 struct dpram_loader {
11 	volatile unsigned char dpram_stat;
12 	volatile unsigned char _unused;
13 	volatile unsigned char addr_low;
14 	volatile unsigned char addr_hi;
15 	volatile unsigned char num_bytes;
16 	volatile unsigned char data[0x3b];
17 
18 	volatile unsigned char loader_firmware[0xc0];
19 };
20 
21 struct dfddi_ram {
22 /*0x000*/	unsigned char		_unused0[0x100];
23 /*0x100*/	struct dpram_loader	loader;
24 /*0x200*/	unsigned char		instructions[0x400];
25 /*0x600*/	unsigned char		msg_in[0x20];
26 /*0x620*/	unsigned char		msg_out[0x20];
27 /*0x640*/	unsigned char		_unused2[0x50];
28 /*0x690*/	unsigned char		smsg_in[0x20];
29 /*0x6b0*/	unsigned char		_unused3[0x30];
30 /*0x6e0*/	unsigned char		beacom_frame[0x20];
31 /*0x700*/	unsigned char		re_sync;
32 /*0x701*/	unsigned char		_unused4;
33 /*0x702*/	unsigned short		tswitch;
34 /*0x704*/	unsigned char		evq_lost;
35 /*0x705*/	unsigned char		_unused6;
36 /*0x706*/	unsigned char		signal_lost;
37 /*0x707*/	unsigned char		_unused7;
38 /*0x708*/	unsigned char		lerror;
39 /*0x709*/	unsigned char		_unused8;
40 /*0x70a*/	unsigned char		rstate;
41 /*0x70b*/	unsigned char		_unused9[0x13];
42 /*0x716*/	unsigned short		dswitch;
43 /*0x718*/	unsigned char		_unused10[0x48];
44 /*0x750*/	unsigned char		cbusy;
45 /*0x751*/	unsigned char		hbusy;
46 /*0x752*/	unsigned short		istat;
47 /*0x754*/	unsigned char		_unused11[];
48 /*0x756*/	unsigned char		disable;
49 /*0x757*/	unsigned char		_unused12[];
50 /*0x78e*/	unsigned char		ucvalid;
51 /*0x78f*/	unsigned char		_unused13;
52 /*0x790*/	unsigned int		u0addr;
53 /*0x794*/	unsigned char		_unused14[];
54 /*0x7a8*/	unsigned int		P_player;
55 /*0x7ac*/	unsigned int		Q_player;
56 /*0x7b0*/	unsigned int		macsi;
57 /*0x7b4*/	unsigned char		_unused15[];
58 /*0x7be*/	unsigned short		reset;
59 /*0x7c0*/	unsigned char		_unused16[];
60 /*0x7fc*/	unsigned short		iack;
61 /*0x7fe*/	unsigned short		loader_addr;
62 };
63 
64 #define DPRAM_SIZE		0x800
65 
66 #define DPRAM_STAT_VALID	0x80
67 #define DPRAM_STAT_EMPTY	0x00
68 
69 struct ptifddi {
70 	struct dfddi_ram	*dpram;
71 	unsigned char		*reset;
72 	unsigned char		*unreset;
73 	struct net_device		*dev;
74 	struct ptifddi		*next_module;
75 };
76 
77 #endif /* !(_PTIFDDI_H) */
78