hatch: refactor gpio table into baseboard, allow empty SPDs
Each variant needed to define variant_early_gpio_table(), even if it didn't need to make any changes. Added a __weak version of the function into baseboard/gpio.c. Certain upcoming Hatch variants will not use SPD files. Allow SPD_SOURCES in spd/Makefile.inc to be empty. BUG=None BRANCH=None TEST=Build coreboot and see that it builds without error Change-Id: Ie946cfd7c071824168faa38fd53bd338a5a451e1 Signed-off-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/36068 Reviewed-by: Furquan Shaikh <furquan@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
f1ca63ca40
commit
4d77bf2a23
|
@ -13,13 +13,10 @@
|
|||
## GNU General Public License for more details.
|
||||
##
|
||||
|
||||
ifneq ($(SPD_SOURCES),)
|
||||
SPD_BIN = $(obj)/spd.bin
|
||||
|
||||
ifeq ($(SPD_SOURCES),)
|
||||
SPD_DEPS := $(error SPD_SOURCES is not set. Variant must provide this)
|
||||
else
|
||||
SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
|
||||
endif
|
||||
SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
|
||||
|
||||
# Include spd ROM data
|
||||
$(SPD_BIN): $(SPD_DEPS)
|
||||
|
@ -32,3 +29,4 @@ $(SPD_BIN): $(SPD_DEPS)
|
|||
cbfs-files-y += spd.bin
|
||||
spd.bin-file := $(SPD_BIN)
|
||||
spd.bin-type := spd
|
||||
endif
|
||||
|
|
|
@ -443,3 +443,10 @@ const struct pad_config *__weak override_gpio_table(size_t *num)
|
|||
*num = 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Weak implementation of early gpio */
|
||||
const struct pad_config *__weak variant_early_gpio_table(size_t *num)
|
||||
{
|
||||
*num = 0;
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue