wct4xxp: Move the check for the VPM to module load time.

This allows dahdi-base to know whether or not there is a VPM attached to
the module as soon as it's registered as opposed to waiting for start
span. This will simplify dahdi_genconf's task of creating a valid
configuration file.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9933 a0bf4364-ded3-4de4-8d8a-66a801d63aff
This commit is contained in:
Shaun Ruffell
2011-06-02 20:01:00 +00:00
parent 83035fa12f
commit d069cf1958

View File

@@ -2776,18 +2776,6 @@ static int t4_startup(struct dahdi_span *span)
dev_info(&wc->dev->dev, "SPAN %d: Quaternary Sync "
"Source\n", span->spanno);
}
#ifdef VPM_SUPPORT
if (!alreadyrunning && !wc->vpm) {
wait_a_little();
t4_vpm400_init(wc);
if (!wc->vpm)
t4_vpm450_init(wc);
wc->dmactrl |= wc->vpm;
t4_pci_out(wc, WC_DMACTRL, wc->dmactrl);
if (wc->vpm)
set_span_devicetype(wc);
}
#endif
if (debug)
dev_info(&wc->dev->dev, "Completed startup!\n");
clear_bit(T4_IGNORE_LATENCY, &wc->checkflag);
@@ -4840,6 +4828,19 @@ static int __devinit t4_init_one(struct pci_dev *pdev, const struct pci_device_i
t4_gpio_setdir(wc, (1 << 17), (1 << 17));
t4_gpio_setdir(wc, (0xff), (0xff));
#ifdef VPM_SUPPORT
if (!wc->vpm) {
wait_a_little();
t4_vpm400_init(wc);
if (!wc->vpm)
t4_vpm450_init(wc);
wc->dmactrl |= wc->vpm;
t4_pci_out(wc, WC_DMACTRL, wc->dmactrl);
if (wc->vpm)
set_span_devicetype(wc);
}
#endif
create_sysfs_files(wc);
#if 0