summaryrefslogtreecommitdiff
path: root/wcfxs.c
diff options
context:
space:
mode:
authormarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2004-05-10 01:46:33 +0000
committermarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2004-05-10 01:46:33 +0000
commit7d33980ce42275bfb0bf6cb4a28e8c1a32e86b47 (patch)
tree2d4614ee9693a7ed1f9b29de190f070803a3a6ab /wcfxs.c
parent5ce9eb4d5aee19a0b3be3be5cc339debfde4546d (diff)
Support unified test/cs register
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@389 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'wcfxs.c')
-rwxr-xr-xwcfxs.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/wcfxs.c b/wcfxs.c
index 58f92ae..416c4c6 100755
--- a/wcfxs.c
+++ b/wcfxs.c
@@ -1558,8 +1558,13 @@ static int wcfxs_hardware_init(struct wcfxs *wc)
printk("Freshmaker version: %02x\n", ver);
for (x=0;x<255;x++) {
/* Test registers */
- __wcfxs_setcreg(wc, WC_TEST, x);
- y = __wcfxs_getcreg(wc, WC_TEST);
+ if (ver >= 0x70) {
+ __wcfxs_setcreg(wc, WC_CS, x);
+ y = __wcfxs_getcreg(wc, WC_CS);
+ } else {
+ __wcfxs_setcreg(wc, WC_TEST, x);
+ y = __wcfxs_getcreg(wc, WC_TEST);
+ }
if (x != y) {
printk("%02x != %02x\n", x, y);
failed++;