lib/spd: remove spd_raw_access_override functionality
Nothing uses this and I don't think we should start using it.
BUG=chromium:990438
TEST=compiles
Change-Id: Id27e0e43f4ffb3e8500f88f4801ce1606b5e052c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/mosys/+/2324767
Tested-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
diff --git a/include/lib/spd.h b/include/lib/spd.h
index 75c4604..e5bfb63 100644
--- a/include/lib/spd.h
+++ b/include/lib/spd.h
@@ -219,20 +219,6 @@
extern int spd_raw_access(struct platform_intf *intf, int bus, int address,
int reg, int length, void *data, int rw);
-/* Introduce ability to override SPD raw access operation. Provide a type for
- * smaller function signatures. */
-typedef int (*spd_raw_override)(struct platform_intf *intf, int bus,
- int address, int reg, int length, void *data,
- int rw);
-
-/* override_spd_raw_access - override the spd_raw() function.
- *
- * @override: function to invoke instead of the normal spd_raw() path.
- *
- * return 0 on success, < 0 otherwise.
- */
-extern int override_spd_raw_access(spd_raw_override override);
-
/*
* spd_total_size - determine total bytes in spd from first few bytes
*
diff --git a/lib/spd/spd.c b/lib/spd/spd.c
index 5844fba..480beae 100644
--- a/lib/spd/spd.c
+++ b/lib/spd/spd.c
@@ -55,8 +55,6 @@
#include "lib/smbios_tables.h"
#include "lib/spd.h"
-static spd_raw_override spd_raw_access_override;
-
struct memory_spd_cb memory_spd_cbfs = {
.read = spd_read_cbfs_flashrom,
};
@@ -127,11 +125,6 @@
int spd_raw_access(struct platform_intf *intf, int bus, int address,
int reg, int length, void *data, int rw)
{
- if (spd_raw_access_override != NULL) {
- return spd_raw_access_override(intf, bus, address,
- reg, length, data, rw);
- }
-
return spd_raw_i2c(intf, bus, address, reg, length, data, rw);
}
@@ -171,12 +164,6 @@
return -1;
}
-int override_spd_raw_access(spd_raw_override override)
-{
- spd_raw_access_override = override;
- return 0;
-}
-
/* new_spd_device() - create a new instance of spd_device
*
* @intf: platform_intf for access