diff options
author | Shaun Ruffell <sruffell@digium.com> | 2011-06-02 20:03:24 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2011-06-02 20:03:24 +0000 |
commit | a8fb94744525a934c9a1188e56a4636086c8a263 (patch) | |
tree | 05aec5eed5b7cb3a56f07ecb4ceb194f6abb2147 /drivers/dahdi/wctdm24xxp | |
parent | f3d3ddf98ba3020fdfd42a1794fb69bad347b595 (diff) |
wctdm24xxp: Drop 'flags' from 'struct wctdm_module'.
The voicebus cards only support the S110M FXS modules which are based on
the 3215. The module flags member was only used to hold whether we were
dealing with a 3210 or 3215 SLIC, so we can drop it since we always know
we'll have a 3215 based SLIC.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9963 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/wctdm24xxp')
-rw-r--r-- | drivers/dahdi/wctdm24xxp/base.c | 38 | ||||
-rw-r--r-- | drivers/dahdi/wctdm24xxp/wctdm24xxp.h | 4 |
2 files changed, 13 insertions, 29 deletions
diff --git a/drivers/dahdi/wctdm24xxp/base.c b/drivers/dahdi/wctdm24xxp/base.c index f8e120c..7958fb4 100644 --- a/drivers/dahdi/wctdm24xxp/base.c +++ b/drivers/dahdi/wctdm24xxp/base.c @@ -1209,12 +1209,11 @@ wctdm_proslic_setreg_indirect(struct wctdm *wc, struct wctdm_module *const mod, unsigned char address, unsigned short data) { int res = -1; - /* Translate 3215 addresses */ - if (mod->flags & FLAG_3215) { - address = translate_3215(address); - if (address == 255) - return 0; - } + + address = translate_3215(address); + if (address == 255) + return 0; + if (!wait_access(wc, mod)) { wctdm_setreg(wc, mod, IDA_LO, (u8)(data & 0xFF)); wctdm_setreg(wc, mod, IDA_HI, (u8)((data & 0xFF00)>>8)); @@ -1230,12 +1229,11 @@ wctdm_proslic_getreg_indirect(struct wctdm *wc, struct wctdm_module *const mod, { int res = -1; char *p=NULL; - /* Translate 3215 addresses */ - if (mod->flags & FLAG_3215) { - address = translate_3215(address); - if (address == 255) - return 0; - } + + address = translate_3215(address); + if (address == 255) + return 0; + if (!wait_access(wc, mod)) { wctdm_setreg(wc, mod, IAA, address); if (!wait_access(wc, mod)) { @@ -1283,8 +1281,7 @@ wctdm_proslic_verify_indirect_regs(struct wctdm *wc, struct wctdm_module *mod) } initial = indirect_regs[i].initial; - if ((j != initial) && (!(mod->flags & FLAG_3215) || - (indirect_regs[i].altaddr != 255))) { + if ((j != initial) && (indirect_regs[i].altaddr != 255)) { dev_notice(&wc->vb.pdev->dev, "!!!!!!! %s iREG %X = %X should be %X\n", indirect_regs[i].name, @@ -2215,16 +2212,6 @@ wctdm_proslic_insane(struct wctdm *wc, struct wctdm_module *const mod) return -1; } - if ((blah & 0xf) < 2) { - dev_info(&wc->vb.pdev->dev, - "ProSLIC 3210 version %d is too old\n", blah & 0xf); - return -1; - } - - if (wctdm_getreg(wc, mod, 1) & 0x80) - /* ProSLIC 3215, not a 3210 */ - mod->flags |= FLAG_3215; - blah = wctdm_getreg(wc, mod, 8); if (blah != 0x2) { dev_notice(&wc->vb.pdev->dev, @@ -3993,7 +3980,7 @@ static struct wctdm_span *wctdm_init_span(struct wctdm *wc, int spanno, int chan snprintf(s->span.desc, sizeof(s->span.desc) - 1, "%s Board %d", wc->desc->name, wc->pos + 1); snprintf(s->span.location, sizeof(s->span.location) - 1, "PCI%s Bus %02d Slot %02d", - (wc->mods[0].flags & FLAG_EXPRESS) ? " Express" : "", + (wc->desc->flags & FLAG_EXPRESS) ? " Express" : "", pdev->bus->number, PCI_SLOT(pdev->devfn) + 1); s->span.manufacturer = "Digium"; strncpy(s->span.devicetype, wc->desc->name, sizeof(s->span.devicetype) - 1); @@ -4962,7 +4949,6 @@ __wctdm_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) wc->companding = DAHDI_LAW_DEFAULT; for (i = 0; i < NUM_MODULES; i++) { - wc->mods[i].flags = wc->desc->flags; wc->mods[i].dacssrc = -1; wc->mods[i].card = i; } diff --git a/drivers/dahdi/wctdm24xxp/wctdm24xxp.h b/drivers/dahdi/wctdm24xxp/wctdm24xxp.h index f14ca6c..bd224fb 100644 --- a/drivers/dahdi/wctdm24xxp/wctdm24xxp.h +++ b/drivers/dahdi/wctdm24xxp/wctdm24xxp.h @@ -50,8 +50,7 @@ #define OHT_TIMER 6000 /* How long after RING to retain OHT */ -#define FLAG_3215 (1 << 0) -#define FLAG_EXPRESS (1 << 1) +#define FLAG_EXPRESS (1 << 0) #define EFRAME_SIZE 108L #define EFRAME_GAP 20L @@ -227,7 +226,6 @@ struct wctdm_module { enum module_type type; int sethook; /* pending hook state command */ int dacssrc; - int flags; /* bitmap of board-specific + module-specific flags */ int altcs; u8 card; |