diff options
author | 2023-10-10 14:33:42 +0000 | |
---|---|---|
committer | 2023-10-10 14:33:42 +0000 | |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /roms/u-boot/scripts/coreboot.sed | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'roms/u-boot/scripts/coreboot.sed')
-rw-r--r-- | roms/u-boot/scripts/coreboot.sed | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/roms/u-boot/scripts/coreboot.sed b/roms/u-boot/scripts/coreboot.sed new file mode 100644 index 000000000..0cbb5fc9b --- /dev/null +++ b/roms/u-boot/scripts/coreboot.sed @@ -0,0 +1,15 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright (c) 2016 Google, Inc +# Script to convert coreboot code to something similar to what U-Boot uses +# sed -f coreboot.sed <coreboot_file.c> +# Remember to add attribution to coreboot for new files added to U-Boot. +s/REG_RES_WRITE32(\(.*\), \(.*\), \(.*\)),/writel(\3, base + \2);/ +s/REG_RES_POLL32(\(.*\), \(.*\), \(.*\), \(.*\), \(.*\)),/ret = poll32(base + \2, \3, \4, \5);/ +s/REG_RES_OR32(\(.*\), \(.*\), \(.*\)),/setbits_le32(base + \2, \3);/ +s/REG_RES_RMW32(\(.*\), \(.*\), \(.*\), \(.*\)),/clrsetbits_le32(base + \2, ~\3, \4);/ +/REG_SCRIPT_END/d +s/read32/readl/ +s/write32(\(.*\), \(.*\))/writel(\2, \1)/ +s/conf->/plat->/ +s/static const struct reg_script \(.*\)_script\[\] = {/static int \1(struct udevice *dev)/ |