summaryrefslogtreecommitdiff
path: root/src/soc/intel/common/basecode
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel/common/basecode')
-rw-r--r--src/soc/intel/common/basecode/ramtop/ramtop.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/soc/intel/common/basecode/ramtop/ramtop.c b/src/soc/intel/common/basecode/ramtop/ramtop.c
index 90717e0025..ec326bb1c0 100644
--- a/src/soc/intel/common/basecode/ramtop/ramtop.c
+++ b/src/soc/intel/common/basecode/ramtop/ramtop.c
@@ -1,8 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
+#include <commonlib/bsd/ipchksum.h>
#include <console/console.h>
#include <cpu/x86/mtrr.h>
-#include <ip_checksum.h>
#include <intelbasecode/ramtop.h>
#include <pc80/mc146818rtc.h>
#include <stdint.h>
@@ -57,7 +57,7 @@ static int ramtop_cmos_read(struct ramtop_table *ramtop)
}
/* Verify checksum over signature and counter only */
- csum = compute_ip_checksum(ramtop, offsetof(struct ramtop_table, checksum));
+ csum = ipchksum(ramtop, offsetof(struct ramtop_table, checksum));
if (csum != ramtop->checksum) {
printk(BIOS_DEBUG, "ramtop_table checksum mismatch\n");
@@ -73,8 +73,7 @@ static void ramtop_cmos_write(struct ramtop_table *ramtop)
u8 i, *p;
/* Checksum over signature and counter only */
- ramtop->checksum = compute_ip_checksum(
- ramtop, offsetof(struct ramtop_table, checksum));
+ ramtop->checksum = ipchksum(ramtop, offsetof(struct ramtop_table, checksum));
for (p = (u8 *)ramtop, i = 0; i < sizeof(*ramtop); i++, p++)
cmos_write(*p, (CMOS_VSTART_ramtop / 8) + i);