| * Copyright 2008 Freescale Semiconductor, Inc. |
| * This program is free software; you can redistribute it and/or |
| * modify it under the terms of the GNU General Public License |
| * Version 2 as published by the Free Software Foundation. |
| /* used for ddr1 and ddr2 spd */ |
| spd_check(const u8 *buf, u8 spd_rev, u8 spd_cksum) |
| * Check SPD revision supported |
| * Rev 1.2 or less supported by this code |
| printf("SPD revision %02X not supported by this code\n", |
| for (i = 0; i < 63; i++) { |
| if (cksum != spd_cksum) { |
| printf("SPD checksum unexpected. " |
| "Checksum in SPD = %02X, computed SPD = %02X\n", |
| ddr1_spd_check(const ddr1_spd_eeprom_t *spd) |
| const u8 *p = (const u8 *)spd; |
| return spd_check(p, spd->spd_rev, spd->cksum); |
| ddr2_spd_check(const ddr2_spd_eeprom_t *spd) |
| const u8 *p = (const u8 *)spd; |
| return spd_check(p, spd->spd_rev, spd->cksum); |