soc/amd/common/block/psp/psp_gen2: use union pspv2_mbox_command
Don't use unnamed redefinitions of the pspv2_mbox_command union when the union definition can be used instead. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: I3757db45272f11bb47e5106ad9054c0a9ca0cd52 Reviewed-on: https://review.coreboot.org/c/coreboot/+/63964 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org> Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
This commit is contained in:
parent
63e7b70641
commit
4452400b60
|
@ -46,10 +46,7 @@ static void *soc_get_mbox_address(void)
|
|||
|
||||
static u16 rd_mbox_sts(struct pspv2_mbox *mbox)
|
||||
{
|
||||
union {
|
||||
u32 val;
|
||||
struct pspv2_mbox_cmd_fields fields;
|
||||
} tmp = { 0 };
|
||||
union pspv2_mbox_command tmp = { .val = 0 };
|
||||
|
||||
tmp.val = read32(&mbox->command);
|
||||
return tmp.fields.mbox_status;
|
||||
|
@ -57,10 +54,7 @@ static u16 rd_mbox_sts(struct pspv2_mbox *mbox)
|
|||
|
||||
static void wr_mbox_cmd(struct pspv2_mbox *mbox, u8 cmd)
|
||||
{
|
||||
union {
|
||||
u32 val;
|
||||
struct pspv2_mbox_cmd_fields fields;
|
||||
} tmp = { 0 };
|
||||
union pspv2_mbox_command tmp = { .val = 0 };
|
||||
|
||||
/* Write entire 32-bit area to begin command execution */
|
||||
tmp.fields.mbox_command = cmd;
|
||||
|
@ -69,10 +63,7 @@ static void wr_mbox_cmd(struct pspv2_mbox *mbox, u8 cmd)
|
|||
|
||||
static u8 rd_mbox_recovery(struct pspv2_mbox *mbox)
|
||||
{
|
||||
union {
|
||||
u32 val;
|
||||
struct pspv2_mbox_cmd_fields fields;
|
||||
} tmp = { 0 };
|
||||
union pspv2_mbox_command tmp = { .val = 0 };
|
||||
|
||||
tmp.val = read32(&mbox->command);
|
||||
return !!tmp.fields.recovery;
|
||||
|
|
Loading…
Reference in New Issue