Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/30737
Change subject: amdfam10 boards: Use PCI_DEVFN() ......................................................................
amdfam10 boards: Use PCI_DEVFN()
Change-Id: I7b9aeaaa1cfa20efc9d187d91ece4eb9ee659c3f Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/mainboard/asus/kfsn4-dre/irq_tables.c M src/mainboard/msi/ms9652_fam10/irq_tables.c M src/mainboard/supermicro/h8dmr_fam10/irq_tables.c M src/mainboard/supermicro/h8qme_fam10/irq_tables.c M src/mainboard/tyan/s2912_fam10/irq_tables.c 5 files changed, 30 insertions(+), 30 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/37/30737/1
diff --git a/src/mainboard/asus/kfsn4-dre/irq_tables.c b/src/mainboard/asus/kfsn4-dre/irq_tables.c index a5dc965..c1bd305 100644 --- a/src/mainboard/asus/kfsn4-dre/irq_tables.c +++ b/src/mainboard/asus/kfsn4-dre/irq_tables.c @@ -83,7 +83,7 @@ pirq->signature = PIRQ_SIGNATURE; pirq->version = PIRQ_VERSION; pirq->rtr_bus = bus_ck804[0]; - pirq->rtr_devfn = ((sbdn + 9) << 3) | 0; + pirq->rtr_devfn = PCI_DEVFN(sbdn + 9, 0); pirq->exclusive_irqs = 0x828; pirq->rtr_vendor = 0x10de; pirq->rtr_device = 0x005c; @@ -95,26 +95,26 @@ slot_num = 0;
/* Slot1 PCIE 16x */ - write_pirq_info(pirq_info, bus_ck804[1], (0 << 3) | 0, 0x3, 0xdeb8, 0x4, + write_pirq_info(pirq_info, bus_ck804[1], PCI_DEVFN(0, 0), 0x3, 0xdeb8, 0x4, 0xdeb8, 0x1, 0xdeb8, 0x2, 0xdeb8, 4, 0); pirq_info++; slot_num++;
/* Slot2 PCIE 1x */ - write_pirq_info(pirq_info, bus_ck804[2], (0 << 3) | 0, 0x4, 0xdeb8, 0x1, + write_pirq_info(pirq_info, bus_ck804[2], PCI_DEVFN(0, 0), 0x4, 0xdeb8, 0x1, 0xdeb8, 0x2, 0xdeb8, 0x3, 0xdeb8, 5, 0); pirq_info++; slot_num++;
/* Slot3 PCIE 1x */ - write_pirq_info(pirq_info, bus_ck804[3], (0 << 3) | 0, 0x1, 0xdeb8, 0x2, + write_pirq_info(pirq_info, bus_ck804[3], PCI_DEVFN(0, 0), 0x1, 0xdeb8, 0x2, 0xdeb8, 0x3, 0xdeb8, 0x4, 0xdeb8, 6, 0); pirq_info++; slot_num++;
/* Slot4 PCIE 4x */ - write_pirq_info(pirq_info, bus_ck804[4], (0x4 << 3) | 0, 0x2, + write_pirq_info(pirq_info, bus_ck804[4], PCI_DEVFN(0x4, 0), 0x2, 0xdeb8, 0x3, 0xdeb8, 0x4, 0xdeb8, 0x1, 0xdeb8, 7, 0); pirq_info++; slot_num++; @@ -131,31 +131,31 @@ }
/* PCI bridge */ - write_pirq_info(pirq_info, bus_ck804[0], ((sbdn + 9) << 3) | 0, 0x1, + write_pirq_info(pirq_info, bus_ck804[0], PCI_DEVFN(sbdn + 9, 0), 0x1, 0xdeb8, 0x2, 0xdeb8, 0x3, 0xdeb8, 0x4, 0xdeb8, 0, 0); pirq_info++; slot_num++;
/* SMBus */ - write_pirq_info(pirq_info, bus_ck804[0], ((sbdn + 1) << 3) | 0, 0x2, + write_pirq_info(pirq_info, bus_ck804[0], PCI_DEVFN(sbdn + 1, 0), 0x2, 0xdeb8, 0, 0, 0, 0, 0, 0, 0, 0); pirq_info++; slot_num++;
/* USB */ - write_pirq_info(pirq_info, bus_ck804[0], ((sbdn + 2) << 3) | 0, 0x1, + write_pirq_info(pirq_info, bus_ck804[0], PCI_DEVFN(sbdn + 2, 0), 0x1, 0xdeb8, 0x2, 0xdeb8, 0, 0, 0, 0, 0, 0); pirq_info++; slot_num++;
/* SATA */ - write_pirq_info(pirq_info, bus_ck804[0], ((sbdn + 7) << 3) | 0, 0x1, + write_pirq_info(pirq_info, bus_ck804[0], PCI_DEVFN(sbdn + 7, 0), 0x1, 0xdeb8, 0, 0, 0, 0, 0, 0, 0, 0); pirq_info++; slot_num++;
/* SATA */ - write_pirq_info(pirq_info, bus_ck804[0], ((sbdn + 8) << 3) | 0, 0x1, + write_pirq_info(pirq_info, bus_ck804[0], PCI_DEVFN(sbdn + 8, 0), 0x1, 0xdeb8, 0, 0, 0, 0, 0, 0, 0, 0); pirq_info++; slot_num++; diff --git a/src/mainboard/msi/ms9652_fam10/irq_tables.c b/src/mainboard/msi/ms9652_fam10/irq_tables.c index 97245ec..e33ceec 100644 --- a/src/mainboard/msi/ms9652_fam10/irq_tables.c +++ b/src/mainboard/msi/ms9652_fam10/irq_tables.c @@ -74,7 +74,7 @@ pirq->version = PIRQ_VERSION;
pirq->rtr_bus = m->bus_mcp55[0]; - pirq->rtr_devfn = ((sbdn + 6) << 3) | 0; + pirq->rtr_devfn = PCI_DEVFN(sbdn + 6, 0);
pirq->exclusive_irqs = 0;
@@ -88,7 +88,7 @@ pirq_info = (void *)(&pirq->checksum + 1); slot_num = 0; //pci bridge - write_pirq_info(pirq_info, m->bus_mcp55[0], ((sbdn + 6) << 3) | 0, 0x1, + write_pirq_info(pirq_info, m->bus_mcp55[0], PCI_DEVFN(sbdn + 6, 0), 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0); pirq_info++; slot_num++; @@ -99,19 +99,19 @@ unsigned busn = (sysconf.pci1234[i] >> 12) & 0xff; unsigned devn = sysconf.hcdn[i] & 0xff;
- write_pirq_info(pirq_info, busn, (devn << 3) | 0, 0x1, 0xdef8, + write_pirq_info(pirq_info, busn, PCI_DEVFN(devn, 0), 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0); pirq_info++; slot_num++; }
#if CONFIG_CBB - write_pirq_info(pirq_info, CONFIG_CBB, (0 << 3) | 0, 0x1, 0xdef8, 0x2, + write_pirq_info(pirq_info, CONFIG_CBB, PCI_DEVFN(0, 0), 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0); pirq_info++; slot_num++; if (sysconf.nodes > 32) { - write_pirq_info(pirq_info, CONFIG_CBB - 1, (0 << 3) | 0, 0x1, + write_pirq_info(pirq_info, CONFIG_CBB - 1, PCI_DEVFN(0, 0), 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0); pirq_info++; diff --git a/src/mainboard/supermicro/h8dmr_fam10/irq_tables.c b/src/mainboard/supermicro/h8dmr_fam10/irq_tables.c index 97245ec..e33ceec 100644 --- a/src/mainboard/supermicro/h8dmr_fam10/irq_tables.c +++ b/src/mainboard/supermicro/h8dmr_fam10/irq_tables.c @@ -74,7 +74,7 @@ pirq->version = PIRQ_VERSION;
pirq->rtr_bus = m->bus_mcp55[0]; - pirq->rtr_devfn = ((sbdn + 6) << 3) | 0; + pirq->rtr_devfn = PCI_DEVFN(sbdn + 6, 0);
pirq->exclusive_irqs = 0;
@@ -88,7 +88,7 @@ pirq_info = (void *)(&pirq->checksum + 1); slot_num = 0; //pci bridge - write_pirq_info(pirq_info, m->bus_mcp55[0], ((sbdn + 6) << 3) | 0, 0x1, + write_pirq_info(pirq_info, m->bus_mcp55[0], PCI_DEVFN(sbdn + 6, 0), 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0); pirq_info++; slot_num++; @@ -99,19 +99,19 @@ unsigned busn = (sysconf.pci1234[i] >> 12) & 0xff; unsigned devn = sysconf.hcdn[i] & 0xff;
- write_pirq_info(pirq_info, busn, (devn << 3) | 0, 0x1, 0xdef8, + write_pirq_info(pirq_info, busn, PCI_DEVFN(devn, 0), 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0); pirq_info++; slot_num++; }
#if CONFIG_CBB - write_pirq_info(pirq_info, CONFIG_CBB, (0 << 3) | 0, 0x1, 0xdef8, 0x2, + write_pirq_info(pirq_info, CONFIG_CBB, PCI_DEVFN(0, 0), 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0); pirq_info++; slot_num++; if (sysconf.nodes > 32) { - write_pirq_info(pirq_info, CONFIG_CBB - 1, (0 << 3) | 0, 0x1, + write_pirq_info(pirq_info, CONFIG_CBB - 1, PCI_DEVFN(0, 0), 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0); pirq_info++; diff --git a/src/mainboard/supermicro/h8qme_fam10/irq_tables.c b/src/mainboard/supermicro/h8qme_fam10/irq_tables.c index b5ea2c2..5248567 100644 --- a/src/mainboard/supermicro/h8qme_fam10/irq_tables.c +++ b/src/mainboard/supermicro/h8qme_fam10/irq_tables.c @@ -74,7 +74,7 @@ pirq->version = PIRQ_VERSION;
pirq->rtr_bus = m->bus_mcp55[0]; - pirq->rtr_devfn = ((sbdn + 6) << 3) | 0; + pirq->rtr_devfn = PCI_DEVFN(sbdn + 6, 0);
pirq->exclusive_irqs = 0;
@@ -88,7 +88,7 @@ pirq_info = (void *)(&pirq->checksum + 1); slot_num = 0; //pci bridge - write_pirq_info(pirq_info, m->bus_mcp55[0], ((sbdn + 6) << 3) | 0, 0x1, + write_pirq_info(pirq_info, m->bus_mcp55[0], PCI_DEVFN(sbdn + 6, 0), 0x1, 0x4ca0, 0x2, 0x4ca0, 0x3, 0x4ca0, 0x4, 0x4ca0, 0, 0); pirq_info++; slot_num++; @@ -99,19 +99,19 @@ unsigned busn = (sysconf.pci1234[i] >> 12) & 0xff; unsigned devn = sysconf.hcdn[i] & 0xff;
- write_pirq_info(pirq_info, busn, (devn << 3) | 0, 0x1, 0x4ca0, + write_pirq_info(pirq_info, busn, PCI_DEVFN(devn, 0), 0x1, 0x4ca0, 0x2, 0x4ca0, 0x3, 0x4ca0, 0x4, 0x4ca0, 0, 0); pirq_info++; slot_num++; }
#if CONFIG_CBB - write_pirq_info(pirq_info, CONFIG_CBB, (0 << 3) | 0, 0x1, 0x4ca0, 0x2, + write_pirq_info(pirq_info, CONFIG_CBB, PCI_DEVFN(0, 0), 0x1, 0x4ca0, 0x2, 0x4ca0, 0x3, 0x4ca0, 0x4, 0x4ca0, 0, 0); pirq_info++; slot_num++; if (sysconf.nodes > 32) { - write_pirq_info(pirq_info, CONFIG_CBB - 1, (0 << 3) | 0, 0x1, + write_pirq_info(pirq_info, CONFIG_CBB - 1, PCI_DEVFN(0, 0), 0x1, 0x4ca0, 0x2, 0x4ca0, 0x3, 0x4ca0, 0x4, 0x4ca0, 0, 0); pirq_info++; diff --git a/src/mainboard/tyan/s2912_fam10/irq_tables.c b/src/mainboard/tyan/s2912_fam10/irq_tables.c index 97245ec..e33ceec 100644 --- a/src/mainboard/tyan/s2912_fam10/irq_tables.c +++ b/src/mainboard/tyan/s2912_fam10/irq_tables.c @@ -74,7 +74,7 @@ pirq->version = PIRQ_VERSION;
pirq->rtr_bus = m->bus_mcp55[0]; - pirq->rtr_devfn = ((sbdn + 6) << 3) | 0; + pirq->rtr_devfn = PCI_DEVFN(sbdn + 6, 0);
pirq->exclusive_irqs = 0;
@@ -88,7 +88,7 @@ pirq_info = (void *)(&pirq->checksum + 1); slot_num = 0; //pci bridge - write_pirq_info(pirq_info, m->bus_mcp55[0], ((sbdn + 6) << 3) | 0, 0x1, + write_pirq_info(pirq_info, m->bus_mcp55[0], PCI_DEVFN(sbdn + 6, 0), 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0); pirq_info++; slot_num++; @@ -99,19 +99,19 @@ unsigned busn = (sysconf.pci1234[i] >> 12) & 0xff; unsigned devn = sysconf.hcdn[i] & 0xff;
- write_pirq_info(pirq_info, busn, (devn << 3) | 0, 0x1, 0xdef8, + write_pirq_info(pirq_info, busn, PCI_DEVFN(devn, 0), 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0); pirq_info++; slot_num++; }
#if CONFIG_CBB - write_pirq_info(pirq_info, CONFIG_CBB, (0 << 3) | 0, 0x1, 0xdef8, 0x2, + write_pirq_info(pirq_info, CONFIG_CBB, PCI_DEVFN(0, 0), 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0); pirq_info++; slot_num++; if (sysconf.nodes > 32) { - write_pirq_info(pirq_info, CONFIG_CBB - 1, (0 << 3) | 0, 0x1, + write_pirq_info(pirq_info, CONFIG_CBB - 1, PCI_DEVFN(0, 0), 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0); pirq_info++;