[LinuxBIOS] [PATCH] vt8237r fixes/improvements (LBv2)
Peter Stuge
peter at stuge.se
Sat Nov 3 02:52:01 CET 2007
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?
> +++ 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.
Otherwise I'll ack. Can you commit?
//Peter
More information about the coreboot
mailing list