Esempio n. 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);
		}
	}
}
Esempio n. 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));
	}
}
Esempio n. 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);
	}
}
Esempio n. 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));
	}
}
Esempio n. 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;
}
Esempio n. 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);
}
Esempio n. 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;
}
Esempio n. 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);
    }
}
Esempio n. 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);
}