From 6272c71fbbfb26ebde9954708f74f875c083f822 Mon Sep 17 00:00:00 2001 From: Thomas Heijligen Date: Sat, 19 Feb 2022 21:17:44 +0100 Subject: hwaccess: replace macros by C code Split the code for endian conversion into separate files for big and little endian. The buildsystem selects the correct file for the used endianness. Replace the swab macros with `static inline` c functions. Define macros for returning the same or swapped value. Call those macros in the endian specific files. Change-Id: I86d38d816b37c283279c485fac8027f8fb94364a Signed-off-by: Thomas Heijligen Reviewed-on: https://review.coreboot.org/c/flashrom/+/62898 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index f5ed409e7..0e6be2059 100644 --- a/Makefile +++ b/Makefile @@ -377,7 +377,9 @@ CHIP_OBJS = jedec.o stm50.o w39.o w29ee011.o \ ############################################################################### # Library code. -LIB_OBJS = libflashrom.o layout.o flashrom.o udelay.o programmer.o programmer_table.o helpers.o ich_descriptors.o fmap.o +LIB_OBJS = libflashrom.o layout.o flashrom.o udelay.o programmer.o programmer_table.o \ + helpers.o ich_descriptors.o fmap.o hwaccess_endian_$(ENDIAN).o + ############################################################################### # Frontend related stuff. -- cgit v1.2.3