#include <linux/module.h>
#include <linux/init.h>
#include <linux/interrupt.h>
+#include <linux/delay.h>
#include "includes.h"
#include "hardware.h"
#include "card.h"
MODULE_DESCRIPTION("ISDN4Linux: Driver for Spellcaster card");
MODULE_AUTHOR("Spellcaster Telecommunications Inc.");
MODULE_LICENSE("GPL");
-MODULE_PARM( io, "1-" __MODULE_STRING(MAX_CARDS) "i");
-MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_CARDS) "i");
-MODULE_PARM(ram, "1-" __MODULE_STRING(MAX_CARDS) "i");
-MODULE_PARM(do_reset, "i");
board *sc_adapter[MAX_CARDS];
int cinst;
static unsigned long ram[] = {0,0,0,0};
static int do_reset = 0;
+module_param_array(io, int, NULL, 0);
+module_param_array(irq, int, NULL, 0);
+module_param_array(ram, int, NULL, 0);
+module_param(do_reset, bool, 0);
+
static int sup_irq[] = { 11, 10, 9, 5, 12, 14, 7, 3, 4, 6 };
#define MAX_IRQS 10
if(do_reset) {
pr_debug("Doing a SAFE probe reset\n");
outb(0xFF, io[b] + RESET_OFFSET);
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(milliseconds(10000));
+ msleep_interruptible(10000);
}
pr_debug("RAM Base for board %d is 0x%x, %s probe\n", b, ram[b],
ram[b] == 0 ? "will" : "won't");
* Try to identify a PRI card
*/
outb(PRI_BASEPG_VAL, pgport);
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(HZ);
+ msleep_interruptible(1000);
sig = readl(rambase + SIG_OFFSET);
pr_debug("Looking for a signature, got 0x%x\n", sig);
if(sig == SIGNATURE)
* Try to identify a PRI card
*/
outb(BRI_BASEPG_VAL, pgport);
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(HZ);
+ msleep_interruptible(1000);
sig = readl(rambase + SIG_OFFSET);
pr_debug("Looking for a signature, got 0x%x\n", sig);
if(sig == SIGNATURE)