Corey Osgood wrote: > So, I commented all the do_ram_commands out (since I can't see > the problem with it) and did ram init using pci_write_config16, setting > what I know the values should be, and then NOP would not report as being > set (and ram still failed). So, I set up a for loop to set NOP until the > northbridge reported that it was set...I got an infinite loop. My loop > might be wrong (it's a bit hackish), can someone tell me if it should > work? Or does NOP simply not set? > > /* 3. Apply NOP. */ > RAM_DEBUG_MESSAGE("Ram Enable 3: Apply NOP\r\n"); > int s; > for( s = 0; s != 0110; s = pci_read_config16( ctrl->d0, SDRAMC ) ) { > RAM_DEBUG_MESSAGE("Do NOPs til it cooperates!\r\n"); > pci_write_config8(ctrl->d0, SDRAMC, 0x0110); > read32(0x04000000); > EXTRA_DELAY > }
Hello Everyone, I am also new to LinuxBIOS and I've been working on porting and updating the SPD code from v1 assembly to v2. I think odinhorse's previous comment is likely to be true, although I think this is probably what he meant to say: for( s = 0; (s & 0x3ff) != 0x0110; s = pci_read_config16( ctrl->d0, SDRAMC ) ) { or: for( s = 0; s != 0x0110; s = pci_read_config16( ctrl->d0, SDRAMC ) & 0x3fff ) { I don't know which one is more correct, so whatever floats your boat. Other than that, I don't see why it wouldn't work. I don't have a suitable test system to test this with, so hope it helps! Alfred -- linuxbios mailing list linuxbios@linuxbios.org http://www.linuxbios.org/mailman/listinfo/linuxbios