Paul Fagerburg has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36068 )
Change subject: automation: add empty_ddr4.spd.hex to Makefile.inc ......................................................................
automation: add empty_ddr4.spd.hex to Makefile.inc
Coreboot build expects to have at least 1 SPD file defined. The author needs to specify the SPDs that are specific to this board, but that can come later. We need to define something so that we can do an initial build and ensure that the new variant has been cloned correctly.
BUG=b:140261109 BRANCH=None TEST=Create and build the "sushi" variant: $ util/mainboard/google/hatch/create_coreboot_variant.sh sushi $ util/abuild/abuild -p none -t google/hatch -x -a
Prior to this CL, you would get an error message that SPD_SOURCES is not set. After the CL, the build proceeds.
Change-Id: Ie946cfd7c071824168faa38fd53bd338a5a451e1 Signed-off-by: Paul Fagerburg pfagerburg@chromium.org --- M util/mainboard/google/hatch/template/Makefile.inc 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/68/36068/1
diff --git a/util/mainboard/google/hatch/template/Makefile.inc b/util/mainboard/google/hatch/template/Makefile.inc index 38cf728..809f051 100644 --- a/util/mainboard/google/hatch/template/Makefile.inc +++ b/util/mainboard/google/hatch/template/Makefile.inc @@ -10,4 +10,4 @@ ## GNU General Public License for more details. ##
-SPD_SOURCES = +SPD_SOURCES = empty_ddr4.spd.hex
Paul Fagerburg has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36068 )
Change subject: automation: add empty_ddr4.spd.hex to Makefile.inc ......................................................................
Patch Set 1:
Fixes a bug in https://review.coreboot.org/c/coreboot/+/35239
Hello Marco Chen, Jett Rink, Keith Short, Justin TerAvest, Shelley Chen, build bot (Jenkins), Scott Collyer, Furquan Shaikh, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36068
to look at the new patch set (#2).
Change subject: automation: add empty_ddr4.spd.hex to Makefile.inc ......................................................................
automation: add empty_ddr4.spd.hex to Makefile.inc
coreboot build expects to have at least 1 SPD file defined. The author needs to specify the SPDs that are specific to this board, but that can come later. We need to define something so that we can do an initial build and ensure that the new variant has been cloned correctly.
BUG=b:140261109 BRANCH=None TEST=Create and build the "sushi" variant: $ util/mainboard/google/hatch/create_coreboot_variant.sh sushi $ util/abuild/abuild -p none -t google/hatch -x -a
Prior to this CL, you would get an error message that SPD_SOURCES is not set. After the CL, the build proceeds.
Change-Id: Ie946cfd7c071824168faa38fd53bd338a5a451e1 Signed-off-by: Paul Fagerburg pfagerburg@chromium.org --- M util/mainboard/google/hatch/template/Makefile.inc 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/68/36068/2
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36068 )
Change subject: automation: add empty_ddr4.spd.hex to Makefile.inc ......................................................................
Patch Set 3:
Wonder if it would be better to allow an empty SPD_SOURCES and print an info instead of an error in spd/Makefile.inc.
Paul Fagerburg has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36068 )
Change subject: automation: add empty_ddr4.spd.hex to Makefile.inc ......................................................................
Patch Set 3:
Patch Set 3:
Wonder if it would be better to allow an empty SPD_SOURCES and print an info instead of an error in spd/Makefile.inc.
Allowing an empty SPD_SOURCES means we need extra logic for when spd.bin doesn't exist (because it only gets built if SPD_SOURCES is non-empty), and then the C array that points to the SPD data has to have special logic as well. And then when you try to run your code, it doesn't work because you don't have any SPD for your DRAM so MRC doesn't know what to do.
On the other hand, if we start with an "empty" SPD, we have one slot filled, spd.bin gets built, the C array has some contents, it's just that (as before) your code won't work, though this time it's because the SPD doesn't work for the DRAM you have.
Hello Marco Chen, Jett Rink, Keith Short, Justin TerAvest, Shelley Chen, build bot (Jenkins), Scott Collyer, Furquan Shaikh, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36068
to look at the new patch set (#4).
Change subject: automation: update script and template files for new variant ......................................................................
automation: update script and template files for new variant
create_coreboot_config.h: * Add a version number for the script and an "auto-generated by" line in the git commit message. * Change the branch name so that it's not the same as the ones that the other scripts will create, so that repo upload on those CLs won't affect this one.
Makefile.inc: * Coreboot build expects to have at least 1 SPD file defined. The author needs to specify the SPDs that are specific to this board, but that can come later. We need to define something so that we can do an initial build and ensure that the new variant has been cloned correctly. * We also need to include our own version of gpio.c in the build.
gpio.h: * The code expects GPIO_MEM_CONFIG_0 through _3 to be defined.
gpio.c: * Need to define tables for GPIO initialization, even if they start out empty.
BUG=b:140261109 BRANCH=None TEST=Create and build the "sushi" variant: $ util/mainboard/google/hatch/create_coreboot_variant.sh sushi $ util/abuild/abuild -p none -t google/hatch -x -a
Prior to this CL, you would get an error message that SPD_SOURCES is not set. If you fixed that, then you would get failures for GPIO_MEM_CONFIG_0, _1, _2, and _3 not defined, and/or gpio_table[] and early_gpio_table[] not defined. After the CL, the build proceeds.
Change-Id: Ie946cfd7c071824168faa38fd53bd338a5a451e1 Signed-off-by: Paul Fagerburg pfagerburg@chromium.org --- M util/mainboard/google/hatch/create_coreboot_variant.sh M util/mainboard/google/hatch/template/Makefile.inc A util/mainboard/google/hatch/template/gpio.c M util/mainboard/google/hatch/template/include/variant/gpio.h 4 files changed, 62 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/68/36068/4
Hello Marco Chen, Jett Rink, Keith Short, Justin TerAvest, Shelley Chen, build bot (Jenkins), Scott Collyer, Furquan Shaikh, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36068
to look at the new patch set (#5).
Change subject: automation: update script and template files for new variant ......................................................................
automation: update script and template files for new variant
create_coreboot_config.h: * Add a version number for the script and an "auto-generated by" line in the git commit message. * Change the branch name so that it's not the same as the ones that the other scripts will create, so that repo upload on those CLs won't affect this one.
Makefile.inc: * coreboot build expects to have at least 1 SPD file defined. The author needs to specify the SPDs that are specific to this board, but that can come later. We need to define something so that we can do an initial build and ensure that the new variant has been cloned correctly. * We also need to include our own version of gpio.c in the build.
gpio.h: * The code expects GPIO_MEM_CONFIG_0 through _3 to be defined.
gpio.c: * Need to define tables for GPIO initialization, even if they start out empty.
BUG=b:140261109 BRANCH=None TEST=Create and build the "sushi" variant: $ util/mainboard/google/hatch/create_coreboot_variant.sh sushi $ util/abuild/abuild -p none -t google/hatch -x -a
Prior to this CL, you would get an error message that SPD_SOURCES is not set. If you fixed that, then you would get failures for GPIO_MEM_CONFIG_0, _1, _2, and _3 not defined, and/or gpio_table[] and early_gpio_table[] not defined. After the CL, the build proceeds.
Change-Id: Ie946cfd7c071824168faa38fd53bd338a5a451e1 Signed-off-by: Paul Fagerburg pfagerburg@chromium.org --- M util/mainboard/google/hatch/create_coreboot_variant.sh M util/mainboard/google/hatch/template/Makefile.inc A util/mainboard/google/hatch/template/gpio.c M util/mainboard/google/hatch/template/include/variant/gpio.h 4 files changed, 62 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/68/36068/5
Justin TerAvest has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36068 )
Change subject: automation: update script and template files for new variant ......................................................................
Patch Set 5: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/36068/5/util/mainboard/google/hatch... File util/mainboard/google/hatch/template/include/variant/gpio.h:
https://review.coreboot.org/c/coreboot/+/36068/5/util/mainboard/google/hatch... PS5, Line 21: #define GPIO_MEM_CONFIG_0 GPP_F20 hmm. This is ok for now, though for later projects, I would like for us to have some baseboard definition for these that can be copied and optionally overridden.
Paul Fagerburg has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36068 )
Change subject: automation: update script and template files for new variant ......................................................................
Patch Set 5:
(1 comment)
https://review.coreboot.org/c/coreboot/+/36068/5/util/mainboard/google/hatch... File util/mainboard/google/hatch/template/include/variant/gpio.h:
https://review.coreboot.org/c/coreboot/+/36068/5/util/mainboard/google/hatch... PS5, Line 21: #define GPIO_MEM_CONFIG_0 GPP_F20
hmm. […]
It is there just to make the code compile. A new variant in coreboot starts out as just a clone of the baseboard, so this will match up with the Hatch definitions. It would be nice to have them defined at the baseboard level, and then if the variant hasn't changed the GPIOs for memory configuration, no need to do anything. That's a future project.
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36068 )
Change subject: automation: update script and template files for new variant ......................................................................
Patch Set 5:
(3 comments)
Patch Set 3:
Patch Set 3:
Wonder if it would be better to allow an empty SPD_SOURCES and print an info instead of an error in spd/Makefile.inc.
Allowing an empty SPD_SOURCES means we need extra logic for when spd.bin doesn't exist (because it only gets built if SPD_SOURCES is non-empty), and then the C array that points to the SPD data has to have special logic as well. And then when you try to run your code, it doesn't work because you don't have any SPD for your DRAM so MRC doesn't know what to do.
On the other hand, if we start with an "empty" SPD, we have one slot filled, spd.bin gets built, the C array has some contents, it's just that (as before) your code won't work, though this time it's because the SPD doesn't work for the DRAM you have.
We have some new variants for Hatch coming up (Puff) that do not use SPD. So, we anyways need to re-factor the code to ensure that we allow for it. Change should as simple as : diff --git a/src/mainboard/google/hatch/spd/Makefile.inc b/src/mainboard/google/hatch/spd/Makefile.inc index 9ab7394b30..1f7bb35a9e 100644 --- a/src/mainboard/google/hatch/spd/Makefile.inc +++ b/src/mainboard/google/hatch/spd/Makefile.inc @@ -16,10 +16,7 @@ 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
# Include spd ROM data $(SPD_BIN): $(SPD_DEPS) @@ -32,3 +29,5 @@ $(SPD_BIN): $(SPD_DEPS) cbfs-files-y += spd.bin spd.bin-file := $(SPD_BIN) spd.bin-type := spd + +endif
https://review.coreboot.org/c/coreboot/+/36068/5/util/mainboard/google/hatch... File util/mainboard/google/hatch/template/gpio.c:
https://review.coreboot.org/c/coreboot/+/36068/5/util/mainboard/google/hatch... PS5, Line 24: override_gpio_table This is already provided as a weak function in baseboard/gpio.c, so there is no need to add this unless the variant really requires it.
https://review.coreboot.org/c/coreboot/+/36068/5/util/mainboard/google/hatch... PS5, Line 40: variant_early_gpio_table I think we should just provide a weak implementation of this in baseboard/hatch. Then, this entire file can be skipped here.
https://review.coreboot.org/c/coreboot/+/36068/5/util/mainboard/google/hatch... File util/mainboard/google/hatch/template/include/variant/gpio.h:
https://review.coreboot.org/c/coreboot/+/36068/5/util/mainboard/google/hatch... PS5, Line 21: #define GPIO_MEM_CONFIG_0 GPP_F20
It is there just to make the code compile. […]
It would be worthwhile moving this to baseboard/gpio.h. Variants can always re-define those later if they don't use the same configuration as baseboard.
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36068 )
Change subject: automation: update script and template files for new variant ......................................................................
Patch Set 5:
ifeq ($(SPD_SOURCES),)
This should be ifneq instead of ifeq. Basically, if SPD_SOURCES are provided add spd.bin else $(info WARNING: SPD_SOURCES not provided. spd.bin will not be generated).
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36068 )
Change subject: automation: update script and template files for new variant ......................................................................
Patch Set 5:
Overall, I think you can avoid most(all?) changes in this CL if you just re-factor hatch/ code.
Hello Marco Chen, Jett Rink, Keith Short, Justin TerAvest, Shelley Chen, build bot (Jenkins), Scott Collyer, Furquan Shaikh, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36068
to look at the new patch set (#6).
Change subject: automation: update script and template files for new variant ......................................................................
automation: update script and template files for new variant
create_coreboot_config.sh: * Add a version number for the script and an "auto-generated by" line in the git commit message. * Change the branch name so that it's not the same as the ones that the other scripts will create, so that repo upload on those CLs won't affect this one.
spd/Makefile.inc * Certain upcoming Hatch variants will not use SPD files. Allow SPD_SOURCES to be empty. This means we don't need to update the template Makefile.inc to specify an empty SPD.
baseboard/gpio.h * Define default GPIOs for MEM_CONFIG, variant can redefine these if needed.
baseboard/gpio.c * Add weak function for variant_early_gpio_table so that we don't need a gpio.c unless we're changing the GPIOs.
BUG=b:140261109 BRANCH=None TEST=Create and build the "sushi" variant: $ util/mainboard/google/hatch/create_coreboot_variant.sh sushi $ util/abuild/abuild -p none -t google/hatch -x -a
Prior to this CL, you would get an error message that SPD_SOURCES is not set. If you fixed that, then you would get failures for GPIO_MEM_CONFIG_0, _1, _2, and _3 not defined, and/or gpio_table[] and early_gpio_table[] not defined. After the CL, the build proceeds.
Change-Id: Ie946cfd7c071824168faa38fd53bd338a5a451e1 Signed-off-by: Paul Fagerburg pfagerburg@chromium.org --- M src/mainboard/google/hatch/spd/Makefile.inc M src/mainboard/google/hatch/variants/baseboard/gpio.c M src/mainboard/google/hatch/variants/baseboard/include/baseboard/gpio.h M util/mainboard/google/hatch/create_coreboot_variant.sh 4 files changed, 34 insertions(+), 17 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/68/36068/6
Paul Fagerburg has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36068 )
Change subject: automation: update script and template files for new variant ......................................................................
Patch Set 6:
(3 comments)
https://review.coreboot.org/c/coreboot/+/36068/5/util/mainboard/google/hatch... File util/mainboard/google/hatch/template/gpio.c:
https://review.coreboot.org/c/coreboot/+/36068/5/util/mainboard/google/hatch... PS5, Line 24: override_gpio_table
This is already provided as a weak function in baseboard/gpio. […]
Done
https://review.coreboot.org/c/coreboot/+/36068/5/util/mainboard/google/hatch... PS5, Line 40: variant_early_gpio_table
I think we should just provide a weak implementation of this in baseboard/hatch. […]
Done
https://review.coreboot.org/c/coreboot/+/36068/5/util/mainboard/google/hatch... File util/mainboard/google/hatch/template/include/variant/gpio.h:
https://review.coreboot.org/c/coreboot/+/36068/5/util/mainboard/google/hatch... PS5, Line 21: #define GPIO_MEM_CONFIG_0 GPP_F20
It would be worthwhile moving this to baseboard/gpio.h. […]
Done
Hello Marco Chen, Jett Rink, Keith Short, Justin TerAvest, Shelley Chen, build bot (Jenkins), Scott Collyer, Furquan Shaikh, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36068
to look at the new patch set (#7).
Change subject: hatch: refactor GPIOs into baseboard, allow empty SPDs ......................................................................
hatch: refactor GPIOs into baseboard, allow empty SPDs
Each variant had to define the GPIOs for memory configuration, even if they were the same as the baseboard. Moved the definititions into baseboard/gpio.h so that if the variant doesn't change the pins, it doesn't need to do anything.
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 --- M src/mainboard/google/hatch/spd/Makefile.inc M src/mainboard/google/hatch/variants/baseboard/gpio.c M src/mainboard/google/hatch/variants/baseboard/include/baseboard/gpio.h 3 files changed, 26 insertions(+), 15 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/68/36068/7
Paul Fagerburg has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36068 )
Change subject: hatch: refactor GPIOs into baseboard, allow empty SPDs ......................................................................
Patch Set 7:
Per Furquan's feedback, refactoring some of the Hatch code allowed no changes to the file templates that create_coreboot_config.sh uses. Accordingly, the commit description and reviewers have changed.
Paul Fagerburg has removed Marco Chen from this change. ( https://review.coreboot.org/c/coreboot/+/36068 )
Change subject: hatch: refactor GPIOs into baseboard, allow empty SPDs ......................................................................
Removed reviewer Marco Chen.
Paul Fagerburg has removed Scott Collyer from this change. ( https://review.coreboot.org/c/coreboot/+/36068 )
Change subject: hatch: refactor GPIOs into baseboard, allow empty SPDs ......................................................................
Removed reviewer Scott Collyer.
Paul Fagerburg has removed Justin TerAvest from this change. ( https://review.coreboot.org/c/coreboot/+/36068 )
Change subject: hatch: refactor GPIOs into baseboard, allow empty SPDs ......................................................................
Removed reviewer Justin TerAvest.
Paul Fagerburg has removed Keith Short from this change. ( https://review.coreboot.org/c/coreboot/+/36068 )
Change subject: hatch: refactor GPIOs into baseboard, allow empty SPDs ......................................................................
Removed reviewer Keith Short.
Paul Fagerburg has removed Jett Rink from this change. ( https://review.coreboot.org/c/coreboot/+/36068 )
Change subject: hatch: refactor GPIOs into baseboard, allow empty SPDs ......................................................................
Removed reviewer Jett Rink.
Paul Fagerburg has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36068 )
Change subject: hatch: refactor GPIOs into baseboard, allow empty SPDs ......................................................................
Patch Set 9:
This change is ready for review.
Justin TerAvest has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36068 )
Change subject: hatch: refactor GPIOs into baseboard, allow empty SPDs ......................................................................
Patch Set 9: Code-Review+2
Hello Justin TerAvest, Shelley Chen, build bot (Jenkins), Furquan Shaikh, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36068
to look at the new patch set (#10).
Change subject: hatch: refactor gpio table into baseboard, allow empty SPDs ......................................................................
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 --- M src/mainboard/google/hatch/spd/Makefile.inc M src/mainboard/google/hatch/variants/baseboard/gpio.c 2 files changed, 10 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/68/36068/10
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36068 )
Change subject: hatch: refactor gpio table into baseboard, allow empty SPDs ......................................................................
Patch Set 10:
(1 comment)
https://review.coreboot.org/c/coreboot/+/36068/10/src/mainboard/google/hatch... File src/mainboard/google/hatch/spd/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/36068/10/src/mainboard/google/hatch... PS10, Line 16: SPD_BIN = $(obj)/spd.bin This can also live within the ifneq block?
Hello Justin TerAvest, Shelley Chen, build bot (Jenkins), Furquan Shaikh, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36068
to look at the new patch set (#11).
Change subject: hatch: refactor gpio table into baseboard, allow empty SPDs ......................................................................
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 --- M src/mainboard/google/hatch/spd/Makefile.inc M src/mainboard/google/hatch/variants/baseboard/gpio.c 2 files changed, 10 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/68/36068/11
Paul Fagerburg has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36068 )
Change subject: hatch: refactor gpio table into baseboard, allow empty SPDs ......................................................................
Patch Set 10:
(1 comment)
https://review.coreboot.org/c/coreboot/+/36068/10/src/mainboard/google/hatch... File src/mainboard/google/hatch/spd/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/36068/10/src/mainboard/google/hatch... PS10, Line 16: SPD_BIN = $(obj)/spd.bin
This can also live within the ifneq block?
Done
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36068 )
Change subject: hatch: refactor gpio table into baseboard, allow empty SPDs ......................................................................
Patch Set 11: Code-Review+2
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/36068 )
Change subject: hatch: refactor gpio table into baseboard, allow empty SPDs ......................................................................
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 --- M src/mainboard/google/hatch/spd/Makefile.inc M src/mainboard/google/hatch/variants/baseboard/gpio.c 2 files changed, 10 insertions(+), 5 deletions(-)
Approvals: build bot (Jenkins): Verified Furquan Shaikh: Looks good to me, approved
diff --git a/src/mainboard/google/hatch/spd/Makefile.inc b/src/mainboard/google/hatch/spd/Makefile.inc index 9ab7394..97a4dfd 100644 --- a/src/mainboard/google/hatch/spd/Makefile.inc +++ b/src/mainboard/google/hatch/spd/Makefile.inc @@ -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 @@ cbfs-files-y += spd.bin spd.bin-file := $(SPD_BIN) spd.bin-type := spd +endif diff --git a/src/mainboard/google/hatch/variants/baseboard/gpio.c b/src/mainboard/google/hatch/variants/baseboard/gpio.c index f8df447..598600b 100644 --- a/src/mainboard/google/hatch/variants/baseboard/gpio.c +++ b/src/mainboard/google/hatch/variants/baseboard/gpio.c @@ -443,3 +443,10 @@ *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; +}