@@ -102,24 +102,6 @@ static u8 dw_pcie_ep_find_capability(struct dw_pcie_ep *ep, u8 func_no, u8 cap)
102
102
return __dw_pcie_ep_find_next_cap (ep , func_no , next_cap_ptr , cap );
103
103
}
104
104
105
- static unsigned int dw_pcie_ep_find_ext_capability (struct dw_pcie * pci , int cap )
106
- {
107
- u32 header ;
108
- int pos = PCI_CFG_SPACE_SIZE ;
109
-
110
- while (pos ) {
111
- header = dw_pcie_readl_dbi (pci , pos );
112
- if (PCI_EXT_CAP_ID (header ) == cap )
113
- return pos ;
114
-
115
- pos = PCI_EXT_CAP_NEXT (header );
116
- if (!pos )
117
- break ;
118
- }
119
-
120
- return 0 ;
121
- }
122
-
123
105
static int dw_pcie_ep_write_header (struct pci_epc * epc , u8 func_no , u8 vfunc_no ,
124
106
struct pci_epf_header * hdr )
125
107
{
@@ -230,7 +212,7 @@ static unsigned int dw_pcie_ep_get_rebar_offset(struct dw_pcie *pci,
230
212
unsigned int offset , nbars ;
231
213
int i ;
232
214
233
- offset = dw_pcie_ep_find_ext_capability (pci , PCI_EXT_CAP_ID_REBAR );
215
+ offset = dw_pcie_find_ext_capability (pci , PCI_EXT_CAP_ID_REBAR );
234
216
if (!offset )
235
217
return offset ;
236
218
@@ -846,7 +828,7 @@ static void dw_pcie_ep_init_non_sticky_registers(struct dw_pcie *pci)
846
828
enum pci_barno bar ;
847
829
u32 reg , i , val ;
848
830
849
- offset = dw_pcie_ep_find_ext_capability (pci , PCI_EXT_CAP_ID_REBAR );
831
+ offset = dw_pcie_find_ext_capability (pci , PCI_EXT_CAP_ID_REBAR );
850
832
851
833
dw_pcie_dbi_ro_wr_en (pci );
852
834
@@ -969,7 +951,7 @@ int dw_pcie_ep_init_registers(struct dw_pcie_ep *ep)
969
951
if (ep -> ops -> init )
970
952
ep -> ops -> init (ep );
971
953
972
- ptm_cap_base = dw_pcie_ep_find_ext_capability (pci , PCI_EXT_CAP_ID_PTM );
954
+ ptm_cap_base = dw_pcie_find_ext_capability (pci , PCI_EXT_CAP_ID_PTM );
973
955
974
956
/*
975
957
* PTM responder capability can be disabled only after disabling
0 commit comments