summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2013-03-12 21:08:47 +0100
committercinap_lenrek <cinap_lenrek@gmx.de>2013-03-12 21:08:47 +0100
commitf0303b65cabce1a3cdf2781c952c94a3f1aca310 (patch)
tree8f9d4130471b976a563312d53c0abb418d9f7e1e
parentda66a67a9415629751d7423df4093dbfb6c633a9 (diff)
parentf28ccb0ed97f8475f29adccb83409b00685ac395 (diff)
downloadplan9front-f0303b65cabce1a3cdf2781c952c94a3f1aca310.tar.xz
merge
-rw-r--r--sys/src/9/pc/etheriwl.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/sys/src/9/pc/etheriwl.c b/sys/src/9/pc/etheriwl.c
index 05ae89193..65bbd204f 100644
--- a/sys/src/9/pc/etheriwl.c
+++ b/sys/src/9/pc/etheriwl.c
@@ -87,6 +87,10 @@ enum {
Gio = 0x03c,
EnaL0S = 1<<1,
+ GpDrv = 0x050,
+ GpDrvCalV6 = 1<<2,
+ GpDrv1X2 = 1<<3,
+
Led = 0x094,
LedBsmCtrl = 1<<5,
LedOn = 0x38,
@@ -1163,6 +1167,14 @@ reset(Ctlr *ctlr)
if((err = niclock(ctlr)) != nil)
return err;
+ if((ctlr->type == Type6005 || ctlr->type == Type6050) && ctlr->eeprom.version == 6)
+ csr32w(ctlr, GpDrv, csr32r(ctlr, GpDrv) | GpDrvCalV6);
+ if(ctlr->type == Type6005)
+ csr32w(ctlr, GpDrv, csr32r(ctlr, GpDrv) | GpDrv1X2);
+ nicunlock(ctlr);
+
+ if((err = niclock(ctlr)) != nil)
+ return err;
csr32w(ctlr, FhRxConfig, 0);
csr32w(ctlr, FhRxWptr, 0);
csr32w(ctlr, FhRxBase, PCIWADDR(ctlr->rx.p) >> 8);
@@ -1347,6 +1359,18 @@ postboot(Ctlr *ctlr)
return err;
}
+ if(ctlr->type == Type6005){
+ /* temperature sensor offset */
+ memset(c, 0, sizeof(c));
+ c[0] = 18;
+ c[1] = 0;
+ c[2] = 1;
+ c[3] = 1;
+ put16(c + 4, 2700);
+ if((err = cmd(ctlr, 176, c, 4+2+2)) != nil)
+ return err;
+ }
+
if(ctlr->type == Type6005 || ctlr->type == Type6050){
/* runtime DC calibration */
memset(c, 0, sizeof(c));