[LinuxBIOS] [PATCH] vt8237r fixes/improvements (LBv2)

Corey Osgood corey.osgood at gmail.com
Sat Nov 3 04:02:55 CET 2007


Peter Stuge wrote:
> On Fri, Nov 02, 2007 at 01:30:25PM -0400, Corey Osgood wrote:
>   
>> +void smbus_fixup(const struct mem_controller *ctrl)
>> +{
>> +	int i, ram_slots, current_slot = 0;
>> +	u8 result = 0;
>> +
>> +	ram_slots = ARRAY_SIZE(ctrl->channel0);
>> +	if (!ram_slots) {
>> +		print_err("smbus_fixup thinks there are no ram slots!\r\n");
>> +		return;
>> +	}
>> +	
>> +	PRINT_DEBUG("Waiting for smbus to warm up");
>> +		
>> +	/* Bad SPD data should be either 0 or 0xff, but YMMV. So we look for the
>> +	 * ID bytes of SDRAM, DDR, DDR2, and DDR3 (and anything in between).
>> +	 * vt8237r has only been seen on DDR and DDR2 based systems, so far */
>> +	for(i = 0; (i < SMBUS_TIMEOUT && ((result < SPD_MEMORY_TYPE_SDRAM) || 
>> +			(result > SPD_MEMORY_TYPE_SDRAM_DDR3))); i++)
>> +	{
>> +		if (current_slot > ram_slots) j = 0;
>>     
>
> What is j here?
>   

Oops, should have been current_slot. I can fix it before commit.

>> +++ src/include/spd.h	(working copy)
>> @@ -105,6 +105,7 @@
>>  #define SPD_MEMORY_TYPE_SGRAM_DDR        6
>>  #define SPD_MEMORY_TYPE_SDRAM_DDR        7
>>  #define SPD_MEMORY_TYPE_SDRAM_DDR2       8
>> +#define SPD_MEMORY_TYPE_SDRAM_DDR3	 0xb
>>     
>
> Looks like bad whitespace, but that's a separate patch.
>   

Weird, it looks fine in the file.

> Otherwise I'll ack. Can you commit?

Yep, just gotta figure out how. I'll hop on IRC if I have a problem.

-Corey




More information about the coreboot mailing list