Furquan Shaikh has submitted this change. ( https://review.coreboot.org/c/coreboot/+/40711 )
Change subject: device: Constify struct device * parameter to acpi_inject_dsdt ......................................................................
device: Constify struct device * parameter to acpi_inject_dsdt
.acpi_inject_dsdt() does not need to modify the device structure. Hence, this change makes the struct device * parameter to acpi_inject_dsdt as const.
Change-Id: I3b096d9a5a9d649193e32ea686d5de9f78124997 Signed-off-by: Furquan Shaikh furquan@google.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/40711 Reviewed-by: Aaron Durbin adurbin@chromium.org Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/include/device/device.h M src/soc/amd/picasso/acpi.c M src/soc/amd/picasso/include/soc/acpi.h M src/soc/amd/stoneyridge/acpi.c M src/soc/amd/stoneyridge/include/soc/acpi.h M src/soc/intel/baytrail/southcluster.c M src/soc/intel/braswell/acpi.c M src/soc/intel/braswell/include/soc/acpi.h M src/soc/intel/broadwell/lpc.c M src/soc/intel/common/block/acpi/acpi.c M src/soc/intel/common/block/include/intelblocks/acpi.h M src/soc/intel/denverton_ns/acpi.c M src/soc/intel/denverton_ns/include/soc/acpi.h M src/soc/intel/skylake/acpi.c M src/soc/intel/skylake/include/soc/acpi.h M src/soc/intel/xeon_sp/cpx/acpi.c M src/soc/intel/xeon_sp/skx/acpi.c M src/southbridge/intel/bd82x6x/lpc.c M src/southbridge/intel/i82801gx/lpc.c M src/southbridge/intel/i82801ix/lpc.c M src/southbridge/intel/i82801jx/lpc.c M src/southbridge/intel/ibexpeak/lpc.c M src/southbridge/intel/lynxpoint/lpc.c M src/vendorcode/google/chromeos/acpi.c M src/vendorcode/google/chromeos/chromeos.h 25 files changed, 25 insertions(+), 25 deletions(-)
Approvals: build bot (Jenkins): Verified Aaron Durbin: Looks good to me, approved
diff --git a/src/include/device/device.h b/src/include/device/device.h index efa9e8b..c21067d 100644 --- a/src/include/device/device.h +++ b/src/include/device/device.h @@ -51,7 +51,7 @@ unsigned long (*write_acpi_tables)(const struct device *dev, unsigned long start, struct acpi_rsdp *rsdp); void (*acpi_fill_ssdt)(const struct device *dev); - void (*acpi_inject_dsdt)(struct device *dev); + void (*acpi_inject_dsdt)(const struct device *dev); const char *(*acpi_name)(const struct device *dev); /* Returns the optional _HID (Hardware ID) */ const char *(*acpi_hid)(const struct device *dev); diff --git a/src/soc/amd/picasso/acpi.c b/src/soc/amd/picasso/acpi.c index 85b40ac..8e34c85 100644 --- a/src/soc/amd/picasso/acpi.c +++ b/src/soc/amd/picasso/acpi.c @@ -267,7 +267,7 @@ gnvs->pcnt = dev_count_cpu(); }
-void southbridge_inject_dsdt(struct device *device) +void southbridge_inject_dsdt(const struct device *device) { struct global_nvs_t *gnvs;
diff --git a/src/soc/amd/picasso/include/soc/acpi.h b/src/soc/amd/picasso/include/soc/acpi.h index bf16518..68321ff 100644 --- a/src/soc/amd/picasso/include/soc/acpi.h +++ b/src/soc/amd/picasso/include/soc/acpi.h @@ -13,7 +13,7 @@ unsigned long southbridge_write_acpi_tables(const struct device *device, unsigned long current, struct acpi_rsdp *rsdp);
-void southbridge_inject_dsdt(struct device *device); +void southbridge_inject_dsdt(const struct device *device);
const char *soc_acpi_name(const struct device *dev);
diff --git a/src/soc/amd/stoneyridge/acpi.c b/src/soc/amd/stoneyridge/acpi.c index e486c9c..cc9f634 100644 --- a/src/soc/amd/stoneyridge/acpi.c +++ b/src/soc/amd/stoneyridge/acpi.c @@ -272,7 +272,7 @@ gnvs->pcnt = dev_count_cpu(); }
-void southbridge_inject_dsdt(struct device *device) +void southbridge_inject_dsdt(const struct device *device) { struct global_nvs_t *gnvs;
diff --git a/src/soc/amd/stoneyridge/include/soc/acpi.h b/src/soc/amd/stoneyridge/include/soc/acpi.h index d6f9bed..6a74f22 100644 --- a/src/soc/amd/stoneyridge/include/soc/acpi.h +++ b/src/soc/amd/stoneyridge/include/soc/acpi.h @@ -19,7 +19,7 @@ unsigned long southbridge_write_acpi_tables(const struct device *device, unsigned long current, struct acpi_rsdp *rsdp);
-void southbridge_inject_dsdt(struct device *device); +void southbridge_inject_dsdt(const struct device *device);
const char *soc_acpi_name(const struct device *dev);
diff --git a/src/soc/intel/baytrail/southcluster.c b/src/soc/intel/baytrail/southcluster.c index 1b0906f..b406096 100644 --- a/src/soc/intel/baytrail/southcluster.c +++ b/src/soc/intel/baytrail/southcluster.c @@ -483,7 +483,7 @@ } }
-static void southcluster_inject_dsdt(struct device *device) +static void southcluster_inject_dsdt(const struct device *device) { global_nvs_t *gnvs;
diff --git a/src/soc/intel/braswell/acpi.c b/src/soc/intel/braswell/acpi.c index 0b68e09..1c9d6b3 100644 --- a/src/soc/intel/braswell/acpi.c +++ b/src/soc/intel/braswell/acpi.c @@ -512,7 +512,7 @@ return current; }
-void southcluster_inject_dsdt(struct device *device) +void southcluster_inject_dsdt(const struct device *device) { global_nvs_t *gnvs;
diff --git a/src/soc/intel/braswell/include/soc/acpi.h b/src/soc/intel/braswell/include/soc/acpi.h index 7a58bec..997b7e9 100644 --- a/src/soc/intel/braswell/include/soc/acpi.h +++ b/src/soc/intel/braswell/include/soc/acpi.h @@ -11,7 +11,7 @@ void acpi_fill_in_fadt(acpi_fadt_t *fadt); unsigned long acpi_madt_irq_overrides(unsigned long current); void acpi_init_gnvs(global_nvs_t *gnvs); -void southcluster_inject_dsdt(struct device *device); +void southcluster_inject_dsdt(const struct device *device); unsigned long southcluster_write_acpi_tables(const struct device *device, unsigned long current, struct acpi_rsdp *rsdp);
diff --git a/src/soc/intel/broadwell/lpc.c b/src/soc/intel/broadwell/lpc.c index 22547fc..af3be9e 100644 --- a/src/soc/intel/broadwell/lpc.c +++ b/src/soc/intel/broadwell/lpc.c @@ -573,7 +573,7 @@ memset(gnvs, 0, sizeof(global_nvs_t)); }
-static void southcluster_inject_dsdt(struct device *device) +static void southcluster_inject_dsdt(const struct device *device) { global_nvs_t *gnvs;
diff --git a/src/soc/intel/common/block/acpi/acpi.c b/src/soc/intel/common/block/acpi/acpi.c index 995a51d..e426fae 100644 --- a/src/soc/intel/common/block/acpi/acpi.c +++ b/src/soc/intel/common/block/acpi/acpi.c @@ -243,7 +243,7 @@ { }
-void southbridge_inject_dsdt(struct device *device) +void southbridge_inject_dsdt(const struct device *device) { struct global_nvs_t *gnvs;
diff --git a/src/soc/intel/common/block/include/intelblocks/acpi.h b/src/soc/intel/common/block/include/intelblocks/acpi.h index e1f9bf8..cb10f1f 100644 --- a/src/soc/intel/common/block/include/intelblocks/acpi.h +++ b/src/soc/intel/common/block/include/intelblocks/acpi.h @@ -48,7 +48,7 @@ * Creates acpi gnvs and adds it to the DSDT table. * GNVS creation is chipset specific and is done in soc specific acpi.c file. */ -void southbridge_inject_dsdt(struct device *device); +void southbridge_inject_dsdt(const struct device *device);
/* * This function populates the gnvs structure in acpi table. diff --git a/src/soc/intel/denverton_ns/acpi.c b/src/soc/intel/denverton_ns/acpi.c index d425879..6f43288 100644 --- a/src/soc/intel/denverton_ns/acpi.c +++ b/src/soc/intel/denverton_ns/acpi.c @@ -292,7 +292,7 @@ return current; }
-void southcluster_inject_dsdt(struct device *device) +void southcluster_inject_dsdt(const struct device *device) { global_nvs_t *gnvs;
diff --git a/src/soc/intel/denverton_ns/include/soc/acpi.h b/src/soc/intel/denverton_ns/include/soc/acpi.h index 9f7e0c3..ae184e9 100644 --- a/src/soc/intel/denverton_ns/include/soc/acpi.h +++ b/src/soc/intel/denverton_ns/include/soc/acpi.h @@ -13,7 +13,7 @@ unsigned long southcluster_write_acpi_tables(const struct device *device, unsigned long current, struct acpi_rsdp *rsdp); -void southcluster_inject_dsdt(struct device *device); +void southcluster_inject_dsdt(const struct device *device); void motherboard_fill_fadt(acpi_fadt_t *fadt);
#endif /* _DENVERTON_NS_ACPI_H_ */ diff --git a/src/soc/intel/skylake/acpi.c b/src/soc/intel/skylake/acpi.c index aac90c3..5ba683f 100644 --- a/src/soc/intel/skylake/acpi.c +++ b/src/soc/intel/skylake/acpi.c @@ -641,7 +641,7 @@ return acpi_align_current(current); }
-void southbridge_inject_dsdt(struct device *device) +void southbridge_inject_dsdt(const struct device *device) { global_nvs_t *gnvs;
diff --git a/src/soc/intel/skylake/include/soc/acpi.h b/src/soc/intel/skylake/include/soc/acpi.h index 924d9cb..f63220e 100644 --- a/src/soc/intel/skylake/include/soc/acpi.h +++ b/src/soc/intel/skylake/include/soc/acpi.h @@ -16,7 +16,7 @@ void acpi_fill_in_fadt(acpi_fadt_t *fadt); unsigned long acpi_madt_irq_overrides(unsigned long current); void acpi_mainboard_gnvs(global_nvs_t *gnvs); -void southbridge_inject_dsdt(struct device *device); +void southbridge_inject_dsdt(const struct device *device); unsigned long southbridge_write_acpi_tables(const struct device *device, unsigned long current, struct acpi_rsdp *rsdp); unsigned long northbridge_write_acpi_tables(const struct device *, diff --git a/src/soc/intel/xeon_sp/cpx/acpi.c b/src/soc/intel/xeon_sp/cpx/acpi.c index 0ba0069..0fe471c 100644 --- a/src/soc/intel/xeon_sp/cpx/acpi.c +++ b/src/soc/intel/xeon_sp/cpx/acpi.c @@ -34,7 +34,7 @@ return current; }
-void southbridge_inject_dsdt(struct device *device) +void southbridge_inject_dsdt(const struct device *device) { global_nvs_t *gnvs;
diff --git a/src/soc/intel/xeon_sp/skx/acpi.c b/src/soc/intel/xeon_sp/skx/acpi.c index 8a806be..9c5c749 100644 --- a/src/soc/intel/xeon_sp/skx/acpi.c +++ b/src/soc/intel/xeon_sp/skx/acpi.c @@ -987,7 +987,7 @@ acpigen_pop_len(); }
-void southbridge_inject_dsdt(struct device *device) +void southbridge_inject_dsdt(const struct device *device) { global_nvs_t *gnvs;
diff --git a/src/southbridge/intel/bd82x6x/lpc.c b/src/southbridge/intel/bd82x6x/lpc.c index 215965e..35d71a4 100644 --- a/src/southbridge/intel/bd82x6x/lpc.c +++ b/src/southbridge/intel/bd82x6x/lpc.c @@ -661,7 +661,7 @@ pch_enable(dev); }
-static void southbridge_inject_dsdt(struct device *dev) +static void southbridge_inject_dsdt(const struct device *dev) { global_nvs_t *gnvs = cbmem_add (CBMEM_ID_ACPI_GNVS, sizeof(*gnvs));
diff --git a/src/southbridge/intel/i82801gx/lpc.c b/src/southbridge/intel/i82801gx/lpc.c index 9b5f545..e54f2bd 100644 --- a/src/southbridge/intel/i82801gx/lpc.c +++ b/src/southbridge/intel/i82801gx/lpc.c @@ -620,7 +620,7 @@ outb(POST_OS_BOOT, 0x80); }
-static void southbridge_inject_dsdt(struct device *dev) +static void southbridge_inject_dsdt(const struct device *dev) { global_nvs_t *gnvs = cbmem_add(CBMEM_ID_ACPI_GNVS, sizeof(*gnvs));
diff --git a/src/southbridge/intel/i82801ix/lpc.c b/src/southbridge/intel/i82801ix/lpc.c index a177c6c..8765cc1 100644 --- a/src/southbridge/intel/i82801ix/lpc.c +++ b/src/southbridge/intel/i82801ix/lpc.c @@ -470,7 +470,7 @@ res->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED; }
-static void southbridge_inject_dsdt(struct device *dev) +static void southbridge_inject_dsdt(const struct device *dev) { global_nvs_t *gnvs = cbmem_add (CBMEM_ID_ACPI_GNVS, sizeof(*gnvs));
diff --git a/src/southbridge/intel/i82801jx/lpc.c b/src/southbridge/intel/i82801jx/lpc.c index 380dca4..77a8f77 100644 --- a/src/southbridge/intel/i82801jx/lpc.c +++ b/src/southbridge/intel/i82801jx/lpc.c @@ -629,7 +629,7 @@ } }
-static void southbridge_inject_dsdt(struct device *dev) +static void southbridge_inject_dsdt(const struct device *dev) { global_nvs_t *gnvs = cbmem_add (CBMEM_ID_ACPI_GNVS, sizeof(*gnvs));
diff --git a/src/southbridge/intel/ibexpeak/lpc.c b/src/southbridge/intel/ibexpeak/lpc.c index 242d274..4edf87e 100644 --- a/src/southbridge/intel/ibexpeak/lpc.c +++ b/src/southbridge/intel/ibexpeak/lpc.c @@ -559,7 +559,7 @@ pch_enable(dev); }
-static void southbridge_inject_dsdt(struct device *dev) +static void southbridge_inject_dsdt(const struct device *dev) { global_nvs_t *gnvs = cbmem_add (CBMEM_ID_ACPI_GNVS, sizeof(*gnvs));
diff --git a/src/southbridge/intel/lynxpoint/lpc.c b/src/southbridge/intel/lynxpoint/lpc.c index d44009b..b5fb674 100644 --- a/src/southbridge/intel/lynxpoint/lpc.c +++ b/src/southbridge/intel/lynxpoint/lpc.c @@ -699,7 +699,7 @@ pch_enable(dev); }
-static void southbridge_inject_dsdt(struct device *dev) +static void southbridge_inject_dsdt(const struct device *dev) { global_nvs_t *gnvs;
diff --git a/src/vendorcode/google/chromeos/acpi.c b/src/vendorcode/google/chromeos/acpi.c index fad1256..abd5b67 100644 --- a/src/vendorcode/google/chromeos/acpi.c +++ b/src/vendorcode/google/chromeos/acpi.c @@ -35,7 +35,7 @@ acpigen_pop_len(); }
-void chromeos_dsdt_generator(struct device *dev) +void chromeos_dsdt_generator(const struct device *dev) { mainboard_chromeos_acpi_generate(); } diff --git a/src/vendorcode/google/chromeos/chromeos.h b/src/vendorcode/google/chromeos/chromeos.h index f7df10f..d2d0a7a 100644 --- a/src/vendorcode/google/chromeos/chromeos.h +++ b/src/vendorcode/google/chromeos/chromeos.h @@ -70,7 +70,7 @@ */ void mainboard_chromeos_acpi_generate(void); #if CONFIG(CHROMEOS) -void chromeos_dsdt_generator(struct device *dev); +void chromeos_dsdt_generator(const struct device *dev); #else #define chromeos_dsdt_generator NULL #endif