Skip to content

Commit 8cd1ab8

Browse files
Flavio Ceolincarlescufi
authored andcommitted
drivers: pcie: Remove deprecated pcie_bdf_lookup
pcie_bdf_lookup() was deprecated before 3.3 release. Time to remove it. Signed-off-by: Flavio Ceolin <[email protected]>
1 parent f4aefc2 commit 8cd1ab8

File tree

2 files changed

+0
-48
lines changed

2 files changed

+0
-48
lines changed

drivers/pcie/host/pcie.c

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -368,40 +368,6 @@ void pcie_irq_enable(pcie_bdf_t bdf, unsigned int irq)
368368
irq_enable(irq);
369369
}
370370

371-
struct lookup_data {
372-
pcie_bdf_t bdf;
373-
pcie_id_t id;
374-
};
375-
376-
static bool lookup_cb(pcie_bdf_t bdf, pcie_id_t id, void *cb_data)
377-
{
378-
struct lookup_data *data = cb_data;
379-
380-
if (id == data->id) {
381-
data->bdf = bdf;
382-
return false;
383-
}
384-
385-
return true;
386-
}
387-
388-
pcie_bdf_t pcie_bdf_lookup(pcie_id_t id)
389-
{
390-
struct lookup_data data = {
391-
.bdf = PCIE_BDF_NONE,
392-
.id = id,
393-
};
394-
struct pcie_scan_opt opt = {
395-
.cb = lookup_cb,
396-
.cb_data = &data,
397-
.flags = (PCIE_SCAN_RECURSIVE | PCIE_SCAN_CB_ALL),
398-
};
399-
400-
pcie_scan(&opt);
401-
402-
return data.bdf;
403-
}
404-
405371
static bool scan_flag(const struct pcie_scan_opt *opt, uint32_t flag)
406372
{
407373
return ((opt->flags & flag) != 0U);

include/zephyr/drivers/pcie/pcie.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -158,20 +158,6 @@ struct pcie_bar {
158158
* These functions are arch-, board-, or SoC-specific.
159159
*/
160160

161-
/**
162-
* @brief Look up the BDF based on PCI(e) vendor & device ID
163-
*
164-
* This function is used to look up the BDF for a device given its
165-
* vendor and device ID.
166-
*
167-
* @deprecated
168-
* @see DEVICE_PCIE_DECLARE
169-
*
170-
* @param id PCI(e) vendor & device ID encoded using PCIE_ID()
171-
* @return The BDF for the device, or PCIE_BDF_NONE if it was not found
172-
*/
173-
__deprecated extern pcie_bdf_t pcie_bdf_lookup(pcie_id_t id);
174-
175161
/**
176162
* @brief Read a 32-bit word from an endpoint's configuration space.
177163
*

0 commit comments

Comments
 (0)