17 #include <linux/signal.h>
18 #include <linux/kernel.h>
28 #define byteout(addr, val) outb(val, addr)
29 #define bytein(addr) inb(addr)
35 ergo_interrupt(
int intno,
void *
dev_id)
40 unsigned char volatile b;
50 spin_unlock_irqrestore(&card->
hysdn_lock, flags);
62 spin_unlock_irqrestore(&card->
hysdn_lock, flags);
88 spin_unlock_irqrestore(&card->
hysdn_lock, flags);
120 spin_unlock_irqrestore(&card->
hysdn_lock, flags);
134 #ifdef CONFIG_HYSDN_CAPI
146 spin_unlock_irqrestore(&card->
hysdn_lock, flags);
153 ergo_set_errlog_state(
hysdn_card *card,
int on)
165 spin_unlock_irqrestore(&card->
hysdn_lock, flags);
173 spin_unlock_irqrestore(&card->
hysdn_lock, flags);
180 static const char TestText[36] =
"This Message is filler, why read it";
214 ergo_writebootimg(
struct HYSDN_CARD *card,
unsigned char *
buf,
222 hysdn_addlog(card,
"ERGO: write bootldr offs=0x%lx ", offs);
261 ergo_writebootseq(
struct HYSDN_CARD *card,
unsigned char *buf,
int len)
267 unsigned char tmp_rdptr;
268 unsigned char wr_mirror;
272 hysdn_addlog(card,
"ERGO: write boot seq len=%d ", len);
276 wr_mirror = sp->
WrPtr;
284 tmp_rdptr = sp->
RdPtr;
286 }
while (
i && (tmp_rdptr != sp->
RdPtr));
293 if ((nr_write = tmp_rdptr - wr_mirror - 1) < 0)
306 *(dst + wr_mirror) = *buf++;
307 if (++wr_mirror >=
buflen)
309 sp->
WrPtr = wr_mirror;
325 int timecnt = 10000 / 50;
365 spin_unlock_irqrestore(&card->
hysdn_lock, flags);
373 #ifdef CONFIG_HYSDN_CAPI
430 ergo_releasehardware(card);