summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2013-10-04 02:27:53 +0200
committercinap_lenrek <cinap_lenrek@gmx.de>2013-10-04 02:27:53 +0200
commit9bcdfac3be4cf1e9669b00720089045a709fcc9c (patch)
treefab8e72a8c237c4e78aa753aa99721015c9d876b /sys
parent5c4756974b7f0a61d267ae522605600ff4409507 (diff)
parent7c28d33d4b827df6038424dfc57312a9ca58bc65 (diff)
merge
Diffstat (limited to 'sys')
-rw-r--r--sys/src/9/pc/ether83815.c20
-rw-r--r--sys/src/9/pc/io.h26
2 files changed, 32 insertions, 14 deletions
diff --git a/sys/src/9/pc/ether83815.c b/sys/src/9/pc/ether83815.c
index 6b3a4cf73..a17f2d0e6 100644
--- a/sys/src/9/pc/ether83815.c
+++ b/sys/src/9/pc/ether83815.c
@@ -92,6 +92,7 @@ enum { /* PCI vendor & device IDs */
SiSrev630s = 0x81,
SiSrev630e = 0x82,
SiSrev630ea1 = 0x83,
+ SiSrev635 = 0x90,
SiSeenodeaddr = 8, /* short addr of SiS eeprom mac addr */
SiS630eenodeaddr = 9, /* likewise for the 630 */
@@ -166,6 +167,7 @@ static Ctlr* ctlrtail;
enum {
/* registers (could memory map) */
Rcr= 0x00, /* command register */
+ Rld= 1<<10, /* reload */
Rst= 1<<8,
Rxr= 1<<5, /* receiver reset */
Txr= 1<<4, /* transmitter reset */
@@ -772,6 +774,8 @@ softreset(Ctlr* ctlr, int resetphys)
* Soft-reset the controller
*/
resetctlr(ctlr);
+ if(ctlr->id != Nat83815)
+ return 0;
csr32w(ctlr, Rccsr, Pmests);
csr32w(ctlr, Rccsr, 0);
csr32w(ctlr, Rcfg, csr32r(ctlr, Rcfg) | Pint_acen);
@@ -923,7 +927,21 @@ sissrom(Ctlr *ctlr)
int i, off = SiSeenodeaddr, cnt = sizeof ee.eaddr / sizeof(short);
ushort *shp = (ushort *)ee.eaddr;
- if(!is630(ctlr->id, ctlr->pcidev) || !sisrdcmos(ctlr)) {
+ if(ctlr->id == SiS900 && ctlr->pcidev->rid == SiSrev635) {
+ csr32w(ctlr, Rcr, csr32r(ctlr, Rcr) | Rld);
+ csr32w(ctlr, Rcr, csr32r(ctlr, Rcr) & ~Rld);
+ csr32w(ctlr, Rrfcr, csr32r(ctlr, Rrfcr) & ~Rfen);
+
+ csr32w(ctlr, Rrfcr, 0);
+ *shp++ = csr32r(ctlr, Rrfdr);
+ csr32w(ctlr, Rrfcr, 1<<16);
+ *shp++ = csr32r(ctlr, Rrfdr);
+ csr32w(ctlr, Rrfcr, 1<<17);
+ *shp = csr32r(ctlr, Rrfdr);
+
+ csr32w(ctlr, Rrfcr, csr32r(ctlr, Rrfcr) | Rfen);
+ memmove(ctlr->sromea, ee.eaddr, sizeof ctlr->sromea);
+ } else if(!is630(ctlr->id, ctlr->pcidev) || !sisrdcmos(ctlr)) {
for (i = 0; i < cnt; i++)
*shp++ = eegetw(ctlr, off++);
memmove(ctlr->sromea, ee.eaddr, sizeof ctlr->sromea);
diff --git a/sys/src/9/pc/io.h b/sys/src/9/pc/io.h
index d33439b40..17ccee519 100644
--- a/sys/src/9/pc/io.h
+++ b/sys/src/9/pc/io.h
@@ -218,19 +218,19 @@ enum { /* type 2 pre-defined header */
/* capabilities */
enum {
- PciCapPMG = 0x01, /* power management */
- PciCapAGP = 0x02,
- PciCapVPD = 0x03, /* vital product data */
- PciCapSID = 0x04, /* slot id */
- PciCapMSI = 0x05,
- PciCapCHS = 0x06, /* compact pci hot swap */
- PciCapPCIX = 0x07,
- PciCapHTC = 0x08, /* hypertransport irq conf */
- PciCapVND = 0x09, /* vendor specific information */
- PciCapPCIe = 0x10,
- PciCapMSIX = 0x11,
- PciCapSATA = 0x12,
- PciCapHSW = 0x0c, /* hot swap */
+ PciCapPMG = 0x01, /* power management */
+ PciCapAGP = 0x02,
+ PciCapVPD = 0x03, /* vital product data */
+ PciCapSID = 0x04, /* slot id */
+ PciCapMSI = 0x05,
+ PciCapCHS = 0x06, /* compact pci hot swap */
+ PciCapPCIX = 0x07,
+ PciCapHTC = 0x08, /* hypertransport irq conf */
+ PciCapVND = 0x09, /* vendor specific information */
+ PciCapPCIe = 0x10,
+ PciCapMSIX = 0x11,
+ PciCapSATA = 0x12,
+ PciCapHSW = 0x0c, /* hot swap */
};
typedef struct Pcisiz Pcisiz;