summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/arch/x86/acpi_device.c2
-rw-r--r--src/arch/x86/include/arch/acpi.h2
-rw-r--r--src/arch/x86/include/arch/acpi_device.h2
-rw-r--r--src/cpu/intel/haswell/acpi.c2
-rw-r--r--src/cpu/intel/model_2065x/acpi.c2
-rw-r--r--src/cpu/intel/model_206ax/acpi.c2
-rw-r--r--src/cpu/intel/speedstep/acpi.c2
-rw-r--r--src/device/pci_rom.c2
-rw-r--r--src/drivers/crb/tis.c2
-rw-r--r--src/drivers/generic/adau7002/adau7002.c2
-rw-r--r--src/drivers/generic/generic/generic.c2
-rw-r--r--src/drivers/generic/gpio_keys/gpio_keys.c2
-rw-r--r--src/drivers/generic/gpio_regulator/gpio_regulator.c2
-rw-r--r--src/drivers/generic/max98357a/max98357a.c2
-rw-r--r--src/drivers/gfx/generic/generic.c2
-rw-r--r--src/drivers/i2c/da7219/da7219.c2
-rw-r--r--src/drivers/i2c/designware/dw_i2c.c2
-rw-r--r--src/drivers/i2c/designware/dw_i2c.h2
-rw-r--r--src/drivers/i2c/generic/chip.h2
-rw-r--r--src/drivers/i2c/generic/generic.c4
-rw-r--r--src/drivers/i2c/hid/hid.c2
-rw-r--r--src/drivers/i2c/max98373/max98373.c2
-rw-r--r--src/drivers/i2c/max98927/max98927.c2
-rw-r--r--src/drivers/i2c/nau8825/nau8825.c2
-rw-r--r--src/drivers/i2c/rt1011/rt1011.c2
-rw-r--r--src/drivers/i2c/rt5663/rt5663.c2
-rw-r--r--src/drivers/i2c/sx9310/sx9310.c2
-rw-r--r--src/drivers/i2c/tpm/chip.c2
-rw-r--r--src/drivers/intel/ish/ish.c2
-rw-r--r--src/drivers/intel/mipi_camera/camera.c2
-rw-r--r--src/drivers/intel/wifi/wifi.c2
-rw-r--r--src/drivers/ipmi/ipmi_kcs_ops.c2
-rw-r--r--src/drivers/net/r8168.c2
-rw-r--r--src/drivers/pc80/tpm/tis.c2
-rw-r--r--src/drivers/spi/acpi/acpi.c2
-rw-r--r--src/drivers/usb/acpi/usb_acpi.c2
-rw-r--r--src/drivers/wifi/generic.c2
-rw-r--r--src/drivers/wifi/generic_wifi.h2
-rw-r--r--src/ec/google/chromeec/ec.h2
-rw-r--r--src/ec/google/chromeec/ec_acpi.c6
-rw-r--r--src/ec/google/wilco/chip.c2
-rw-r--r--src/ec/lenovo/h8/h8.h2
-rw-r--r--src/ec/lenovo/h8/ssdt.c4
-rw-r--r--src/include/device/device.h2
-rw-r--r--src/include/device/pci_rom.h2
-rw-r--r--src/mainboard/lenovo/x200/mainboard.c2
-rw-r--r--src/mainboard/lenovo/x201/mainboard.c2
-rw-r--r--src/mainboard/lenovo/x60/mainboard.c2
-rw-r--r--src/northbridge/amd/agesa/family14/northbridge.c2
-rw-r--r--src/northbridge/amd/agesa/family15tn/northbridge.c2
-rw-r--r--src/northbridge/amd/agesa/family16kb/northbridge.c2
-rw-r--r--src/northbridge/amd/pi/00630F01/northbridge.c2
-rw-r--r--src/northbridge/amd/pi/00660F01/northbridge.c2
-rw-r--r--src/northbridge/amd/pi/00730F01/northbridge.c2
-rw-r--r--src/northbridge/intel/gm45/gma.c2
-rw-r--r--src/northbridge/intel/haswell/gma.c2
-rw-r--r--src/northbridge/intel/i945/gma.c2
-rw-r--r--src/northbridge/intel/ironlake/gma.c2
-rw-r--r--src/northbridge/intel/sandybridge/gma.c2
-rw-r--r--src/northbridge/intel/x4x/gma.c2
-rw-r--r--src/soc/amd/picasso/acpi.c2
-rw-r--r--src/soc/amd/picasso/northbridge.c2
-rw-r--r--src/soc/amd/stoneyridge/acpi.c2
-rw-r--r--src/soc/amd/stoneyridge/northbridge.c2
-rw-r--r--src/soc/intel/baytrail/acpi.c2
-rw-r--r--src/soc/intel/baytrail/gfx.c2
-rw-r--r--src/soc/intel/braswell/acpi.c2
-rw-r--r--src/soc/intel/braswell/gfx.c2
-rw-r--r--src/soc/intel/broadwell/acpi.c2
-rw-r--r--src/soc/intel/broadwell/igd.c2
-rw-r--r--src/soc/intel/common/block/acpi/acpi.c2
-rw-r--r--src/soc/intel/common/block/graphics/graphics.c2
-rw-r--r--src/soc/intel/common/block/scs/sd.c2
-rw-r--r--src/soc/intel/skylake/acpi.c2
-rw-r--r--src/soc/intel/xeon_sp/skx/acpi.c2
-rw-r--r--src/southbridge/intel/bd82x6x/lpc.c2
-rw-r--r--src/southbridge/intel/bd82x6x/sata.c2
-rw-r--r--src/southbridge/intel/common/acpi_pirq_gen.c2
-rw-r--r--src/southbridge/intel/common/acpi_pirq_gen.h2
-rw-r--r--src/southbridge/intel/i82371eb/acpi_tables.c2
-rw-r--r--src/southbridge/intel/i82371eb/isa.c2
-rw-r--r--src/southbridge/intel/i82801gx/lpc.c2
-rw-r--r--src/southbridge/intel/i82801ix/lpc.c2
-rw-r--r--src/southbridge/intel/i82801jx/lpc.c2
-rw-r--r--src/southbridge/intel/ibexpeak/lpc.c2
-rw-r--r--src/southbridge/intel/ibexpeak/sata.c2
-rw-r--r--src/southbridge/intel/lynxpoint/lpc.c2
-rw-r--r--src/superio/common/generic.c2
-rw-r--r--src/superio/common/ssdt.c10
-rw-r--r--src/superio/common/ssdt.h2
-rw-r--r--src/superio/nuvoton/npcd378/superio.c8
91 files changed, 102 insertions, 102 deletions
diff --git a/src/arch/x86/acpi_device.c b/src/arch/x86/acpi_device.c
index 1dc471c54f..b4016ef5db 100644
--- a/src/arch/x86/acpi_device.c
+++ b/src/arch/x86/acpi_device.c
@@ -941,7 +941,7 @@ struct acpi_dp *acpi_dp_add_gpio(struct acpi_dp *dp, const char *name,
* }
* }
*/
-void acpi_device_write_pci_dev(struct device *dev)
+void acpi_device_write_pci_dev(const struct device *dev)
{
const char *scope = acpi_device_scope(dev);
const char *name = acpi_device_name(dev);
diff --git a/src/arch/x86/include/arch/acpi.h b/src/arch/x86/include/arch/acpi.h
index 9fb6f6fcec..86b3932f89 100644
--- a/src/arch/x86/include/arch/acpi.h
+++ b/src/arch/x86/include/arch/acpi.h
@@ -930,7 +930,7 @@ unsigned long acpi_write_hpet(const struct device *device, unsigned long start,
acpi_rsdp_t *rsdp);
/* cpu/intel/speedstep/acpi.c */
-void generate_cpu_entries(struct device *device);
+void generate_cpu_entries(const struct device *device);
void acpi_create_mcfg(acpi_mcfg_t *mcfg);
diff --git a/src/arch/x86/include/arch/acpi_device.h b/src/arch/x86/include/arch/acpi_device.h
index 80dab0b1ba..ed64cd8a27 100644
--- a/src/arch/x86/include/arch/acpi_device.h
+++ b/src/arch/x86/include/arch/acpi_device.h
@@ -508,6 +508,6 @@ void acpi_dp_write(struct acpi_dp *table);
* scope in DSDT. So, if there are any references to this PCI device scope required from static
* asl files, do not use this function and instead add the device to DSDT as well.
*/
-void acpi_device_write_pci_dev(struct device *dev);
+void acpi_device_write_pci_dev(const struct device *dev);
#endif
diff --git a/src/cpu/intel/haswell/acpi.c b/src/cpu/intel/haswell/acpi.c
index f8f139c8ea..b3cc1e0d5b 100644
--- a/src/cpu/intel/haswell/acpi.c
+++ b/src/cpu/intel/haswell/acpi.c
@@ -289,7 +289,7 @@ static void generate_P_state_entries(int core, int cores_per_package)
acpigen_pop_len();
}
-void generate_cpu_entries(struct device *device)
+void generate_cpu_entries(const struct device *device)
{
int coreID, cpuID, pcontrol_blk = get_pmbase(), plen = 6;
int totalcores = dev_count_cpu();
diff --git a/src/cpu/intel/model_2065x/acpi.c b/src/cpu/intel/model_2065x/acpi.c
index 4f49dba410..a45f021ccb 100644
--- a/src/cpu/intel/model_2065x/acpi.c
+++ b/src/cpu/intel/model_2065x/acpi.c
@@ -281,7 +281,7 @@ static void generate_P_state_entries(int core, int cores_per_package)
acpigen_pop_len();
}
-void generate_cpu_entries(struct device *device)
+void generate_cpu_entries(const struct device *device)
{
int coreID, cpuID, pcontrol_blk = PMB0_BASE, plen = 6;
int totalcores = dev_count_cpu();
diff --git a/src/cpu/intel/model_206ax/acpi.c b/src/cpu/intel/model_206ax/acpi.c
index eba853794f..d668f45f23 100644
--- a/src/cpu/intel/model_206ax/acpi.c
+++ b/src/cpu/intel/model_206ax/acpi.c
@@ -284,7 +284,7 @@ static void generate_P_state_entries(int core, int cores_per_package)
acpigen_pop_len();
}
-void generate_cpu_entries(struct device *device)
+void generate_cpu_entries(const struct device *device)
{
int coreID, cpuID, pcontrol_blk = PMB0_BASE, plen = 6;
int totalcores = dev_count_cpu();
diff --git a/src/cpu/intel/speedstep/acpi.c b/src/cpu/intel/speedstep/acpi.c
index 5e8330c76c..1d33640c8b 100644
--- a/src/cpu/intel/speedstep/acpi.c
+++ b/src/cpu/intel/speedstep/acpi.c
@@ -81,7 +81,7 @@ static void gen_pstate_entries(const sst_table_t *const pstates,
/**
* @brief Generate ACPI entries for Speedstep for each cpu
*/
-void generate_cpu_entries(struct device *device)
+void generate_cpu_entries(const struct device *device)
{
int coreID, cpuID, pcontrol_blk = PMB0_BASE, plen = 6;
int totalcores = determine_total_number_of_cores();
diff --git a/src/device/pci_rom.c b/src/device/pci_rom.c
index cfd16e804d..4fec2906d6 100644
--- a/src/device/pci_rom.c
+++ b/src/device/pci_rom.c
@@ -261,7 +261,7 @@ pci_rom_write_acpi_tables(const struct device *device, unsigned long current,
return current;
}
-void pci_rom_ssdt(struct device *device)
+void pci_rom_ssdt(const struct device *device)
{
static size_t ngfx;
diff --git a/src/drivers/crb/tis.c b/src/drivers/crb/tis.c
index bd54bb6b54..0e97a07848 100644
--- a/src/drivers/crb/tis.c
+++ b/src/drivers/crb/tis.c
@@ -93,7 +93,7 @@ int tis_sendrecv(const uint8_t *sendbuf, size_t sbuf_size, uint8_t *recvbuf, siz
return 0;
}
-static void crb_tpm_fill_ssdt(struct device *dev)
+static void crb_tpm_fill_ssdt(const struct device *dev)
{
const char *path = acpi_device_path(dev);
if (!path) {
diff --git a/src/drivers/generic/adau7002/adau7002.c b/src/drivers/generic/adau7002/adau7002.c
index aa47ae6bb9..bf2f03de04 100644
--- a/src/drivers/generic/adau7002/adau7002.c
+++ b/src/drivers/generic/adau7002/adau7002.c
@@ -14,7 +14,7 @@
#define ADAU7002_ACPI_NAME "ADAU"
#define ADAU7002_ACPI_HID "ADAU7002"
-static void adau7002_fill_ssdt(struct device *dev)
+static void adau7002_fill_ssdt(const struct device *dev)
{
struct drivers_generic_adau7002_config *config;
struct acpi_dp *dp;
diff --git a/src/drivers/generic/generic/generic.c b/src/drivers/generic/generic/generic.c
index cee41a538b..eed824d375 100644
--- a/src/drivers/generic/generic/generic.c
+++ b/src/drivers/generic/generic/generic.c
@@ -10,7 +10,7 @@
#include <string.h>
#include "chip.h"
-static void generic_dev_fill_ssdt_generator(struct device *dev)
+static void generic_dev_fill_ssdt_generator(const struct device *dev)
{
struct acpi_dp *dsd;
struct drivers_generic_generic_config *config = dev->chip_info;
diff --git a/src/drivers/generic/gpio_keys/gpio_keys.c b/src/drivers/generic/gpio_keys/gpio_keys.c
index b8e72bf328..1017f7a69f 100644
--- a/src/drivers/generic/gpio_keys/gpio_keys.c
+++ b/src/drivers/generic/gpio_keys/gpio_keys.c
@@ -46,7 +46,7 @@ static struct acpi_dp *gpio_keys_add_child_node(
return dsd;
}
-static void gpio_keys_fill_ssdt_generator(struct device *dev)
+static void gpio_keys_fill_ssdt_generator(const struct device *dev)
{
struct drivers_generic_gpio_keys_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev);
diff --git a/src/drivers/generic/gpio_regulator/gpio_regulator.c b/src/drivers/generic/gpio_regulator/gpio_regulator.c
index 0f39910b85..0ec1626da8 100644
--- a/src/drivers/generic/gpio_regulator/gpio_regulator.c
+++ b/src/drivers/generic/gpio_regulator/gpio_regulator.c
@@ -9,7 +9,7 @@
#include "chip.h"
-static void gpio_regulator_fill_ssdt_generator(struct device *dev)
+static void gpio_regulator_fill_ssdt_generator(const struct device *dev)
{
struct drivers_generic_gpio_regulator_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev);
diff --git a/src/drivers/generic/max98357a/max98357a.c b/src/drivers/generic/max98357a/max98357a.c
index 599acb5afe..b9c270b0c5 100644
--- a/src/drivers/generic/max98357a/max98357a.c
+++ b/src/drivers/generic/max98357a/max98357a.c
@@ -14,7 +14,7 @@
#define MAX98357A_ACPI_NAME "MAXM"
-static void max98357a_fill_ssdt(struct device *dev)
+static void max98357a_fill_ssdt(const struct device *dev)
{
struct drivers_generic_max98357a_config *config = dev->chip_info;
const char *path;
diff --git a/src/drivers/gfx/generic/generic.c b/src/drivers/gfx/generic/generic.c
index aa8d7566f6..4670b4d65f 100644
--- a/src/drivers/gfx/generic/generic.c
+++ b/src/drivers/gfx/generic/generic.c
@@ -101,7 +101,7 @@ static void gfx_fill_privacy_screen_dsm(
privacy);
}
-static void gfx_fill_ssdt_generator(struct device *dev)
+static void gfx_fill_ssdt_generator(const struct device *dev)
{
size_t i;
struct drivers_gfx_generic_config *config = dev->chip_info;
diff --git a/src/drivers/i2c/da7219/da7219.c b/src/drivers/i2c/da7219/da7219.c
index 4cfeb9fb72..931c437546 100644
--- a/src/drivers/i2c/da7219/da7219.c
+++ b/src/drivers/i2c/da7219/da7219.c
@@ -17,7 +17,7 @@
#define DA7219_ACPI_NAME "DLG7"
#define DA7219_ACPI_HID "DLGS7219"
-static void da7219_fill_ssdt(struct device *dev)
+static void da7219_fill_ssdt(const struct device *dev)
{
struct drivers_i2c_da7219_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev);
diff --git a/src/drivers/i2c/designware/dw_i2c.c b/src/drivers/i2c/designware/dw_i2c.c
index 309dfeee0a..74e24c7a53 100644
--- a/src/drivers/i2c/designware/dw_i2c.c
+++ b/src/drivers/i2c/designware/dw_i2c.c
@@ -805,7 +805,7 @@ void dw_i2c_dev_init(struct device *dev)
* Generate I2C timing information into the SSDT for the OS driver to consume,
* optionally applying override values provided by the caller.
*/
-void dw_i2c_acpi_fill_ssdt(struct device *dev)
+void dw_i2c_acpi_fill_ssdt(const struct device *dev)
{
const struct dw_i2c_bus_config *bcfg;
uintptr_t dw_i2c_addr;
diff --git a/src/drivers/i2c/designware/dw_i2c.h b/src/drivers/i2c/designware/dw_i2c.h
index e309bc12a2..75df47592e 100644
--- a/src/drivers/i2c/designware/dw_i2c.h
+++ b/src/drivers/i2c/designware/dw_i2c.h
@@ -141,7 +141,7 @@ void dw_i2c_dev_init(struct device *dev);
* Common device_operations implementation to fill ACPI SSDT table for i2c
* host controller.
*/
-void dw_i2c_acpi_fill_ssdt(struct device *dev);
+void dw_i2c_acpi_fill_ssdt(const struct device *dev);
/*
* Common device_operations implementation for i2c host controller ops.
diff --git a/src/drivers/i2c/generic/chip.h b/src/drivers/i2c/generic/chip.h
index b167b71bed..e1f4472a44 100644
--- a/src/drivers/i2c/generic/chip.h
+++ b/src/drivers/i2c/generic/chip.h
@@ -76,7 +76,7 @@ struct drivers_i2c_generic_config {
* callback: Callback to fill in device-specific information
* config: Pointer to drivers_i2c_generic_config structure
*/
-void i2c_generic_fill_ssdt(struct device *dev,
+void i2c_generic_fill_ssdt(const struct device *dev,
void (*callback)(const struct device *dev),
struct drivers_i2c_generic_config *config);
diff --git a/src/drivers/i2c/generic/generic.c b/src/drivers/i2c/generic/generic.c
index 38fcfdc160..7e709d6cc7 100644
--- a/src/drivers/i2c/generic/generic.c
+++ b/src/drivers/i2c/generic/generic.c
@@ -43,7 +43,7 @@ static int i2c_generic_write_gpio(struct acpi_gpio *gpio, int *curr_index)
return ret;
}
-void i2c_generic_fill_ssdt(struct device *dev,
+void i2c_generic_fill_ssdt(const struct device *dev,
void (*callback)(const struct device *dev),
struct drivers_i2c_generic_config *config)
{
@@ -159,7 +159,7 @@ void i2c_generic_fill_ssdt(struct device *dev,
config->desc ? : dev->chip_ops->name, dev_path(dev));
}
-static void i2c_generic_fill_ssdt_generator(struct device *dev)
+static void i2c_generic_fill_ssdt_generator(const struct device *dev)
{
i2c_generic_fill_ssdt(dev, NULL, dev->chip_info);
}
diff --git a/src/drivers/i2c/hid/hid.c b/src/drivers/i2c/hid/hid.c
index 0cb28bba65..4fac85874d 100644
--- a/src/drivers/i2c/hid/hid.c
+++ b/src/drivers/i2c/hid/hid.c
@@ -20,7 +20,7 @@ static void i2c_hid_fill_dsm(const struct device *dev)
acpigen_write_dsm_i2c_hid(&dsm_config);
}
-static void i2c_hid_fill_ssdt_generator(struct device *dev)
+static void i2c_hid_fill_ssdt_generator(const struct device *dev)
{
struct drivers_i2c_hid_config *config = dev->chip_info;
config->generic.cid = I2C_HID_CID;
diff --git a/src/drivers/i2c/max98373/max98373.c b/src/drivers/i2c/max98373/max98373.c
index a7df56baa0..067563868c 100644
--- a/src/drivers/i2c/max98373/max98373.c
+++ b/src/drivers/i2c/max98373/max98373.c
@@ -14,7 +14,7 @@
#define MAX98373_ACPI_NAME "MAXI"
#define MAX98373_ACPI_HID "MX98373"
-static void max98373_fill_ssdt(struct device *dev)
+static void max98373_fill_ssdt(const struct device *dev)
{
struct drivers_i2c_max98373_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev);
diff --git a/src/drivers/i2c/max98927/max98927.c b/src/drivers/i2c/max98927/max98927.c
index 0cb80ae88a..ddd9d152b0 100644
--- a/src/drivers/i2c/max98927/max98927.c
+++ b/src/drivers/i2c/max98927/max98927.c
@@ -14,7 +14,7 @@
#define MAX98927_ACPI_NAME "MAXI"
#define MAX98927_ACPI_HID "MX98927"
-static void max98927_fill_ssdt(struct device *dev)
+static void max98927_fill_ssdt(const struct device *dev)
{
struct drivers_i2c_max98927_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev);
diff --git a/src/drivers/i2c/nau8825/nau8825.c b/src/drivers/i2c/nau8825/nau8825.c
index c3e95e7506..fd9cfc9679 100644
--- a/src/drivers/i2c/nau8825/nau8825.c
+++ b/src/drivers/i2c/nau8825/nau8825.c
@@ -19,7 +19,7 @@
#define NAU8825_DP_INT(key,val) \
acpi_dp_add_integer(dp, "nuvoton," key, (val))
-static void nau8825_fill_ssdt(struct device *dev)
+static void nau8825_fill_ssdt(const struct device *dev)
{
struct drivers_i2c_nau8825_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev);
diff --git a/src/drivers/i2c/rt1011/rt1011.c b/src/drivers/i2c/rt1011/rt1011.c
index 68681ef846..ec018cc38f 100644
--- a/src/drivers/i2c/rt1011/rt1011.c
+++ b/src/drivers/i2c/rt1011/rt1011.c
@@ -16,7 +16,7 @@
#define RT1011_DP_INT(key, val) acpi_dp_add_integer(dp, "realtek," key, (val))
-static void rt1011_fill_ssdt(struct device *dev)
+static void rt1011_fill_ssdt(const struct device *dev)
{
struct drivers_i2c_rt1011_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev);
diff --git a/src/drivers/i2c/rt5663/rt5663.c b/src/drivers/i2c/rt5663/rt5663.c
index 70c14efc45..67d8dea562 100644
--- a/src/drivers/i2c/rt5663/rt5663.c
+++ b/src/drivers/i2c/rt5663/rt5663.c
@@ -17,7 +17,7 @@
#define RT5663_DP_INT(key, val) \
acpi_dp_add_integer(dp, "realtek," key, (val))
-static void rt5663_fill_ssdt(struct device *dev)
+static void rt5663_fill_ssdt(const struct device *dev)
{
struct drivers_i2c_rt5663_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev);
diff --git a/src/drivers/i2c/sx9310/sx9310.c b/src/drivers/i2c/sx9310/sx9310.c
index a4fac10f60..44cb883478 100644
--- a/src/drivers/i2c/sx9310/sx9310.c
+++ b/src/drivers/i2c/sx9310/sx9310.c
@@ -18,7 +18,7 @@
I2C_SX9310_ACPI_ID "," #NAME, \
config->NAME)
-static void i2c_sx9310_fill_ssdt(struct device *dev)
+static void i2c_sx9310_fill_ssdt(const struct device *dev)
{
struct drivers_i2c_sx9310_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev);
diff --git a/src/drivers/i2c/tpm/chip.c b/src/drivers/i2c/tpm/chip.c
index b81b0d17c8..fbf9ffa667 100644
--- a/src/drivers/i2c/tpm/chip.c
+++ b/src/drivers/i2c/tpm/chip.c
@@ -11,7 +11,7 @@
#include "tpm.h"
#include "chip.h"
-static void i2c_tpm_fill_ssdt(struct device *dev)
+static void i2c_tpm_fill_ssdt(const struct device *dev)
{
struct drivers_i2c_tpm_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev);
diff --git a/src/drivers/intel/ish/ish.c b/src/drivers/intel/ish/ish.c
index 3daf4915c6..58402869f4 100644
--- a/src/drivers/intel/ish/ish.c
+++ b/src/drivers/intel/ish/ish.c
@@ -8,7 +8,7 @@
#include <device/pci_ids.h>
#include "chip.h"
-static void ish_fill_ssdt_generator(struct device *dev)
+static void ish_fill_ssdt_generator(const struct device *dev)
{
struct drivers_intel_ish_config *config = dev->chip_info;
struct device *root = dev->bus->dev;
diff --git a/src/drivers/intel/mipi_camera/camera.c b/src/drivers/intel/mipi_camera/camera.c
index aabf2bad2d..b8e1076346 100644
--- a/src/drivers/intel/mipi_camera/camera.c
+++ b/src/drivers/intel/mipi_camera/camera.c
@@ -10,7 +10,7 @@
#include <device/path.h>
#include "chip.h"
-static void camera_fill_ssdt(struct device *dev)
+static void camera_fill_ssdt(const struct device *dev)
{
struct drivers_intel_mipi_camera_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev);
diff --git a/src/drivers/intel/wifi/wifi.c b/src/drivers/intel/wifi/wifi.c
index c3e551a7b9..ffbab4de79 100644
--- a/src/drivers/intel/wifi/wifi.c
+++ b/src/drivers/intel/wifi/wifi.c
@@ -59,7 +59,7 @@ static int smbios_write_wifi(struct device *dev, int *handle,
#endif
#if CONFIG(HAVE_ACPI_TABLES)
-static void intel_wifi_fill_ssdt(struct device *dev)
+static void intel_wifi_fill_ssdt(const struct device *dev)
{
struct drivers_intel_wifi_config *config = dev->chip_info;
struct generic_wifi_config generic_config;
diff --git a/src/drivers/ipmi/ipmi_kcs_ops.c b/src/drivers/ipmi/ipmi_kcs_ops.c
index 349abbce3f..145313a599 100644
--- a/src/drivers/ipmi/ipmi_kcs_ops.c
+++ b/src/drivers/ipmi/ipmi_kcs_ops.c
@@ -221,7 +221,7 @@ ipmi_write_acpi_tables(const struct device *dev, unsigned long current,
return current;
}
-static void ipmi_ssdt(struct device *dev)
+static void ipmi_ssdt(const struct device *dev)
{
const char *scope = acpi_device_scope(dev);
struct drivers_ipmi_config *conf = NULL;
diff --git a/src/drivers/net/r8168.c b/src/drivers/net/r8168.c
index c547f1776c..b904586dd5 100644
--- a/src/drivers/net/r8168.c
+++ b/src/drivers/net/r8168.c
@@ -306,7 +306,7 @@ static void r8168_init(struct device *dev)
#if CONFIG(HAVE_ACPI_TABLES)
#define R8168_ACPI_HID "R8168"
-static void r8168_net_fill_ssdt(struct device *dev)
+static void r8168_net_fill_ssdt(const struct device *dev)
{
struct drivers_net_config *config = dev->chip_info;
const char *path = acpi_device_path(dev->bus->dev);
diff --git a/src/drivers/pc80/tpm/tis.c b/src/drivers/pc80/tpm/tis.c
index 1081410011..3d4c6b6d98 100644
--- a/src/drivers/pc80/tpm/tis.c
+++ b/src/drivers/pc80/tpm/tis.c
@@ -872,7 +872,7 @@ static void (*tpm_mci_callbacks[])(void *) = {
tpm_mci_func1_cb,
};
-static void lpc_tpm_fill_ssdt(struct device *dev)
+static void lpc_tpm_fill_ssdt(const struct device *dev)
{
const char *path = acpi_device_path(dev->bus->dev);
u32 arg;
diff --git a/src/drivers/spi/acpi/acpi.c b/src/drivers/spi/acpi/acpi.c
index 76bddbdfe5..0eeaffbddd 100644
--- a/src/drivers/spi/acpi/acpi.c
+++ b/src/drivers/spi/acpi/acpi.c
@@ -59,7 +59,7 @@ static int spi_acpi_write_gpio(struct acpi_gpio *gpio, int *curr_index)
return ret;
}
-static void spi_acpi_fill_ssdt_generator(struct device *dev)
+static void spi_acpi_fill_ssdt_generator(const struct device *dev)
{
struct drivers_spi_acpi_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev);
diff --git a/src/drivers/usb/acpi/usb_acpi.c b/src/drivers/usb/acpi/usb_acpi.c
index a6a004f760..916d3733ec 100644
--- a/src/drivers/usb/acpi/usb_acpi.c
+++ b/src/drivers/usb/acpi/usb_acpi.c
@@ -21,7 +21,7 @@ static bool usb_acpi_add_gpios_to_crs(struct drivers_usb_acpi_config *cfg)
return true;
}
-static void usb_acpi_fill_ssdt_generator(struct device *dev)
+static void usb_acpi_fill_ssdt_generator(const struct device *dev)
{
struct drivers_usb_acpi_config *config = dev->chip_info;
const char *path = acpi_device_path(dev);
diff --git a/src/drivers/wifi/generic.c b/src/drivers/wifi/generic.c
index fe2e39d29d..b864094499 100644
--- a/src/drivers/wifi/generic.c
+++ b/src/drivers/wifi/generic.c
@@ -171,7 +171,7 @@ static void emit_sar_acpi_structures(void)
acpigen_pop_len();
}
-void generic_wifi_fill_ssdt(struct device *dev,
+void generic_wifi_fill_ssdt(const struct device *dev,
const struct generic_wifi_config *config)
{
const char *path;
diff --git a/src/drivers/wifi/generic_wifi.h b/src/drivers/wifi/generic_wifi.h
index 1c90bc6d66..b863ef4565 100644
--- a/src/drivers/wifi/generic_wifi.h
+++ b/src/drivers/wifi/generic_wifi.h
@@ -22,7 +22,7 @@ struct generic_wifi_config {
* This function implements common device operation to help fill ACPI SSDT
* table for WiFi controller.
*/
-void generic_wifi_fill_ssdt(struct device *dev,
+void generic_wifi_fill_ssdt(const struct device *dev,
const struct generic_wifi_config *config);
/**
diff --git a/src/ec/google/chromeec/ec.h b/src/ec/google/chromeec/ec.h
index 5f84722ac7..6014143b9d 100644
--- a/src/ec/google/chromeec/ec.h
+++ b/src/ec/google/chromeec/ec.h
@@ -344,7 +344,7 @@ int google_chromeec_get_keybd_config(struct ec_response_keybd_config *keybd);
*
* @param dev EC device
*/
-void google_chromeec_fill_ssdt_generator(struct device *dev);
+void google_chromeec_fill_ssdt_generator(const struct device *dev);
/**
* Returns the ACPI name for the EC device.
diff --git a/src/ec/google/chromeec/ec_acpi.c b/src/ec/google/chromeec/ec_acpi.c
index 79e3f4bfa1..2331c7a492 100644
--- a/src/ec/google/chromeec/ec_acpi.c
+++ b/src/ec/google/chromeec/ec_acpi.c
@@ -187,7 +187,7 @@ static void add_usb_port_references(struct acpi_dp *dsd, int port_number)
}
}
-static void fill_ssdt_typec_device(struct device *dev)
+static void fill_ssdt_typec_device(const struct device *dev)
{
struct usb_pd_port_caps port_caps;
char con_name[] = "CONx";
@@ -249,7 +249,7 @@ static const enum ps2_action_key ps2_enum_val[] = {
[TK_PREV_TRACK] = PS2_KEY_PREV_TRACK,
};
-static void fill_ssdt_ps2_keyboard(struct device *dev)
+static void fill_ssdt_ps2_keyboard(const struct device *dev)
{
uint8_t i;
struct ec_response_keybd_config keybd = {};
@@ -273,7 +273,7 @@ static void fill_ssdt_ps2_keyboard(struct device *dev)
!!(keybd.capabilities & KEYBD_CAP_SCRNLOCK_KEY));
}
-void google_chromeec_fill_ssdt_generator(struct device *dev)
+void google_chromeec_fill_ssdt_generator(const struct device *dev)
{
if (!dev->enabled)
return;
diff --git a/src/ec/google/wilco/chip.c b/src/ec/google/wilco/chip.c
index 7de4e0235e..0d0f987da3 100644
--- a/src/ec/google/wilco/chip.c
+++ b/src/ec/google/wilco/chip.c
@@ -179,7 +179,7 @@ static void wilco_ec_read_resources(struct device *dev)
wilco_ec_resource(dev, 2, CONFIG_EC_BASE_PACKET, 16);
}
-static void wilco_ec_fill_ssdt_generator(struct device *dev)
+static void wilco_ec_fill_ssdt_generator(const struct device *dev)
{
struct opregion opreg;
void *region_ptr;
diff --git a/src/ec/lenovo/h8/h8.h b/src/ec/lenovo/h8/h8.h
index 8999cc377a..5b2ae1ead9 100644
--- a/src/ec/lenovo/h8/h8.h
+++ b/src/ec/lenovo/h8/h8.h
@@ -35,7 +35,7 @@ void h8_wwan_enable(int on);
bool h8_wwan_nv_enable(void);
bool h8_has_wwan(const struct device *dev);
-void h8_ssdt_generator(struct device *dev);
+void h8_ssdt_generator(const struct device *dev);
/* EC registers */
#define H8_CONFIG0 0x00
diff --git a/src/ec/lenovo/h8/ssdt.c b/src/ec/lenovo/h8/ssdt.c
index 6b821a40f2..56e305a787 100644
--- a/src/ec/lenovo/h8/ssdt.c
+++ b/src/ec/lenovo/h8/ssdt.c
@@ -8,7 +8,7 @@
#include "h8.h"
#include "chip.h"
-static char *h8_dsdt_scope(struct device *dev, const char *scope)
+static char *h8_dsdt_scope(const struct device *dev, const char *scope)
{
static char buf[DEVICE_PATH_MAX] = {};
const char *path = acpi_device_path(dev);
@@ -22,7 +22,7 @@ static char *h8_dsdt_scope(struct device *dev, const char *scope)
/*
* Generates EC SSDT.
*/
-void h8_ssdt_generator(struct device *dev)
+void h8_ssdt_generator(const struct device *dev)
{
struct ec_lenovo_h8_config *conf = dev->chip_info;
diff --git a/src/include/device/device.h b/src/include/device/device.h
index 40aa2d0419..efa9e8bc58 100644
--- a/src/include/device/device.h
+++ b/src/include/device/device.h
@@ -50,7 +50,7 @@ struct device_operations {
#if CONFIG(HAVE_ACPI_TABLES)
unsigned long (*write_acpi_tables)(const struct device *dev,
unsigned long start, struct acpi_rsdp *rsdp);
- void (*acpi_fill_ssdt)(struct device *dev);
+ void (*acpi_fill_ssdt)(const struct device *dev);
void (*acpi_inject_dsdt)(struct device *dev);
const char *(*acpi_name)(const struct device *dev);
/* Returns the optional _HID (Hardware ID) */
diff --git a/src/include/device/pci_rom.h b/src/include/device/pci_rom.h
index d16daf8a86..6b6fee2c44 100644
--- a/src/include/device/pci_rom.h
+++ b/src/include/device/pci_rom.h
@@ -43,7 +43,7 @@ pci_rom_write_acpi_tables(const struct device *device,
unsigned long current,
struct acpi_rsdp *rsdp);
-void pci_rom_ssdt(struct device *device);
+void pci_rom_ssdt(const struct device *device);
void map_oprom_vendev_rev(u32 *vendev, u8 *rev);
u32 map_oprom_vendev(u32 vendev);
diff --git a/src/mainboard/lenovo/x200/mainboard.c b/src/mainboard/lenovo/x200/mainboard.c
index f3ef0ec59e..86afcfdf72 100644
--- a/src/mainboard/lenovo/x200/mainboard.c
+++ b/src/mainboard/lenovo/x200/mainboard.c
@@ -6,7 +6,7 @@
#include <drivers/lenovo/lenovo.h>
#include "dock.h"
-static void fill_ssdt(struct device *device)
+static void fill_ssdt(const struct device *device)
{
drivers_lenovo_serial_ports_ssdt_generate("\\_SB.PCI0.LPCB", 0);
}
diff --git a/src/mainboard/lenovo/x201/mainboard.c b/src/mainboard/lenovo/x201/mainboard.c
index b29302de0f..785cde6242 100644
--- a/src/mainboard/lenovo/x201/mainboard.c
+++ b/src/mainboard/lenovo/x201/mainboard.c
@@ -10,7 +10,7 @@
#include <cpu/x86/lapic.h>
#include <drivers/lenovo/lenovo.h>
-static void fill_ssdt(struct device *device)
+static void fill_ssdt(const struct device *device)
{
drivers_lenovo_serial_ports_ssdt_generate("\\_SB.PCI0.LPCB", 0);
}
diff --git a/src/mainboard/lenovo/x60/mainboard.c b/src/mainboard/lenovo/x60/mainboard.c
index 86a2040fcf..14080f5f05 100644
--- a/src/mainboard/lenovo/x60/mainboard.c
+++ b/src/mainboard/lenovo/x60/mainboard.c
@@ -99,7 +99,7 @@ static void mainboard_init(struct device *dev)
}
}
-static void fill_ssdt(struct device *device)
+static void fill_ssdt(const struct device *device)
{
drivers_lenovo_serial_ports_ssdt_generate("\\_SB.PCI0.LPCB", 1);
}
diff --git a/src/northbridge/amd/agesa/family14/northbridge.c b/src/northbridge/amd/agesa/family14/northbridge.c
index 32d1ad8655..9700ff727d 100644
--- a/src/northbridge/amd/agesa/family14/northbridge.c
+++ b/src/northbridge/amd/agesa/family14/northbridge.c
@@ -658,7 +658,7 @@ static void cpu_bus_init(struct device *dev)
/* North Bridge Structures */
-static void northbridge_fill_ssdt_generator(struct device *device)
+static void northbridge_fill_ssdt_generator(const struct device *device)
{
msr_t msr;
char pscope[] = "\\_SB.PCI0";
diff --git a/src/northbridge/amd/agesa/family15tn/northbridge.c b/src/northbridge/amd/agesa/family15tn/northbridge.c
index e400d106fb..e861b9804d 100644
--- a/src/northbridge/amd/agesa/family15tn/northbridge.c
+++ b/src/northbridge/amd/agesa/family15tn/northbridge.c
@@ -417,7 +417,7 @@ static unsigned long acpi_fill_hest(acpi_hest_t *hest)
return (unsigned long)current;
}
-static void northbridge_fill_ssdt_generator(struct device *device)
+static void northbridge_fill_ssdt_generator(const struct device *device)
{
msr_t msr;
char pscope[] = "\\_SB.PCI0";
diff --git a/src/northbridge/amd/agesa/family16kb/northbridge.c b/src/northbridge/amd/agesa/family16kb/northbridge.c
index b63dec9a87..7852b5eb3a 100644
--- a/src/northbridge/amd/agesa/family16kb/northbridge.c
+++ b/src/northbridge/amd/agesa/family16kb/northbridge.c
@@ -417,7 +417,7 @@ static unsigned long acpi_fill_hest(acpi_hest_t *hest)
return (unsigned long)current;
}
-static void northbridge_fill_ssdt_generator(struct device *device)
+static void northbridge_fill_ssdt_generator(const struct device *device)
{
msr_t msr;
char pscope[] = "\\_SB.PCI0";
diff --git a/src/northbridge/amd/pi/00630F01/northbridge.c b/src/northbridge/amd/pi/00630F01/northbridge.c
index f07a60af60..1ead42c92e 100644
--- a/src/northbridge/amd/pi/00630F01/northbridge.c
+++ b/src/northbridge/amd/pi/00630F01/northbridge.c
@@ -415,7 +415,7 @@ static unsigned long acpi_fill_hest(acpi_hest_t *hest)
return (unsigned long)current;
}
-static void northbridge_fill_ssdt_generator(struct device *device)
+static void northbridge_fill_ssdt_generator(const struct device *device)
{
msr_t msr;
char pscope[] = "\\_SB.PCI0";
diff --git a/src/northbridge/amd/pi/00660F01/northbridge.c b/src/northbridge/amd/pi/00660F01/northbridge.c
index 2742f0673d..e3d753a93d 100644
--- a/src/northbridge/amd/pi/00660F01/northbridge.c
+++ b/src/northbridge/amd/pi/00660F01/northbridge.c
@@ -403,7 +403,7 @@ static unsigned long acpi_fill_hest(acpi_hest_t *hest)
return (unsigned long)current;
}
-static void northbridge_fill_ssdt_generator(struct device *device)
+static void northbridge_fill_ssdt_generator(const struct device *device)
{
msr_t msr;
char pscope[] = "\\_SB.PCI0";
diff --git a/src/northbridge/amd/pi/00730F01/northbridge.c b/src/northbridge/amd/pi/00730F01/northbridge.c
index d5a6865003..fa49fc934e 100644
--- a/src/northbridge/amd/pi/00730F01/northbridge.c
+++ b/src/northbridge/amd/pi/00730F01/northbridge.c
@@ -727,7 +727,7 @@ static unsigned long acpi_fill_ivrs(acpi_ivrs_t *ivrs, unsigned long current)
return acpi_fill_ivrs11(current, ivrs_agesa);
}
-static void northbridge_fill_ssdt_generator(struct device *device)
+static void northbridge_fill_ssdt_generator(const struct device *device)
{
msr_t msr;
char pscope[] = "\\_SB.PCI0";
diff --git a/src/northbridge/intel/gm45/gma.c b/src/northbridge/intel/gm45/gma.c
index 93191148e8..8a38bdf4ea 100644
--- a/src/northbridge/intel/gm45/gma.c
+++ b/src/northbridge/intel/gm45/gma.c
@@ -208,7 +208,7 @@ static void gma_func0_init(struct device *dev)
intel_gma_restore_opregion();
}
-static void gma_generate_ssdt(struct device *device)
+static void gma_generate_ssdt(const struct device *device)
{
const struct northbridge_intel_gm45_config *chip = device->chip_info;
diff --git a/src/northbridge/intel/haswell/gma.c b/src/northbridge/intel/haswell/gma.c
index 1014ce527c..4d70d1a001 100644
--- a/src/northbridge/intel/haswell/gma.c
+++ b/src/northbridge/intel/haswell/gma.c
@@ -513,7 +513,7 @@ static void gma_func0_init(struct device *dev)
intel_gma_restore_opregion();
}
-static void gma_generate_ssdt(struct device *dev)
+static void gma_generate_ssdt(const struct device *dev)
{
const struct northbridge_intel_haswell_config *chip = dev->chip_info;
diff --git a/src/northbridge/intel/i945/gma.c b/src/northbridge/intel/i945/gma.c
index 98b8e8a45a..3259ac4dad 100644
--- a/src/northbridge/intel/i945/gma.c
+++ b/src/northbridge/intel/i945/gma.c
@@ -744,7 +744,7 @@ static void gma_func1_init(struct device *dev)
pci_write_config8(dev, 0xf4, 0xff);
}
-static void gma_generate_ssdt(struct device *device)
+static void gma_generate_ssdt(const struct device *device)
{
const struct northbridge_intel_i945_config *chip = device->chip_info;
diff --git a/src/northbridge/intel/ironlake/gma.c b/src/northbridge/intel/ironlake/gma.c
index d0f6bde948..2521105920 100644
--- a/src/northbridge/intel/ironlake/gma.c
+++ b/src/northbridge/intel/ironlake/gma.c
@@ -203,7 +203,7 @@ static void gma_read_resources(struct device *dev)
res->size = (resource_t) 0x10000000;
}
-static void gma_generate_ssdt(struct device *device)
+static void gma_generate_ssdt(const struct device *device)
{
const struct northbridge_intel_ironlake_config *chip = device->chip_info;
diff --git a/src/northbridge/intel/sandybridge/gma.c b/src/northbridge/intel/sandybridge/gma.c
index ad94e067c4..bb099f0663 100644
--- a/src/northbridge/intel/sandybridge/gma.c
+++ b/src/northbridge/intel/sandybridge/gma.c
@@ -640,7 +640,7 @@ static void gma_func0_init(struct device *dev)
intel_gma_restore_opregion();
}
-static void gma_generate_ssdt(struct device *device)
+static void gma_generate_ssdt(const struct device *device)
{
const struct northbridge_intel_sandybridge_config *chip = device->chip_info;
diff --git a/src/northbridge/intel/x4x/gma.c b/src/northbridge/intel/x4x/gma.c
index c1b7837f0d..03d72649aa 100644
--- a/src/northbridge/intel/x4x/gma.c
+++ b/src/northbridge/intel/x4x/gma.c
@@ -80,7 +80,7 @@ static void gma_func0_disable(struct device *dev)
pci_write_config16(dev_host, D0F0_GGC, ggc);
}
-static void gma_generate_ssdt(struct device *device)
+static void gma_generate_ssdt(const struct device *device)
{
const struct northbridge_intel_x4x_config *chip = device->chip_info;
diff --git a/src/soc/amd/picasso/acpi.c b/src/soc/amd/picasso/acpi.c
index c3dec352f9..85b40ac8a5 100644
--- a/src/soc/amd/picasso/acpi.c
+++ b/src/soc/amd/picasso/acpi.c
@@ -220,7 +220,7 @@ void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt)
header->checksum = acpi_checksum((void *)fadt, sizeof(acpi_fadt_t));
}
-void generate_cpu_entries(struct device *device)
+void generate_cpu_entries(const struct device *device)
{
int cores, cpu;
diff --git a/src/soc/amd/picasso/northbridge.c b/src/soc/amd/picasso/northbridge.c
index d6409c9653..35d46bcfb6 100644
--- a/src/soc/amd/picasso/northbridge.c
+++ b/src/soc/amd/picasso/northbridge.c
@@ -159,7 +159,7 @@ unsigned long acpi_fill_mcfg(unsigned long current)
return current;
}
-static void northbridge_fill_ssdt_generator(struct device *device)
+static void northbridge_fill_ssdt_generator(const struct device *device)
{
msr_t msr;
char pscope[] = "\\_SB.PCI0";
diff --git a/src/soc/amd/stoneyridge/acpi.c b/src/soc/amd/stoneyridge/acpi.c
index 325b59403f..e486c9c59a 100644
--- a/src/soc/amd/stoneyridge/acpi.c
+++ b/src/soc/amd/stoneyridge/acpi.c
@@ -222,7 +222,7 @@ void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt)
header->checksum = acpi_checksum((void *)fadt, sizeof(acpi_fadt_t));
}
-void generate_cpu_entries(struct device *device)
+void generate_cpu_entries(const struct device *device)
{
int cores, cpu;
diff --git a/src/soc/amd/stoneyridge/northbridge.c b/src/soc/amd/stoneyridge/northbridge.c
index 2911c898dd..db715091cf 100644
--- a/src/soc/amd/stoneyridge/northbridge.c
+++ b/src/soc/amd/stoneyridge/northbridge.c
@@ -195,7 +195,7 @@ static unsigned long acpi_fill_hest(acpi_hest_t *hest)
return (unsigned long)current;
}
-static void northbridge_fill_ssdt_generator(struct device *device)
+static void northbridge_fill_ssdt_generator(const struct device *device)
{
msr_t msr;
char pscope[] = "\\_SB.PCI0";
diff --git a/src/soc/intel/baytrail/acpi.c b/src/soc/intel/baytrail/acpi.c
index 3074f1a08f..426c2de95a 100644
--- a/src/soc/intel/baytrail/acpi.c
+++ b/src/soc/intel/baytrail/acpi.c
@@ -402,7 +402,7 @@ static void generate_P_state_entries(int core, int cores_per_package)
acpigen_pop_len();
}
-void generate_cpu_entries(struct device *device)
+void generate_cpu_entries(const struct device *device)
{
int core;
int pcontrol_blk = get_pmbase(), plen = 6;
diff --git a/src/soc/intel/baytrail/gfx.c b/src/soc/intel/baytrail/gfx.c
index 7e65c966c1..fe842ac266 100644
--- a/src/soc/intel/baytrail/gfx.c
+++ b/src/soc/intel/baytrail/gfx.c
@@ -386,7 +386,7 @@ static void gfx_init(struct device *dev)
intel_gma_restore_opregion();
}
-static void gma_generate_ssdt(struct device *dev)
+static void gma_generate_ssdt(const struct device *dev)
{
const struct soc_intel_baytrail_config *chip = dev->chip_info;
diff --git a/src/soc/intel/braswell/acpi.c b/src/soc/intel/braswell/acpi.c
index 7cabb3a418..0b68e09316 100644
--- a/src/soc/intel/braswell/acpi.c
+++ b/src/soc/intel/braswell/acpi.c
@@ -405,7 +405,7 @@ static void generate_p_state_entries(int core, int cores_per_package)
acpigen_pop_len();
}
-void generate_cpu_entries(struct device *device)
+void generate_cpu_entries(const struct device *device)
{
int core;
int pcontrol_blk = get_pmbase(), plen = 6;
diff --git a/src/soc/intel/braswell/gfx.c b/src/soc/intel/braswell/gfx.c
index d6671f6936..163acb4fd9 100644
--- a/src/soc/intel/braswell/gfx.c
+++ b/src/soc/intel/braswell/gfx.c
@@ -77,7 +77,7 @@ void gma_set_gnvs_aslb(void *gnvs, uintptr_t aslb)
gnvs_ptr->aslb = aslb;
}
-static void gma_generate_ssdt(struct device *dev)
+static void gma_generate_ssdt(const struct device *dev)
{
const struct soc_intel_braswell_config *chip = dev->chip_info;
diff --git a/src/soc/intel/broadwell/acpi.c b/src/soc/intel/broadwell/acpi.c
index feec61f3a0..503e1799b5 100644
--- a/src/soc/intel/broadwell/acpi.c
+++ b/src/soc/intel/broadwell/acpi.c
@@ -496,7 +496,7 @@ static void generate_P_state_entries(int core, int cores_per_package)
acpigen_pop_len();
}
-void generate_cpu_entries(struct device *device)
+void generate_cpu_entries(const struct device *device)
{
int coreID, cpuID, pcontrol_blk = ACPI_BASE_ADDRESS, plen = 6;
int totalcores = dev_count_cpu();
diff --git a/src/soc/intel/broadwell/igd.c b/src/soc/intel/broadwell/igd.c
index 6ab9b199a0..b030d44c39 100644
--- a/src/soc/intel/broadwell/igd.c
+++ b/src/soc/intel/broadwell/igd.c
@@ -616,7 +616,7 @@ gma_write_acpi_tables(const struct device *const dev, unsigned long current,
return current;
}
-static void gma_generate_ssdt(struct device *dev)
+static void gma_generate_ssdt(const struct device *dev)
{
const struct soc_intel_broadwell_config *chip = dev->chip_info;
diff --git a/src/soc/intel/common/block/acpi/acpi.c b/src/soc/intel/common/block/acpi/acpi.c
index f1c7b8a5a7..995a51da0b 100644
--- a/src/soc/intel/common/block/acpi/acpi.c
+++ b/src/soc/intel/common/block/acpi/acpi.c
@@ -431,7 +431,7 @@ __weak void soc_power_states_generation(int core_id,
{
}
-void generate_cpu_entries(struct device *device)
+void generate_cpu_entries(const struct device *device)
{
int core_id, cpu_id, pcontrol_blk = ACPI_BASE_ADDRESS;
int plen = 6;
diff --git a/src/soc/intel/common/block/graphics/graphics.c b/src/soc/intel/common/block/graphics/graphics.c
index a6d45c66e1..5392958b42 100644
--- a/src/soc/intel/common/block/graphics/graphics.c
+++ b/src/soc/intel/common/block/graphics/graphics.c
@@ -39,7 +39,7 @@ intel_igd_get_controller_info(const struct device *device)
return NULL;
}
-static void gma_generate_ssdt(struct device *device)
+static void gma_generate_ssdt(const struct device *device)
{
const struct i915_gpu_controller_info *gfx = intel_igd_get_controller_info(device);
diff --git a/src/soc/intel/common/block/scs/sd.c b/src/soc/intel/common/block/scs/sd.c
index d31e33c90a..8e44738da5 100644
--- a/src/soc/intel/common/block/scs/sd.c
+++ b/src/soc/intel/common/block/scs/sd.c
@@ -7,7 +7,7 @@
#include <intelblocks/sd.h>
#if CONFIG(HAVE_ACPI_TABLES)
-static void sd_fill_ssdt(struct device *dev)
+static void sd_fill_ssdt(const struct device *dev)
{
const char *path;
struct acpi_gpio default_gpio = { 0 };
diff --git a/src/soc/intel/skylake/acpi.c b/src/soc/intel/skylake/acpi.c
index 487916886b..aac90c3fd5 100644
--- a/src/soc/intel/skylake/acpi.c
+++ b/src/soc/intel/skylake/acpi.c
@@ -491,7 +491,7 @@ static void generate_p_state_entries(int core, int cores_per_package)
acpigen_pop_len();
}
-void generate_cpu_entries(struct device *device)
+void generate_cpu_entries(const struct device *device)
{
int core_id, cpu_id, pcontrol_blk = ACPI_BASE_ADDRESS, plen = 6;
int totalcores = dev_count_cpu();
diff --git a/src/soc/intel/xeon_sp/skx/acpi.c b/src/soc/intel/xeon_sp/skx/acpi.c
index 589ee856a2..8a806be888 100644
--- a/src/soc/intel/xeon_sp/skx/acpi.c
+++ b/src/soc/intel/xeon_sp/skx/acpi.c
@@ -200,7 +200,7 @@ void generate_p_state_entries(int core, int cores_per_package)
{
}
-void generate_cpu_entries(struct device *device)
+void generate_cpu_entries(const struct device *device)
{
int core_id, cpu_id, pcontrol_blk = ACPI_BASE_ADDRESS;
int plen = 6;
diff --git a/src/southbridge/intel/bd82x6x/lpc.c b/src/southbridge/intel/bd82x6x/lpc.c
index 278e90ac00..215965e6f2 100644
--- a/src/southbridge/intel/bd82x6x/lpc.c
+++ b/src/southbridge/intel/bd82x6x/lpc.c
@@ -823,7 +823,7 @@ static const char *lpc_acpi_name(const struct device *dev)
return "LPCB";
}
-static void southbridge_fill_ssdt(struct device *device)
+static void southbridge_fill_ssdt(const struct device *device)
{
struct device *dev = pcidev_on_root(0x1f, 0);
config_t *chip = dev->chip_info;
diff --git a/src/southbridge/intel/bd82x6x/sata.c b/src/southbridge/intel/bd82x6x/sata.c
index 75a1b1a363..e65fd6ecae 100644
--- a/src/southbridge/intel/bd82x6x/sata.c
+++ b/src/southbridge/intel/bd82x6x/sata.c
@@ -274,7 +274,7 @@ static const char *sata_acpi_name(const struct device *dev)
return "SATA";
}
-static void sata_fill_ssdt(struct device *dev)
+static void sata_fill_ssdt(const struct device *dev)
{
config_t *config = dev->chip_info;
generate_sata_ssdt_ports("\\_SB_.PCI0.SATA", config->sata_port_map);
diff --git a/src/southbridge/intel/common/acpi_pirq_gen.c b/src/southbridge/intel/common/acpi_pirq_gen.c
index d1e0c8bb70..20dafdfd38 100644
--- a/src/southbridge/intel/common/acpi_pirq_gen.c
+++ b/src/southbridge/intel/common/acpi_pirq_gen.c
@@ -71,7 +71,7 @@ static void gen_pirq_route(const enum emit_type emit, const char *lpcb_path,
}
}
-void intel_acpi_gen_def_acpi_pirq(struct device *dev)
+void intel_acpi_gen_def_acpi_pirq(const struct device *dev)
{
const char *lpcb_path = acpi_device_path(dev);
char pci_int_mapping[32][4];
diff --git a/src/southbridge/intel/common/acpi_pirq_gen.h b/src/southbridge/intel/common/acpi_pirq_gen.h
index dc2cae9847..acb1bcb1ac 100644
--- a/src/southbridge/intel/common/acpi_pirq_gen.h
+++ b/src/southbridge/intel/common/acpi_pirq_gen.h
@@ -24,7 +24,7 @@ enum pirq {
PIRQ_H,
};
-void intel_acpi_gen_def_acpi_pirq(struct device *dev);
+void intel_acpi_gen_def_acpi_pirq(const struct device *dev);
enum pirq intel_common_map_pirq(const struct device *dev,
const enum pci_pin pci_pin);
diff --git a/src/southbridge/intel/i82371eb/acpi_tables.c b/src/southbridge/intel/i82371eb/acpi_tables.c
index 9da9c23e53..96fcefcebb 100644
--- a/src/southbridge/intel/i82371eb/acpi_tables.c
+++ b/src/southbridge/intel/i82371eb/acpi_tables.c
@@ -25,7 +25,7 @@ static int determine_total_number_of_cores(void)
return count;
}
-void generate_cpu_entries(struct device *device)
+void generate_cpu_entries(const struct device *device)
{
int cpu, pcontrol_blk=DEFAULT_PMBASE+PCNTRL, plen=6;
int numcpus = determine_total_number_of_cores();
diff --git a/src/southbridge/intel/i82371eb/isa.c b/src/southbridge/intel/i82371eb/isa.c
index bb876115a3..bc492df15a 100644
--- a/src/southbridge/intel/i82371eb/isa.c
+++ b/src/southbridge/intel/i82371eb/isa.c
@@ -118,7 +118,7 @@ static void sb_read_resources(struct device *dev)
}
#if CONFIG(HAVE_ACPI_TABLES)
-static void southbridge_acpi_fill_ssdt_generator(struct device *device)
+static void southbridge_acpi_fill_ssdt_generator(const struct device *device)
{
acpigen_write_mainboard_resources("\\_SB.PCI0.MBRS", "_CRS");
generate_cpu_entries(device);
diff --git a/src/southbridge/intel/i82801gx/lpc.c b/src/southbridge/intel/i82801gx/lpc.c
index c24460cd81..9b5f5457fc 100644
--- a/src/southbridge/intel/i82801gx/lpc.c
+++ b/src/southbridge/intel/i82801gx/lpc.c
@@ -647,7 +647,7 @@ static const char *lpc_acpi_name(const struct device *dev)
return "LPCB";
}
-static void southbridge_fill_ssdt(struct device *device)
+static void southbridge_fill_ssdt(const struct device *device)
{
intel_acpi_gen_def_acpi_pirq(device);
}
diff --git a/src/southbridge/intel/i82801ix/lpc.c b/src/southbridge/intel/i82801ix/lpc.c
index 923056c7a8..a177c6cc64 100644
--- a/src/southbridge/intel/i82801ix/lpc.c
+++ b/src/southbridge/intel/i82801ix/lpc.c
@@ -494,7 +494,7 @@ static const char *lpc_acpi_name(const struct device *dev)
return "LPCB";
}
-static void southbridge_fill_ssdt(struct device *device)
+static void southbridge_fill_ssdt(const struct device *device)
{
struct device *dev = pcidev_on_root(0x1f, 0);
config_t *chip = dev->chip_info;
diff --git a/src/southbridge/intel/i82801jx/lpc.c b/src/southbridge/intel/i82801jx/lpc.c
index 91f92859c1..380dca4c30 100644
--- a/src/southbridge/intel/i82801jx/lpc.c
+++ b/src/southbridge/intel/i82801jx/lpc.c
@@ -652,7 +652,7 @@ static const char *lpc_acpi_name(const struct device *dev)
return "LPCB";
}
-static void southbridge_fill_ssdt(struct device *device)
+static void southbridge_fill_ssdt(const struct device *device)
{
struct device *dev = pcidev_on_root(0x1f, 0);
config_t *chip = dev->chip_info;
diff --git a/src/southbridge/intel/ibexpeak/lpc.c b/src/southbridge/intel/ibexpeak/lpc.c
index 395919e676..242d274932 100644
--- a/src/southbridge/intel/ibexpeak/lpc.c
+++ b/src/southbridge/intel/ibexpeak/lpc.c
@@ -716,7 +716,7 @@ static const char *lpc_acpi_name(const struct device *dev)
return "LPCB";
}
-static void southbridge_fill_ssdt(struct device *device)
+static void southbridge_fill_ssdt(const struct device *device)
{
struct device *dev = pcidev_on_root(0x1f, 0);
config_t *chip = dev->chip_info;
diff --git a/src/southbridge/intel/ibexpeak/sata.c b/src/southbridge/intel/ibexpeak/sata.c
index 3a7bdb605f..11ac078c83 100644
--- a/src/southbridge/intel/ibexpeak/sata.c
+++ b/src/southbridge/intel/ibexpeak/sata.c
@@ -212,7 +212,7 @@ static void sata_enable(struct device *dev)
pci_write_config16(dev, 0x90, map);
}
-static void sata_fill_ssdt(struct device *dev)
+static void sata_fill_ssdt(const struct device *dev)
{
config_t *config = dev->chip_info;
generate_sata_ssdt_ports("\\_SB_.PCI0.SATA", config->sata_port_map);
diff --git a/src/southbridge/intel/lynxpoint/lpc.c b/src/southbridge/intel/lynxpoint/lpc.c
index 42469ba3c1..d44009b00f 100644
--- a/src/southbridge/intel/lynxpoint/lpc.c
+++ b/src/southbridge/intel/lynxpoint/lpc.c
@@ -877,7 +877,7 @@ static const char *lpc_acpi_name(const struct device *dev)
return "LPCB";
}
-static void southbridge_fill_ssdt(struct device *dev)
+static void southbridge_fill_ssdt(const struct device *dev)
{
intel_acpi_gen_def_acpi_pirq(dev);
}
diff --git a/src/superio/common/generic.c b/src/superio/common/generic.c
index 88432ff68d..cffe0c3476 100644
--- a/src/superio/common/generic.c
+++ b/src/superio/common/generic.c
@@ -31,7 +31,7 @@ static void generic_read_resources(struct device *dev)
}
#if CONFIG(HAVE_ACPI_TABLES)
-static void generic_ssdt(struct device *dev)
+static void generic_ssdt(const struct device *dev)
{
const char *scope = acpi_device_scope(dev);
const char *name = acpi_device_name(dev);
diff --git a/src/superio/common/ssdt.c b/src/superio/common/ssdt.c
index f5ad765aa1..9ff02fb3af 100644
--- a/src/superio/common/ssdt.c
+++ b/src/superio/common/ssdt.c
@@ -29,7 +29,7 @@ static const struct superio_dev superio_devs[] = {
static const u8 io_idx[] = {PNP_IDX_IO0, PNP_IDX_IO1, PNP_IDX_IO2, PNP_IDX_IO3};
static const u8 irq_idx[] = {PNP_IDX_IRQ0, PNP_IDX_IRQ1};
-static const struct superio_dev *superio_guess_function(struct device *dev)
+static const struct superio_dev *superio_guess_function(const struct device *dev)
{
for (size_t i = 0; i < ARRAY_SIZE(io_idx); i++) {
struct resource *res = probe_resource(dev, io_idx[i]);
@@ -62,7 +62,7 @@ static const struct superio_dev *superio_guess_function(struct device *dev)
}
/* Return true if there are resources to report */
-static bool has_resources(struct device *dev)
+static bool has_resources(const struct device *dev)
{
for (size_t i = 0; i < ARRAY_SIZE(io_idx); i++) {
struct resource *res = probe_resource(dev, io_idx[i]);
@@ -80,7 +80,7 @@ static bool has_resources(struct device *dev)
}
/* Add IO and IRQ resources for _CRS or _PRS */
-static void ldn_gen_resources(struct device *dev)
+static void ldn_gen_resources(const struct device *dev)
{
uint16_t irq = 0;
for (size_t i = 0; i < ARRAY_SIZE(io_idx); i++) {
@@ -109,7 +109,7 @@ static void ldn_gen_resources(struct device *dev)
}
/* Add resource base and size for additional SuperIO code */
-static void ldn_gen_resources_use(struct device *dev)
+static void ldn_gen_resources_use(const struct device *dev)
{
char name[5];
for (size_t i = 0; i < ARRAY_SIZE(io_idx); i++) {
@@ -161,7 +161,7 @@ static const char *name_from_hid(const char *hid)
return "Generic device";
}
-void superio_common_fill_ssdt_generator(struct device *dev)
+void superio_common_fill_ssdt_generator(const struct device *dev)
{
if (!dev || !dev->bus || !dev->bus->dev) {
printk(BIOS_CRIT, "BUG: Invalid argument in %s!\n", __func__);
diff --git a/src/superio/common/ssdt.h b/src/superio/common/ssdt.h
index 1f9918950f..5b1efcf8ac 100644
--- a/src/superio/common/ssdt.h
+++ b/src/superio/common/ssdt.h
@@ -7,6 +7,6 @@
#include <device/device.h>
const char *superio_common_ldn_acpi_name(const struct device *dev);
-void superio_common_fill_ssdt_generator(struct device *dev);
+void superio_common_fill_ssdt_generator(const struct device *dev);
#endif /* __SUPERIO_COMMON_SSDT_H__ */
diff --git a/src/superio/nuvoton/npcd378/superio.c b/src/superio/nuvoton/npcd378/superio.c
index 94b42a02cf..8f5975ba26 100644
--- a/src/superio/nuvoton/npcd378/superio.c
+++ b/src/superio/nuvoton/npcd378/superio.c
@@ -115,7 +115,7 @@ static const char *npcd378_acpi_hid(const struct device *dev)
}
}
-static void npcd378_ssdt_aux(struct device *dev)
+static void npcd378_ssdt_aux(const struct device *dev)
{
/* Scope */
acpigen_write_scope(acpi_device_path(dev));
@@ -131,7 +131,7 @@ static void npcd378_ssdt_aux(struct device *dev)
acpigen_pop_len(); /* Pop Scope */
}
-static void npcd378_ssdt_kbc(struct device *dev)
+static void npcd378_ssdt_kbc(const struct device *dev)
{
/* Scope */
acpigen_write_scope(acpi_device_path(dev));
@@ -147,7 +147,7 @@ static void npcd378_ssdt_kbc(struct device *dev)
acpigen_pop_len(); /* Pop Scope */
}
-static void npcd378_ssdt_pwr(struct device *dev)
+static void npcd378_ssdt_pwr(const struct device *dev)
{
const char *name = acpi_device_path(dev);
const char *scope = acpi_device_scope(dev);
@@ -403,7 +403,7 @@ static void npcd378_ssdt_pwr(struct device *dev)
acpigen_pop_len(); /* Scope */
}
-static void npcd378_fill_ssdt_generator(struct device *dev)
+static void npcd378_fill_ssdt_generator(const struct device *dev)
{
superio_common_fill_ssdt_generator(dev);