soc/amd/*/include/data_fabric: add dst_ prefix to fabric_id field

Rename the fabric_id struct field in the df_mmio_control union to
dst_fabric_id to both better match the register definitions and also be
a bit clearer about what this is doing. Also use tabs for indentation in
the struct inside the df_mmio_control union.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I0a17d82a5d7b66a8f84854f21fbbb319da81ac43
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76932
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
This commit is contained in:
Felix Held 2023-08-04 18:45:36 +02:00
parent a159075d3f
commit 84a60fbb1b
6 changed files with 37 additions and 37 deletions

View File

@ -18,13 +18,13 @@
union df_mmio_control {
struct {
uint32_t re : 1; /* [ 0.. 0] */
uint32_t we : 1; /* [ 1.. 1] */
uint32_t : 2; /* [ 3.. 2] */
uint32_t fabric_id : 10; /* [13.. 4] */
uint32_t : 2; /* [15..14] */
uint32_t np : 1; /* [16..16] */
uint32_t : 15; /* [31..17] */
uint32_t re : 1; /* [ 0.. 0] */
uint32_t we : 1; /* [ 1.. 1] */
uint32_t : 2; /* [ 3.. 2] */
uint32_t dst_fabric_id : 10; /* [13.. 4] */
uint32_t : 2; /* [15..14] */
uint32_t np : 1; /* [16..16] */
uint32_t : 15; /* [31..17] */
};
uint32_t raw;
};

View File

@ -67,13 +67,13 @@ void data_fabric_print_mmio_conf(void)
control.re ? "x" : " ",
control.we ? "x" : " ",
control.np ? "x" : " ",
control.fabric_id);
control.dst_fabric_id);
}
}
void data_fabric_disable_mmio_reg(unsigned int reg)
{
union df_mmio_control ctrl = { .fabric_id = IOMS0_FABRIC_ID };
union df_mmio_control ctrl = { .dst_fabric_id = IOMS0_FABRIC_ID };
data_fabric_broadcast_write32(DF_MMIO_CONTROL(reg), ctrl.raw);
data_fabric_broadcast_write32(DF_MMIO_BASE(reg), 0);
data_fabric_broadcast_write32(DF_MMIO_LIMIT(reg), 0);
@ -173,7 +173,7 @@ void data_fabric_set_mmio_np(void)
return;
}
union df_mmio_control np_ctrl = { .fabric_id = IOMS0_FABRIC_ID,
union df_mmio_control np_ctrl = { .dst_fabric_id = IOMS0_FABRIC_ID,
.np = 1, .we = 1, .re = 1 };
data_fabric_broadcast_write32(DF_MMIO_BASE(reg), np_bot);
data_fabric_broadcast_write32(DF_MMIO_LIMIT(reg), np_top);

View File

@ -18,13 +18,13 @@
union df_mmio_control {
struct {
uint32_t re : 1; /* [ 0.. 0] */
uint32_t we : 1; /* [ 1.. 1] */
uint32_t : 1; /* [ 2.. 2] */
uint32_t np : 1; /* [ 3.. 3] */
uint32_t : 12; /* [15.. 4] */
uint32_t fabric_id : 6; /* [21..16] */
uint32_t : 10; /* [31..22] */
uint32_t re : 1; /* [ 0.. 0] */
uint32_t we : 1; /* [ 1.. 1] */
uint32_t : 1; /* [ 2.. 2] */
uint32_t np : 1; /* [ 3.. 3] */
uint32_t : 12; /* [15.. 4] */
uint32_t dst_fabric_id : 6; /* [21..16] */
uint32_t : 10; /* [31..22] */
};
uint32_t raw;
};

View File

@ -23,13 +23,13 @@
union df_mmio_control {
struct {
uint32_t re : 1; /* [ 0.. 0] */
uint32_t we : 1; /* [ 1.. 1] */
uint32_t : 2; /* [ 3.. 2] */
uint32_t fabric_id : 4; /* [ 7.. 4] */
uint32_t : 8; /* [15.. 8] */
uint32_t np : 1; /* [16..16] */
uint32_t : 15; /* [31..17] */
uint32_t re : 1; /* [ 0.. 0] */
uint32_t we : 1; /* [ 1.. 1] */
uint32_t : 2; /* [ 3.. 2] */
uint32_t dst_fabric_id : 4; /* [ 7.. 4] */
uint32_t : 8; /* [15.. 8] */
uint32_t np : 1; /* [16..16] */
uint32_t : 15; /* [31..17] */
};
uint32_t raw;
};

View File

@ -18,13 +18,13 @@
union df_mmio_control {
struct {
uint32_t re : 1; /* [ 0.. 0] */
uint32_t we : 1; /* [ 1.. 1] */
uint32_t : 1; /* [ 2.. 2] */
uint32_t np : 1; /* [ 3.. 3] */
uint32_t : 12; /* [15.. 4] */
uint32_t fabric_id : 6; /* [21..16] */
uint32_t : 10; /* [31..22] */
uint32_t re : 1; /* [ 0.. 0] */
uint32_t we : 1; /* [ 1.. 1] */
uint32_t : 1; /* [ 2.. 2] */
uint32_t np : 1; /* [ 3.. 3] */
uint32_t : 12; /* [15.. 4] */
uint32_t dst_fabric_id : 6; /* [21..16] */
uint32_t : 10; /* [31..22] */
};
uint32_t raw;
};

View File

@ -53,12 +53,12 @@
union df_mmio_control {
struct {
uint32_t re : 1; /* [ 0.. 0] */
uint32_t we : 1; /* [ 1.. 1] */
uint32_t : 2; /* [ 3.. 2] */
uint32_t fabric_id : 8; /* [11.. 4] */
uint32_t np : 1; /* [12..12] */
uint32_t : 19; /* [31..13] */
uint32_t re : 1; /* [ 0.. 0] */
uint32_t we : 1; /* [ 1.. 1] */
uint32_t : 2; /* [ 3.. 2] */
uint32_t dst_fabric_id : 8; /* [11.. 4] */
uint32_t np : 1; /* [12..12] */
uint32_t : 19; /* [31..13] */
};
uint32_t raw;
};