Пример #1
0
static void
reset_bkm(struct IsdnCardState *cs)
{
	long flags;

	if (cs->typ == ISDN_CTYPE_SCT_QUADRO) {
		if (!is_ipac_active(SCT_1) &&
		    !is_ipac_active(SCT_2) &&
		    !is_ipac_active(SCT_3) &&
		    !is_ipac_active(SCT_4)) {
			/* Issue total reset only if no ipac is active */
			wordout(cs->hw.ax.plx_adr + 0x50, (wordin(cs->hw.ax.plx_adr + 0x50) & ~4));

			save_flags(flags);
			sti();
			current->state = TASK_UNINTERRUPTIBLE;
			schedule_timeout((10 * HZ) / 1000);

			/* Remove the soft reset */
			wordout(cs->hw.ax.plx_adr + 0x50, (wordin(cs->hw.ax.plx_adr + 0x50) | 4));

			current->state = TASK_UNINTERRUPTIBLE;
			schedule_timeout((10 * HZ) / 1000);
			restore_flags(flags);
		}
	}
}
Пример #2
0
static void
enable_bkm_int(struct IsdnCardState *cs, unsigned bEnable)
{
	if (cs->typ == ISDN_CTYPE_SCT_QUADRO) {
		if (bEnable)
			wordout(cs->hw.ax.plx_adr + 0x4C, (wordin(cs->hw.ax.plx_adr + 0x4C) | 0x41));
		else
			wordout(cs->hw.ax.plx_adr + 0x4C, (wordin(cs->hw.ax.plx_adr + 0x4C) & ~0x41));
	}
}
Пример #3
0
static void
reset_bkm(struct IsdnCardState *cs)
{
	if (cs->subtyp == SCT_1) {
		wordout(cs->hw.ax.plx_adr + 0x50, (wordin(cs->hw.ax.plx_adr + 0x50) & ~4));
		mdelay(10);
		/* Remove the soft reset */
		wordout(cs->hw.ax.plx_adr + 0x50, (wordin(cs->hw.ax.plx_adr + 0x50) | 4));
		mdelay(10);
	}
}
Пример #4
0
static void
enable_bkm_int(struct IsdnCardState *cs, unsigned bEnable)
{
	if (cs->typ == ISDN_CTYPE_SCT_QUADRO) {
		if (bEnable)
			wordout(cs->hw.ax.plx_adr + 0x4C, (wordin(cs->hw.ax.plx_adr + 0x4C) | 0x41));
		else
			/* Issue general di only if no ipac is active */
			if (!is_ipac_active(SCT_1) &&
			    !is_ipac_active(SCT_2) &&
			    !is_ipac_active(SCT_3) &&
			    !is_ipac_active(SCT_4))
			wordout(cs->hw.ax.plx_adr + 0x4C, (wordin(cs->hw.ax.plx_adr + 0x4C) & ~0x41));
	}
}
Пример #5
0
static inline void
readfifo(unsigned int ale, unsigned int adr, u_char off, u_char * data, int size)
{
	int i;
	wordout(ale, off);
	for (i = 0; i < size; i++)
		data[i] = wordin(adr) & 0xFF;
}
Пример #6
0
static inline u_char
readreg(unsigned int ale, unsigned int adr, u_char off)
{
	register u_char ret;
	wordout(ale, off);
	ret = wordin(adr) & 0xFF;
	return (ret);
}
Пример #7
0
static inline void
readfifo(unsigned int ale, unsigned int adr, u_char off, u_char * data, int size)
{
	/* fifo read without cli because it's allready done  */
	int i;
	wordout(ale, off);
	for (i = 0; i < size; i++)
		data[i] = wordin(adr) & 0xFF;
}
Пример #8
0
static void
reset_bkm(struct IsdnCardState *cs)
{
    long flags;

    if (cs->subtyp == SCT_1) {
        wordout(cs->hw.ax.plx_adr + 0x50, (wordin(cs->hw.ax.plx_adr + 0x50) & ~4));
        save_flags(flags);
        sti();
        set_current_state(TASK_UNINTERRUPTIBLE);
        schedule_timeout((10 * HZ) / 1000);
        /* Remove the soft reset */
        wordout(cs->hw.ax.plx_adr + 0x50, (wordin(cs->hw.ax.plx_adr + 0x50) | 4));
        set_current_state(TASK_UNINTERRUPTIBLE);
        schedule_timeout((10 * HZ) / 1000);
        restore_flags(flags);
    }
}
Пример #9
0
static inline u_char
readreg(unsigned int ale, unsigned int adr, u_char off)
{
	register u_char ret;
	long flags;
	save_flags(flags);
	cli();
	wordout(ale, off);
	ret = wordin(adr) & 0xFF;
	restore_flags(flags);
	return (ret);
}