diff options
Diffstat (limited to 'src/drivers/generic/generic/chip.h')
-rw-r--r-- | src/drivers/generic/generic/chip.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/drivers/generic/generic/chip.h b/src/drivers/generic/generic/chip.h new file mode 100644 index 0000000000..f3c54b687b --- /dev/null +++ b/src/drivers/generic/generic/chip.h @@ -0,0 +1,48 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2018 Google LLC. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef __GENERIC_GENERIC_CHIP_H__ +#define __GENERIC_GENERIC_CHIP_H__ + +#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES) + +#include <arch/acpi_device.h> + +#define MAX_GENERIC_PROPERTY_LIST 10 + +struct drivers_generic_generic_config { + const char *hid; /* ACPI _HID (required) */ + const char *cid; /* ACPI _CID */ + const char *name; /* ACPI Device Name */ + /* + * Autogenerated ACPI Device Name if name is not provided in + * devicetree. + */ + char autogen_name[5]; + const char *desc; /* ACPI _DDN */ + unsigned int uid; /* ACPI _UID */ + + /* Generic properties for exporting device-specific data to the OS */ + struct acpi_dp property_list[MAX_GENERIC_PROPERTY_LIST]; + int property_count; +}; + +#else /* CONFIG_HAVE_ACPI_TABLES */ + +struct drivers_generic_generic_config { }; + +#endif /* !CONFIG_HAVE_ACPI_TABLES */ + +#endif /* __GENERIC_GENERIC_CHIP_H__ */ |