Intel
®
81341 and 81342 I/O Processors
December 2007
Developer’s Manual
Order Number: 315037-002US
671
DDR SDRAM Memory Controller—Intel
®
81341 and 81342
/* Write DLLRCVER Register */
*MCU_DLLRCVER = ((1<<17) | (1<<18) | treg | (coarse << 8) | fine);
/* Read register again to guarantee previous write operation */
*MCU_DLLRCVER;
/* Read a DDR SDRAM Memory Location, this memory read causes
the auto calibration circuit to sample the DQS signal */
val = *ddr_mem_addr;
/* If not defined as a stronly ordered memory region, may need to
put a dependancy here to ensure load from DDR completes */
asm volatile("mov %0, %0" : : "r" (val));
/* Read DLLRCVER register bit 24 to get DQS sample */
val = *MCU_DLLRCVER & (1<<24);
return (val == 0 ? val : 1);
} // End sample_dqs() procedure