Skip to content

Commit 777e5e6

Browse files
committed
Merge branch 'remotes/lorenzo/pci/ftpci100'
- Rename PCI_IOSIZE, etc in ftpci100 to avoid macro name collisions (Randy Dunlap) * remotes/lorenzo/pci/ftpci100: PCI: ftpci100: Rename macro name collision
2 parents c04881e + 5be967d commit 777e5e6

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

drivers/pci/controller/pci-ftpci100.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@
3434
* Special configuration registers directly in the first few words
3535
* in I/O space.
3636
*/
37-
#define PCI_IOSIZE 0x00
38-
#define PCI_PROT 0x04 /* AHB protection */
39-
#define PCI_CTRL 0x08 /* PCI control signal */
40-
#define PCI_SOFTRST 0x10 /* Soft reset counter and response error enable */
41-
#define PCI_CONFIG 0x28 /* PCI configuration command register */
42-
#define PCI_DATA 0x2C
37+
#define FTPCI_IOSIZE 0x00
38+
#define FTPCI_PROT 0x04 /* AHB protection */
39+
#define FTPCI_CTRL 0x08 /* PCI control signal */
40+
#define FTPCI_SOFTRST 0x10 /* Soft reset counter and response error enable */
41+
#define FTPCI_CONFIG 0x28 /* PCI configuration command register */
42+
#define FTPCI_DATA 0x2C
4343

4444
#define FARADAY_PCI_STATUS_CMD 0x04 /* Status and command */
4545
#define FARADAY_PCI_PMC 0x40 /* Power management control */
@@ -195,9 +195,9 @@ static int faraday_raw_pci_read_config(struct faraday_pci *p, int bus_number,
195195
PCI_CONF_FUNCTION(PCI_FUNC(fn)) |
196196
PCI_CONF_WHERE(config) |
197197
PCI_CONF_ENABLE,
198-
p->base + PCI_CONFIG);
198+
p->base + FTPCI_CONFIG);
199199

200-
*value = readl(p->base + PCI_DATA);
200+
*value = readl(p->base + FTPCI_DATA);
201201

202202
if (size == 1)
203203
*value = (*value >> (8 * (config & 3))) & 0xFF;
@@ -230,17 +230,17 @@ static int faraday_raw_pci_write_config(struct faraday_pci *p, int bus_number,
230230
PCI_CONF_FUNCTION(PCI_FUNC(fn)) |
231231
PCI_CONF_WHERE(config) |
232232
PCI_CONF_ENABLE,
233-
p->base + PCI_CONFIG);
233+
p->base + FTPCI_CONFIG);
234234

235235
switch (size) {
236236
case 4:
237-
writel(value, p->base + PCI_DATA);
237+
writel(value, p->base + FTPCI_DATA);
238238
break;
239239
case 2:
240-
writew(value, p->base + PCI_DATA + (config & 3));
240+
writew(value, p->base + FTPCI_DATA + (config & 3));
241241
break;
242242
case 1:
243-
writeb(value, p->base + PCI_DATA + (config & 3));
243+
writeb(value, p->base + FTPCI_DATA + (config & 3));
244244
break;
245245
default:
246246
ret = PCIBIOS_BAD_REGISTER_NUMBER;
@@ -469,19 +469,19 @@ static int faraday_pci_probe(struct platform_device *pdev)
469469
if (!faraday_res_to_memcfg(io->start - win->offset,
470470
resource_size(io), &val)) {
471471
/* setup I/O space size */
472-
writel(val, p->base + PCI_IOSIZE);
472+
writel(val, p->base + FTPCI_IOSIZE);
473473
} else {
474474
dev_err(dev, "illegal IO mem size\n");
475475
return -EINVAL;
476476
}
477477
}
478478

479479
/* Setup hostbridge */
480-
val = readl(p->base + PCI_CTRL);
480+
val = readl(p->base + FTPCI_CTRL);
481481
val |= PCI_COMMAND_IO;
482482
val |= PCI_COMMAND_MEMORY;
483483
val |= PCI_COMMAND_MASTER;
484-
writel(val, p->base + PCI_CTRL);
484+
writel(val, p->base + FTPCI_CTRL);
485485
/* Mask and clear all interrupts */
486486
faraday_raw_pci_write_config(p, 0, 0, FARADAY_PCI_CTRL2 + 2, 2, 0xF000);
487487
if (variant->cascaded_irq) {

0 commit comments

Comments
 (0)