summaryrefslogtreecommitdiff
path: root/wctdm.c
diff options
context:
space:
mode:
Diffstat (limited to 'wctdm.c')
-rwxr-xr-xwctdm.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/wctdm.c b/wctdm.c
index 58f92ae..416c4c6 100755
--- a/wctdm.c
+++ b/wctdm.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++;