PERFORCE change 125593 for review
Peter Wemm
peter at FreeBSD.org
Thu Aug 23 12:27:31 PDT 2007
http://perforce.freebsd.org/chv.cgi?CH=125593
Change 125593 by peter at peter_overcee on 2007/08/23 19:27:17
Actually change the PLX register to the good value.
Affected files ...
.. //depot/projects/hammer/sys/dev/si/si_pci.c#9 edit
Differences ...
==== //depot/projects/hammer/sys/dev/si/si_pci.c#9 (text+ko) ====
@@ -106,16 +106,24 @@
}
if (pci_get_devid(dev) == 0x200011cb) {
+ int rid;
+ struct resource *plx_res;
+ uint32_t *addr;
+ uint32_t oldvalue;
+
/* Perform a PLX control register fixup */
- int rid = PCIR_BAR(0);
- plx_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
- &rid, RF_ACTIVE);
+ rid = PCIR_BAR(0);
+ plx_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid,
+ RF_ACTIVE);
if (plx_res == NULL) {
device_printf(dev, "couldn't map plx registers\n");
} else {
- uint32_t *maddr;
addr = rman_get_virtual(plx_res);
- device_printf(dev, "PLX register 0x50: 0x%08x\n", addr[0x50 / 4]);
+ oldvalue = addr[0x50 / 4];
+ if (oldvalue != 0x18260000) {
+ device_printf(dev, "PLX register 0x50: 0x%08x changed to 0x%08x\n", oldvalue, 0x18260000);
+ addr[0x50 / 4] = 0x18260000;
+ }
bus_release_resource(dev, SYS_RES_MEMORY, rid, plx_res);
}
}
More information about the p4-projects
mailing list