Furquan Shaikh has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/34251 )
Change subject: mb/google/hatch: Add support for variant_memory_sku() ......................................................................
mb/google/hatch: Add support for variant_memory_sku()
This change adds support for variant_memory_sku() that allows variant to return memory SKU ID. Current implementation of memory_sku() is renamed to weak implementation of variant_memory_sku(). Functionally this change should be the same as before for all hatch variants. This function will be overriden by helios in a follow-up CL.
BUG=b:133455595
Change-Id: I509c263ec08e0060c12ef1ea9fed673f1e3f3a41 Signed-off-by: Furquan Shaikh furquan@google.com --- M src/mainboard/google/hatch/romstage.c M src/mainboard/google/hatch/variants/baseboard/include/baseboard/variants.h 2 files changed, 5 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/51/34251/1
diff --git a/src/mainboard/google/hatch/romstage.c b/src/mainboard/google/hatch/romstage.c index 69fee28..a94fab5 100644 --- a/src/mainboard/google/hatch/romstage.c +++ b/src/mainboard/google/hatch/romstage.c @@ -29,7 +29,7 @@ */ #define GPIO_MEM_CH_SEL GPP_F2
-static int memory_sku(void) +int __weak variant_memory_sku(void) { const gpio_t spd_gpios[] = { GPIO_MEM_CONFIG_0, @@ -48,7 +48,7 @@ int is_single_ch_mem;
variant_memory_params(&memcfg); - mem_sku = memory_sku(); + mem_sku = variant_memory_sku(); /* * GPP_F2 is the MEM_CH_SEL gpio, which is set to 1 for single * channel skus and 0 for dual channel skus. diff --git a/src/mainboard/google/hatch/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/hatch/variants/baseboard/include/baseboard/variants.h index 17bd5df..864d140 100644 --- a/src/mainboard/google/hatch/variants/baseboard/include/baseboard/variants.h +++ b/src/mainboard/google/hatch/variants/baseboard/include/baseboard/variants.h @@ -34,6 +34,9 @@ /* Return board specific memory configuration */ void variant_memory_params(struct cnl_mb_cfg *bcfg);
+/* Return memory SKU for the variant */ +int variant_memory_sku(void); + /* Return variant specific gpio pads to be configured during sleep */ const struct pad_config *variant_sleep_gpio_table(u8 slp_typ, size_t *num);
Paul Fagerburg has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34251 )
Change subject: mb/google/hatch: Add support for variant_memory_sku() ......................................................................
Patch Set 1: Code-Review+2
Furquan Shaikh has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/34251 )
Change subject: mb/google/hatch: Add support for variant_memory_sku() ......................................................................
mb/google/hatch: Add support for variant_memory_sku()
This change adds support for variant_memory_sku() that allows variant to return memory SKU ID. Current implementation of memory_sku() is renamed to weak implementation of variant_memory_sku(). Functionally this change should be the same as before for all hatch variants. This function will be overriden by helios in a follow-up CL.
BUG=b:133455595
Change-Id: I509c263ec08e0060c12ef1ea9fed673f1e3f3a41 Signed-off-by: Furquan Shaikh furquan@google.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/34251 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Paul Fagerburg pfagerburg@chromium.org --- M src/mainboard/google/hatch/romstage.c M src/mainboard/google/hatch/variants/baseboard/include/baseboard/variants.h 2 files changed, 5 insertions(+), 2 deletions(-)
Approvals: build bot (Jenkins): Verified Paul Fagerburg: Looks good to me, approved
diff --git a/src/mainboard/google/hatch/romstage.c b/src/mainboard/google/hatch/romstage.c index 69fee28..a94fab5 100644 --- a/src/mainboard/google/hatch/romstage.c +++ b/src/mainboard/google/hatch/romstage.c @@ -29,7 +29,7 @@ */ #define GPIO_MEM_CH_SEL GPP_F2
-static int memory_sku(void) +int __weak variant_memory_sku(void) { const gpio_t spd_gpios[] = { GPIO_MEM_CONFIG_0, @@ -48,7 +48,7 @@ int is_single_ch_mem;
variant_memory_params(&memcfg); - mem_sku = memory_sku(); + mem_sku = variant_memory_sku(); /* * GPP_F2 is the MEM_CH_SEL gpio, which is set to 1 for single * channel skus and 0 for dual channel skus. diff --git a/src/mainboard/google/hatch/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/hatch/variants/baseboard/include/baseboard/variants.h index 17bd5df..864d140 100644 --- a/src/mainboard/google/hatch/variants/baseboard/include/baseboard/variants.h +++ b/src/mainboard/google/hatch/variants/baseboard/include/baseboard/variants.h @@ -34,6 +34,9 @@ /* Return board specific memory configuration */ void variant_memory_params(struct cnl_mb_cfg *bcfg);
+/* Return memory SKU for the variant */ +int variant_memory_sku(void); + /* Return variant specific gpio pads to be configured during sleep */ const struct pad_config *variant_sleep_gpio_table(u8 slp_typ, size_t *num);