Skip to content

Commit 24d174a

Browse files
firebolt007bjorn-helgaas
authored andcommitted
PCI: xgene: Rename xgene_pcie_port to xgene_pcie
Rename struct xgene_pcie_port to xgene_pcie to match the convention of <driver>_pcie. No functional change intended. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Fan Fei <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Cc: Toan Le <[email protected]>
1 parent de8bd0c commit 24d174a

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

drivers/pci/controller/pci-xgene.c

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
#define XGENE_PCIE_IP_VER_2 2
6161

6262
#if defined(CONFIG_PCI_XGENE) || (defined(CONFIG_ACPI) && defined(CONFIG_PCI_QUIRKS))
63-
struct xgene_pcie_port {
63+
struct xgene_pcie {
6464
struct device_node *node;
6565
struct device *dev;
6666
struct clk *clk;
@@ -71,12 +71,12 @@ struct xgene_pcie_port {
7171
u32 version;
7272
};
7373

74-
static u32 xgene_pcie_readl(struct xgene_pcie_port *port, u32 reg)
74+
static u32 xgene_pcie_readl(struct xgene_pcie *port, u32 reg)
7575
{
7676
return readl(port->csr_base + reg);
7777
}
7878

79-
static void xgene_pcie_writel(struct xgene_pcie_port *port, u32 reg, u32 val)
79+
static void xgene_pcie_writel(struct xgene_pcie *port, u32 reg, u32 val)
8080
{
8181
writel(val, port->csr_base + reg);
8282
}
@@ -86,15 +86,15 @@ static inline u32 pcie_bar_low_val(u32 addr, u32 flags)
8686
return (addr & PCI_BASE_ADDRESS_MEM_MASK) | flags;
8787
}
8888

89-
static inline struct xgene_pcie_port *pcie_bus_to_port(struct pci_bus *bus)
89+
static inline struct xgene_pcie *pcie_bus_to_port(struct pci_bus *bus)
9090
{
9191
struct pci_config_window *cfg;
9292

9393
if (acpi_disabled)
94-
return (struct xgene_pcie_port *)(bus->sysdata);
94+
return (struct xgene_pcie *)(bus->sysdata);
9595

9696
cfg = bus->sysdata;
97-
return (struct xgene_pcie_port *)(cfg->priv);
97+
return (struct xgene_pcie *)(cfg->priv);
9898
}
9999

100100
/*
@@ -103,7 +103,7 @@ static inline struct xgene_pcie_port *pcie_bus_to_port(struct pci_bus *bus)
103103
*/
104104
static void __iomem *xgene_pcie_get_cfg_base(struct pci_bus *bus)
105105
{
106-
struct xgene_pcie_port *port = pcie_bus_to_port(bus);
106+
struct xgene_pcie *port = pcie_bus_to_port(bus);
107107

108108
if (bus->number >= (bus->primary + 1))
109109
return port->cfg_base + AXI_EP_CFG_ACCESS;
@@ -117,7 +117,7 @@ static void __iomem *xgene_pcie_get_cfg_base(struct pci_bus *bus)
117117
*/
118118
static void xgene_pcie_set_rtdid_reg(struct pci_bus *bus, uint devfn)
119119
{
120-
struct xgene_pcie_port *port = pcie_bus_to_port(bus);
120+
struct xgene_pcie *port = pcie_bus_to_port(bus);
121121
unsigned int b, d, f;
122122
u32 rtdid_val = 0;
123123

@@ -164,7 +164,7 @@ static void __iomem *xgene_pcie_map_bus(struct pci_bus *bus, unsigned int devfn,
164164
static int xgene_pcie_config_read32(struct pci_bus *bus, unsigned int devfn,
165165
int where, int size, u32 *val)
166166
{
167-
struct xgene_pcie_port *port = pcie_bus_to_port(bus);
167+
struct xgene_pcie *port = pcie_bus_to_port(bus);
168168

169169
if (pci_generic_config_read32(bus, devfn, where & ~0x3, 4, val) !=
170170
PCIBIOS_SUCCESSFUL)
@@ -227,7 +227,7 @@ static int xgene_pcie_ecam_init(struct pci_config_window *cfg, u32 ipversion)
227227
{
228228
struct device *dev = cfg->parent;
229229
struct acpi_device *adev = to_acpi_device(dev);
230-
struct xgene_pcie_port *port;
230+
struct xgene_pcie *port;
231231
struct resource csr;
232232
int ret;
233233

@@ -281,7 +281,7 @@ const struct pci_ecam_ops xgene_v2_pcie_ecam_ops = {
281281
#endif
282282

283283
#if defined(CONFIG_PCI_XGENE)
284-
static u64 xgene_pcie_set_ib_mask(struct xgene_pcie_port *port, u32 addr,
284+
static u64 xgene_pcie_set_ib_mask(struct xgene_pcie *port, u32 addr,
285285
u32 flags, u64 size)
286286
{
287287
u64 mask = (~(size - 1) & PCI_BASE_ADDRESS_MEM_MASK) | flags;
@@ -307,7 +307,7 @@ static u64 xgene_pcie_set_ib_mask(struct xgene_pcie_port *port, u32 addr,
307307
return mask;
308308
}
309309

310-
static void xgene_pcie_linkup(struct xgene_pcie_port *port,
310+
static void xgene_pcie_linkup(struct xgene_pcie *port,
311311
u32 *lanes, u32 *speed)
312312
{
313313
u32 val32;
@@ -322,7 +322,7 @@ static void xgene_pcie_linkup(struct xgene_pcie_port *port,
322322
}
323323
}
324324

325-
static int xgene_pcie_init_port(struct xgene_pcie_port *port)
325+
static int xgene_pcie_init_port(struct xgene_pcie *port)
326326
{
327327
struct device *dev = port->dev;
328328
int rc;
@@ -342,7 +342,7 @@ static int xgene_pcie_init_port(struct xgene_pcie_port *port)
342342
return 0;
343343
}
344344

345-
static int xgene_pcie_map_reg(struct xgene_pcie_port *port,
345+
static int xgene_pcie_map_reg(struct xgene_pcie *port,
346346
struct platform_device *pdev)
347347
{
348348
struct device *dev = port->dev;
@@ -362,7 +362,7 @@ static int xgene_pcie_map_reg(struct xgene_pcie_port *port,
362362
return 0;
363363
}
364364

365-
static void xgene_pcie_setup_ob_reg(struct xgene_pcie_port *port,
365+
static void xgene_pcie_setup_ob_reg(struct xgene_pcie *port,
366366
struct resource *res, u32 offset,
367367
u64 cpu_addr, u64 pci_addr)
368368
{
@@ -394,7 +394,7 @@ static void xgene_pcie_setup_ob_reg(struct xgene_pcie_port *port,
394394
xgene_pcie_writel(port, offset + 0x14, upper_32_bits(pci_addr));
395395
}
396396

397-
static void xgene_pcie_setup_cfg_reg(struct xgene_pcie_port *port)
397+
static void xgene_pcie_setup_cfg_reg(struct xgene_pcie *port)
398398
{
399399
u64 addr = port->cfg_addr;
400400

@@ -403,7 +403,7 @@ static void xgene_pcie_setup_cfg_reg(struct xgene_pcie_port *port)
403403
xgene_pcie_writel(port, CFGCTL, EN_REG);
404404
}
405405

406-
static int xgene_pcie_map_ranges(struct xgene_pcie_port *port)
406+
static int xgene_pcie_map_ranges(struct xgene_pcie *port)
407407
{
408408
struct pci_host_bridge *bridge = pci_host_bridge_from_priv(port);
409409
struct resource_entry *window;
@@ -444,7 +444,7 @@ static int xgene_pcie_map_ranges(struct xgene_pcie_port *port)
444444
return 0;
445445
}
446446

447-
static void xgene_pcie_setup_pims(struct xgene_pcie_port *port, u32 pim_reg,
447+
static void xgene_pcie_setup_pims(struct xgene_pcie *port, u32 pim_reg,
448448
u64 pim, u64 size)
449449
{
450450
xgene_pcie_writel(port, pim_reg, lower_32_bits(pim));
@@ -478,7 +478,7 @@ static int xgene_pcie_select_ib_reg(u8 *ib_reg_mask, u64 size)
478478
return -EINVAL;
479479
}
480480

481-
static void xgene_pcie_setup_ib_reg(struct xgene_pcie_port *port,
481+
static void xgene_pcie_setup_ib_reg(struct xgene_pcie *port,
482482
struct resource_entry *entry,
483483
u8 *ib_reg_mask)
484484
{
@@ -529,7 +529,7 @@ static void xgene_pcie_setup_ib_reg(struct xgene_pcie_port *port,
529529
xgene_pcie_setup_pims(port, pim_reg, pci_addr, ~(size - 1));
530530
}
531531

532-
static int xgene_pcie_parse_map_dma_ranges(struct xgene_pcie_port *port)
532+
static int xgene_pcie_parse_map_dma_ranges(struct xgene_pcie *port)
533533
{
534534
struct pci_host_bridge *bridge = pci_host_bridge_from_priv(port);
535535
struct resource_entry *entry;
@@ -542,15 +542,15 @@ static int xgene_pcie_parse_map_dma_ranges(struct xgene_pcie_port *port)
542542
}
543543

544544
/* clear BAR configuration which was done by firmware */
545-
static void xgene_pcie_clear_config(struct xgene_pcie_port *port)
545+
static void xgene_pcie_clear_config(struct xgene_pcie *port)
546546
{
547547
int i;
548548

549549
for (i = PIM1_1L; i <= CFGCTL; i += 4)
550550
xgene_pcie_writel(port, i, 0);
551551
}
552552

553-
static int xgene_pcie_setup(struct xgene_pcie_port *port)
553+
static int xgene_pcie_setup(struct xgene_pcie *port)
554554
{
555555
struct device *dev = port->dev;
556556
u32 val, lanes = 0, speed = 0;
@@ -588,7 +588,7 @@ static int xgene_pcie_probe(struct platform_device *pdev)
588588
{
589589
struct device *dev = &pdev->dev;
590590
struct device_node *dn = dev->of_node;
591-
struct xgene_pcie_port *port;
591+
struct xgene_pcie *port;
592592
struct pci_host_bridge *bridge;
593593
int ret;
594594

0 commit comments

Comments
 (0)