src/mainboard/google: Adopt Mainboards to changed Type41 Func

Required for automatic onboard device detection in the next patch.

Change-Id: I3087de779faf8d006510c460b5372b22ae54b887
Signed-off-by: Christian Walter <christian.walter@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/32909
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Christian Walter 2019-05-21 17:22:49 +02:00 committed by Patrick Rudolph
parent 84b8f90bba
commit e6afab12e2
12 changed files with 37 additions and 20 deletions

View File

@ -962,7 +962,7 @@ int smbios_write_type38(unsigned long *current, int *handle,
int smbios_write_type41(unsigned long *current, int *handle, int smbios_write_type41(unsigned long *current, int *handle,
const char *name, u8 instance, u16 segment, const char *name, u8 instance, u16 segment,
u8 bus, u8 device, u8 function) u8 bus, u8 device, u8 function, u8 device_type)
{ {
struct smbios_type41 *t = (struct smbios_type41 *)*current; struct smbios_type41 *t = (struct smbios_type41 *)*current;
int len = sizeof(struct smbios_type41); int len = sizeof(struct smbios_type41);
@ -972,7 +972,7 @@ int smbios_write_type41(unsigned long *current, int *handle,
t->handle = *handle; t->handle = *handle;
t->length = len - 2; t->length = len - 2;
t->reference_designation = smbios_add_string(t->eos, name); t->reference_designation = smbios_add_string(t->eos, name);
t->device_type = SMBIOS_DEVICE_TYPE_OTHER; t->device_type = device_type;
t->device_status = 1; t->device_status = 1;
t->device_type_instance = instance; t->device_type_instance = instance;
t->segment_group_number = segment; t->segment_group_number = segment;

View File

@ -44,7 +44,7 @@ int smbios_write_type38(unsigned long *current, int *handle,
const u8 irq); const u8 irq);
int smbios_write_type41(unsigned long *current, int *handle, int smbios_write_type41(unsigned long *current, int *handle,
const char *name, u8 instance, u16 segment, const char *name, u8 instance, u16 segment,
u8 bus, u8 device, u8 function); u8 bus, u8 device, u8 function, u8 device_type);
const char *smbios_system_manufacturer(void); const char *smbios_system_manufacturer(void);
const char *smbios_system_product_name(void); const char *smbios_system_product_name(void);

View File

@ -26,7 +26,8 @@ int variant_smbios_data(struct device *dev, int *handle, unsigned long *current)
BOARD_TRACKPAD_I2C_BUS, /* segment */ BOARD_TRACKPAD_I2C_BUS, /* segment */
BOARD_TRACKPAD_I2C_ADDR, /* bus */ BOARD_TRACKPAD_I2C_ADDR, /* bus */
0, /* device */ 0, /* device */
0); /* function */ 0, /* function */
SMBIOS_DEVICE_TYPE_OTHER); /* device type */
return len; return len;
} }

View File

@ -26,7 +26,8 @@ int variant_smbios_data(struct device *dev, int *handle, unsigned long *current)
BOARD_TRACKPAD_I2C_BUS, /* segment */ BOARD_TRACKPAD_I2C_BUS, /* segment */
BOARD_TRACKPAD_I2C_ADDR, /* bus */ BOARD_TRACKPAD_I2C_ADDR, /* bus */
0, /* device */ 0, /* device */
0); /* function */ 0, /* function */
SMBIOS_DEVICE_TYPE_OTHER); /* device type */
return len; return len;
} }

View File

@ -35,7 +35,8 @@ int variant_smbios_data(struct device *dev, int *handle, unsigned long *current)
BOARD_TOUCHSCREEN_I2C_BUS, /* segment */ BOARD_TOUCHSCREEN_I2C_BUS, /* segment */
BOARD_TOUCHSCREEN_I2C_ADDR, /* bus */ BOARD_TOUCHSCREEN_I2C_ADDR, /* bus */
0, /* device */ 0, /* device */
0); /* function */ 0, /* function */
SMBIOS_DEVICE_TYPE_OTHER); /* device type */
return len; return len;
} }

View File

@ -29,7 +29,8 @@ int variant_smbios_data(struct device *dev, int *handle, unsigned long *current)
BOARD_TRACKPAD_I2C_BUS, /* segment */ BOARD_TRACKPAD_I2C_BUS, /* segment */
BOARD_TRACKPAD_I2C_ADDR, /* bus */ BOARD_TRACKPAD_I2C_ADDR, /* bus */
0, /* device */ 0, /* device */
0); /* function */ 0, /* function */
SMBIOS_DEVICE_TYPE_OTHER); /* device type */
return len; return len;
} }

View File

@ -29,7 +29,8 @@ int variant_smbios_data(struct device *dev, int *handle, unsigned long *current)
BOARD_TRACKPAD_I2C_BUS, /* segment */ BOARD_TRACKPAD_I2C_BUS, /* segment */
BOARD_TRACKPAD_I2C_ADDR, /* bus */ BOARD_TRACKPAD_I2C_ADDR, /* bus */
0, /* device */ 0, /* device */
0); /* function */ 0, /* function */
SMBIOS_DEVICE_TYPE_OTHER); /* device type */
len += smbios_write_type41( len += smbios_write_type41(
current, handle, current, handle,
@ -38,7 +39,8 @@ int variant_smbios_data(struct device *dev, int *handle, unsigned long *current)
BOARD_TOUCHSCREEN_I2C_BUS, /* segment */ BOARD_TOUCHSCREEN_I2C_BUS, /* segment */
BOARD_TOUCHSCREEN_I2C_ADDR, /* bus */ BOARD_TOUCHSCREEN_I2C_ADDR, /* bus */
0, /* device */ 0, /* device */
0); /* function */ 0, /* function */
SMBIOS_DEVICE_TYPE_OTHER); /* device type */
return len; return len;
} }

View File

@ -264,7 +264,8 @@ static int butterfly_onboard_smbios_data(struct device *dev, int *handle,
0, /* segment */ 0, /* segment */
BOARD_TRACKPAD_I2C_ADDR, /* bus */ BOARD_TRACKPAD_I2C_ADDR, /* bus */
0, /* device */ 0, /* device */
0); /* function */ 0, /* function */
SMBIOS_DEVICE_TYPE_OTHER); /* device type */
return len; return len;
} }

View File

@ -170,7 +170,8 @@ static int link_onboard_smbios_data(struct device *dev, int *handle,
0, /* segment */ 0, /* segment */
BOARD_LIGHTSENSOR_I2C_ADDR, /* bus */ BOARD_LIGHTSENSOR_I2C_ADDR, /* bus */
0, /* device */ 0, /* device */
0); /* function */ 0, /* function */
SMBIOS_DEVICE_TYPE_OTHER); /* device type */
len += smbios_write_type41( len += smbios_write_type41(
current, handle, current, handle,
@ -179,7 +180,8 @@ static int link_onboard_smbios_data(struct device *dev, int *handle,
0, /* segment */ 0, /* segment */
BOARD_TRACKPAD_I2C_ADDR, /* bus */ BOARD_TRACKPAD_I2C_ADDR, /* bus */
0, /* device */ 0, /* device */
0); /* function */ 0, /* function */
SMBIOS_DEVICE_TYPE_OTHER); /* device type */
len += smbios_write_type41( len += smbios_write_type41(
current, handle, current, handle,
@ -188,7 +190,8 @@ static int link_onboard_smbios_data(struct device *dev, int *handle,
0, /* segment */ 0, /* segment */
BOARD_TOUCHSCREEN_I2C_ADDR, /* bus */ BOARD_TOUCHSCREEN_I2C_ADDR, /* bus */
0, /* device */ 0, /* device */
0); /* function */ 0, /* function */
SMBIOS_DEVICE_TYPE_OTHER); /* device type */
return len; return len;
} }

View File

@ -57,7 +57,8 @@ static int parrot_onboard_smbios_data(struct device *dev, int *handle,
0, /* segment */ 0, /* segment */
BOARD_TRACKPAD_I2C_ADDR, /* bus */ BOARD_TRACKPAD_I2C_ADDR, /* bus */
0, /* device */ 0, /* device */
0); /* function */ 0, /* function */
SMBIOS_DEVICE_TYPE_OTHER); /* device type */
} else { } else {
len += smbios_write_type41( len += smbios_write_type41(
current, handle, current, handle,
@ -66,7 +67,8 @@ static int parrot_onboard_smbios_data(struct device *dev, int *handle,
0, /* segment */ 0, /* segment */
BOARD_TRACKPAD_I2C_ADDR, /* bus */ BOARD_TRACKPAD_I2C_ADDR, /* bus */
0, /* device */ 0, /* device */
0); /* function */ 0, /* function */
SMBIOS_DEVICE_TYPE_OTHER); /* device type */
} }
return len; return len;

View File

@ -142,7 +142,8 @@ static int mainboard_smbios_data(struct device *dev, int *handle,
BOARD_TRACKPAD_I2C_BUS, /* segment */ BOARD_TRACKPAD_I2C_BUS, /* segment */
BOARD_TRACKPAD_I2C_ADDR, /* bus */ BOARD_TRACKPAD_I2C_ADDR, /* bus */
0, /* device */ 0, /* device */
0); /* function */ 0, /* function */
SMBIOS_DEVICE_TYPE_OTHER); /* device type */
#endif #endif
#ifdef BOARD_TOUCHSCREEN_NAME #ifdef BOARD_TOUCHSCREEN_NAME
len += smbios_write_type41( len += smbios_write_type41(
@ -152,7 +153,8 @@ static int mainboard_smbios_data(struct device *dev, int *handle,
BOARD_TOUCHSCREEN_I2C_BUS, /* segment */ BOARD_TOUCHSCREEN_I2C_BUS, /* segment */
BOARD_TOUCHSCREEN_I2C_ADDR, /* bus */ BOARD_TOUCHSCREEN_I2C_ADDR, /* bus */
0, /* device */ 0, /* device */
0); /* function */ 0, /* function */
SMBIOS_DEVICE_TYPE_OTHER); /* device type */
#endif #endif
return len; return len;
} }

View File

@ -54,7 +54,8 @@ static int mainboard_smbios_data(struct device *dev, int *handle,
BOARD_LIGHTSENSOR_I2C_BUS, /* segment */ BOARD_LIGHTSENSOR_I2C_BUS, /* segment */
BOARD_LIGHTSENSOR_I2C_ADDR, /* bus */ BOARD_LIGHTSENSOR_I2C_ADDR, /* bus */
0, /* device */ 0, /* device */
0); /* function */ 0, /* function */
SMBIOS_DEVICE_TYPE_OTHER); /* device type */
len += smbios_write_type41( len += smbios_write_type41(
current, handle, current, handle,
@ -63,7 +64,8 @@ static int mainboard_smbios_data(struct device *dev, int *handle,
BOARD_TRACKPAD_I2C_BUS, /* segment */ BOARD_TRACKPAD_I2C_BUS, /* segment */
BOARD_TRACKPAD_I2C_ADDR, /* bus */ BOARD_TRACKPAD_I2C_ADDR, /* bus */
0, /* device */ 0, /* device */
0); /* function */ 0, /* function */
SMBIOS_DEVICE_TYPE_OTHER); /* device type */
len += smbios_write_type41( len += smbios_write_type41(
current, handle, current, handle,
@ -72,7 +74,8 @@ static int mainboard_smbios_data(struct device *dev, int *handle,
BOARD_TOUCHSCREEN_I2C_BUS, /* segment */ BOARD_TOUCHSCREEN_I2C_BUS, /* segment */
BOARD_TOUCHSCREEN_I2C_ADDR, /* bus */ BOARD_TOUCHSCREEN_I2C_ADDR, /* bus */
0, /* device */ 0, /* device */
0); /* function */ 0, /* function */
SMBIOS_DEVICE_TYPE_OTHER); /* device type */
return len; return len;
} }