summaryrefslogtreecommitdiff
path: root/src/superio
diff options
context:
space:
mode:
Diffstat (limited to 'src/superio')
-rw-r--r--src/superio/common/chip.h3
-rw-r--r--src/superio/common/generic.c6
2 files changed, 9 insertions, 0 deletions
diff --git a/src/superio/common/chip.h b/src/superio/common/chip.h
index 737c90c500..2836a522f1 100644
--- a/src/superio/common/chip.h
+++ b/src/superio/common/chip.h
@@ -5,6 +5,9 @@
struct superio_common_config {
/* FIXME: Add enter conf/exit conf codes here for SSDT generation */
+ /* Rarely, boards may have more than one SuperIO. Give each SuperIO a
+ * unique name for ACPI. The default is 'SIO0'. */
+ char acpi_name[5];
};
#endif /* __SUPERIO_COMMON_CHIP_H__ */
diff --git a/src/superio/common/generic.c b/src/superio/common/generic.c
index 83f2fea2b2..c6903402a0 100644
--- a/src/superio/common/generic.c
+++ b/src/superio/common/generic.c
@@ -4,6 +4,7 @@
#include <device/pnp.h>
#include <acpi/acpigen.h>
#include <console/console.h>
+#include "chip.h"
static void generic_set_resources(struct device *dev)
{
@@ -292,6 +293,11 @@ static void generic_ssdt(const struct device *dev)
static const char *generic_acpi_name(const struct device *dev)
{
+ const struct superio_common_config *cfg = dev->chip_info;
+ if (cfg && cfg->acpi_name[sizeof(cfg->acpi_name)-1] == '\0' &&
+ strlen(cfg->acpi_name) == 4) {
+ return cfg->acpi_name;
+ }
return "SIO0";
}
#endif