summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarshall Dawson <marshalldawson3rd@gmail.com>2017-12-13 10:51:13 -0700
committerMartin Roth <martinroth@google.com>2017-12-20 16:36:22 +0000
commit66dd399ac2fb57321ba3095515b11d40ca7c5614 (patch)
tree2d40248bb2d2ca149790e5ad6c5f0fda3008b0db
parent33c8773dfd4972f21e474b22d4d2c6b3c9d19f38 (diff)
downloadcoreboot-66dd399ac2fb57321ba3095515b11d40ca7c5614.tar.xz
amd/common/psp: Convert structure init to C99
Use C99 designated initializers for the psp_notify_dram() buffer structure. Change-Id: I2e18b3a2c19b8fb17d0f654b16def52517538957 Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com> Reviewed-on: https://review.coreboot.org/22847 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
-rw-r--r--src/soc/amd/common/block/psp/psp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/soc/amd/common/block/psp/psp.c b/src/soc/amd/common/block/psp/psp.c
index b13aa57337..bb0a5fe8bd 100644
--- a/src/soc/amd/common/block/psp/psp.c
+++ b/src/soc/amd/common/block/psp/psp.c
@@ -161,14 +161,15 @@ static int send_psp_command(u32 command, void *buffer)
*/
int psp_notify_dram(void)
{
- struct mbox_default_buffer buffer;
int cmd_status;
+ struct mbox_default_buffer buffer = {
+ .header = {
+ .size = sizeof(buffer)
+ }
+ };
printk(BIOS_DEBUG, "PSP: Notify that DRAM is available... ");
- buffer.header.size = sizeof(struct mbox_default_buffer);
- buffer.header.status = 0; /* PSP does not report status for this cmd */
-
cmd_status = send_psp_command(MBOX_BIOS_CMD_DRAM_INFO, &buffer);
/* buffer's status shouldn't change but report it if it does */