sb/intel/lynxpoint: Drop typedefs of struct types

There's no need to use typedefs for struct types. Get rid of them.

Tested with BUILD_TIMELESS=1, Asrock B85M Pro4 remains identical.

Change-Id: I109bd690500a9f03b9da0fd72044be79abf660d3
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/59619
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
This commit is contained in:
Angel Pons 2021-11-24 11:58:04 +01:00 committed by Felix Held
parent 78ee4889dc
commit 01c9b98ef2
2 changed files with 61 additions and 61 deletions

View File

@ -452,7 +452,7 @@ static void intel_me_mbp_clear(struct device *dev)
} }
} }
static void me_print_fw_version(mbp_fw_version_name *vers_name) static void me_print_fw_version(struct mbp_fw_version_name *vers_name)
{ {
if (!vers_name) { if (!vers_name) {
printk(BIOS_ERR, "ME: mbp missing version report\n"); printk(BIOS_ERR, "ME: mbp missing version report\n");
@ -471,7 +471,7 @@ static inline void print_cap(const char *name, int state)
} }
/* Get ME Firmware Capabilities */ /* Get ME Firmware Capabilities */
static int mkhi_get_fwcaps(mbp_mefwcaps *cap) static int mkhi_get_fwcaps(struct mbp_mefwcaps *cap)
{ {
u32 rule_id = 0; u32 rule_id = 0;
struct me_fwcaps cap_msg; struct me_fwcaps cap_msg;
@ -491,9 +491,9 @@ static int mkhi_get_fwcaps(mbp_mefwcaps *cap)
} }
/* Get ME Firmware Capabilities */ /* Get ME Firmware Capabilities */
static void me_print_fwcaps(mbp_mefwcaps *cap) static void me_print_fwcaps(struct mbp_mefwcaps *cap)
{ {
mbp_mefwcaps local_caps; struct mbp_mefwcaps local_caps;
if (!cap) { if (!cap) {
cap = &local_caps; cap = &local_caps;
printk(BIOS_ERR, "ME: mbp missing fwcaps report\n"); printk(BIOS_ERR, "ME: mbp missing fwcaps report\n");
@ -747,7 +747,7 @@ static u32 me_to_host_words_pending(void)
} }
struct mbp_payload { struct mbp_payload {
mbp_header header; struct mbp_header header;
u32 data[0]; u32 data[0];
}; };
@ -757,9 +757,9 @@ struct mbp_payload {
* Return -1 to indicate a problem (give up) * Return -1 to indicate a problem (give up)
* Return 0 to indicate success (send LOCK+EOP) * Return 0 to indicate success (send LOCK+EOP)
*/ */
static int intel_me_read_mbp(me_bios_payload *mbp_data, struct device *dev) static int intel_me_read_mbp(struct me_bios_payload *mbp_data, struct device *dev)
{ {
mbp_header mbp_hdr; struct mbp_header mbp_hdr;
u32 me2host_pending; u32 me2host_pending;
struct mei_csr host; struct mei_csr host;
struct me_hfs2 hfs2; struct me_hfs2 hfs2;
@ -826,7 +826,7 @@ static int intel_me_read_mbp(me_bios_payload *mbp_data, struct device *dev)
} }
/* Setup the pointers in the me_bios_payload structure. */ /* Setup the pointers in the me_bios_payload structure. */
for (i = 0; i < mbp->header.mbp_size - 1;) { for (i = 0; i < mbp->header.mbp_size - 1;) {
mbp_item_header *item = (void *)&mbp->data[i]; struct mbp_item_header *item = (void *)&mbp->data[i];
switch (MBP_MAKE_IDENT(item->app_id, item->item_id)) { switch (MBP_MAKE_IDENT(item->app_id, item->item_id)) {
case MBP_IDENT(KERNEL, FW_VER): case MBP_IDENT(KERNEL, FW_VER):
@ -880,7 +880,7 @@ static void intel_me_init(struct device *dev)
{ {
struct southbridge_intel_lynxpoint_config *config = dev->chip_info; struct southbridge_intel_lynxpoint_config *config = dev->chip_info;
me_bios_path path = intel_me_path(dev); me_bios_path path = intel_me_path(dev);
me_bios_payload mbp_data; struct me_bios_payload mbp_data;
/* Do initial setup and determine the BIOS path */ /* Do initial setup and determine the BIOS path */
printk(BIOS_NOTICE, "ME: BIOS path: %s\n", me_bios_path_values[path]); printk(BIOS_NOTICE, "ME: BIOS path: %s\n", me_bios_path_values[path]);

View File

@ -353,27 +353,27 @@ void intel_me_finalize(struct device *dev);
#define MBP_IDENT(appid, item) \ #define MBP_IDENT(appid, item) \
MBP_MAKE_IDENT(MBP_APPID_##appid, MBP_##appid##_##item##_ITEM) MBP_MAKE_IDENT(MBP_APPID_##appid, MBP_##appid##_##item##_ITEM)
typedef struct { struct mbp_header {
u32 mbp_size : 8; u32 mbp_size : 8;
u32 num_entries : 8; u32 num_entries : 8;
u32 rsvd : 16; u32 rsvd : 16;
} __packed mbp_header; } __packed;
typedef struct { struct mbp_item_header {
u32 app_id : 8; u32 app_id : 8;
u32 item_id : 8; u32 item_id : 8;
u32 length : 8; u32 length : 8;
u32 rsvd : 8; u32 rsvd : 8;
} __packed mbp_item_header; } __packed;
typedef struct { struct mbp_fw_version_name {
u32 major_version : 16; u32 major_version : 16;
u32 minor_version : 16; u32 minor_version : 16;
u32 hotfix_version : 16; u32 hotfix_version : 16;
u32 build_version : 16; u32 build_version : 16;
} __packed mbp_fw_version_name; } __packed;
typedef struct { struct mbp_mefwcaps {
u32 full_net : 1; u32 full_net : 1;
u32 std_net : 1; u32 std_net : 1;
u32 manageability : 1; u32 manageability : 1;
@ -393,19 +393,19 @@ typedef struct {
u32 reserved_4 : 1; u32 reserved_4 : 1;
u32 wlan : 1; u32 wlan : 1;
u32 reserved_5 : 8; u32 reserved_5 : 8;
} __packed mbp_mefwcaps; } __packed;
typedef struct { struct mbp_rom_bist_data {
u16 device_id; u16 device_id;
u16 fuse_test_flags; u16 fuse_test_flags;
u32 umchid[4]; u32 umchid[4];
} __packed mbp_rom_bist_data; } __packed;
typedef struct { struct mbp_platform_key {
u32 key[8]; u32 key[8];
} mbp_platform_key; };
typedef struct { struct mbp_me_firmware_type {
u32 mobile: 1; u32 mobile: 1;
u32 desktop: 1; u32 desktop: 1;
u32 server: 1; u32 server: 1;
@ -417,70 +417,70 @@ typedef struct {
u32 image_type: 4; u32 image_type: 4;
u32 brand: 4; u32 brand: 4;
u32 rsvd1: 16; u32 rsvd1: 16;
} __packed mbp_me_firmware_type; } __packed;
typedef struct { struct mbp_plat_type {
mbp_me_firmware_type rule_data; struct mbp_me_firmware_type rule_data;
u8 available; u8 available;
} mbp_plat_type; };
typedef struct { struct icc_address_mask {
u16 icc_start_address; u16 icc_start_address;
u16 mask; u16 mask;
} __packed icc_address_mask; } __packed;
typedef struct { struct mbp_icc_profile {
u8 num_icc_profiles; u8 num_icc_profiles;
u8 icc_profile_soft_strap; u8 icc_profile_soft_strap;
u8 icc_profile_index; u8 icc_profile_index;
u8 reserved; u8 reserved;
u32 icc_reg_bundles; u32 icc_reg_bundles;
icc_address_mask icc_address_mask[0]; struct icc_address_mask icc_address_mask[0];
} __packed mbp_icc_profile; } __packed;
typedef struct { struct tdt_state_flag {
u16 lock_state : 1; u16 lock_state : 1;
u16 authenticate_module : 1; u16 authenticate_module : 1;
u16 s3authentication : 1; u16 s3authentication : 1;
u16 flash_wear_out : 1; u16 flash_wear_out : 1;
u16 flash_variable_security : 1; u16 flash_variable_security : 1;
u16 reserved : 11; u16 reserved : 11;
} __packed tdt_state_flag; } __packed;
typedef struct { struct mbp_at_state {
u8 state; u8 state;
u8 last_theft_trigger; u8 last_theft_trigger;
tdt_state_flag flags; struct tdt_state_flag flags;
} __packed mbp_at_state; } __packed;
typedef struct { struct mbp_plat_time {
u32 wake_event_mrst_time_ms; u32 wake_event_mrst_time_ms;
u32 mrst_pltrst_time_ms; u32 mrst_pltrst_time_ms;
u32 pltrst_cpurst_time_ms; u32 pltrst_cpurst_time_ms;
} __packed mbp_plat_time; } __packed;
typedef struct { struct mbp_nfc_data {
u32 device_type : 2; u32 device_type : 2;
u32 reserved : 30; u32 reserved : 30;
} __packed mbp_nfc_data; } __packed;
typedef struct { struct me_bios_payload {
mbp_fw_version_name *fw_version_name; struct mbp_fw_version_name *fw_version_name;
mbp_mefwcaps *fw_capabilities; struct mbp_mefwcaps *fw_capabilities;
mbp_rom_bist_data *rom_bist_data; struct mbp_rom_bist_data *rom_bist_data;
mbp_platform_key *platform_key; struct mbp_platform_key *platform_key;
mbp_plat_type *fw_plat_type; struct mbp_plat_type *fw_plat_type;
mbp_icc_profile *icc_profile; struct mbp_icc_profile *icc_profile;
mbp_at_state *at_state; struct mbp_at_state *at_state;
u32 *mfsintegrity; u32 *mfsintegrity;
mbp_plat_time *plat_time; struct mbp_plat_time *plat_time;
mbp_nfc_data *nfc_data; struct mbp_nfc_data *nfc_data;
} me_bios_payload; };
struct me_fwcaps { struct me_fwcaps {
u32 id; u32 id;
u8 length; u8 length;
mbp_mefwcaps caps_sku; struct mbp_mefwcaps caps_sku;
u8 reserved[3]; u8 reserved[3];
} __packed; } __packed;