Skip to content

Commit b616cf5

Browse files
smaeulgregkh
authored andcommitted
firmware: coreboot: Remove unused coreboot_table_find
Now that all users of the coreboot_table_find function have been updated to hang off the coreboot table bus instead, remove it. Signed-off-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent a43eb6b commit b616cf5

2 files changed

Lines changed: 0 additions & 46 deletions

File tree

‎drivers/firmware/google/coreboot_table.c‎

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -97,49 +97,6 @@ void coreboot_driver_unregister(struct coreboot_driver *driver)
9797
}
9898
EXPORT_SYMBOL(coreboot_driver_unregister);
9999

100-
/*
101-
* This function parses the coreboot table for an entry that contains the base
102-
* address of the given entry tag. The coreboot table consists of a header
103-
* directly followed by a number of small, variable-sized entries, which each
104-
* contain an identifying tag and their length as the first two fields.
105-
*/
106-
int coreboot_table_find(int tag, void *data, size_t data_size)
107-
{
108-
struct coreboot_table_header header;
109-
struct coreboot_table_entry entry;
110-
void *ptr_entry;
111-
int i;
112-
113-
if (!ptr_header)
114-
return -EPROBE_DEFER;
115-
116-
memcpy_fromio(&header, ptr_header, sizeof(header));
117-
118-
if (strncmp(header.signature, "LBIO", sizeof(header.signature))) {
119-
pr_warn("coreboot_table: coreboot table missing or corrupt!\n");
120-
return -ENODEV;
121-
}
122-
123-
ptr_entry = (void *)ptr_header + header.header_bytes;
124-
125-
for (i = 0; i < header.table_entries; i++) {
126-
memcpy_fromio(&entry, ptr_entry, sizeof(entry));
127-
if (entry.tag == tag) {
128-
if (data_size < entry.size)
129-
return -EINVAL;
130-
131-
memcpy_fromio(data, ptr_entry, entry.size);
132-
133-
return 0;
134-
}
135-
136-
ptr_entry += entry.size;
137-
}
138-
139-
return -ENOENT;
140-
}
141-
EXPORT_SYMBOL(coreboot_table_find);
142-
143100
int coreboot_table_init(struct device *dev, void __iomem *ptr)
144101
{
145102
int i, ret;

‎drivers/firmware/google/coreboot_table.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,6 @@ int coreboot_driver_register(struct coreboot_driver *driver);
6969
/* Unregister a driver that uses the data from a coreboot table. */
7070
void coreboot_driver_unregister(struct coreboot_driver *driver);
7171

72-
/* Retrieve coreboot table entry with tag *tag* and copy it to data */
73-
int coreboot_table_find(int tag, void *data, size_t data_size);
74-
7572
/* Initialize coreboot table module given a pointer to iomem */
7673
int coreboot_table_init(struct device *dev, void __iomem *ptr);
7774

0 commit comments

Comments
 (0)