Unify byte order macros and clrsetbits

Hardware / Coreboot - Julius Werner [chromium.org] - 21 April 2015 01:23 UTC

This patch removes quite a bit of code duplication between cpu_to_le32() and clrsetbits_le32() style macros on the different architectures. This also syncs those macros back up to the new write32(a, v) style IO accessor macros that are now used on ARM and ARM64.

CQ-DEPEND=CL:254862 BRANCH=none BUG=chromium:444723 TEST=Compiled Cosmos, Daisy, Blaze, Falco, Pinky, Pit, Rambi, Ryu, Storm and Urara. Booted on Jerry. Tried to compare binary images... unfortunately something about the new macro notation makes the compiler evaluate it more efficiently (not recalculating the address between the read and the write), so this was of limited value.

Change-Id: If8ab62912c952d68a67a0f71e82b038732cd1317

9ff8f6f Unify byte order macros and clrsetbits
src/arch/arm/include/arch/byteorder.h | 21 ------
src/arch/arm/include/arch/io.h | 96 ---------------------------
src/arch/arm/include/armv4/arch/arch_io.h | 58 ----------------
src/arch/arm/include/armv4/arch/io.h | 59 ++++++++++++++++
src/arch/arm/include/armv7/arch/arch_io.h | 68 -------------------
src/arch/arm/include/armv7/arch/io.h | 69 +++++++++++++++++++
src/arch/arm64/include/arch/byteorder.h | 21 ------
src/arch/arm64/include/arch/io.h | 94 --------------------------
src/arch/arm64/include/armv8/arch/arch_io.h | 69 -------------------
src/arch/arm64/include/armv8/arch/io.h | 70 +++++++++++++++++++
src/arch/mips/include/arch/byteorder.h | 21 +-----
src/arch/mips/include/arch/io.h | 57 +---------------
src/arch/riscv/include/arch/byteorder.h | 21 ------
src/arch/x86/boot/smbios.c | 2 +-
src/arch/x86/include/arch/byteorder.h | 21 ------
src/arch/x86/include/arch/cbfs.h | 2 +-
src/arch/x86/include/arch/io.h | 1 +
src/device/oprom/yabel/device.h | 2 +-
src/device/oprom/yabel/vbe.c | 2 +-
src/drivers/i2c/tpm/tis.c | 2 +-
src/drivers/i2c/tpm/tpm.c | 2 +-
src/drivers/pc80/tpm/tpm.c | 1 -
src/drivers/usb/ehci_debug.c | 1 -
src/include/device/pci_rom.h | 2 +-
src/include/endian.h | 67 +++++++++++++++++++
src/lib/edid.c | 1 -
src/lib/selfboot.c | 2 +-
src/mainboard/amd/inagua/broadcom.c | 2 +-
src/mainboard/google/butterfly/romstage.c | 1 -
src/mainboard/google/link/romstage.c | 1 -
src/mainboard/google/parrot/romstage.c | 1 -
src/mainboard/google/samus/spd/spd.c | 2 +-
src/mainboard/google/stout/romstage.c | 1 -
src/mainboard/samsung/lumpy/romstage.c | 1 -
src/mainboard/samsung/stumpy/romstage.c | 1 -
35 files changed, 278 insertions(+), 564 deletions(-)

Upstream: review.coreboot.org


  • Share