1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-01 14:11:15 +02:00

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 <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/62898
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
Thomas Heijligen
2022-02-19 21:17:44 +01:00
committed by Nico Huber
parent b94a5a21c3
commit 6272c71fbb
5 changed files with 167 additions and 69 deletions

View File

@ -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.