• Home
  • Raw
  • Download

Lines Matching refs:bar

211 					enum cdns_pcie_rp_bar bar,  in cdns_pcie_host_bar_ib_config()  argument
218 if (!rc->avail_ib_bar[bar]) in cdns_pcie_host_bar_ib_config()
221 rc->avail_ib_bar[bar] = false; in cdns_pcie_host_bar_ib_config()
227 cdns_pcie_writel(pcie, CDNS_PCIE_AT_IB_RP_BAR_ADDR0(bar), addr0); in cdns_pcie_host_bar_ib_config()
228 cdns_pcie_writel(pcie, CDNS_PCIE_AT_IB_RP_BAR_ADDR1(bar), addr1); in cdns_pcie_host_bar_ib_config()
230 if (bar == RP_NO_BAR) in cdns_pcie_host_bar_ib_config()
234 value &= ~(LM_RC_BAR_CFG_CTRL_MEM_64BITS(bar) | in cdns_pcie_host_bar_ib_config()
235 LM_RC_BAR_CFG_CTRL_PREF_MEM_64BITS(bar) | in cdns_pcie_host_bar_ib_config()
236 LM_RC_BAR_CFG_CTRL_MEM_32BITS(bar) | in cdns_pcie_host_bar_ib_config()
237 LM_RC_BAR_CFG_CTRL_PREF_MEM_32BITS(bar) | in cdns_pcie_host_bar_ib_config()
238 LM_RC_BAR_CFG_APERTURE(bar, bar_aperture_mask[bar] + 2)); in cdns_pcie_host_bar_ib_config()
241 value |= LM_RC_BAR_CFG_CTRL_MEM_64BITS(bar); in cdns_pcie_host_bar_ib_config()
242 value |= LM_RC_BAR_CFG_CTRL_PREF_MEM_64BITS(bar); in cdns_pcie_host_bar_ib_config()
245 value |= LM_RC_BAR_CFG_CTRL_MEM_32BITS(bar); in cdns_pcie_host_bar_ib_config()
246 value |= LM_RC_BAR_CFG_CTRL_PREF_MEM_32BITS(bar); in cdns_pcie_host_bar_ib_config()
249 value |= LM_RC_BAR_CFG_APERTURE(bar, aperture); in cdns_pcie_host_bar_ib_config()
258 enum cdns_pcie_rp_bar bar, sel_bar; in cdns_pcie_host_find_min_bar() local
261 for (bar = RP_BAR0; bar <= RP_NO_BAR; bar++) { in cdns_pcie_host_find_min_bar()
262 if (!rc->avail_ib_bar[bar]) in cdns_pcie_host_find_min_bar()
265 if (size <= bar_max_size[bar]) { in cdns_pcie_host_find_min_bar()
267 sel_bar = bar; in cdns_pcie_host_find_min_bar()
271 if (bar_max_size[bar] < bar_max_size[sel_bar]) in cdns_pcie_host_find_min_bar()
272 sel_bar = bar; in cdns_pcie_host_find_min_bar()
282 enum cdns_pcie_rp_bar bar, sel_bar; in cdns_pcie_host_find_max_bar() local
285 for (bar = RP_BAR0; bar <= RP_NO_BAR; bar++) { in cdns_pcie_host_find_max_bar()
286 if (!rc->avail_ib_bar[bar]) in cdns_pcie_host_find_max_bar()
289 if (size >= bar_max_size[bar]) { in cdns_pcie_host_find_max_bar()
291 sel_bar = bar; in cdns_pcie_host_find_max_bar()
295 if (bar_max_size[bar] > bar_max_size[sel_bar]) in cdns_pcie_host_find_max_bar()
296 sel_bar = bar; in cdns_pcie_host_find_max_bar()
309 enum cdns_pcie_rp_bar bar; in cdns_pcie_host_bar_config() local
333 bar = cdns_pcie_host_find_min_bar(rc, size); in cdns_pcie_host_bar_config()
334 if (bar != RP_BAR_UNDEFINED) { in cdns_pcie_host_bar_config()
335 ret = cdns_pcie_host_bar_ib_config(rc, bar, cpu_addr, in cdns_pcie_host_bar_config()
338 dev_err(dev, "IB BAR: %d config failed\n", bar); in cdns_pcie_host_bar_config()
353 bar = cdns_pcie_host_find_max_bar(rc, size); in cdns_pcie_host_bar_config()
354 if (bar == RP_BAR_UNDEFINED) { in cdns_pcie_host_bar_config()
360 winsize = bar_max_size[bar]; in cdns_pcie_host_bar_config()
361 ret = cdns_pcie_host_bar_ib_config(rc, bar, cpu_addr, winsize, in cdns_pcie_host_bar_config()
364 dev_err(dev, "IB BAR: %d config failed\n", bar); in cdns_pcie_host_bar_config()
498 enum cdns_pcie_rp_bar bar; in cdns_pcie_host_setup() local
541 for (bar = RP_BAR0; bar <= RP_NO_BAR; bar++) in cdns_pcie_host_setup()
542 rc->avail_ib_bar[bar] = true; in cdns_pcie_host_setup()