hisax_isac.h 900 Bytes
Newer Older
Linus Torvalds's avatar
Linus Torvalds committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#ifndef __HISAX_ISAC_H__
#define __HISAX_ISAC_H__

#include <linux/kernel.h>
#include "fsm.h"
#include "hisax_if.h"

#define TIMER3_VALUE 7000
#define MAX_DFRAME_LEN_L1 300

#define ISAC_IOM1	0

struct isac {
	void *priv;

	u_long flags;
	struct hisax_d_if hisax_d_if;
	struct FsmInst l1m;
	struct FsmTimer timer;
20 21
	u8 mocr;
	u8 adf2;
Linus Torvalds's avatar
Linus Torvalds committed
22 23
	int    type;

24
	u8 rcvbuf[MAX_DFRAME_LEN_L1];
Linus Torvalds's avatar
Linus Torvalds committed
25 26 27 28 29
	int rcvidx;

	struct sk_buff *tx_skb;
	int tx_cnt;

30 31 32 33
	u8 (*read_isac)      (struct isac *, u8);
	void   (*write_isac)     (struct isac *, u8, u8);
	void   (*read_isac_fifo) (struct isac *, u8 *, int);
	void   (*write_isac_fifo)(struct isac *, u8 *, int);
Linus Torvalds's avatar
Linus Torvalds committed
34 35 36 37 38
};

void isac_init(struct isac *isac);
void isac_d_l2l1(struct hisax_if *hisax_d_if, int pr, void *arg);

39
void hisax_isac_setup(struct isac *isac);
Linus Torvalds's avatar
Linus Torvalds committed
40
void isac_irq(struct isac *isac);
Linus Torvalds's avatar
Linus Torvalds committed
41 42

void isacsx_setup(struct isac *isac);
Linus Torvalds's avatar
Linus Torvalds committed
43
void isacsx_irq(struct isac *isac);
Linus Torvalds's avatar
Linus Torvalds committed
44 45

#endif