summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2020-04-05 13:55:12 +0200
committerNico Huber <nico.h@gmx.de>2020-04-10 11:25:04 +0000
commita461b694a6c0468cd679628aeebf83437027fb45 (patch)
tree6ba4647074e37d7580ab85683c8aa40358246e4c /src/soc
parent9734325f4568c19d1ffc392084aa431a810a0709 (diff)
Drop unnecessary DEVICE_NOOP entries
Providing an explicit no-op function pointer is only necessary for `.read_resources` and `.set_resources`. All other device-operation pointers are optional and can be NULL. Change-Id: I3d139f7be86180558cabec04b8566873062e33be Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/40206 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/amd/picasso/chip.c1
-rw-r--r--src/soc/amd/picasso/i2c.c1
-rw-r--r--src/soc/amd/stoneyridge/chip.c1
-rw-r--r--src/soc/amd/stoneyridge/i2c.c1
-rw-r--r--src/soc/cavium/cn81xx/soc.c1
-rw-r--r--src/soc/intel/apollolake/chip.c1
-rw-r--r--src/soc/intel/baytrail/chip.c1
-rw-r--r--src/soc/intel/braswell/chip.c1
-rw-r--r--src/soc/intel/broadwell/chip.c1
-rw-r--r--src/soc/intel/cannonlake/chip.c2
-rw-r--r--src/soc/intel/denverton_ns/chip.c1
-rw-r--r--src/soc/intel/denverton_ns/uart.c1
-rw-r--r--src/soc/intel/icelake/chip.c2
-rw-r--r--src/soc/intel/jasperlake/chip.c2
-rw-r--r--src/soc/intel/skylake/chip.c2
-rw-r--r--src/soc/intel/tigerlake/chip.c2
-rw-r--r--src/soc/intel/xeon_sp/cpx/chip.c1
-rw-r--r--src/soc/intel/xeon_sp/skx/chip.c1
-rw-r--r--src/soc/nvidia/tegra210/soc.c2
19 files changed, 0 insertions, 25 deletions
diff --git a/src/soc/amd/picasso/chip.c b/src/soc/amd/picasso/chip.c
index ae3ae32626..865dad875a 100644
--- a/src/soc/amd/picasso/chip.c
+++ b/src/soc/amd/picasso/chip.c
@@ -21,7 +21,6 @@ extern const char *i2c_acpi_name(const struct device *dev);
struct device_operations cpu_bus_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
.init = picasso_init_cpus,
.acpi_fill_ssdt = generate_cpu_entries,
};
diff --git a/src/soc/amd/picasso/i2c.c b/src/soc/amd/picasso/i2c.c
index dec409f060..f17eccd487 100644
--- a/src/soc/amd/picasso/i2c.c
+++ b/src/soc/amd/picasso/i2c.c
@@ -128,7 +128,6 @@ struct device_operations picasso_i2c_mmio_ops = {
/* TODO(teravest): Move I2C resource info here. */
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
.scan_bus = scan_smbus,
.acpi_name = i2c_acpi_name,
.acpi_fill_ssdt = dw_i2c_acpi_fill_ssdt,
diff --git a/src/soc/amd/stoneyridge/chip.c b/src/soc/amd/stoneyridge/chip.c
index 8efe64feca..b27683a6dc 100644
--- a/src/soc/amd/stoneyridge/chip.c
+++ b/src/soc/amd/stoneyridge/chip.c
@@ -26,7 +26,6 @@ extern const char *i2c_acpi_name(const struct device *dev);
struct device_operations cpu_bus_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
.init = stoney_init_cpus,
.acpi_fill_ssdt = generate_cpu_entries,
};
diff --git a/src/soc/amd/stoneyridge/i2c.c b/src/soc/amd/stoneyridge/i2c.c
index 3f95be73c3..8ec3555c17 100644
--- a/src/soc/amd/stoneyridge/i2c.c
+++ b/src/soc/amd/stoneyridge/i2c.c
@@ -112,7 +112,6 @@ struct device_operations stoneyridge_i2c_mmio_ops = {
/* TODO(teravest): Move I2C resource info here. */
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
.scan_bus = scan_smbus,
.acpi_name = i2c_acpi_name,
.acpi_fill_ssdt = dw_i2c_acpi_fill_ssdt,
diff --git a/src/soc/cavium/cn81xx/soc.c b/src/soc/cavium/cn81xx/soc.c
index 512a337d7b..f3adc47a42 100644
--- a/src/soc/cavium/cn81xx/soc.c
+++ b/src/soc/cavium/cn81xx/soc.c
@@ -382,7 +382,6 @@ static void soc_final(struct device *dev)
static struct device_operations soc_ops = {
.read_resources = soc_read_resources,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
.init = soc_init,
.final = soc_final,
};
diff --git a/src/soc/intel/apollolake/chip.c b/src/soc/intel/apollolake/chip.c
index 2c8737f654..cf4763d67d 100644
--- a/src/soc/intel/apollolake/chip.c
+++ b/src/soc/intel/apollolake/chip.c
@@ -221,7 +221,6 @@ static struct device_operations pci_domain_ops = {
static struct device_operations cpu_bus_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
.init = apollolake_init_cpus,
.acpi_fill_ssdt = generate_cpu_entries,
};
diff --git a/src/soc/intel/baytrail/chip.c b/src/soc/intel/baytrail/chip.c
index 39802dcabb..b51d8c31de 100644
--- a/src/soc/intel/baytrail/chip.c
+++ b/src/soc/intel/baytrail/chip.c
@@ -23,7 +23,6 @@ static struct device_operations pci_domain_ops = {
static struct device_operations cpu_bus_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
.init = baytrail_init_cpus,
};
diff --git a/src/soc/intel/braswell/chip.c b/src/soc/intel/braswell/chip.c
index d1540f844c..991e30f3de 100644
--- a/src/soc/intel/braswell/chip.c
+++ b/src/soc/intel/braswell/chip.c
@@ -26,7 +26,6 @@ static struct device_operations pci_domain_ops = {
static struct device_operations cpu_bus_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
.init = soc_init_cpus
};
diff --git a/src/soc/intel/broadwell/chip.c b/src/soc/intel/broadwell/chip.c
index 1cf5ada530..4caa23653d 100644
--- a/src/soc/intel/broadwell/chip.c
+++ b/src/soc/intel/broadwell/chip.c
@@ -25,7 +25,6 @@ static struct device_operations pci_domain_ops = {
static struct device_operations cpu_bus_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
.init = &broadwell_init_cpus,
};
diff --git a/src/soc/intel/cannonlake/chip.c b/src/soc/intel/cannonlake/chip.c
index d3918a360b..e323346a12 100644
--- a/src/soc/intel/cannonlake/chip.c
+++ b/src/soc/intel/cannonlake/chip.c
@@ -186,8 +186,6 @@ static struct device_operations pci_domain_ops = {
static struct device_operations cpu_bus_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
- .init = DEVICE_NOOP,
.acpi_fill_ssdt = generate_cpu_entries,
};
diff --git a/src/soc/intel/denverton_ns/chip.c b/src/soc/intel/denverton_ns/chip.c
index d21f053b41..dbee2977a2 100644
--- a/src/soc/intel/denverton_ns/chip.c
+++ b/src/soc/intel/denverton_ns/chip.c
@@ -44,7 +44,6 @@ static struct device_operations pci_domain_ops = {
static struct device_operations cpu_bus_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
.init = denverton_init_cpus,
#if CONFIG(HAVE_ACPI_TABLES)
.acpi_fill_ssdt = generate_cpu_entries,
diff --git a/src/soc/intel/denverton_ns/uart.c b/src/soc/intel/denverton_ns/uart.c
index d6babc48dc..ce608195f6 100644
--- a/src/soc/intel/denverton_ns/uart.c
+++ b/src/soc/intel/denverton_ns/uart.c
@@ -53,7 +53,6 @@ static struct device_operations uart_ops = {
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = pci_dev_init,
- .enable = DEVICE_NOOP
};
static const struct pci_driver uart_driver __pci_driver = {
diff --git a/src/soc/intel/icelake/chip.c b/src/soc/intel/icelake/chip.c
index 483e0d6e09..36cd0d15e5 100644
--- a/src/soc/intel/icelake/chip.c
+++ b/src/soc/intel/icelake/chip.c
@@ -142,8 +142,6 @@ static struct device_operations pci_domain_ops = {
static struct device_operations cpu_bus_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
- .init = DEVICE_NOOP,
.acpi_fill_ssdt = generate_cpu_entries,
};
diff --git a/src/soc/intel/jasperlake/chip.c b/src/soc/intel/jasperlake/chip.c
index 6a560270e7..643d8511d4 100644
--- a/src/soc/intel/jasperlake/chip.c
+++ b/src/soc/intel/jasperlake/chip.c
@@ -149,8 +149,6 @@ static struct device_operations pci_domain_ops = {
static struct device_operations cpu_bus_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
- .init = DEVICE_NOOP,
#if CONFIG(HAVE_ACPI_TABLES)
.acpi_fill_ssdt = generate_cpu_entries,
#endif
diff --git a/src/soc/intel/skylake/chip.c b/src/soc/intel/skylake/chip.c
index c3b22e2e0d..6e471fb2d3 100644
--- a/src/soc/intel/skylake/chip.c
+++ b/src/soc/intel/skylake/chip.c
@@ -97,8 +97,6 @@ static struct device_operations pci_domain_ops = {
static struct device_operations cpu_bus_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
- .init = DEVICE_NOOP,
#if CONFIG(HAVE_ACPI_TABLES)
.acpi_fill_ssdt = generate_cpu_entries,
#endif
diff --git a/src/soc/intel/tigerlake/chip.c b/src/soc/intel/tigerlake/chip.c
index f57f51dc7d..b93d1fc2ba 100644
--- a/src/soc/intel/tigerlake/chip.c
+++ b/src/soc/intel/tigerlake/chip.c
@@ -149,8 +149,6 @@ static struct device_operations pci_domain_ops = {
static struct device_operations cpu_bus_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
- .init = DEVICE_NOOP,
#if CONFIG(HAVE_ACPI_TABLES)
.acpi_fill_ssdt = generate_cpu_entries,
#endif
diff --git a/src/soc/intel/xeon_sp/cpx/chip.c b/src/soc/intel/xeon_sp/cpx/chip.c
index ef18e45e9b..5f1dedf497 100644
--- a/src/soc/intel/xeon_sp/cpx/chip.c
+++ b/src/soc/intel/xeon_sp/cpx/chip.c
@@ -33,7 +33,6 @@ static struct device_operations pci_domain_ops = {
static struct device_operations cpu_bus_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
.init = cpx_init_cpus,
};
diff --git a/src/soc/intel/xeon_sp/skx/chip.c b/src/soc/intel/xeon_sp/skx/chip.c
index 90ae0252e2..fbd13d524c 100644
--- a/src/soc/intel/xeon_sp/skx/chip.c
+++ b/src/soc/intel/xeon_sp/skx/chip.c
@@ -484,7 +484,6 @@ static struct device_operations pci_domain_ops = {
static struct device_operations cpu_bus_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
.init = xeon_sp_init_cpus,
#if CONFIG(HAVE_ACPI_TABLES)
/* defined in src/soc/intel/common/block/acpi/acpi.c */
diff --git a/src/soc/nvidia/tegra210/soc.c b/src/soc/nvidia/tegra210/soc.c
index b4f51e8587..5fc1e6a9dd 100644
--- a/src/soc/nvidia/tegra210/soc.c
+++ b/src/soc/nvidia/tegra210/soc.c
@@ -52,8 +52,6 @@ static void soc_read_resources(struct device *dev)
static struct device_operations soc_ops = {
.read_resources = soc_read_resources,
.set_resources = DEVICE_NOOP,
- .enable_resources = DEVICE_NOOP,
- .init = DEVICE_NOOP,
};
static void enable_tegra210_dev(struct device *dev)