ACPI: Clarify serial bus revision and specific revision

Serial bus revision [Byte 3] and serial bus specific revision [Byte 9]
are not the same.

Change-Id: I366f62e6aa0e9c0dfbc1ec17adeebc42a0e777eb
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/32329
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lijian Zhao <lijian.zhao@intel.com>
This commit is contained in:
Elyes HAOUAS 2019-04-16 08:12:10 +02:00 committed by Patrick Georgi
parent da9302a2c4
commit 34564ed154
2 changed files with 10 additions and 7 deletions

View File

@ -377,7 +377,7 @@ void acpi_device_write_i2c(const struct acpi_i2c *i2c)
desc_length = acpi_device_write_zero_len();
/* Byte 3: Revision ID */
acpigen_emit_byte(ACPI_SERIAL_BUS_REVISION_ID);
acpigen_emit_byte(ACPI_I2C_SERIAL_BUS_REVISION_ID);
/* Byte 4: Resource Source Index is Reserved */
acpigen_emit_byte(0);
@ -401,7 +401,7 @@ void acpi_device_write_i2c(const struct acpi_i2c *i2c)
acpigen_emit_word(i2c->mode_10bit);
/* Byte 9: Type Specific Revision ID */
acpigen_emit_byte(ACPI_SERIAL_BUS_REVISION_ID);
acpigen_emit_byte(ACPI_I2C_TYPE_SPECIFIC_REVISION_ID);
/* Byte 10-11: I2C Type Data Length */
type_length = acpi_device_write_zero_len();
@ -435,7 +435,7 @@ void acpi_device_write_spi(const struct acpi_spi *spi)
desc_length = acpi_device_write_zero_len();
/* Byte 3: Revision ID */
acpigen_emit_byte(ACPI_SERIAL_BUS_REVISION_ID);
acpigen_emit_byte(ACPI_SPI_SERIAL_BUS_REVISION_ID);
/* Byte 4: Resource Source Index is Reserved */
acpigen_emit_byte(0);
@ -464,7 +464,7 @@ void acpi_device_write_spi(const struct acpi_spi *spi)
acpigen_emit_word(flags);
/* Byte 9: Type Specific Revision ID */
acpigen_emit_byte(ACPI_SERIAL_BUS_REVISION_ID);
acpigen_emit_byte(ACPI_SPI_TYPE_SPECIFIC_REVISION_ID);
/* Byte 10-11: SPI Type Data Length */
type_length = acpi_device_write_zero_len();

View File

@ -311,7 +311,10 @@ void acpi_device_write_gpio(const struct acpi_gpio *gpio);
#define ACPI_SERIAL_BUS_TYPE_I2C 1
#define ACPI_SERIAL_BUS_TYPE_SPI 2
#define ACPI_SERIAL_BUS_REVISION_ID 1
#define ACPI_I2C_SERIAL_BUS_REVISION_ID 1 /* TODO: upgrade to 2 */
#define ACPI_I2C_TYPE_SPECIFIC_REVISION_ID 1
#define ACPI_SPI_SERIAL_BUS_REVISION_ID 1
#define ACPI_SPI_TYPE_SPECIFIC_REVISION_ID 1
/*
* ACPI I2C Bus