summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/amd/bettong/irq_tables.c1
-rw-r--r--src/mainboard/amd/db-ft3b-lc/irq_tables.c1
-rw-r--r--src/mainboard/amd/dbm690t/irq_tables.c3
-rw-r--r--src/mainboard/amd/dinar/irq_tables.c12
-rw-r--r--src/mainboard/amd/inagua/irq_tables.c13
-rw-r--r--src/mainboard/amd/lamar/irq_tables.c1
-rw-r--r--src/mainboard/amd/mahogany/irq_tables.c3
-rw-r--r--src/mainboard/amd/mahogany_fam10/irq_tables.c3
-rw-r--r--src/mainboard/amd/olivehill/irq_tables.c1
-rw-r--r--src/mainboard/amd/olivehillplus/irq_tables.c1
-rw-r--r--src/mainboard/amd/parmer/irq_tables.c1
-rw-r--r--src/mainboard/amd/persimmon/irq_tables.c7
-rw-r--r--src/mainboard/amd/pistachio/irq_tables.c3
-rw-r--r--src/mainboard/amd/serengeti_cheetah/irq_tables.c131
-rw-r--r--src/mainboard/amd/serengeti_cheetah_fam10/irq_tables.c82
-rw-r--r--src/mainboard/amd/south_station/irq_tables.c7
-rw-r--r--src/mainboard/amd/thatcher/irq_tables.c1
-rw-r--r--src/mainboard/amd/tilapia_fam10/irq_tables.c3
-rw-r--r--src/mainboard/amd/torpedo/irq_tables.c8
-rw-r--r--src/mainboard/amd/union_station/irq_tables.c7
-rw-r--r--src/mainboard/asrock/939a785gmh/irq_tables.c3
-rw-r--r--src/mainboard/asrock/e350m1/irq_tables.c7
-rw-r--r--src/mainboard/asrock/imb-a180/irq_tables.c1
-rw-r--r--src/mainboard/asus/f2a85-m/irq_tables.c1
-rw-r--r--src/mainboard/asus/kcma-d8/irq_tables.c6
-rw-r--r--src/mainboard/asus/kgpe-d16/irq_tables.c6
-rw-r--r--src/mainboard/bap/ode_e20XX/irq_tables.c1
-rw-r--r--src/mainboard/broadcom/blast/irq_tables.c66
-rw-r--r--src/mainboard/gigabyte/ga_2761gxdk/irq_tables.c156
-rw-r--r--src/mainboard/gigabyte/m57sli/irq_tables.c77
-rw-r--r--src/mainboard/gigabyte/ma785gm/irq_tables.c3
-rw-r--r--src/mainboard/gigabyte/ma785gmt/irq_tables.c3
-rw-r--r--src/mainboard/gigabyte/ma78gm/irq_tables.c3
-rw-r--r--src/mainboard/gizmosphere/gizmo/irq_tables.c7
-rw-r--r--src/mainboard/gizmosphere/gizmo2/irq_tables.c1
-rw-r--r--src/mainboard/hp/abm/irq_tables.c1
-rw-r--r--src/mainboard/hp/dl145_g1/irq_tables.c36
-rw-r--r--src/mainboard/hp/pavilion_m6_1035dx/irq_tables.c1
-rw-r--r--src/mainboard/iei/kino-780am2-fam10/irq_tables.c3
-rw-r--r--src/mainboard/iwill/dk8_htx/irq_tables.c131
-rw-r--r--src/mainboard/jetway/nf81-t56n-lf/irq_tables.c8
-rw-r--r--src/mainboard/jetway/pa78vm5/irq_tables.c3
-rw-r--r--src/mainboard/kontron/kt690/irq_tables.c3
-rw-r--r--src/mainboard/lenovo/g505s/irq_tables.c1
-rw-r--r--src/mainboard/lippert/frontrunner-af/irq_tables.c7
-rw-r--r--src/mainboard/lippert/toucan-af/irq_tables.c7
-rw-r--r--src/mainboard/msi/ms7135/irq_tables.c24
-rw-r--r--src/mainboard/msi/ms9185/irq_tables.c118
-rw-r--r--src/mainboard/msi/ms9282/irq_tables.c59
-rw-r--r--src/mainboard/msi/ms9652_fam10/irq_tables.c74
-rw-r--r--src/mainboard/nvidia/l1_2pvv/irq_tables.c55
-rw-r--r--src/mainboard/pcengines/apu1/irq_tables.c7
-rw-r--r--src/mainboard/siemens/sitemp_g1p1/irq_tables.c10
-rw-r--r--src/mainboard/sunw/ultra40/irq_tables.c223
-rw-r--r--src/mainboard/sunw/ultra40m2/irq_tables.c55
-rw-r--r--src/mainboard/supermicro/h8dme/irq_tables.c79
-rw-r--r--src/mainboard/supermicro/h8dmr/irq_tables.c79
-rw-r--r--src/mainboard/supermicro/h8dmr_fam10/irq_tables.c74
-rw-r--r--src/mainboard/supermicro/h8qgi/irq_tables.c13
-rw-r--r--src/mainboard/supermicro/h8qme_fam10/irq_tables.c74
-rw-r--r--src/mainboard/supermicro/h8scm/irq_tables.c8
-rw-r--r--src/mainboard/supermicro/h8scm_fam10/irq_tables.c9
-rw-r--r--src/mainboard/technexion/tim5690/irq_tables.c3
-rw-r--r--src/mainboard/technexion/tim8690/irq_tables.c3
-rw-r--r--src/mainboard/tyan/s2912/irq_tables.c59
-rw-r--r--src/mainboard/tyan/s2912_fam10/irq_tables.c74
-rw-r--r--src/mainboard/tyan/s8226/irq_tables.c13
-rw-r--r--src/mainboard/winent/mb6047/irq_tables.c110
68 files changed, 1054 insertions, 1000 deletions
diff --git a/src/mainboard/amd/bettong/irq_tables.c b/src/mainboard/amd/bettong/irq_tables.c
index 452ac0a205..dd24f73835 100644
--- a/src/mainboard/amd/bettong/irq_tables.c
+++ b/src/mainboard/amd/bettong/irq_tables.c
@@ -39,7 +39,6 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
pirq_info->rfu = rfu;
}
-
unsigned long write_pirq_routing_table(unsigned long addr)
{
struct irq_routing_table *pirq;
diff --git a/src/mainboard/amd/db-ft3b-lc/irq_tables.c b/src/mainboard/amd/db-ft3b-lc/irq_tables.c
index c48a4452dc..d7e6385dfb 100644
--- a/src/mainboard/amd/db-ft3b-lc/irq_tables.c
+++ b/src/mainboard/amd/db-ft3b-lc/irq_tables.c
@@ -39,7 +39,6 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
pirq_info->rfu = rfu;
}
-
unsigned long write_pirq_routing_table(unsigned long addr)
{
struct irq_routing_table *pirq;
diff --git a/src/mainboard/amd/dbm690t/irq_tables.c b/src/mainboard/amd/dbm690t/irq_tables.c
index f2be994780..4c2a48dff7 100644
--- a/src/mainboard/amd/dbm690t/irq_tables.c
+++ b/src/mainboard/amd/dbm690t/irq_tables.c
@@ -21,8 +21,6 @@
#include <cpu/amd/amdk8_sysconf.h>
-
-
static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
@@ -41,6 +39,7 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
pirq_info->slot = slot;
pirq_info->rfu = rfu;
}
+
extern u8 bus_rs690[8];
extern u8 bus_sb600[2];
extern unsigned long sbdn_sb600;
diff --git a/src/mainboard/amd/dinar/irq_tables.c b/src/mainboard/amd/dinar/irq_tables.c
index 4637e04571..cfa48b56bc 100644
--- a/src/mainboard/amd/dinar/irq_tables.c
+++ b/src/mainboard/amd/dinar/irq_tables.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-
#include <console/console.h>
#include <device/pci.h>
#include <string.h>
@@ -22,9 +21,9 @@
#include <cpu/amd/amdfam15.h>
static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
- u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
- u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
- u8 slot, u8 rfu)
+ u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
+ u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
+ u8 slot, u8 rfu)
{
pirq_info->bus = bus;
pirq_info->devfn = devfn;
@@ -79,19 +78,14 @@ unsigned long write_pirq_routing_table(unsigned long addr)
pirq_info = (void *)(&pirq->checksum + 1);
slot_num = 0;
-
/* pci bridge */
write_pirq_info(pirq_info, 0, PCI_DEVFN(0x14, 4),
0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0,
0);
pirq_info++;
-
-
slot_num++;
-
-
pirq->size = 32 + 16 * slot_num;
for (i = 0; i < pirq->size; i++)
diff --git a/src/mainboard/amd/inagua/irq_tables.c b/src/mainboard/amd/inagua/irq_tables.c
index e73bb6673b..1b6257cee7 100644
--- a/src/mainboard/amd/inagua/irq_tables.c
+++ b/src/mainboard/amd/inagua/irq_tables.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-
#include <console/console.h>
#include <device/pci.h>
#include <string.h>
@@ -21,11 +20,10 @@
#include <arch/pirq_routing.h>
#include <cpu/amd/amdfam14.h>
-
static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
- u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
- u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
- u8 slot, u8 rfu)
+ u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
+ u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
+ u8 slot, u8 rfu)
{
pirq_info->bus = bus;
pirq_info->devfn = devfn;
@@ -80,19 +78,14 @@ unsigned long write_pirq_routing_table(unsigned long addr)
pirq_info = (void *)(&pirq->checksum + 1);
slot_num = 0;
-
/* pci bridge */
write_pirq_info(pirq_info, 0, PCI_DEVFN(0x14, 4),
0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0,
0);
pirq_info++;
-
-
slot_num++;
-
-
pirq->size = 32 + 16 * slot_num;
for (i = 0; i < pirq->size; i++)
diff --git a/src/mainboard/amd/lamar/irq_tables.c b/src/mainboard/amd/lamar/irq_tables.c
index 4d29d0f7ba..9609db33ed 100644
--- a/src/mainboard/amd/lamar/irq_tables.c
+++ b/src/mainboard/amd/lamar/irq_tables.c
@@ -39,7 +39,6 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
pirq_info->rfu = rfu;
}
-
unsigned long write_pirq_routing_table(unsigned long addr)
{
struct irq_routing_table *pirq;
diff --git a/src/mainboard/amd/mahogany/irq_tables.c b/src/mainboard/amd/mahogany/irq_tables.c
index 80bfbb4efc..ef2a3ec45c 100644
--- a/src/mainboard/amd/mahogany/irq_tables.c
+++ b/src/mainboard/amd/mahogany/irq_tables.c
@@ -21,8 +21,6 @@
#include <cpu/amd/amdk8_sysconf.h>
-
-
static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
@@ -41,6 +39,7 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
pirq_info->slot = slot;
pirq_info->rfu = rfu;
}
+
extern u8 bus_rs780[8];
extern u8 bus_sb700[2];
extern unsigned long sbdn_sb700;
diff --git a/src/mainboard/amd/mahogany_fam10/irq_tables.c b/src/mainboard/amd/mahogany_fam10/irq_tables.c
index 8c613da67c..aff85b63ee 100644
--- a/src/mainboard/amd/mahogany_fam10/irq_tables.c
+++ b/src/mainboard/amd/mahogany_fam10/irq_tables.c
@@ -21,8 +21,6 @@
#include <cpu/amd/amdfam10_sysconf.h>
-
-
static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
@@ -41,6 +39,7 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
pirq_info->slot = slot;
pirq_info->rfu = rfu;
}
+
extern u8 bus_rs780[8];
extern u8 bus_sb700[2];
extern unsigned long sbdn_sb700;
diff --git a/src/mainboard/amd/olivehill/irq_tables.c b/src/mainboard/amd/olivehill/irq_tables.c
index c48a4452dc..d7e6385dfb 100644
--- a/src/mainboard/amd/olivehill/irq_tables.c
+++ b/src/mainboard/amd/olivehill/irq_tables.c
@@ -39,7 +39,6 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
pirq_info->rfu = rfu;
}
-
unsigned long write_pirq_routing_table(unsigned long addr)
{
struct irq_routing_table *pirq;
diff --git a/src/mainboard/amd/olivehillplus/irq_tables.c b/src/mainboard/amd/olivehillplus/irq_tables.c
index c48a4452dc..d7e6385dfb 100644
--- a/src/mainboard/amd/olivehillplus/irq_tables.c
+++ b/src/mainboard/amd/olivehillplus/irq_tables.c
@@ -39,7 +39,6 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
pirq_info->rfu = rfu;
}
-
unsigned long write_pirq_routing_table(unsigned long addr)
{
struct irq_routing_table *pirq;
diff --git a/src/mainboard/amd/parmer/irq_tables.c b/src/mainboard/amd/parmer/irq_tables.c
index 9fa8d256a4..c0752676df 100644
--- a/src/mainboard/amd/parmer/irq_tables.c
+++ b/src/mainboard/amd/parmer/irq_tables.c
@@ -39,7 +39,6 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
pirq_info->rfu = rfu;
}
-
unsigned long write_pirq_routing_table(unsigned long addr)
{
struct irq_routing_table *pirq;
diff --git a/src/mainboard/amd/persimmon/irq_tables.c b/src/mainboard/amd/persimmon/irq_tables.c
index 0c53417b67..1b6257cee7 100644
--- a/src/mainboard/amd/persimmon/irq_tables.c
+++ b/src/mainboard/amd/persimmon/irq_tables.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-
#include <console/console.h>
#include <device/pci.h>
#include <string.h>
@@ -21,7 +20,6 @@
#include <arch/pirq_routing.h>
#include <cpu/amd/amdfam14.h>
-
static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
@@ -80,19 +78,14 @@ unsigned long write_pirq_routing_table(unsigned long addr)
pirq_info = (void *)(&pirq->checksum + 1);
slot_num = 0;
-
/* pci bridge */
write_pirq_info(pirq_info, 0, PCI_DEVFN(0x14, 4),
0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0,
0);
pirq_info++;
-
-
slot_num++;
-
-
pirq->size = 32 + 16 * slot_num;
for (i = 0; i < pirq->size; i++)
diff --git a/src/mainboard/amd/pistachio/irq_tables.c b/src/mainboard/amd/pistachio/irq_tables.c
index 940b1aa485..456c568801 100644
--- a/src/mainboard/amd/pistachio/irq_tables.c
+++ b/src/mainboard/amd/pistachio/irq_tables.c
@@ -21,8 +21,6 @@
#include <cpu/amd/amdk8_sysconf.h>
-
-
static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
@@ -41,6 +39,7 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
pirq_info->slot = slot;
pirq_info->rfu = rfu;
}
+
extern u8 bus_rs690[8];
extern u8 bus_sb600[2];
extern u32 sbdn_sb600;
diff --git a/src/mainboard/amd/serengeti_cheetah/irq_tables.c b/src/mainboard/amd/serengeti_cheetah/irq_tables.c
index 9514ea7bdc..2fc3ee6334 100644
--- a/src/mainboard/amd/serengeti_cheetah/irq_tables.c
+++ b/src/mainboard/amd/serengeti_cheetah/irq_tables.c
@@ -20,12 +20,14 @@
#include "mb_sysconf.h"
-static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus, uint8_t devfn, uint8_t link0, uint16_t bitmap0,
- uint8_t link1, uint16_t bitmap1, uint8_t link2, uint16_t bitmap2,uint8_t link3, uint16_t bitmap3,
- uint8_t slot, uint8_t rfu)
+static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus,
+ uint8_t devfn, uint8_t link0, uint16_t bitmap0,
+ uint8_t link1, uint16_t bitmap1, uint8_t link2,
+ uint16_t bitmap2, uint8_t link3, uint16_t bitmap3,
+ uint8_t slot, uint8_t rfu)
{
- pirq_info->bus = bus;
- pirq_info->devfn = devfn;
+ pirq_info->bus = bus;
+ pirq_info->devfn = devfn;
pirq_info->irq[0].link = link0;
pirq_info->irq[0].bitmap = bitmap0;
@@ -37,12 +39,9 @@ static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus, uint8_t dev
pirq_info->irq[3].bitmap = bitmap3;
pirq_info->slot = slot;
- pirq_info->rfu = rfu;
+ pirq_info->rfu = rfu;
}
-
-
-
unsigned long write_pirq_routing_table(unsigned long addr)
{
@@ -51,30 +50,30 @@ unsigned long write_pirq_routing_table(unsigned long addr)
unsigned slot_num;
uint8_t *v;
- uint8_t sum=0;
- int i;
+ uint8_t sum = 0;
+ int i;
struct mb_sysconf_t *m;
- get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
+ get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
m = sysconf.mb;
- /* Align the table to be 16 byte aligned. */
- addr += 15;
- addr &= ~15;
+ /* Align the table to be 16 byte aligned. */
+ addr += 15;
+ addr &= ~15;
- /* This table must be between 0xf0000 & 0x100000 */
- printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);
+ /* This table must be between 0xf0000 & 0x100000 */
+ printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);
pirq = (void *)(addr);
- v = (uint8_t *)(addr);
+ v = (uint8_t *) (addr);
pirq->signature = PIRQ_SIGNATURE;
- pirq->version = PIRQ_VERSION;
+ pirq->version = PIRQ_VERSION;
pirq->rtr_bus = m->bus_8111_0;
- pirq->rtr_devfn = ((sysconf.sbdn+1)<<3)|0;
+ pirq->rtr_devfn = ((sysconf.sbdn + 1) << 3) | 0;
pirq->exclusive_irqs = 0;
@@ -85,37 +84,44 @@ unsigned long write_pirq_routing_table(unsigned long addr)
memset(pirq->rfu, 0, sizeof(pirq->rfu));
- pirq_info = (void *) ( &pirq->checksum + 1);
+ pirq_info = (void *)(&pirq->checksum + 1);
slot_num = 0;
- {
- device_t dev;
- dev = dev_find_slot(m->bus_8111_0, PCI_DEVFN(sysconf.sbdn+1,3));
- if (dev) {
- /* initialize PCI interupts - these assignments depend
- on the PCB routing of PINTA-D
-
- PINTA = IRQ3
- PINTB = IRQ5
- PINTC = IRQ10
- PINTD = IRQ11
- */
- pci_write_config16(dev, 0x56, 0xba53);
- }
- }
+ {
+ device_t dev;
+ dev =
+ dev_find_slot(m->bus_8111_0,
+ PCI_DEVFN(sysconf.sbdn + 1, 3));
+ if (dev) {
+ /* initialize PCI interupts - these assignments depend
+ on the PCB routing of PINTA-D
+
+ PINTA = IRQ3
+ PINTB = IRQ5
+ PINTC = IRQ10
+ PINTD = IRQ11
+ */
+ pci_write_config16(dev, 0x56, 0xba53);
+ }
+ }
//pci bridge
- printk(BIOS_DEBUG, "setting Onboard AMD Southbridge\n");
- static const unsigned char slotIrqs_1_4[4] = { 3, 5, 10, 11 };
- pci_assign_irqs(m->bus_8111_0, sysconf.sbdn+1, slotIrqs_1_4);
- write_pirq_info(pirq_info, m->bus_8111_0, ((sysconf.sbdn+1)<<3)|0, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
- pirq_info++; slot_num++;
-
- printk(BIOS_DEBUG, "setting Onboard AMD USB\n");
- static const unsigned char slotIrqs_8111_1_0[4] = { 0, 0, 0, 11};
- pci_assign_irqs(m->bus_8111_1, 0, slotIrqs_8111_1_0);
- write_pirq_info(pirq_info, m->bus_8111_1,0, 0, 0, 0, 0, 0, 0, 0x4, 0xdef8, 0, 0);
- pirq_info++; slot_num++;
+ printk(BIOS_DEBUG, "setting Onboard AMD Southbridge\n");
+ static const unsigned char slotIrqs_1_4[4] = { 3, 5, 10, 11 };
+ pci_assign_irqs(m->bus_8111_0, sysconf.sbdn + 1, slotIrqs_1_4);
+ write_pirq_info(pirq_info, m->bus_8111_0, ((sysconf.sbdn + 1) << 3) | 0,
+ 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0,
+ 0);
+ pirq_info++;
+ slot_num++;
+
+ printk(BIOS_DEBUG, "setting Onboard AMD USB\n");
+ static const unsigned char slotIrqs_8111_1_0[4] = { 0, 0, 0, 11 };
+ pci_assign_irqs(m->bus_8111_1, 0, slotIrqs_8111_1_0);
+ write_pirq_info(pirq_info, m->bus_8111_1, 0, 0, 0, 0, 0, 0, 0, 0x4,
+ 0xdef8, 0, 0);
+ pirq_info++;
+ slot_num++;
//pcix bridge
// write_pirq_info(pirq_info, m->bus_8132_0, (sbdn3<<3)|0, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
@@ -123,30 +129,33 @@ unsigned long write_pirq_routing_table(unsigned long addr)
int j = 0;
- for(i=1; i< sysconf.hc_possible_num; i++) {
- if(!(sysconf.pci1234[i] & 0x1) ) continue;
- unsigned busn = (sysconf.pci1234[i] >> 16) & 0xff;
- unsigned devn = sysconf.hcdn[i] & 0xff;
+ for (i = 1; i < sysconf.hc_possible_num; i++) {
+ if (!(sysconf.pci1234[i] & 0x1))
+ continue;
+ unsigned busn = (sysconf.pci1234[i] >> 16) & 0xff;
+ unsigned devn = sysconf.hcdn[i] & 0xff;
- write_pirq_info(pirq_info, busn, (devn<<3)|0, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
- pirq_info++; slot_num++;
- j++;
+ write_pirq_info(pirq_info, busn, (devn << 3) | 0, 0x1, 0xdef8,
+ 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
+ pirq_info++;
+ slot_num++;
+ j++;
- }
+ }
pirq->size = 32 + 16 * slot_num;
- for (i = 0; i < pirq->size; i++)
- sum += v[i];
+ for (i = 0; i < pirq->size; i++)
+ sum += v[i];
sum = pirq->checksum - sum;
- if (sum != pirq->checksum) {
- pirq->checksum = sum;
- }
+ if (sum != pirq->checksum) {
+ pirq->checksum = sum;
+ }
printk(BIOS_INFO, "done.\n");
- return (unsigned long) pirq_info;
+ return (unsigned long)pirq_info;
}
diff --git a/src/mainboard/amd/serengeti_cheetah_fam10/irq_tables.c b/src/mainboard/amd/serengeti_cheetah_fam10/irq_tables.c
index 22337a3caa..380510da4e 100644
--- a/src/mainboard/amd/serengeti_cheetah_fam10/irq_tables.c
+++ b/src/mainboard/amd/serengeti_cheetah_fam10/irq_tables.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-
#include <console/console.h>
#include <device/pci.h>
#include <string.h>
@@ -23,27 +22,25 @@
#include "mb_sysconf.h"
-static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn, u8 link0, u16 bitmap0,
- u8 link1, u16 bitmap1, u8 link2, u16 bitmap2,u8 link3, u16 bitmap3,
- u8 slot, u8 rfu)
+static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
+ u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
+ u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
+ u8 slot, u8 rfu)
{
pirq_info->bus = bus;
pirq_info->devfn = devfn;
- pirq_info->irq[0].link = link0;
- pirq_info->irq[0].bitmap = bitmap0;
- pirq_info->irq[1].link = link1;
- pirq_info->irq[1].bitmap = bitmap1;
- pirq_info->irq[2].link = link2;
- pirq_info->irq[2].bitmap = bitmap2;
- pirq_info->irq[3].link = link3;
- pirq_info->irq[3].bitmap = bitmap3;
+ pirq_info->irq[0].link = link0;
+ pirq_info->irq[0].bitmap = bitmap0;
+ pirq_info->irq[1].link = link1;
+ pirq_info->irq[1].bitmap = bitmap1;
+ pirq_info->irq[2].link = link2;
+ pirq_info->irq[2].bitmap = bitmap2;
+ pirq_info->irq[3].link = link3;
+ pirq_info->irq[3].bitmap = bitmap3;
pirq_info->slot = slot;
pirq_info->rfu = rfu;
}
-
-
-
unsigned long write_pirq_routing_table(unsigned long addr)
{
@@ -52,12 +49,12 @@ unsigned long write_pirq_routing_table(unsigned long addr)
u32 slot_num;
u8 *v;
- u8 sum=0;
+ u8 sum = 0;
int i;
struct mb_sysconf_t *m;
- get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
+ get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
m = sysconf.mb;
@@ -69,13 +66,13 @@ unsigned long write_pirq_routing_table(unsigned long addr)
printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);
pirq = (void *)(addr);
- v = (u8 *)(addr);
+ v = (u8 *) (addr);
pirq->signature = PIRQ_SIGNATURE;
- pirq->version = PIRQ_VERSION;
+ pirq->version = PIRQ_VERSION;
pirq->rtr_bus = m->bus_8111_0;
- pirq->rtr_devfn = ((sysconf.sbdn+1)<<3)|0;
+ pirq->rtr_devfn = ((sysconf.sbdn + 1) << 3) | 0;
pirq->exclusive_irqs = 0;
@@ -86,38 +83,47 @@ unsigned long write_pirq_routing_table(unsigned long addr)
memset(pirq->rfu, 0, sizeof(pirq->rfu));
- pirq_info = (void *) ( &pirq->checksum + 1);
+ pirq_info = (void *)(&pirq->checksum + 1);
slot_num = 0;
-
//pci bridge
- write_pirq_info(pirq_info, m->bus_8111_0, ((sysconf.sbdn+1)<<3)|0, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
- pirq_info++; slot_num++;
-
+ write_pirq_info(pirq_info, m->bus_8111_0, ((sysconf.sbdn + 1) << 3) | 0,
+ 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0,
+ 0);
+ pirq_info++;
+ slot_num++;
//pcix bridge
-// write_pirq_info(pirq_info, m->bus_8132_0, (sbdn3<<3)|0, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
-// pirq_info++; slot_num++;
+// write_pirq_info(pirq_info, m->bus_8132_0, (sbdn3<<3)|0, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
+// pirq_info++; slot_num++;
- int j=0;
+ int j = 0;
- for(i=1; i< sysconf.hc_possible_num; i++) {
- if(!(sysconf.pci1234[i] & 0x1) ) continue;
+ for (i = 1; i < sysconf.hc_possible_num; i++) {
+ if (!(sysconf.pci1234[i] & 0x1))
+ continue;
u32 busn = (sysconf.pci1234[i] >> 12) & 0xff;
u32 devn = sysconf.hcdn[i] & 0xff;
- write_pirq_info(pirq_info, busn, (devn<<3)|0, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, busn, (devn << 3) | 0, 0x1, 0xdef8,
+ 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
+ pirq_info++;
+ slot_num++;
j++;
}
#if CONFIG_CBB
- write_pirq_info(pirq_info, CONFIG_CBB, (0<<3)|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, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, CONFIG_CBB, (0 << 3) | 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,
+ 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8,
+ 0, 0);
+ pirq_info++;
+ slot_num++;
}
#endif
@@ -135,6 +141,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
printk(BIOS_INFO, "done.\n");
- return (unsigned long) pirq_info;
+ return (unsigned long)pirq_info;
}
diff --git a/src/mainboard/amd/south_station/irq_tables.c b/src/mainboard/amd/south_station/irq_tables.c
index 0c53417b67..1b6257cee7 100644
--- a/src/mainboard/amd/south_station/irq_tables.c
+++ b/src/mainboard/amd/south_station/irq_tables.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-
#include <console/console.h>
#include <device/pci.h>
#include <string.h>
@@ -21,7 +20,6 @@
#include <arch/pirq_routing.h>
#include <cpu/amd/amdfam14.h>
-
static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
@@ -80,19 +78,14 @@ unsigned long write_pirq_routing_table(unsigned long addr)
pirq_info = (void *)(&pirq->checksum + 1);
slot_num = 0;
-
/* pci bridge */
write_pirq_info(pirq_info, 0, PCI_DEVFN(0x14, 4),
0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0,
0);
pirq_info++;
-
-
slot_num++;
-
-
pirq->size = 32 + 16 * slot_num;
for (i = 0; i < pirq->size; i++)
diff --git a/src/mainboard/amd/thatcher/irq_tables.c b/src/mainboard/amd/thatcher/irq_tables.c
index 9fa8d256a4..c0752676df 100644
--- a/src/mainboard/amd/thatcher/irq_tables.c
+++ b/src/mainboard/amd/thatcher/irq_tables.c
@@ -39,7 +39,6 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
pirq_info->rfu = rfu;
}
-
unsigned long write_pirq_routing_table(unsigned long addr)
{
struct irq_routing_table *pirq;
diff --git a/src/mainboard/amd/tilapia_fam10/irq_tables.c b/src/mainboard/amd/tilapia_fam10/irq_tables.c
index 8c613da67c..aff85b63ee 100644
--- a/src/mainboard/amd/tilapia_fam10/irq_tables.c
+++ b/src/mainboard/amd/tilapia_fam10/irq_tables.c
@@ -21,8 +21,6 @@
#include <cpu/amd/amdfam10_sysconf.h>
-
-
static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
@@ -41,6 +39,7 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
pirq_info->slot = slot;
pirq_info->rfu = rfu;
}
+
extern u8 bus_rs780[8];
extern u8 bus_sb700[2];
extern unsigned long sbdn_sb700;
diff --git a/src/mainboard/amd/torpedo/irq_tables.c b/src/mainboard/amd/torpedo/irq_tables.c
index 2e4355eaf8..cedac009d0 100644
--- a/src/mainboard/amd/torpedo/irq_tables.c
+++ b/src/mainboard/amd/torpedo/irq_tables.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-
#include <console/console.h>
#include <device/pci.h>
#include <string.h>
@@ -21,8 +20,6 @@
#include <arch/pirq_routing.h>
#include <cpu/amd/amdfam12.h>
-
-
static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
@@ -81,19 +78,14 @@ unsigned long write_pirq_routing_table(unsigned long addr)
pirq_info = (void *)(&pirq->checksum + 1);
slot_num = 0;
-
/* pci bridge */
write_pirq_info(pirq_info, 0, PCI_DEVFN(0x14, 4),
0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0,
0);
pirq_info++;
-
-
slot_num++;
-
-
pirq->size = 32 + 16 * slot_num;
for (i = 0; i < pirq->size; i++)
diff --git a/src/mainboard/amd/union_station/irq_tables.c b/src/mainboard/amd/union_station/irq_tables.c
index 0c53417b67..1b6257cee7 100644
--- a/src/mainboard/amd/union_station/irq_tables.c
+++ b/src/mainboard/amd/union_station/irq_tables.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-
#include <console/console.h>
#include <device/pci.h>
#include <string.h>
@@ -21,7 +20,6 @@
#include <arch/pirq_routing.h>
#include <cpu/amd/amdfam14.h>
-
static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
@@ -80,19 +78,14 @@ unsigned long write_pirq_routing_table(unsigned long addr)
pirq_info = (void *)(&pirq->checksum + 1);
slot_num = 0;
-
/* pci bridge */
write_pirq_info(pirq_info, 0, PCI_DEVFN(0x14, 4),
0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0,
0);
pirq_info++;
-
-
slot_num++;
-
-
pirq->size = 32 + 16 * slot_num;
for (i = 0; i < pirq->size; i++)
diff --git a/src/mainboard/asrock/939a785gmh/irq_tables.c b/src/mainboard/asrock/939a785gmh/irq_tables.c
index 80bfbb4efc..ef2a3ec45c 100644
--- a/src/mainboard/asrock/939a785gmh/irq_tables.c
+++ b/src/mainboard/asrock/939a785gmh/irq_tables.c
@@ -21,8 +21,6 @@
#include <cpu/amd/amdk8_sysconf.h>
-
-
static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
@@ -41,6 +39,7 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
pirq_info->slot = slot;
pirq_info->rfu = rfu;
}
+
extern u8 bus_rs780[8];
extern u8 bus_sb700[2];
extern unsigned long sbdn_sb700;
diff --git a/src/mainboard/asrock/e350m1/irq_tables.c b/src/mainboard/asrock/e350m1/irq_tables.c
index 0c53417b67..1b6257cee7 100644
--- a/src/mainboard/asrock/e350m1/irq_tables.c
+++ b/src/mainboard/asrock/e350m1/irq_tables.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-
#include <console/console.h>
#include <device/pci.h>
#include <string.h>
@@ -21,7 +20,6 @@
#include <arch/pirq_routing.h>
#include <cpu/amd/amdfam14.h>
-
static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
@@ -80,19 +78,14 @@ unsigned long write_pirq_routing_table(unsigned long addr)
pirq_info = (void *)(&pirq->checksum + 1);
slot_num = 0;
-
/* pci bridge */
write_pirq_info(pirq_info, 0, PCI_DEVFN(0x14, 4),
0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0,
0);
pirq_info++;
-
-
slot_num++;
-
-
pirq->size = 32 + 16 * slot_num;
for (i = 0; i < pirq->size; i++)
diff --git a/src/mainboard/asrock/imb-a180/irq_tables.c b/src/mainboard/asrock/imb-a180/irq_tables.c
index c48a4452dc..d7e6385dfb 100644
--- a/src/mainboard/asrock/imb-a180/irq_tables.c
+++ b/src/mainboard/asrock/imb-a180/irq_tables.c
@@ -39,7 +39,6 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
pirq_info->rfu = rfu;
}
-
unsigned long write_pirq_routing_table(unsigned long addr)
{
struct irq_routing_table *pirq;
diff --git a/src/mainboard/asus/f2a85-m/irq_tables.c b/src/mainboard/asus/f2a85-m/irq_tables.c
index eeaf8d3a80..458c15757b 100644
--- a/src/mainboard/asus/f2a85-m/irq_tables.c
+++ b/src/mainboard/asus/f2a85-m/irq_tables.c
@@ -39,7 +39,6 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
pirq_info->rfu = rfu;
}
-
unsigned long write_pirq_routing_table(unsigned long addr)
{
struct irq_routing_table *pirq;
diff --git a/src/mainboard/asus/kcma-d8/irq_tables.c b/src/mainboard/asus/kcma-d8/irq_tables.c
index ef39db2610..5dc2d15659 100644
--- a/src/mainboard/asus/kcma-d8/irq_tables.c
+++ b/src/mainboard/asus/kcma-d8/irq_tables.c
@@ -59,6 +59,7 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
pirq_info->slot = slot;
pirq_info->rfu = rfu;
}
+
extern u8 bus_isa;
extern u8 bus_sr5650[14];
extern u8 bus_sp5100[2];
@@ -107,8 +108,9 @@ unsigned long write_pirq_routing_table(unsigned long addr)
slot_num = 0;
/* pci bridge */
- write_pirq_info(pirq_info, bus_sp5100[0], ((sbdn_sp5100 + 0x14) << 3) | 4,
- LNKA, IRQBM, LNKB, IRQBM, LNKC, IRQBM, LNKD, IRQBM, 0, 0);
+ write_pirq_info(pirq_info, bus_sp5100[0],
+ ((sbdn_sp5100 + 0x14) << 3) | 4, LNKA, IRQBM, LNKB,
+ IRQBM, LNKC, IRQBM, LNKD, IRQBM, 0, 0);
pirq_info++;
slot_num++;
diff --git a/src/mainboard/asus/kgpe-d16/irq_tables.c b/src/mainboard/asus/kgpe-d16/irq_tables.c
index ef39db2610..5dc2d15659 100644
--- a/src/mainboard/asus/kgpe-d16/irq_tables.c
+++ b/src/mainboard/asus/kgpe-d16/irq_tables.c
@@ -59,6 +59,7 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
pirq_info->slot = slot;
pirq_info->rfu = rfu;
}
+
extern u8 bus_isa;
extern u8 bus_sr5650[14];
extern u8 bus_sp5100[2];
@@ -107,8 +108,9 @@ unsigned long write_pirq_routing_table(unsigned long addr)
slot_num = 0;
/* pci bridge */
- write_pirq_info(pirq_info, bus_sp5100[0], ((sbdn_sp5100 + 0x14) << 3) | 4,
- LNKA, IRQBM, LNKB, IRQBM, LNKC, IRQBM, LNKD, IRQBM, 0, 0);
+ write_pirq_info(pirq_info, bus_sp5100[0],
+ ((sbdn_sp5100 + 0x14) << 3) | 4, LNKA, IRQBM, LNKB,
+ IRQBM, LNKC, IRQBM, LNKD, IRQBM, 0, 0);
pirq_info++;
slot_num++;
diff --git a/src/mainboard/bap/ode_e20XX/irq_tables.c b/src/mainboard/bap/ode_e20XX/irq_tables.c
index c48a4452dc..d7e6385dfb 100644
--- a/src/mainboard/bap/ode_e20XX/irq_tables.c
+++ b/src/mainboard/bap/ode_e20XX/irq_tables.c
@@ -39,7 +39,6 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
pirq_info->rfu = rfu;
}
-
unsigned long write_pirq_routing_table(unsigned long addr)
{
struct irq_routing_table *pirq;
diff --git a/src/mainboard/broadcom/blast/irq_tables.c b/src/mainboard/broadcom/blast/irq_tables.c
index d5b73521df..003a36b384 100644
--- a/src/mainboard/broadcom/blast/irq_tables.c
+++ b/src/mainboard/broadcom/blast/irq_tables.c
@@ -6,12 +6,14 @@
#include <cpu/amd/amdk8_sysconf.h>
-static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus, uint8_t devfn, uint8_t link0, uint16_t bitmap0,
- uint8_t link1, uint16_t bitmap1, uint8_t link2, uint16_t bitmap2,uint8_t link3, uint16_t bitmap3,
- uint8_t slot, uint8_t rfu)
+static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus,
+ uint8_t devfn, uint8_t link0, uint16_t bitmap0,
+ uint8_t link1, uint16_t bitmap1, uint8_t link2,
+ uint16_t bitmap2, uint8_t link3, uint16_t bitmap3,
+ uint8_t slot, uint8_t rfu)
{
- pirq_info->bus = bus;
- pirq_info->devfn = devfn;
+ pirq_info->bus = bus;
+ pirq_info->devfn = devfn;
pirq_info->irq[0].link = link0;
pirq_info->irq[0].bitmap = bitmap0;
@@ -26,14 +28,12 @@ static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus, uint8_t dev
pirq_info->rfu = rfu;
}
-extern unsigned char bus_bcm5780[7];
-extern unsigned char bus_bcm5785_0;
-extern unsigned char bus_bcm5785_1;
-extern unsigned apicid_bcm5785[3];
-
-extern unsigned sbdn2;
-
+extern unsigned char bus_bcm5780[7];
+extern unsigned char bus_bcm5785_0;
+extern unsigned char bus_bcm5785_1;
+extern unsigned apicid_bcm5785[3];
+extern unsigned sbdn2;
unsigned long write_pirq_routing_table(unsigned long addr)
{
@@ -43,26 +43,26 @@ unsigned long write_pirq_routing_table(unsigned long addr)
unsigned slot_num;
uint8_t *v;
- uint8_t sum=0;
- int i;
+ uint8_t sum = 0;
+ int i;
get_bus_conf();
- /* Align the table to be 16 byte aligned. */
- addr += 15;
- addr &= ~15;
+ /* Align the table to be 16 byte aligned. */
+ addr += 15;
+ addr &= ~15;
- /* This table must be between 0xf0000 & 0x100000 */
- printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);
+ /* This table must be between 0xf0000 & 0x100000 */
+ printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);
pirq = (void *)(addr);
- v = (uint8_t *)(addr);
+ v = (uint8_t *) (addr);
pirq->signature = PIRQ_SIGNATURE;
- pirq->version = PIRQ_VERSION;
+ pirq->version = PIRQ_VERSION;
pirq->rtr_bus = bus_bcm5785_0;
- pirq->rtr_devfn = (sysconf.sbdn<<3)|0;
+ pirq->rtr_devfn = (sysconf.sbdn << 3) | 0;
pirq->exclusive_irqs = 0;
@@ -73,27 +73,29 @@ unsigned long write_pirq_routing_table(unsigned long addr)
memset(pirq->rfu, 0, sizeof(pirq->rfu));
- get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
+ get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
- pirq_info = (void *) ( &pirq->checksum + 1);
+ pirq_info = (void *)(&pirq->checksum + 1);
slot_num = 0;
//pci bridge
- write_pirq_info(pirq_info, bus_bcm5785_0, (sysconf.sbdn<<3)|0, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, bus_bcm5785_0, (sysconf.sbdn << 3) | 0, 0x1,
+ 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
+ pirq_info++;
+ slot_num++;
pirq->size = 32 + 16 * slot_num;
- for (i = 0; i < pirq->size; i++)
- sum += v[i];
+ for (i = 0; i < pirq->size; i++)
+ sum += v[i];
sum = pirq->checksum - sum;
- if (sum != pirq->checksum) {
- pirq->checksum = sum;
- }
+ if (sum != pirq->checksum) {
+ pirq->checksum = sum;
+ }
printk(BIOS_INFO, "done.\n");
- return (unsigned long) pirq_info;
+ return (unsigned long)pirq_info;
}
diff --git a/src/mainboard/gigabyte/ga_2761gxdk/irq_tables.c b/src/mainboard/gigabyte/ga_2761gxdk/irq_tables.c
index d724a51191..abaaca21f5 100644
--- a/src/mainboard/gigabyte/ga_2761gxdk/irq_tables.c
+++ b/src/mainboard/gigabyte/ga_2761gxdk/irq_tables.c
@@ -25,24 +25,27 @@
#include <device/pci_ids.h>
#include <cpu/amd/amdk8_sysconf.h>
-static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus, uint8_t devfn, uint8_t link0, uint16_t bitmap0,
- uint8_t link1, uint16_t bitmap1, uint8_t link2, uint16_t bitmap2,uint8_t link3, uint16_t bitmap3,
- uint8_t slot, uint8_t rfu)
+static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus,
+ uint8_t devfn, uint8_t link0, uint16_t bitmap0,
+ uint8_t link1, uint16_t bitmap1, uint8_t link2,
+ uint16_t bitmap2, uint8_t link3, uint16_t bitmap3,
+ uint8_t slot, uint8_t rfu)
{
- pirq_info->bus = bus;
- pirq_info->devfn = devfn;
- pirq_info->irq[0].link = link0;
- pirq_info->irq[0].bitmap = bitmap0;
- pirq_info->irq[1].link = link1;
- pirq_info->irq[1].bitmap = bitmap1;
- pirq_info->irq[2].link = link2;
- pirq_info->irq[2].bitmap = bitmap2;
- pirq_info->irq[3].link = link3;
- pirq_info->irq[3].bitmap = bitmap3;
- pirq_info->slot = slot;
- pirq_info->rfu = rfu;
+ pirq_info->bus = bus;
+ pirq_info->devfn = devfn;
+ pirq_info->irq[0].link = link0;
+ pirq_info->irq[0].bitmap = bitmap0;
+ pirq_info->irq[1].link = link1;
+ pirq_info->irq[1].bitmap = bitmap1;
+ pirq_info->irq[2].link = link2;
+ pirq_info->irq[2].bitmap = bitmap2;
+ pirq_info->irq[3].link = link3;
+ pirq_info->irq[3].bitmap = bitmap3;
+ pirq_info->slot = slot;
+ pirq_info->rfu = rfu;
}
-extern unsigned char bus_sis966[8]; //1
+
+extern unsigned char bus_sis966[8]; //1
unsigned long write_pirq_routing_table(unsigned long addr)
{
@@ -53,24 +56,24 @@ unsigned long write_pirq_routing_table(unsigned long addr)
uint8_t *v;
unsigned sbdn;
- uint8_t sum=0;
- int i;
+ uint8_t sum = 0;
+ int i;
- get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
+ get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
sbdn = sysconf.sbdn;
- /* Align the table to be 16 byte aligned. */
- addr += 15;
- addr &= ~15;
+ /* Align the table to be 16 byte aligned. */
+ addr += 15;
+ addr &= ~15;
- /* This table must be between 0xf0000 & 0x100000 */
+ /* This table must be between 0xf0000 & 0x100000 */
printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);
pirq = (void *)(addr);
- v = (uint8_t *)(addr);
+ v = (uint8_t *) (addr);
pirq->signature = PIRQ_SIGNATURE;
- pirq->version = PIRQ_VERSION;
+ pirq->version = PIRQ_VERSION;
pirq->rtr_bus = 0;
pirq->rtr_devfn = PCI_DEVFN(2, 0);
@@ -84,11 +87,13 @@ unsigned long write_pirq_routing_table(unsigned long addr)
memset(pirq->rfu, 0, sizeof(pirq->rfu));
- pirq_info = (void *) ( &pirq->checksum + 1);
+ pirq_info = (void *)(&pirq->checksum + 1);
slot_num = 0;
- write_pirq_info(pirq_info, 0, PCI_DEVFN(2, 0), 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, 0, PCI_DEVFN(2, 0), 0x1, 0xdef8, 0x2, 0xdef8,
+ 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
+ pirq_info++;
+ slot_num++;
pirq->size = 32 + 16 * slot_num;
@@ -103,56 +108,61 @@ unsigned long write_pirq_routing_table(unsigned long addr)
printk(BIOS_INFO, "done.\n");
- {
- device_t dev;
- dev = dev_find_slot(0, PCI_DEVFN(2,0));
+ {
+ device_t dev;
+ dev = dev_find_slot(0, PCI_DEVFN(2, 0));
if (dev) {
- /* initialize PCI interupts - these assignments depend
- on the PCB routing of PINTA-D
-
- PINTA = IRQ10
- PINTB = IRQ11
- PINTC = NA
- PINTD = IRQ10
- PINTE = IRQ11
- PINTF = IRQ5
- PINTG = NA
- PINTH = IRQ7
-
- */
- uint8_t reg[8]={0x41,0x42,0x43,0x44,0x60,0x61,0x62,0x63};
- uint8_t irq[8]={0x0A,0X0B,0X0,0X0a,0X0B,0X05,0X0,0X07};
-
- for(i=0;i<8;i++)
- pci_write_config8(dev, reg[i], irq[i]);
- } // endif
-
- printk(BIOS_DEBUG, "Setting Onboard SiS Southbridge\n");
-
- dev = dev_find_slot(0, PCI_DEVFN(2,5)); // 5513 (IDE)
- pci_write_config8(dev, 0x3C, 0x0A);
- dev = dev_find_slot(0, PCI_DEVFN(3,0)); // USB 1.1
- pci_write_config8(dev, 0x3C, 0x0B);
- dev = dev_find_slot(0, PCI_DEVFN(3,1)); // USB 1.1
- pci_write_config8(dev, 0x3C, 0x05);
- dev = dev_find_slot(0, PCI_DEVFN(3,3)); // USB 2.0
+ /* initialize PCI interupts - these assignments depend
+ on the PCB routing of PINTA-D
+
+ PINTA = IRQ10
+ PINTB = IRQ11
+ PINTC = NA
+ PINTD = IRQ10
+ PINTE = IRQ11
+ PINTF = IRQ5
+ PINTG = NA
+ PINTH = IRQ7
+
+ */
+ uint8_t reg[8] = {
+ 0x41, 0x42, 0x43, 0x44, 0x60, 0x61, 0x62, 0x63
+ };
+ uint8_t irq[8] = {
+ 0x0A, 0X0B, 0X0, 0X0a, 0X0B, 0X05, 0X0, 0X07
+ };
+
+ for (i = 0; i < 8; i++)
+ pci_write_config8(dev, reg[i], irq[i]);
+ } // endif
+
+ printk(BIOS_DEBUG, "Setting Onboard SiS Southbridge\n");
+
+ dev = dev_find_slot(0, PCI_DEVFN(2, 5)); // 5513 (IDE)
+ pci_write_config8(dev, 0x3C, 0x0A);
+ dev = dev_find_slot(0, PCI_DEVFN(3, 0)); // USB 1.1
+ pci_write_config8(dev, 0x3C, 0x0B);
+ dev = dev_find_slot(0, PCI_DEVFN(3, 1)); // USB 1.1
+ pci_write_config8(dev, 0x3C, 0x05);
+ dev = dev_find_slot(0, PCI_DEVFN(3, 3)); // USB 2.0
pci_write_config8(dev, 0x3C, 0x07);
- dev = dev_find_slot(0, PCI_DEVFN(4,0)); // 191 (LAN)
+ dev = dev_find_slot(0, PCI_DEVFN(4, 0)); // 191 (LAN)
+ pci_write_config8(dev, 0x3C, 0x0A);
+ dev = dev_find_slot(0, PCI_DEVFN(5, 0)); // 1183 (SATA)
+ pci_write_config8(dev, 0x3C, 0x0B);
+ dev = dev_find_slot(0, PCI_DEVFN(6, 0)); // PCI-E
pci_write_config8(dev, 0x3C, 0x0A);
- dev = dev_find_slot(0, PCI_DEVFN(5,0)); // 1183 (SATA)
- pci_write_config8(dev, 0x3C, 0x0B);
- dev = dev_find_slot(0, PCI_DEVFN(6,0)); // PCI-E
- pci_write_config8(dev, 0x3C, 0x0A);
- dev = dev_find_slot(0, PCI_DEVFN(7,0)); // PCI-E
- pci_write_config8(dev, 0x3C, 0x0A);
- dev = dev_find_slot(0, PCI_DEVFN(15,0)); // Azalia
- pci_write_config8(dev, 0x3C, 0x05);
- }
+ dev = dev_find_slot(0, PCI_DEVFN(7, 0)); // PCI-E
+ pci_write_config8(dev, 0x3C, 0x0A);
+ dev = dev_find_slot(0, PCI_DEVFN(15, 0)); // Azalia
+ pci_write_config8(dev, 0x3C, 0x05);
+ }
printk(BIOS_DEBUG, "pirq routing table, size=%d\n", pirq->size);
- for (i = 0; i < pirq->size; i+=4)
- printk(BIOS_DEBUG, "%.2x%.2x%.2x%.2x\n", v[i+3],v[i+2],v[i+1],v[i]);
+ for (i = 0; i < pirq->size; i += 4)
+ printk(BIOS_DEBUG, "%.2x%.2x%.2x%.2x\n", v[i + 3], v[i + 2],
+ v[i + 1], v[i]);
- return (unsigned long) pirq_info;
+ return (unsigned long)pirq_info;
}
diff --git a/src/mainboard/gigabyte/m57sli/irq_tables.c b/src/mainboard/gigabyte/m57sli/irq_tables.c
index 7c717f1142..4d42d7495c 100644
--- a/src/mainboard/gigabyte/m57sli/irq_tables.c
+++ b/src/mainboard/gigabyte/m57sli/irq_tables.c
@@ -23,26 +23,27 @@
#include <cpu/amd/amdk8_sysconf.h>
-static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus, uint8_t devfn, uint8_t link0, uint16_t bitmap0,
- uint8_t link1, uint16_t bitmap1, uint8_t link2, uint16_t bitmap2,uint8_t link3, uint16_t bitmap3,
- uint8_t slot, uint8_t rfu)
+static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus,
+ uint8_t devfn, uint8_t link0, uint16_t bitmap0,
+ uint8_t link1, uint16_t bitmap1, uint8_t link2,
+ uint16_t bitmap2, uint8_t link3, uint16_t bitmap3,
+ uint8_t slot, uint8_t rfu)
{
- pirq_info->bus = bus;
- pirq_info->devfn = devfn;
- pirq_info->irq[0].link = link0;
- pirq_info->irq[0].bitmap = bitmap0;
- pirq_info->irq[1].link = link1;
- pirq_info->irq[1].bitmap = bitmap1;
- pirq_info->irq[2].link = link2;
- pirq_info->irq[2].bitmap = bitmap2;
- pirq_info->irq[3].link = link3;
- pirq_info->irq[3].bitmap = bitmap3;
- pirq_info->slot = slot;
- pirq_info->rfu = rfu;
+ pirq_info->bus = bus;
+ pirq_info->devfn = devfn;
+ pirq_info->irq[0].link = link0;
+ pirq_info->irq[0].bitmap = bitmap0;
+ pirq_info->irq[1].link = link1;
+ pirq_info->irq[1].bitmap = bitmap1;
+ pirq_info->irq[2].link = link2;
+ pirq_info->irq[2].bitmap = bitmap2;
+ pirq_info->irq[3].link = link3;
+ pirq_info->irq[3].bitmap = bitmap3;
+ pirq_info->slot = slot;
+ pirq_info->rfu = rfu;
}
-extern unsigned char bus_mcp55[8]; //1
-
+extern unsigned char bus_mcp55[8]; //1
unsigned long write_pirq_routing_table(unsigned long addr)
{
@@ -53,27 +54,27 @@ unsigned long write_pirq_routing_table(unsigned long addr)
uint8_t *v;
unsigned sbdn;
- uint8_t sum=0;
- int i;
+ uint8_t sum = 0;
+ int i;
- get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
+ get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
sbdn = sysconf.sbdn;
- /* Align the table to be 16 byte aligned. */
- addr += 15;
- addr &= ~15;
+ /* Align the table to be 16 byte aligned. */
+ addr += 15;
+ addr &= ~15;
- /* This table must be between 0xf0000 & 0x100000 */
- printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);
+ /* This table must be between 0xf0000 & 0x100000 */
+ printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);
pirq = (void *)(addr);
- v = (uint8_t *)(addr);
+ v = (uint8_t *) (addr);
pirq->signature = PIRQ_SIGNATURE;
- pirq->version = PIRQ_VERSION;
+ pirq->version = PIRQ_VERSION;
pirq->rtr_bus = bus_mcp55[0];
- pirq->rtr_devfn = ((sbdn+6)<<3)|0;
+ pirq->rtr_devfn = ((sbdn + 6) << 3) | 0;
pirq->exclusive_irqs = 0;
@@ -84,25 +85,27 @@ unsigned long write_pirq_routing_table(unsigned long addr)
memset(pirq->rfu, 0, sizeof(pirq->rfu));
- pirq_info = (void *) ( &pirq->checksum + 1);
+ pirq_info = (void *)(&pirq->checksum + 1);
slot_num = 0;
//pci bridge
- write_pirq_info(pirq_info, bus_mcp55[0], ((sbdn+6)<<3)|0, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, bus_mcp55[0], ((sbdn + 6) << 3) | 0, 0x1,
+ 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
+ pirq_info++;
+ slot_num++;
pirq->size = 32 + 16 * slot_num;
- for (i = 0; i < pirq->size; i++)
- sum += v[i];
+ for (i = 0; i < pirq->size; i++)
+ sum += v[i];
sum = pirq->checksum - sum;
- if (sum != pirq->checksum) {
- pirq->checksum = sum;
- }
+ if (sum != pirq->checksum) {
+ pirq->checksum = sum;
+ }
printk(BIOS_INFO, "done.\n");
- return (unsigned long) pirq_info;
+ return (unsigned long)pirq_info;
}
diff --git a/src/mainboard/gigabyte/ma785gm/irq_tables.c b/src/mainboard/gigabyte/ma785gm/irq_tables.c
index 8c613da67c..aff85b63ee 100644
--- a/src/mainboard/gigabyte/ma785gm/irq_tables.c
+++ b/src/mainboard/gigabyte/ma785gm/irq_tables.c
@@ -21,8 +21,6 @@
#include <cpu/amd/amdfam10_sysconf.h>
-
-
static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
@@ -41,6 +39,7 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
pirq_info->slot = slot;
pirq_info->rfu = rfu;
}
+
extern u8 bus_rs780[8];
extern u8 bus_sb700[2];
extern unsigned long sbdn_sb700;
diff --git a/src/mainboard/gigabyte/ma785gmt/irq_tables.c b/src/mainboard/gigabyte/ma785gmt/irq_tables.c
index 8c613da67c..aff85b63ee 100644
--- a/src/mainboard/gigabyte/ma785gmt/irq_tables.c
+++ b/src/mainboard/gigabyte/ma785gmt/irq_tables.c
@@ -21,8 +21,6 @@
#include <cpu/amd/amdfam10_sysconf.h>
-
-
static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
@@ -41,6 +39,7 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
pirq_info->slot = slot;
pirq_info->rfu = rfu;
}
+
extern u8 bus_rs780[8];
extern u8 bus_sb700[2];
extern unsigned long sbdn_sb700;
diff --git a/src/mainboard/gigabyte/ma78gm/irq_tables.c b/src/mainboard/gigabyte/ma78gm/irq_tables.c
index 8c613da67c..aff85b63ee 100644
--- a/src/mainboard/gigabyte/ma78gm/irq_tables.c
+++ b/src/mainboard/gigabyte/ma78gm/irq_tables.c
@@ -21,8 +21,6 @@
#include <cpu/amd/amdfam10_sysconf.h>
-
-
static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
@@ -41,6 +39,7 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
pirq_info->slot = slot;
pirq_info->rfu = rfu;
}
+
extern u8 bus_rs780[8];
extern u8 bus_sb700[2];
extern unsigned long sbdn_sb700;
diff --git a/src/mainboard/gizmosphere/gizmo/irq_tables.c b/src/mainboard/gizmosphere/gizmo/irq_tables.c
index 2d1c70c6a8..60a8f74d1d 100644
--- a/src/mainboard/gizmosphere/gizmo/irq_tables.c
+++ b/src/mainboard/gizmosphere/gizmo/irq_tables.c
@@ -14,7 +14,6 @@
* GNU General Public License for more details.
*/
-
#include <console/console.h>
#include <device/pci.h>
#include <string.h>
@@ -22,7 +21,6 @@
#include <arch/pirq_routing.h>
#include <cpu/amd/amdfam14.h>
-
static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
@@ -81,19 +79,14 @@ unsigned long write_pirq_routing_table(unsigned long addr)
pirq_info = (void *)(&pirq->checksum + 1);
slot_num = 0;
-
/* pci bridge */
write_pirq_info(pirq_info, 0, PCI_DEVFN(0x14, 4),
0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0,
0);
pirq_info++;
-
-
slot_num++;
-
-
pirq->size = 32 + 16 * slot_num;
for (i = 0; i < pirq->size; i++)
diff --git a/src/mainboard/gizmosphere/gizmo2/irq_tables.c b/src/mainboard/gizmosphere/gizmo2/irq_tables.c
index c48a4452dc..d7e6385dfb 100644
--- a/src/mainboard/gizmosphere/gizmo2/irq_tables.c
+++ b/src/mainboard/gizmosphere/gizmo2/irq_tables.c
@@ -39,7 +39,6 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
pirq_info->rfu = rfu;
}
-
unsigned long write_pirq_routing_table(unsigned long addr)
{
struct irq_routing_table *pirq;
diff --git a/src/mainboard/hp/abm/irq_tables.c b/src/mainboard/hp/abm/irq_tables.c
index c48a4452dc..d7e6385dfb 100644
--- a/src/mainboard/hp/abm/irq_tables.c
+++ b/src/mainboard/hp/abm/irq_tables.c
@@ -39,7 +39,6 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
pirq_info->rfu = rfu;
}
-
unsigned long write_pirq_routing_table(unsigned long addr)
{
struct irq_routing_table *pirq;
diff --git a/src/mainboard/hp/dl145_g1/irq_tables.c b/src/mainboard/hp/dl145_g1/irq_tables.c
index 1cb5fa9550..4988ea1691 100644
--- a/src/mainboard/hp/dl145_g1/irq_tables.c
+++ b/src/mainboard/hp/dl145_g1/irq_tables.c
@@ -7,9 +7,11 @@
#include <cpu/amd/amdk8_sysconf.h>
#include "mb_sysconf.h"
-static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus, uint8_t devfn, uint8_t link0, uint16_t bitmap0,
- uint8_t link1, uint16_t bitmap1, uint8_t link2, uint16_t bitmap2,uint8_t link3, uint16_t bitmap3,
- uint8_t slot, uint8_t rfu)
+static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus,
+ uint8_t devfn, uint8_t link0, uint16_t bitmap0,
+ uint8_t link1, uint16_t bitmap1, uint8_t link2,
+ uint16_t bitmap2, uint8_t link3, uint16_t bitmap3,
+ uint8_t slot, uint8_t rfu)
{
pirq_info->bus = bus;
pirq_info->devfn = devfn;
@@ -33,10 +35,10 @@ unsigned long write_pirq_routing_table(unsigned long addr)
uint8_t *v;
struct mb_sysconf_t *m = sysconf.mb;
- uint8_t sum=0;
+ uint8_t sum = 0;
int i;
- get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
+ get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
/* Align the table to be 16 byte aligned. */
addr += 15;
@@ -46,13 +48,13 @@ unsigned long write_pirq_routing_table(unsigned long addr)
printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);
pirq = (void *)(addr);
- v = (uint8_t *)(addr);
+ v = (uint8_t *) (addr);
pirq->signature = PIRQ_SIGNATURE;
- pirq->version = PIRQ_VERSION;
+ pirq->version = PIRQ_VERSION;
pirq->rtr_bus = m->bus_8111_0;
- pirq->rtr_devfn = ((sysconf.sbdn+1)<<3)|0;
+ pirq->rtr_devfn = ((sysconf.sbdn + 1) << 3) | 0;
pirq->exclusive_irqs = 0;
@@ -63,16 +65,20 @@ unsigned long write_pirq_routing_table(unsigned long addr)
memset(pirq->rfu, 0, sizeof(pirq->rfu));
- pirq_info = (void *) ( &pirq->checksum + 1);
+ pirq_info = (void *)(&pirq->checksum + 1);
slot_num = 0;
//pci bridge
- write_pirq_info(pirq_info, m->bus_8111_0, ((sysconf.sbdn+1)<<3)|0, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, m->bus_8111_0, ((sysconf.sbdn + 1) << 3) | 0,
+ 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0,
+ 0);
+ pirq_info++;
+ slot_num++;
//pcix bridge
-// write_pirq_info(pirq_info, m->bus_8131_0, (m->sbdn3<<3)|0, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
-// pirq_info++; slot_num++;
+// write_pirq_info(pirq_info, m->bus_8131_0, (m->sbdn3<<3)|0, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
+// pirq_info++; slot_num++;
- pirq_info++; slot_num++;
+ pirq_info++;
+ slot_num++;
pirq->size = 32 + 16 * slot_num;
@@ -87,6 +93,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
printk(BIOS_INFO, "done.\n");
- return (unsigned long) pirq_info;
+ return (unsigned long)pirq_info;
}
diff --git a/src/mainboard/hp/pavilion_m6_1035dx/irq_tables.c b/src/mainboard/hp/pavilion_m6_1035dx/irq_tables.c
index 33256cc3ed..607d28b9c6 100644
--- a/src/mainboard/hp/pavilion_m6_1035dx/irq_tables.c
+++ b/src/mainboard/hp/pavilion_m6_1035dx/irq_tables.c
@@ -39,7 +39,6 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
pirq_info->rfu = rfu;
}
-
unsigned long write_pirq_routing_table(unsigned long addr)
{
struct irq_routing_table *pirq;
diff --git a/src/mainboard/iei/kino-780am2-fam10/irq_tables.c b/src/mainboard/iei/kino-780am2-fam10/irq_tables.c
index 8c613da67c..aff85b63ee 100644
--- a/src/mainboard/iei/kino-780am2-fam10/irq_tables.c
+++ b/src/mainboard/iei/kino-780am2-fam10/irq_tables.c
@@ -21,8 +21,6 @@
#include <cpu/amd/amdfam10_sysconf.h>
-
-
static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
@@ -41,6 +39,7 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
pirq_info->slot = slot;
pirq_info->rfu = rfu;
}
+
extern u8 bus_rs780[8];
extern u8 bus_sb700[2];
extern unsigned long sbdn_sb700;
diff --git a/src/mainboard/iwill/dk8_htx/irq_tables.c b/src/mainboard/iwill/dk8_htx/irq_tables.c
index 9a359e3dd9..e9f13b4298 100644
--- a/src/mainboard/iwill/dk8_htx/irq_tables.c
+++ b/src/mainboard/iwill/dk8_htx/irq_tables.c
@@ -7,12 +7,14 @@
#include "mb_sysconf.h"
-static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus, uint8_t devfn, uint8_t link0, uint16_t bitmap0,
- uint8_t link1, uint16_t bitmap1, uint8_t link2, uint16_t bitmap2,uint8_t link3, uint16_t bitmap3,
- uint8_t slot, uint8_t rfu)
+static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus,
+ uint8_t devfn, uint8_t link0, uint16_t bitmap0,
+ uint8_t link1, uint16_t bitmap1, uint8_t link2,
+ uint16_t bitmap2, uint8_t link3, uint16_t bitmap3,
+ uint8_t slot, uint8_t rfu)
{
- pirq_info->bus = bus;
- pirq_info->devfn = devfn;
+ pirq_info->bus = bus;
+ pirq_info->devfn = devfn;
pirq_info->irq[0].link = link0;
pirq_info->irq[0].bitmap = bitmap0;
@@ -24,12 +26,9 @@ static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus, uint8_t dev
pirq_info->irq[3].bitmap = bitmap3;
pirq_info->slot = slot;
- pirq_info->rfu = rfu;
+ pirq_info->rfu = rfu;
}
-
-
-
unsigned long write_pirq_routing_table(unsigned long addr)
{
@@ -38,30 +37,30 @@ unsigned long write_pirq_routing_table(unsigned long addr)
unsigned slot_num;
uint8_t *v;
- uint8_t sum=0;
- int i;
+ uint8_t sum = 0;
+ int i;
struct mb_sysconf_t *m;
- get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
+ get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
m = sysconf.mb;
- /* Align the table to be 16 byte aligned. */
- addr += 15;
- addr &= ~15;
+ /* Align the table to be 16 byte aligned. */
+ addr += 15;
+ addr &= ~15;
- /* This table must be between 0xf0000 & 0x100000 */
- printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);
+ /* This table must be between 0xf0000 & 0x100000 */
+ printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);
pirq = (void *)(addr);
- v = (uint8_t *)(addr);
+ v = (uint8_t *) (addr);
pirq->signature = PIRQ_SIGNATURE;
- pirq->version = PIRQ_VERSION;
+ pirq->version = PIRQ_VERSION;
pirq->rtr_bus = m->bus_8111_0;
- pirq->rtr_devfn = ((sysconf.sbdn+1)<<3)|0;
+ pirq->rtr_devfn = ((sysconf.sbdn + 1) << 3) | 0;
pirq->exclusive_irqs = 0;
@@ -72,37 +71,44 @@ unsigned long write_pirq_routing_table(unsigned long addr)
memset(pirq->rfu, 0, sizeof(pirq->rfu));
- pirq_info = (void *) ( &pirq->checksum + 1);
+ pirq_info = (void *)(&pirq->checksum + 1);
slot_num = 0;
- {
- device_t dev;
- dev = dev_find_slot(m->bus_8111_0, PCI_DEVFN(sysconf.sbdn+1,3));
- if (dev) {
- /* initialize PCI interupts - these assignments depend
- on the PCB routing of PINTA-D
-
- PINTA = IRQ3
- PINTB = IRQ5
- PINTC = IRQ10
- PINTD = IRQ11
- */
- pci_write_config16(dev, 0x56, 0xba53);
- }
- }
+ {
+ device_t dev;
+ dev =
+ dev_find_slot(m->bus_8111_0,
+ PCI_DEVFN(sysconf.sbdn + 1, 3));
+ if (dev) {
+ /* initialize PCI interupts - these assignments depend
+ on the PCB routing of PINTA-D
+
+ PINTA = IRQ3
+ PINTB = IRQ5
+ PINTC = IRQ10
+ PINTD = IRQ11
+ */
+ pci_write_config16(dev, 0x56, 0xba53);
+ }
+ }
//pci bridge
- printk(BIOS_DEBUG, "setting Onboard AMD Southbridge\n");
- static const unsigned char slotIrqs_1_4[4] = { 3, 5, 10, 11 };
- pci_assign_irqs(m->bus_8111_0, sysconf.sbdn+1, slotIrqs_1_4);
- write_pirq_info(pirq_info, m->bus_8111_0, ((sysconf.sbdn+1)<<3)|0, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
- pirq_info++; slot_num++;
-
- printk(BIOS_DEBUG, "setting Onboard AMD USB\n");
- static const unsigned char slotIrqs_8111_1_0[4] = { 0, 0, 0, 11};
- pci_assign_irqs(m->bus_8111_1, 0, slotIrqs_8111_1_0);
- write_pirq_info(pirq_info, m->bus_8111_1,0, 0, 0, 0, 0, 0, 0, 0x4, 0xdef8, 0, 0);
- pirq_info++; slot_num++;
+ printk(BIOS_DEBUG, "setting Onboard AMD Southbridge\n");
+ static const unsigned char slotIrqs_1_4[4] = { 3, 5, 10, 11 };
+ pci_assign_irqs(m->bus_8111_0, sysconf.sbdn + 1, slotIrqs_1_4);
+ write_pirq_info(pirq_info, m->bus_8111_0, ((sysconf.sbdn + 1) << 3) | 0,
+ 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0,
+ 0);
+ pirq_info++;
+ slot_num++;
+
+ printk(BIOS_DEBUG, "setting Onboard AMD USB\n");
+ static const unsigned char slotIrqs_8111_1_0[4] = { 0, 0, 0, 11 };
+ pci_assign_irqs(m->bus_8111_1, 0, slotIrqs_8111_1_0);
+ write_pirq_info(pirq_info, m->bus_8111_1, 0, 0, 0, 0, 0, 0, 0, 0x4,
+ 0xdef8, 0, 0);
+ pirq_info++;
+ slot_num++;
//pcix bridge
// write_pirq_info(pirq_info, m->bus_8132_0, (sbdn3<<3)|0, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
@@ -110,30 +116,33 @@ unsigned long write_pirq_routing_table(unsigned long addr)
int j = 0;
- for(i=1; i< sysconf.hc_possible_num; i++) {
- if(!(sysconf.pci1234[i] & 0x1) ) continue;
- unsigned busn = (sysconf.pci1234[i] >> 16) & 0xff;
- unsigned devn = sysconf.hcdn[i] & 0xff;
+ for (i = 1; i < sysconf.hc_possible_num; i++) {
+ if (!(sysconf.pci1234[i] & 0x1))
+ continue;
+ unsigned busn = (sysconf.pci1234[i] >> 16) & 0xff;
+ unsigned devn = sysconf.hcdn[i] & 0xff;
- write_pirq_info(pirq_info, busn, (devn<<3)|0, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
- pirq_info++; slot_num++;
- j++;
+ write_pirq_info(pirq_info, busn, (devn << 3) | 0, 0x1, 0xdef8,
+ 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
+ pirq_info++;
+ slot_num++;
+ j++;
- }
+ }
pirq->size = 32 + 16 * slot_num;
- for (i = 0; i < pirq->size; i++)
- sum += v[i];
+ for (i = 0; i < pirq->size; i++)
+ sum += v[i];
sum = pirq->checksum - sum;
- if (sum != pirq->checksum) {
- pirq->checksum = sum;
- }
+ if (sum != pirq->checksum) {
+ pirq->checksum = sum;
+ }
printk(BIOS_INFO, "done.\n");
- return (unsigned long) pirq_info;
+ return (unsigned long)pirq_info;
}
diff --git a/src/mainboard/jetway/nf81-t56n-lf/irq_tables.c b/src/mainboard/jetway/nf81-t56n-lf/irq_tables.c
index 2012ea4be5..cfe9250bec 100644
--- a/src/mainboard/jetway/nf81-t56n-lf/irq_tables.c
+++ b/src/mainboard/jetway/nf81-t56n-lf/irq_tables.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-
#include <arch/pirq_routing.h>
#include <console/console.h>
#include <cpu/amd/amdfam14.h>
@@ -21,11 +20,10 @@
#include <string.h>
#include <stdint.h>
-
static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
- u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
- u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
- u8 slot, u8 rfu)
+ u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
+ u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
+ u8 slot, u8 rfu)
{
pirq_info->bus = bus;
pirq_info->devfn = devfn;
diff --git a/src/mainboard/jetway/pa78vm5/irq_tables.c b/src/mainboard/jetway/pa78vm5/irq_tables.c
index 8c613da67c..aff85b63ee 100644
--- a/src/mainboard/jetway/pa78vm5/irq_tables.c
+++ b/src/mainboard/jetway/pa78vm5/irq_tables.c
@@ -21,8 +21,6 @@
#include <cpu/amd/amdfam10_sysconf.h>
-
-
static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
@@ -41,6 +39,7 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
pirq_info->slot = slot;
pirq_info->rfu = rfu;
}
+
extern u8 bus_rs780[8];
extern u8 bus_sb700[2];
extern unsigned long sbdn_sb700;
diff --git a/src/mainboard/kontron/kt690/irq_tables.c b/src/mainboard/kontron/kt690/irq_tables.c
index f2be994780..4c2a48dff7 100644
--- a/src/mainboard/kontron/kt690/irq_tables.c
+++ b/src/mainboard/kontron/kt690/irq_tables.c
@@ -21,8 +21,6 @@
#include <cpu/amd/amdk8_sysconf.h>
-
-
static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
@@ -41,6 +39,7 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
pirq_info->slot = slot;
pirq_info->rfu = rfu;
}
+
extern u8 bus_rs690[8];
extern u8 bus_sb600[2];
extern unsigned long sbdn_sb600;
diff --git a/src/mainboard/lenovo/g505s/irq_tables.c b/src/mainboard/lenovo/g505s/irq_tables.c
index 33256cc3ed..607d28b9c6 100644
--- a/src/mainboard/lenovo/g505s/irq_tables.c
+++ b/src/mainboard/lenovo/g505s/irq_tables.c
@@ -39,7 +39,6 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
pirq_info->rfu = rfu;
}
-
unsigned long write_pirq_routing_table(unsigned long addr)
{
struct irq_routing_table *pirq;
diff --git a/src/mainboard/lippert/frontrunner-af/irq_tables.c b/src/mainboard/lippert/frontrunner-af/irq_tables.c
index 0c53417b67..1b6257cee7 100644
--- a/src/mainboard/lippert/frontrunner-af/irq_tables.c
+++ b/src/mainboard/lippert/frontrunner-af/irq_tables.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-
#include <console/console.h>
#include <device/pci.h>
#include <string.h>
@@ -21,7 +20,6 @@
#include <arch/pirq_routing.h>
#include <cpu/amd/amdfam14.h>
-
static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
@@ -80,19 +78,14 @@ unsigned long write_pirq_routing_table(unsigned long addr)
pirq_info = (void *)(&pirq->checksum + 1);
slot_num = 0;
-
/* pci bridge */
write_pirq_info(pirq_info, 0, PCI_DEVFN(0x14, 4),
0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0,
0);
pirq_info++;
-
-
slot_num++;
-
-
pirq->size = 32 + 16 * slot_num;
for (i = 0; i < pirq->size; i++)
diff --git a/src/mainboard/lippert/toucan-af/irq_tables.c b/src/mainboard/lippert/toucan-af/irq_tables.c
index 0c53417b67..1b6257cee7 100644
--- a/src/mainboard/lippert/toucan-af/irq_tables.c
+++ b/src/mainboard/lippert/toucan-af/irq_tables.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-
#include <console/console.h>
#include <device/pci.h>
#include <string.h>
@@ -21,7 +20,6 @@
#include <arch/pirq_routing.h>
#include <cpu/amd/amdfam14.h>
-
static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
@@ -80,19 +78,14 @@ unsigned long write_pirq_routing_table(unsigned long addr)
pirq_info = (void *)(&pirq->checksum + 1);
slot_num = 0;
-
/* pci bridge */
write_pirq_info(pirq_info, 0, PCI_DEVFN(0x14, 4),
0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0,
0);
pirq_info++;
-
-
slot_num++;
-
-
pirq->size = 32 + 16 * slot_num;
for (i = 0; i < pirq->size; i++)
diff --git a/src/mainboard/msi/ms7135/irq_tables.c b/src/mainboard/msi/ms7135/irq_tables.c
index eea5eddde6..e40794ef3c 100644
--- a/src/mainboard/msi/ms7135/irq_tables.c
+++ b/src/mainboard/msi/ms7135/irq_tables.c
@@ -33,7 +33,6 @@
extern unsigned char bus_ck804[6];
-
/**
* Add one line to IRQ table.
*/
@@ -204,50 +203,49 @@ unsigned long write_pirq_routing_table(unsigned long addr)
/* Bus, device, slots IRQs for {A,B,C,D}. */
- irq[0] = 10; /* SMBus */ /* test me */
+ irq[0] = 10; /* SMBus *//* test me */
pci_assign_irqs(bus_ck804[0], 1, irq);
- irq[0] = 10; /* USB */
+ irq[0] = 10; /* USB */
irq[1] = 10;
pci_assign_irqs(bus_ck804[0], 2, irq);
- irq[0] = 10; /* AC97 */
+ irq[0] = 10; /* AC97 */
irq[1] = 0;
pci_assign_irqs(bus_ck804[0], 4, irq);
- irq[0] = 11; /* SATA */
+ irq[0] = 11; /* SATA */
pci_assign_irqs(bus_ck804[0], 7, irq);
- irq[0] = 5; /* SATA */
+ irq[0] = 5; /* SATA */
pci_assign_irqs(bus_ck804[0], 8, irq);
- irq[0] = 10; /* Ethernet */
+ irq[0] = 10; /* Ethernet */
pci_assign_irqs(bus_ck804[0], 10, irq);
-
/* physical slots */
- irq[0] = 5; /* PCI E1 - x1 */
+ irq[0] = 5; /* PCI E1 - x1 */
pci_assign_irqs(bus_ck804[2], 0, irq);
- irq[0] = 11; /* PCI E2 - x16 */
+ irq[0] = 11; /* PCI E2 - x16 */
pci_assign_irqs(bus_ck804[3], 0, irq);
/* AGP-on-PCI "AGR" ignored */
- irq[0] = 10; /* PCI1 */
+ irq[0] = 10; /* PCI1 */
irq[1] = 11;
irq[2] = 5;
irq[3] = 0;
pci_assign_irqs(bus_ck804[1], 7, irq);
- irq[0] = 11; /* PCI2 */
+ irq[0] = 11; /* PCI2 */
irq[1] = 10;
irq[2] = 5;
irq[3] = 0;
pci_assign_irqs(bus_ck804[1], 8, irq);
- irq[0] = 5; /* PCI3 */
+ irq[0] = 5; /* PCI3 */
irq[1] = 10;
irq[2] = 11;
irq[3] = 0;
diff --git a/src/mainboard/msi/ms9185/irq_tables.c b/src/mainboard/msi/ms9185/irq_tables.c
index 992dc5ac28..65f82a2823 100644
--- a/src/mainboard/msi/ms9185/irq_tables.c
+++ b/src/mainboard/msi/ms9185/irq_tables.c
@@ -27,90 +27,92 @@
#include "mb_sysconf.h"
-
-static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus, uint8_t devfn, uint8_t link0, uint16_t bitmap0,
- uint8_t link1, uint16_t bitmap1, uint8_t link2, uint16_t bitmap2,uint8_t link3, uint16_t bitmap3,
- uint8_t slot, uint8_t rfu)
+static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus,
+ uint8_t devfn, uint8_t link0, uint16_t bitmap0,
+ uint8_t link1, uint16_t bitmap1, uint8_t link2,
+ uint16_t bitmap2, uint8_t link3, uint16_t bitmap3,
+ uint8_t slot, uint8_t rfu)
{
- pirq_info->bus = bus;
- pirq_info->devfn = devfn;
-
- pirq_info->irq[0].link = link0;
- pirq_info->irq[0].bitmap = bitmap0;
- pirq_info->irq[1].link = link1;
- pirq_info->irq[1].bitmap = bitmap1;
- pirq_info->irq[2].link = link2;
- pirq_info->irq[2].bitmap = bitmap2;
- pirq_info->irq[3].link = link3;
- pirq_info->irq[3].bitmap = bitmap3;
-
- pirq_info->slot = slot;
- pirq_info->rfu = rfu;
+ pirq_info->bus = bus;
+ pirq_info->devfn = devfn;
+
+ pirq_info->irq[0].link = link0;
+ pirq_info->irq[0].bitmap = bitmap0;
+ pirq_info->irq[1].link = link1;
+ pirq_info->irq[1].bitmap = bitmap1;
+ pirq_info->irq[2].link = link2;
+ pirq_info->irq[2].bitmap = bitmap2;
+ pirq_info->irq[3].link = link3;
+ pirq_info->irq[3].bitmap = bitmap3;
+
+ pirq_info->slot = slot;
+ pirq_info->rfu = rfu;
}
-
-
unsigned long write_pirq_routing_table(unsigned long addr)
{
- struct irq_routing_table *pirq;
- struct irq_info *pirq_info;
- unsigned slot_num;
- uint8_t *v;
+ struct irq_routing_table *pirq;
+ struct irq_info *pirq_info;
+ unsigned slot_num;
+ uint8_t *v;
- uint8_t sum=0;
- int i;
+ uint8_t sum = 0;
+ int i;
- struct mb_sysconf_t *m;
+ struct mb_sysconf_t *m;
- get_bus_conf();
+ get_bus_conf();
- m = sysconf.mb;
+ m = sysconf.mb;
- /* Align the table to be 16 byte aligned. */
- addr += 15;
- addr &= ~15;
+ /* Align the table to be 16 byte aligned. */
+ addr += 15;
+ addr &= ~15;
- /* This table must be between 0xf0000 & 0x100000 */
- printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);
+ /* This table must be between 0xf0000 & 0x100000 */
+ printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);
- pirq = (void *)(addr);
- v = (uint8_t *)(addr);
+ pirq = (void *)(addr);
+ v = (uint8_t *) (addr);
- pirq->signature = PIRQ_SIGNATURE;
- pirq->version = PIRQ_VERSION;
+ pirq->signature = PIRQ_SIGNATURE;
+ pirq->version = PIRQ_VERSION;
- pirq->rtr_bus = m->bus_bcm5785_0;
- pirq->rtr_devfn = (sysconf.sbdn<<3)|0;
+ pirq->rtr_bus = m->bus_bcm5785_0;
+ pirq->rtr_devfn = (sysconf.sbdn << 3) | 0;
- pirq->exclusive_irqs = 0;
+ pirq->exclusive_irqs = 0;
- pirq->rtr_vendor = 0x1166;
- pirq->rtr_device = 0x0036;
+ pirq->rtr_vendor = 0x1166;
+ pirq->rtr_device = 0x0036;
- pirq->miniport_data = 0;
+ pirq->miniport_data = 0;
- memset(pirq->rfu, 0, sizeof(pirq->rfu));
+ memset(pirq->rfu, 0, sizeof(pirq->rfu));
- pirq_info = (void *) ( &pirq->checksum + 1);
- slot_num = 0;
+ pirq_info = (void *)(&pirq->checksum + 1);
+ slot_num = 0;
//pci bridge
- write_pirq_info(pirq_info, m->bus_bcm5785_0, (sysconf.sbdn<<3)|0, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, m->bus_bcm5785_0, (sysconf.sbdn << 3) | 0,
+ 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0,
+ 0);
+ pirq_info++;
+ slot_num++;
- pirq->size = 32 + 16 * slot_num;
+ pirq->size = 32 + 16 * slot_num;
- for (i = 0; i < pirq->size; i++)
- sum += v[i];
+ for (i = 0; i < pirq->size; i++)
+ sum += v[i];
- sum = pirq->checksum - sum;
+ sum = pirq->checksum - sum;
- if (sum != pirq->checksum) {
- pirq->checksum = sum;
- }
+ if (sum != pirq->checksum) {
+ pirq->checksum = sum;
+ }
- printk(BIOS_INFO, "done.\n");
+ printk(BIOS_INFO, "done.\n");
- return (unsigned long) pirq_info;
+ return (unsigned long)pirq_info;
}
diff --git a/src/mainboard/msi/ms9282/irq_tables.c b/src/mainboard/msi/ms9282/irq_tables.c
index 5891512da6..cbb621a906 100644
--- a/src/mainboard/msi/ms9282/irq_tables.c
+++ b/src/mainboard/msi/ms9282/irq_tables.c
@@ -27,26 +27,26 @@
#include <cpu/amd/amdk8_sysconf.h>
#include "mb_sysconf.h"
-static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus, uint8_t devfn, uint8_t link0, uint16_t bitmap0,
- uint8_t link1, uint16_t bitmap1, uint8_t link2, uint16_t bitmap2,uint8_t link3, uint16_t bitmap3,
- uint8_t slot, uint8_t rfu)
+static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus,
+ uint8_t devfn, uint8_t link0, uint16_t bitmap0,
+ uint8_t link1, uint16_t bitmap1, uint8_t link2,
+ uint16_t bitmap2, uint8_t link3, uint16_t bitmap3,
+ uint8_t slot, uint8_t rfu)
{
pirq_info->bus = bus;
pirq_info->devfn = devfn;
- pirq_info->irq[0].link = link0;
- pirq_info->irq[0].bitmap = bitmap0;
- pirq_info->irq[1].link = link1;
- pirq_info->irq[1].bitmap = bitmap1;
- pirq_info->irq[2].link = link2;
- pirq_info->irq[2].bitmap = bitmap2;
- pirq_info->irq[3].link = link3;
- pirq_info->irq[3].bitmap = bitmap3;
+ pirq_info->irq[0].link = link0;
+ pirq_info->irq[0].bitmap = bitmap0;
+ pirq_info->irq[1].link = link1;
+ pirq_info->irq[1].bitmap = bitmap1;
+ pirq_info->irq[2].link = link2;
+ pirq_info->irq[2].bitmap = bitmap2;
+ pirq_info->irq[3].link = link3;
+ pirq_info->irq[3].bitmap = bitmap3;
pirq_info->slot = slot;
pirq_info->rfu = rfu;
}
-
-
unsigned long write_pirq_routing_table(unsigned long addr)
{
@@ -57,10 +57,10 @@ unsigned long write_pirq_routing_table(unsigned long addr)
struct mb_sysconf_t *m;
unsigned sbdn;
- uint8_t sum=0;
+ uint8_t sum = 0;
int i;
- get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
+ get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
sbdn = sysconf.sbdn;
m = sysconf.mb;
@@ -72,13 +72,13 @@ unsigned long write_pirq_routing_table(unsigned long addr)
printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);
pirq = (void *)(addr);
- v = (uint8_t *)(addr);
+ v = (uint8_t *) (addr);
pirq->signature = PIRQ_SIGNATURE;
- pirq->version = PIRQ_VERSION;
+ pirq->version = PIRQ_VERSION;
pirq->rtr_bus = m->bus_mcp55[0];
- pirq->rtr_devfn = ((sbdn+6)<<3)|0;
+ pirq->rtr_devfn = ((sbdn + 6) << 3) | 0;
pirq->exclusive_irqs = 0;
@@ -89,19 +89,24 @@ unsigned long write_pirq_routing_table(unsigned long addr)
memset(pirq->rfu, 0, sizeof(pirq->rfu));
- pirq_info = (void *) ( &pirq->checksum + 1);
+ 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, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
- pirq_info++; slot_num++;
-
- for(i=1; i< sysconf.hc_possible_num; i++) {
- if(!(sysconf.pci1234[i] & 0x1) ) continue;
+ write_pirq_info(pirq_info, m->bus_mcp55[0], ((sbdn + 6) << 3) | 0, 0x1,
+ 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
+ pirq_info++;
+ slot_num++;
+
+ for (i = 1; i < sysconf.hc_possible_num; i++) {
+ if (!(sysconf.pci1234[i] & 0x1))
+ continue;
unsigned busn = (sysconf.pci1234[i] >> 16) & 0xff;
unsigned devn = sysconf.hcdn[i] & 0xff;
- write_pirq_info(pirq_info, busn, (devn<<3)|0, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, busn, (devn << 3) | 0, 0x1, 0xdef8,
+ 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
+ pirq_info++;
+ slot_num++;
}
pirq->size = 32 + 16 * slot_num;
@@ -117,6 +122,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
printk(BIOS_INFO, "done.\n");
- return (unsigned long) pirq_info;
+ return (unsigned long)pirq_info;
}
diff --git a/src/mainboard/msi/ms9652_fam10/irq_tables.c b/src/mainboard/msi/ms9652_fam10/irq_tables.c
index c11707d79a..513fd57c58 100644
--- a/src/mainboard/msi/ms9652_fam10/irq_tables.c
+++ b/src/mainboard/msi/ms9652_fam10/irq_tables.c
@@ -24,26 +24,26 @@
#include <cpu/amd/amdfam10_sysconf.h>
#include "mb_sysconf.h"
-static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus, uint8_t devfn, uint8_t link0, uint16_t bitmap0,
- uint8_t link1, uint16_t bitmap1, uint8_t link2, uint16_t bitmap2,uint8_t link3, uint16_t bitmap3,
- uint8_t slot, uint8_t rfu)
+static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus,
+ uint8_t devfn, uint8_t link0, uint16_t bitmap0,
+ uint8_t link1, uint16_t bitmap1, uint8_t link2,
+ uint16_t bitmap2, uint8_t link3, uint16_t bitmap3,
+ uint8_t slot, uint8_t rfu)
{
pirq_info->bus = bus;
pirq_info->devfn = devfn;
- pirq_info->irq[0].link = link0;
- pirq_info->irq[0].bitmap = bitmap0;
- pirq_info->irq[1].link = link1;
- pirq_info->irq[1].bitmap = bitmap1;
- pirq_info->irq[2].link = link2;
- pirq_info->irq[2].bitmap = bitmap2;
- pirq_info->irq[3].link = link3;
- pirq_info->irq[3].bitmap = bitmap3;
+ pirq_info->irq[0].link = link0;
+ pirq_info->irq[0].bitmap = bitmap0;
+ pirq_info->irq[1].link = link1;
+ pirq_info->irq[1].bitmap = bitmap1;
+ pirq_info->irq[2].link = link2;
+ pirq_info->irq[2].bitmap = bitmap2;
+ pirq_info->irq[3].link = link3;
+ pirq_info->irq[3].bitmap = bitmap3;
pirq_info->slot = slot;
pirq_info->rfu = rfu;
}
-
-
unsigned long write_pirq_routing_table(unsigned long addr)
{
@@ -54,10 +54,10 @@ unsigned long write_pirq_routing_table(unsigned long addr)
struct mb_sysconf_t *m;
unsigned sbdn;
- uint8_t sum=0;
+ uint8_t sum = 0;
int i;
- get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
+ get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
sbdn = sysconf.sbdn;
m = sysconf.mb;
@@ -69,13 +69,13 @@ unsigned long write_pirq_routing_table(unsigned long addr)
printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);
pirq = (void *)(addr);
- v = (uint8_t *)(addr);
+ v = (uint8_t *) (addr);
pirq->signature = PIRQ_SIGNATURE;
- pirq->version = PIRQ_VERSION;
+ pirq->version = PIRQ_VERSION;
pirq->rtr_bus = m->bus_mcp55[0];
- pirq->rtr_devfn = ((sbdn+6)<<3)|0;
+ pirq->rtr_devfn = ((sbdn + 6) << 3) | 0;
pirq->exclusive_irqs = 0;
@@ -86,27 +86,37 @@ unsigned long write_pirq_routing_table(unsigned long addr)
memset(pirq->rfu, 0, sizeof(pirq->rfu));
- pirq_info = (void *) ( &pirq->checksum + 1);
+ 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, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
- pirq_info++; slot_num++;
-
- for(i=1; i< sysconf.hc_possible_num; i++) {
- if(!(sysconf.pci1234[i] & 0x1) ) continue;
+ write_pirq_info(pirq_info, m->bus_mcp55[0], ((sbdn + 6) << 3) | 0, 0x1,
+ 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
+ pirq_info++;
+ slot_num++;
+
+ for (i = 1; i < sysconf.hc_possible_num; i++) {
+ if (!(sysconf.pci1234[i] & 0x1))
+ continue;
unsigned busn = (sysconf.pci1234[i] >> 12) & 0xff;
unsigned devn = sysconf.hcdn[i] & 0xff;
- write_pirq_info(pirq_info, busn, (devn<<3)|0, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, busn, (devn << 3) | 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, 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, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, CONFIG_CBB, (0 << 3) | 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,
+ 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8,
+ 0, 0);
+ pirq_info++;
+ slot_num++;
}
#endif
@@ -123,6 +133,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
printk(BIOS_INFO, "done.\n");
- return (unsigned long) pirq_info;
+ return (unsigned long)pirq_info;
}
diff --git a/src/mainboard/nvidia/l1_2pvv/irq_tables.c b/src/mainboard/nvidia/l1_2pvv/irq_tables.c
index 0396812c78..061d276b78 100644
--- a/src/mainboard/nvidia/l1_2pvv/irq_tables.c
+++ b/src/mainboard/nvidia/l1_2pvv/irq_tables.c
@@ -24,26 +24,26 @@
#include <cpu/amd/amdk8_sysconf.h>
#include "mb_sysconf.h"
-static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus, uint8_t devfn, uint8_t link0, uint16_t bitmap0,
- uint8_t link1, uint16_t bitmap1, uint8_t link2, uint16_t bitmap2,uint8_t link3, uint16_t bitmap3,
- uint8_t slot, uint8_t rfu)
+static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus,
+ uint8_t devfn, uint8_t link0, uint16_t bitmap0,
+ uint8_t link1, uint16_t bitmap1, uint8_t link2,
+ uint16_t bitmap2, uint8_t link3, uint16_t bitmap3,
+ uint8_t slot, uint8_t rfu)
{
pirq_info->bus = bus;
pirq_info->devfn = devfn;
- pirq_info->irq[0].link = link0;
- pirq_info->irq[0].bitmap = bitmap0;
- pirq_info->irq[1].link = link1;
- pirq_info->irq[1].bitmap = bitmap1;
- pirq_info->irq[2].link = link2;
- pirq_info->irq[2].bitmap = bitmap2;
- pirq_info->irq[3].link = link3;
- pirq_info->irq[3].bitmap = bitmap3;
+ pirq_info->irq[0].link = link0;
+ pirq_info->irq[0].bitmap = bitmap0;
+ pirq_info->irq[1].link = link1;
+ pirq_info->irq[1].bitmap = bitmap1;
+ pirq_info->irq[2].link = link2;
+ pirq_info->irq[2].bitmap = bitmap2;
+ pirq_info->irq[3].link = link3;
+ pirq_info->irq[3].bitmap = bitmap3;
pirq_info->slot = slot;
pirq_info->rfu = rfu;
}
-
-
unsigned long write_pirq_routing_table(unsigned long addr)
{
@@ -54,10 +54,10 @@ unsigned long write_pirq_routing_table(unsigned long addr)
struct mb_sysconf_t *m;
unsigned sbdn;
- uint8_t sum=0;
+ uint8_t sum = 0;
int i;
- get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
+ get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
sbdn = sysconf.sbdn;
m = sysconf.mb;
@@ -69,13 +69,13 @@ unsigned long write_pirq_routing_table(unsigned long addr)
printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);
pirq = (void *)(addr);
- v = (uint8_t *)(addr);
+ v = (uint8_t *) (addr);
pirq->signature = PIRQ_SIGNATURE;
- pirq->version = PIRQ_VERSION;
+ pirq->version = PIRQ_VERSION;
pirq->rtr_bus = m->bus_mcp55;
- pirq->rtr_devfn = ((sbdn+6)<<3)|0;
+ pirq->rtr_devfn = ((sbdn + 6) << 3) | 0;
pirq->exclusive_irqs = 0;
@@ -86,19 +86,24 @@ unsigned long write_pirq_routing_table(unsigned long addr)
memset(pirq->rfu, 0, sizeof(pirq->rfu));
- pirq_info = (void *) ( &pirq->checksum + 1);
+ pirq_info = (void *)(&pirq->checksum + 1);
slot_num = 0;
//pci bridge
- write_pirq_info(pirq_info, m->bus_mcp55, ((sbdn+6)<<3)|0, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, m->bus_mcp55, ((sbdn + 6) << 3) | 0, 0x1,
+ 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
+ pirq_info++;
+ slot_num++;
for (i = 1; i < sysconf.hc_possible_num; i++) {
- if(!(sysconf.pci1234[i] & 0x1) ) continue;
+ if (!(sysconf.pci1234[i] & 0x1))
+ continue;
unsigned busn = (sysconf.pci1234[i] >> 16) & 0xff;
unsigned devn = sysconf.hcdn[i] & 0xff;
- write_pirq_info(pirq_info, busn, (devn<<3)|0, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, busn, (devn << 3) | 0, 0x1, 0xdef8,
+ 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
+ pirq_info++;
+ slot_num++;
}
pirq->size = 32 + 16 * slot_num;
@@ -114,6 +119,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
printk(BIOS_INFO, "done.\n");
- return (unsigned long) pirq_info;
+ return (unsigned long)pirq_info;
}
diff --git a/src/mainboard/pcengines/apu1/irq_tables.c b/src/mainboard/pcengines/apu1/irq_tables.c
index 0c53417b67..1b6257cee7 100644
--- a/src/mainboard/pcengines/apu1/irq_tables.c
+++ b/src/mainboard/pcengines/apu1/irq_tables.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-
#include <console/console.h>
#include <device/pci.h>
#include <string.h>
@@ -21,7 +20,6 @@
#include <arch/pirq_routing.h>
#include <cpu/amd/amdfam14.h>
-
static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
@@ -80,19 +78,14 @@ unsigned long write_pirq_routing_table(unsigned long addr)
pirq_info = (void *)(&pirq->checksum + 1);
slot_num = 0;
-
/* pci bridge */
write_pirq_info(pirq_info, 0, PCI_DEVFN(0x14, 4),
0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0,
0);
pirq_info++;
-
-
slot_num++;
-
-
pirq->size = 32 + 16 * slot_num;
for (i = 0; i < pirq->size; i++)
diff --git a/src/mainboard/siemens/sitemp_g1p1/irq_tables.c b/src/mainboard/siemens/sitemp_g1p1/irq_tables.c
index 721e73ec5e..dccbe12243 100644
--- a/src/mainboard/siemens/sitemp_g1p1/irq_tables.c
+++ b/src/mainboard/siemens/sitemp_g1p1/irq_tables.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-
#include <console/console.h>
#include <device/pci.h>
#include <string.h>
@@ -58,6 +57,7 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
pirq_info->slot = slot;
pirq_info->rfu = rfu;
}
+
extern u8 bus_rs690[8];
extern u8 bus_sb600[2];
extern unsigned long sbdn_sb600;
@@ -103,12 +103,16 @@ unsigned long write_pirq_routing_table(unsigned long addr)
slot_num = 0;
/* pci bridge */
- write_pirq_info(pirq_info, bus_sb600[0], ((sbdn_sb600 + 0x14) << 3) | 4, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 1, 0);
+ write_pirq_info(pirq_info, bus_sb600[0], ((sbdn_sb600 + 0x14) << 3) | 4,
+ 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 1,
+ 0);
pirq_info++;
slot_num++;
/* ide */
- write_pirq_info(pirq_info, bus_sb600[0], ((sbdn_sb600 + 0x14) << 3) | 1, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 1, 0);
+ write_pirq_info(pirq_info, bus_sb600[0], ((sbdn_sb600 + 0x14) << 3) | 1,
+ 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 1,
+ 0);
pirq_info++;
slot_num++;
diff --git a/src/mainboard/sunw/ultra40/irq_tables.c b/src/mainboard/sunw/ultra40/irq_tables.c
index aa4fa10edc..f895291b4c 100644
--- a/src/mainboard/sunw/ultra40/irq_tables.c
+++ b/src/mainboard/sunw/ultra40/irq_tables.c
@@ -5,48 +5,48 @@
#include <arch/pirq_routing.h>
#include <cpu/amd/amdk8_sysconf.h>
-static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus, uint8_t devfn, uint8_t link0, uint16_t bitmap0,
- uint8_t link1, uint16_t bitmap1, uint8_t link2, uint16_t bitmap2,uint8_t link3, uint16_t bitmap3,
- uint8_t slot, uint8_t rfu)
+static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus,
+ uint8_t devfn, uint8_t link0, uint16_t bitmap0,
+ uint8_t link1, uint16_t bitmap1, uint8_t link2,
+ uint16_t bitmap2, uint8_t link3, uint16_t bitmap3,
+ uint8_t slot, uint8_t rfu)
{
- pirq_info->bus = bus;
- pirq_info->devfn = devfn;
- pirq_info->irq[0].link = link0;
- pirq_info->irq[0].bitmap = bitmap0;
- pirq_info->irq[1].link = link1;
- pirq_info->irq[1].bitmap = bitmap1;
- pirq_info->irq[2].link = link2;
- pirq_info->irq[2].bitmap = bitmap2;
- pirq_info->irq[3].link = link3;
- pirq_info->irq[3].bitmap = bitmap3;
- pirq_info->slot = slot;
- pirq_info->rfu = rfu;
+ pirq_info->bus = bus;
+ pirq_info->devfn = devfn;
+ pirq_info->irq[0].link = link0;
+ pirq_info->irq[0].bitmap = bitmap0;
+ pirq_info->irq[1].link = link1;
+ pirq_info->irq[1].bitmap = bitmap1;
+ pirq_info->irq[2].link = link2;
+ pirq_info->irq[2].bitmap = bitmap2;
+ pirq_info->irq[3].link = link3;
+ pirq_info->irq[3].bitmap = bitmap3;
+ pirq_info->slot = slot;
+ pirq_info->rfu = rfu;
}
-extern unsigned char bus_ck804_0; //1
-extern unsigned char bus_ck804_1; //2
-extern unsigned char bus_ck804_2; //3
-extern unsigned char bus_ck804_3; //4
-extern unsigned char bus_ck804_4; //5
-extern unsigned char bus_ck804_5; //6
-extern unsigned char bus_8131_0; //7
-extern unsigned char bus_8131_1; //8
-extern unsigned char bus_8131_2; //9
-extern unsigned char bus_ck804b_0;//a
-extern unsigned char bus_ck804b_1;//b
-extern unsigned char bus_ck804b_2;//c
-extern unsigned char bus_ck804b_3;//d
-extern unsigned char bus_ck804b_4;//e
-extern unsigned char bus_ck804b_5;//f
+extern unsigned char bus_ck804_0; //1
+extern unsigned char bus_ck804_1; //2
+extern unsigned char bus_ck804_2; //3
+extern unsigned char bus_ck804_3; //4
+extern unsigned char bus_ck804_4; //5
+extern unsigned char bus_ck804_5; //6
+extern unsigned char bus_8131_0; //7
+extern unsigned char bus_8131_1; //8
+extern unsigned char bus_8131_2; //9
+extern unsigned char bus_ck804b_0; //a
+extern unsigned char bus_ck804b_1; //b
+extern unsigned char bus_ck804b_2; //c
+extern unsigned char bus_ck804b_3; //d
+extern unsigned char bus_ck804b_4; //e
+extern unsigned char bus_ck804b_5; //f
extern unsigned pci1234[];
-extern unsigned sbdn;
-extern unsigned hcdn[];
-extern unsigned sbdn3;
-extern unsigned sbdnb;
-
-
+extern unsigned sbdn;
+extern unsigned hcdn[];
+extern unsigned sbdn3;
+extern unsigned sbdnb;
unsigned long write_pirq_routing_table(unsigned long addr)
{
@@ -56,26 +56,26 @@ unsigned long write_pirq_routing_table(unsigned long addr)
unsigned slot_num;
uint8_t *v;
- uint8_t sum=0;
- int i;
+ uint8_t sum = 0;
+ int i;
- get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
+ get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
- /* Align the table to be 16 byte aligned. */
- addr += 15;
- addr &= ~15;
+ /* Align the table to be 16 byte aligned. */
+ addr += 15;
+ addr &= ~15;
- /* This table must be between 0xf0000 & 0x100000 */
- printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);
+ /* This table must be between 0xf0000 & 0x100000 */
+ printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);
pirq = (void *)(addr);
- v = (uint8_t *)(addr);
+ v = (uint8_t *) (addr);
pirq->signature = PIRQ_SIGNATURE;
- pirq->version = PIRQ_VERSION;
+ pirq->version = PIRQ_VERSION;
pirq->rtr_bus = bus_ck804_0;
- pirq->rtr_devfn = ((sbdn+9)<<3)|0;
+ pirq->rtr_devfn = ((sbdn + 9) << 3) | 0;
pirq->exclusive_irqs = 0;
@@ -86,90 +86,127 @@ unsigned long write_pirq_routing_table(unsigned long addr)
memset(pirq->rfu, 0, sizeof(pirq->rfu));
- pirq_info = (void *) ( &pirq->checksum + 1);
+ pirq_info = (void *)(&pirq->checksum + 1);
slot_num = 0;
//pci bridge
- write_pirq_info(pirq_info, bus_ck804_0, ((sbdn+9)<<3)|0, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, bus_ck804_0, ((sbdn + 9) << 3) | 0, 0x1,
+ 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
+ pirq_info++;
+ slot_num++;
//pcix bridge
- write_pirq_info(pirq_info, bus_8131_0, (sbdn3<<3)|0, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
- pirq_info++; slot_num++;
-
- if(pci1234[2] & 0xf) {
- //second pci beidge
- write_pirq_info(pirq_info, bus_ck804b_0, ((sbdnb+9)<<3)|0, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0x0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, bus_8131_0, (sbdn3 << 3) | 0, 0x1, 0xdef8,
+ 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
+ pirq_info++;
+ slot_num++;
+
+ if (pci1234[2] & 0xf) {
+ //second pci beidge
+ write_pirq_info(pirq_info, bus_ck804b_0, ((sbdnb + 9) << 3) | 0,
+ 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4,
+ 0xdef8, 0x0, 0);
+ pirq_info++;
+ slot_num++;
}
#if 0
//smbus
- write_pirq_info(pirq_info, bus_ck804_0, ((sbdn+1)<<3)|0, 0x2, 0xdef8, 0, 0, 0, 0, 0, 0, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, bus_ck804_0, ((sbdn + 1) << 3) | 0, 0x2,
+ 0xdef8, 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, 0xdef8, 0x2, 0xdef8, 0, 0, 0, 0, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, bus_ck804_0, ((sbdn + 2) << 3) | 0, 0x1,
+ 0xdef8, 0x2, 0xdef8, 0, 0, 0, 0, 0, 0);
+ pirq_info++;
+ slot_num++;
//audio
- write_pirq_info(pirq_info, bus_ck804_0, ((sbdn+4)<<3)|0, 0x1, 0xdef8, 0, 0, 0, 0, 0, 0, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, bus_ck804_0, ((sbdn + 4) << 3) | 0, 0x1,
+ 0xdef8, 0, 0, 0, 0, 0, 0, 0, 0);
+ pirq_info++;
+ slot_num++;
//sata
- write_pirq_info(pirq_info, bus_ck804_0, ((sbdn+7)<<3)|0, 0x1, 0xdef8, 0, 0, 0, 0, 0, 0, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, bus_ck804_0, ((sbdn + 7) << 3) | 0, 0x1,
+ 0xdef8, 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, 0xdef8, 0, 0, 0, 0, 0, 0, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, bus_ck804_0, ((sbdn + 8) << 3) | 0, 0x1,
+ 0xdef8, 0, 0, 0, 0, 0, 0, 0, 0);
+ pirq_info++;
+ slot_num++;
//nic
- write_pirq_info(pirq_info, bus_ck804_0, ((sbdn+0xa)<<3)|0, 0x1, 0xdef8, 0, 0, 0, 0, 0, 0, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, bus_ck804_0, ((sbdn + 0xa) << 3) | 0, 0x1,
+ 0xdef8, 0, 0, 0, 0, 0, 0, 0, 0);
+ pirq_info++;
+ slot_num++;
//Slot1 PCIE x16
- write_pirq_info(pirq_info, bus_ck804_5, (0<<3)|0, 0x3, 0xdef8, 0x4, 0xdef8, 0x1, 0xdef8, 0x2, 0xdef8, 1, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, bus_ck804_5, (0 << 3) | 0, 0x3, 0xdef8, 0x4,
+ 0xdef8, 0x1, 0xdef8, 0x2, 0xdef8, 1, 0);
+ pirq_info++;
+ slot_num++;
//firewire
- write_pirq_info(pirq_info, bus_ck804_1, (0x5<<3)|0, 0x3, 0xdef8, 0, 0, 0, 0, 0, 0, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, bus_ck804_1, (0x5 << 3) | 0, 0x3, 0xdef8, 0,
+ 0, 0, 0, 0, 0, 0, 0);
+ pirq_info++;
+ slot_num++;
//Slot2 pci
- write_pirq_info(pirq_info, bus_ck804_1, (0x4<<3)|0, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 2, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, bus_ck804_1, (0x4 << 3) | 0, 0x1, 0xdef8,
+ 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 2, 0);
+ pirq_info++;
+ slot_num++;
//nic
- write_pirq_info(pirq_info, bus_ck804b_0, ((sbdnb+0xa)<<3)|0, 0x1, 0xdef8, 0, 0, 0, 0, 0, 0, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, bus_ck804b_0, ((sbdnb + 0xa) << 3) | 0, 0x1,
+ 0xdef8, 0, 0, 0, 0, 0, 0, 0, 0);
+ pirq_info++;
+ slot_num++;
//Slot3 PCIE x16
- write_pirq_info(pirq_info, bus_ck804b_5, (0<<3)|0, 0x3, 0xdef8, 0x4, 0xdef8, 0x1, 0xdef8, 0x2, 0xdef8, 3, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, bus_ck804b_5, (0 << 3) | 0, 0x3, 0xdef8, 0x4,
+ 0xdef8, 0x1, 0xdef8, 0x2, 0xdef8, 3, 0);
+ pirq_info++;
+ slot_num++;
//Slot4 PCIX
- write_pirq_info(pirq_info, bus_8131_2, (4<<3)|0, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 4, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, bus_8131_2, (4 << 3) | 0, 0x1, 0xdef8, 0x2,
+ 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 4, 0);
+ pirq_info++;
+ slot_num++;
//Slot5 PCIX
- write_pirq_info(pirq_info, bus_8131_2, (9<<3)|0, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0x1, 0xdef8, 5, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, bus_8131_2, (9 << 3) | 0, 0x2, 0xdef8, 0x3,
+ 0xdef8, 0x4, 0xdef8, 0x1, 0xdef8, 5, 0);
+ pirq_info++;
+ slot_num++;
//onboard scsi
- write_pirq_info(pirq_info, bus_8131_2, (6<<3)|0, 0x2, 0xdef8, 0x3, 0xdef8, 0, 0, 0, 0, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, bus_8131_2, (6 << 3) | 0, 0x2, 0xdef8, 0x3,
+ 0xdef8, 0, 0, 0, 0, 0, 0);
+ pirq_info++;
+ slot_num++;
//Slot6 PCIX
- write_pirq_info(pirq_info, bus_8131_1, (4<<3)|0, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 6, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, bus_8131_1, (4 << 3) | 0, 0x1, 0xdef8, 0x2,
+ 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 6, 0);
+ pirq_info++;
+ slot_num++;
#endif
pirq->size = 32 + 16 * slot_num;
- for (i = 0; i < pirq->size; i++)
- sum += v[i];
+ for (i = 0; i < pirq->size; i++)
+ sum += v[i];
sum = pirq->checksum - sum;
- if (sum != pirq->checksum) {
- pirq->checksum = sum;
- }
+ if (sum != pirq->checksum) {
+ pirq->checksum = sum;
+ }
printk(BIOS_INFO, "done.\n");
- return (unsigned long) pirq_info;
+ return (unsigned long)pirq_info;
}
diff --git a/src/mainboard/sunw/ultra40m2/irq_tables.c b/src/mainboard/sunw/ultra40m2/irq_tables.c
index 0396812c78..061d276b78 100644
--- a/src/mainboard/sunw/ultra40m2/irq_tables.c
+++ b/src/mainboard/sunw/ultra40m2/irq_tables.c
@@ -24,26 +24,26 @@
#include <cpu/amd/amdk8_sysconf.h>
#include "mb_sysconf.h"
-static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus, uint8_t devfn, uint8_t link0, uint16_t bitmap0,
- uint8_t link1, uint16_t bitmap1, uint8_t link2, uint16_t bitmap2,uint8_t link3, uint16_t bitmap3,
- uint8_t slot, uint8_t rfu)
+static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus,
+ uint8_t devfn, uint8_t link0, uint16_t bitmap0,
+ uint8_t link1, uint16_t bitmap1, uint8_t link2,
+ uint16_t bitmap2, uint8_t link3, uint16_t bitmap3,
+ uint8_t slot, uint8_t rfu)
{
pirq_info->bus = bus;
pirq_info->devfn = devfn;
- pirq_info->irq[0].link = link0;
- pirq_info->irq[0].bitmap = bitmap0;
- pirq_info->irq[1].link = link1;
- pirq_info->irq[1].bitmap = bitmap1;
- pirq_info->irq[2].link = link2;
- pirq_info->irq[2].bitmap = bitmap2;
- pirq_info->irq[3].link = link3;
- pirq_info->irq[3].bitmap = bitmap3;
+ pirq_info->irq[0].link = link0;
+ pirq_info->irq[0].bitmap = bitmap0;
+ pirq_info->irq[1].link = link1;
+ pirq_info->irq[1].bitmap = bitmap1;
+ pirq_info->irq[2].link = link2;
+ pirq_info->irq[2].bitmap = bitmap2;
+ pirq_info->irq[3].link = link3;
+ pirq_info->irq[3].bitmap = bitmap3;
pirq_info->slot = slot;
pirq_info->rfu = rfu;
}
-
-
unsigned long write_pirq_routing_table(unsigned long addr)
{
@@ -54,10 +54,10 @@ unsigned long write_pirq_routing_table(unsigned long addr)
struct mb_sysconf_t *m;
unsigned sbdn;
- uint8_t sum=0;
+ uint8_t sum = 0;
int i;
- get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
+ get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
sbdn = sysconf.sbdn;
m = sysconf.mb;
@@ -69,13 +69,13 @@ unsigned long write_pirq_routing_table(unsigned long addr)
printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);
pirq = (void *)(addr);
- v = (uint8_t *)(addr);
+ v = (uint8_t *) (addr);
pirq->signature = PIRQ_SIGNATURE;
- pirq->version = PIRQ_VERSION;
+ pirq->version = PIRQ_VERSION;
pirq->rtr_bus = m->bus_mcp55;
- pirq->rtr_devfn = ((sbdn+6)<<3)|0;
+ pirq->rtr_devfn = ((sbdn + 6) << 3) | 0;
pirq->exclusive_irqs = 0;
@@ -86,19 +86,24 @@ unsigned long write_pirq_routing_table(unsigned long addr)
memset(pirq->rfu, 0, sizeof(pirq->rfu));
- pirq_info = (void *) ( &pirq->checksum + 1);
+ pirq_info = (void *)(&pirq->checksum + 1);
slot_num = 0;
//pci bridge
- write_pirq_info(pirq_info, m->bus_mcp55, ((sbdn+6)<<3)|0, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, m->bus_mcp55, ((sbdn + 6) << 3) | 0, 0x1,
+ 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
+ pirq_info++;
+ slot_num++;
for (i = 1; i < sysconf.hc_possible_num; i++) {
- if(!(sysconf.pci1234[i] & 0x1) ) continue;
+ if (!(sysconf.pci1234[i] & 0x1))
+ continue;
unsigned busn = (sysconf.pci1234[i] >> 16) & 0xff;
unsigned devn = sysconf.hcdn[i] & 0xff;
- write_pirq_info(pirq_info, busn, (devn<<3)|0, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, busn, (devn << 3) | 0, 0x1, 0xdef8,
+ 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
+ pirq_info++;
+ slot_num++;
}
pirq->size = 32 + 16 * slot_num;
@@ -114,6 +119,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
printk(BIOS_INFO, "done.\n");
- return (unsigned long) pirq_info;
+ return (unsigned long)pirq_info;
}
diff --git a/src/mainboard/supermicro/h8dme/irq_tables.c b/src/mainboard/supermicro/h8dme/irq_tables.c
index b8319b5d2b..2e9bbb8e87 100644
--- a/src/mainboard/supermicro/h8dme/irq_tables.c
+++ b/src/mainboard/supermicro/h8dme/irq_tables.c
@@ -23,27 +23,28 @@
#include <cpu/amd/amdk8_sysconf.h>
-static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus, uint8_t devfn, uint8_t link0, uint16_t bitmap0,
- uint8_t link1, uint16_t bitmap1, uint8_t link2, uint16_t bitmap2,uint8_t link3, uint16_t bitmap3,
- uint8_t slot, uint8_t rfu)
+static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus,
+ uint8_t devfn, uint8_t link0, uint16_t bitmap0,
+ uint8_t link1, uint16_t bitmap1, uint8_t link2,
+ uint16_t bitmap2, uint8_t link3, uint16_t bitmap3,
+ uint8_t slot, uint8_t rfu)
{
- pirq_info->bus = bus;
- pirq_info->devfn = devfn;
- pirq_info->irq[0].link = link0;
- pirq_info->irq[0].bitmap = bitmap0;
- pirq_info->irq[1].link = link1;
- pirq_info->irq[1].bitmap = bitmap1;
- pirq_info->irq[2].link = link2;
- pirq_info->irq[2].bitmap = bitmap2;
- pirq_info->irq[3].link = link3;
- pirq_info->irq[3].bitmap = bitmap3;
- pirq_info->slot = slot;
- pirq_info->rfu = rfu;
+ pirq_info->bus = bus;
+ pirq_info->devfn = devfn;
+ pirq_info->irq[0].link = link0;
+ pirq_info->irq[0].bitmap = bitmap0;
+ pirq_info->irq[1].link = link1;
+ pirq_info->irq[1].bitmap = bitmap1;
+ pirq_info->irq[2].link = link2;
+ pirq_info->irq[2].bitmap = bitmap2;
+ pirq_info->irq[3].link = link3;
+ pirq_info->irq[3].bitmap = bitmap3;
+ pirq_info->slot = slot;
+ pirq_info->rfu = rfu;
}
-extern unsigned char bus_isa;
-extern unsigned char bus_mcp55[8]; //1
-
+extern unsigned char bus_isa;
+extern unsigned char bus_mcp55[8]; //1
unsigned long write_pirq_routing_table(unsigned long addr)
{
@@ -54,27 +55,27 @@ unsigned long write_pirq_routing_table(unsigned long addr)
uint8_t *v;
unsigned sbdn;
- uint8_t sum=0;
- int i;
+ uint8_t sum = 0;
+ int i;
- get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
+ get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
sbdn = sysconf.sbdn;
- /* Align the table to be 16 byte aligned. */
- addr += 15;
- addr &= ~15;
+ /* Align the table to be 16 byte aligned. */
+ addr += 15;
+ addr &= ~15;
- /* This table must be between 0xf0000 & 0x100000 */
- printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);
+ /* This table must be between 0xf0000 & 0x100000 */
+ printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);
pirq = (void *)(addr);
- v = (uint8_t *)(addr);
+ v = (uint8_t *) (addr);
pirq->signature = PIRQ_SIGNATURE;
- pirq->version = PIRQ_VERSION;
+ pirq->version = PIRQ_VERSION;
pirq->rtr_bus = bus_mcp55[0];
- pirq->rtr_devfn = ((sbdn+6)<<3)|0;
+ pirq->rtr_devfn = ((sbdn + 6) << 3) | 0;
pirq->exclusive_irqs = 0;
@@ -85,25 +86,27 @@ unsigned long write_pirq_routing_table(unsigned long addr)
memset(pirq->rfu, 0, sizeof(pirq->rfu));
- pirq_info = (void *) ( &pirq->checksum + 1);
+ pirq_info = (void *)(&pirq->checksum + 1);
slot_num = 0;
//pci bridge
- write_pirq_info(pirq_info, bus_mcp55[0], ((sbdn+6)<<3)|0, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, bus_mcp55[0], ((sbdn + 6) << 3) | 0, 0x1,
+ 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
+ pirq_info++;
+ slot_num++;
pirq->size = 32 + 16 * slot_num;
- for (i = 0; i < pirq->size; i++)
- sum += v[i];
+ for (i = 0; i < pirq->size; i++)
+ sum += v[i];
sum = pirq->checksum - sum;
- if (sum != pirq->checksum) {
- pirq->checksum = sum;
- }
+ if (sum != pirq->checksum) {
+ pirq->checksum = sum;
+ }
printk(BIOS_INFO, "done.\n");
- return (unsigned long) pirq_info;
+ return (unsigned long)pirq_info;
}
diff --git a/src/mainboard/supermicro/h8dmr/irq_tables.c b/src/mainboard/supermicro/h8dmr/irq_tables.c
index b8319b5d2b..2e9bbb8e87 100644
--- a/src/mainboard/supermicro/h8dmr/irq_tables.c
+++ b/src/mainboard/supermicro/h8dmr/irq_tables.c
@@ -23,27 +23,28 @@
#include <cpu/amd/amdk8_sysconf.h>
-static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus, uint8_t devfn, uint8_t link0, uint16_t bitmap0,
- uint8_t link1, uint16_t bitmap1, uint8_t link2, uint16_t bitmap2,uint8_t link3, uint16_t bitmap3,
- uint8_t slot, uint8_t rfu)
+static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus,
+ uint8_t devfn, uint8_t link0, uint16_t bitmap0,
+ uint8_t link1, uint16_t bitmap1, uint8_t link2,
+ uint16_t bitmap2, uint8_t link3, uint16_t bitmap3,
+ uint8_t slot, uint8_t rfu)
{
- pirq_info->bus = bus;
- pirq_info->devfn = devfn;
- pirq_info->irq[0].link = link0;
- pirq_info->irq[0].bitmap = bitmap0;
- pirq_info->irq[1].link = link1;
- pirq_info->irq[1].bitmap = bitmap1;
- pirq_info->irq[2].link = link2;
- pirq_info->irq[2].bitmap = bitmap2;
- pirq_info->irq[3].link = link3;
- pirq_info->irq[3].bitmap = bitmap3;
- pirq_info->slot = slot;
- pirq_info->rfu = rfu;
+ pirq_info->bus = bus;
+ pirq_info->devfn = devfn;
+ pirq_info->irq[0].link = link0;
+ pirq_info->irq[0].bitmap = bitmap0;
+ pirq_info->irq[1].link = link1;
+ pirq_info->irq[1].bitmap = bitmap1;
+ pirq_info->irq[2].link = link2;
+ pirq_info->irq[2].bitmap = bitmap2;
+ pirq_info->irq[3].link = link3;
+ pirq_info->irq[3].bitmap = bitmap3;
+ pirq_info->slot = slot;
+ pirq_info->rfu = rfu;
}
-extern unsigned char bus_isa;
-extern unsigned char bus_mcp55[8]; //1
-
+extern unsigned char bus_isa;
+extern unsigned char bus_mcp55[8]; //1
unsigned long write_pirq_routing_table(unsigned long addr)
{
@@ -54,27 +55,27 @@ unsigned long write_pirq_routing_table(unsigned long addr)
uint8_t *v;
unsigned sbdn;
- uint8_t sum=0;
- int i;
+ uint8_t sum = 0;
+ int i;
- get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
+ get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
sbdn = sysconf.sbdn;
- /* Align the table to be 16 byte aligned. */
- addr += 15;
- addr &= ~15;
+ /* Align the table to be 16 byte aligned. */
+ addr += 15;
+ addr &= ~15;
- /* This table must be between 0xf0000 & 0x100000 */
- printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);
+ /* This table must be between 0xf0000 & 0x100000 */
+ printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);
pirq = (void *)(addr);
- v = (uint8_t *)(addr);
+ v = (uint8_t *) (addr);
pirq->signature = PIRQ_SIGNATURE;
- pirq->version = PIRQ_VERSION;
+ pirq->version = PIRQ_VERSION;
pirq->rtr_bus = bus_mcp55[0];
- pirq->rtr_devfn = ((sbdn+6)<<3)|0;
+ pirq->rtr_devfn = ((sbdn + 6) << 3) | 0;
pirq->exclusive_irqs = 0;
@@ -85,25 +86,27 @@ unsigned long write_pirq_routing_table(unsigned long addr)
memset(pirq->rfu, 0, sizeof(pirq->rfu));
- pirq_info = (void *) ( &pirq->checksum + 1);
+ pirq_info = (void *)(&pirq->checksum + 1);
slot_num = 0;
//pci bridge
- write_pirq_info(pirq_info, bus_mcp55[0], ((sbdn+6)<<3)|0, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, bus_mcp55[0], ((sbdn + 6) << 3) | 0, 0x1,
+ 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
+ pirq_info++;
+ slot_num++;
pirq->size = 32 + 16 * slot_num;
- for (i = 0; i < pirq->size; i++)
- sum += v[i];
+ for (i = 0; i < pirq->size; i++)
+ sum += v[i];
sum = pirq->checksum - sum;
- if (sum != pirq->checksum) {
- pirq->checksum = sum;
- }
+ if (sum != pirq->checksum) {
+ pirq->checksum = sum;
+ }
printk(BIOS_INFO, "done.\n");
- return (unsigned long) pirq_info;
+ return (unsigned long)pirq_info;
}
diff --git a/src/mainboard/supermicro/h8dmr_fam10/irq_tables.c b/src/mainboard/supermicro/h8dmr_fam10/irq_tables.c
index c11707d79a..513fd57c58 100644
--- a/src/mainboard/supermicro/h8dmr_fam10/irq_tables.c
+++ b/src/mainboard/supermicro/h8dmr_fam10/irq_tables.c
@@ -24,26 +24,26 @@
#include <cpu/amd/amdfam10_sysconf.h>
#include "mb_sysconf.h"
-static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus, uint8_t devfn, uint8_t link0, uint16_t bitmap0,
- uint8_t link1, uint16_t bitmap1, uint8_t link2, uint16_t bitmap2,uint8_t link3, uint16_t bitmap3,
- uint8_t slot, uint8_t rfu)
+static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus,
+ uint8_t devfn, uint8_t link0, uint16_t bitmap0,
+ uint8_t link1, uint16_t bitmap1, uint8_t link2,
+ uint16_t bitmap2, uint8_t link3, uint16_t bitmap3,
+ uint8_t slot, uint8_t rfu)
{
pirq_info->bus = bus;
pirq_info->devfn = devfn;
- pirq_info->irq[0].link = link0;
- pirq_info->irq[0].bitmap = bitmap0;
- pirq_info->irq[1].link = link1;
- pirq_info->irq[1].bitmap = bitmap1;
- pirq_info->irq[2].link = link2;
- pirq_info->irq[2].bitmap = bitmap2;
- pirq_info->irq[3].link = link3;
- pirq_info->irq[3].bitmap = bitmap3;
+ pirq_info->irq[0].link = link0;
+ pirq_info->irq[0].bitmap = bitmap0;
+ pirq_info->irq[1].link = link1;
+ pirq_info->irq[1].bitmap = bitmap1;
+ pirq_info->irq[2].link = link2;
+ pirq_info->irq[2].bitmap = bitmap2;
+ pirq_info->irq[3].link = link3;
+ pirq_info->irq[3].bitmap = bitmap3;
pirq_info->slot = slot;
pirq_info->rfu = rfu;
}
-
-
unsigned long write_pirq_routing_table(unsigned long addr)
{
@@ -54,10 +54,10 @@ unsigned long write_pirq_routing_table(unsigned long addr)
struct mb_sysconf_t *m;
unsigned sbdn;
- uint8_t sum=0;
+ uint8_t sum = 0;
int i;
- get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
+ get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
sbdn = sysconf.sbdn;
m = sysconf.mb;
@@ -69,13 +69,13 @@ unsigned long write_pirq_routing_table(unsigned long addr)
printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);
pirq = (void *)(addr);
- v = (uint8_t *)(addr);
+ v = (uint8_t *) (addr);
pirq->signature = PIRQ_SIGNATURE;
- pirq->version = PIRQ_VERSION;
+ pirq->version = PIRQ_VERSION;
pirq->rtr_bus = m->bus_mcp55[0];
- pirq->rtr_devfn = ((sbdn+6)<<3)|0;
+ pirq->rtr_devfn = ((sbdn + 6) << 3) | 0;
pirq->exclusive_irqs = 0;
@@ -86,27 +86,37 @@ unsigned long write_pirq_routing_table(unsigned long addr)
memset(pirq->rfu, 0, sizeof(pirq->rfu));
- pirq_info = (void *) ( &pirq->checksum + 1);
+ 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, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
- pirq_info++; slot_num++;
-
- for(i=1; i< sysconf.hc_possible_num; i++) {
- if(!(sysconf.pci1234[i] & 0x1) ) continue;
+ write_pirq_info(pirq_info, m->bus_mcp55[0], ((sbdn + 6) << 3) | 0, 0x1,
+ 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
+ pirq_info++;
+ slot_num++;
+
+ for (i = 1; i < sysconf.hc_possible_num; i++) {
+ if (!(sysconf.pci1234[i] & 0x1))
+ continue;
unsigned busn = (sysconf.pci1234[i] >> 12) & 0xff;
unsigned devn = sysconf.hcdn[i] & 0xff;
- write_pirq_info(pirq_info, busn, (devn<<3)|0, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, busn, (devn << 3) | 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, 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, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, CONFIG_CBB, (0 << 3) | 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,
+ 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8,
+ 0, 0);
+ pirq_info++;
+ slot_num++;
}
#endif
@@ -123,6 +133,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
printk(BIOS_INFO, "done.\n");
- return (unsigned long) pirq_info;
+ return (unsigned long)pirq_info;
}
diff --git a/src/mainboard/supermicro/h8qgi/irq_tables.c b/src/mainboard/supermicro/h8qgi/irq_tables.c
index bbcea89d4d..a94bc15193 100644
--- a/src/mainboard/supermicro/h8qgi/irq_tables.c
+++ b/src/mainboard/supermicro/h8qgi/irq_tables.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-
#include <console/console.h>
#include <device/pci.h>
#include <string.h>
@@ -21,11 +20,10 @@
#include <arch/pirq_routing.h>
#include <cpu/amd/amdfam10_sysconf.h>
-
static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
- u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
- u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
- u8 slot, u8 rfu)
+ u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
+ u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
+ u8 slot, u8 rfu)
{
pirq_info->bus = bus;
pirq_info->devfn = devfn;
@@ -80,19 +78,14 @@ unsigned long write_pirq_routing_table(unsigned long addr)
pirq_info = (void *)(&pirq->checksum + 1);
slot_num = 0;
-
/* pci bridge */
write_pirq_info(pirq_info, 0, PCI_DEVFN(0x14, 4),
0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0,
0);
pirq_info++;
-
-
slot_num++;
-
-
pirq->size = 32 + 16 * slot_num;
for (i = 0; i < pirq->size; i++)
diff --git a/src/mainboard/supermicro/h8qme_fam10/irq_tables.c b/src/mainboard/supermicro/h8qme_fam10/irq_tables.c
index 459a8b1a90..82023f9b10 100644
--- a/src/mainboard/supermicro/h8qme_fam10/irq_tables.c
+++ b/src/mainboard/supermicro/h8qme_fam10/irq_tables.c
@@ -24,26 +24,26 @@
#include <cpu/amd/amdfam10_sysconf.h>
#include "mb_sysconf.h"
-static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus, uint8_t devfn, uint8_t link0, uint16_t bitmap0,
- uint8_t link1, uint16_t bitmap1, uint8_t link2, uint16_t bitmap2,uint8_t link3, uint16_t bitmap3,
- uint8_t slot, uint8_t rfu)
+static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus,
+ uint8_t devfn, uint8_t link0, uint16_t bitmap0,
+ uint8_t link1, uint16_t bitmap1, uint8_t link2,
+ uint16_t bitmap2, uint8_t link3, uint16_t bitmap3,
+ uint8_t slot, uint8_t rfu)
{
pirq_info->bus = bus;
pirq_info->devfn = devfn;
- pirq_info->irq[0].link = link0;
- pirq_info->irq[0].bitmap = bitmap0;
- pirq_info->irq[1].link = link1;
- pirq_info->irq[1].bitmap = bitmap1;
- pirq_info->irq[2].link = link2;
- pirq_info->irq[2].bitmap = bitmap2;
- pirq_info->irq[3].link = link3;
- pirq_info->irq[3].bitmap = bitmap3;
+ pirq_info->irq[0].link = link0;
+ pirq_info->irq[0].bitmap = bitmap0;
+ pirq_info->irq[1].link = link1;
+ pirq_info->irq[1].bitmap = bitmap1;
+ pirq_info->irq[2].link = link2;
+ pirq_info->irq[2].bitmap = bitmap2;
+ pirq_info->irq[3].link = link3;
+ pirq_info->irq[3].bitmap = bitmap3;
pirq_info->slot = slot;
pirq_info->rfu = rfu;
}
-
-
unsigned long write_pirq_routing_table(unsigned long addr)
{
@@ -54,10 +54,10 @@ unsigned long write_pirq_routing_table(unsigned long addr)
struct mb_sysconf_t *m;
unsigned sbdn;
- uint8_t sum=0;
+ uint8_t sum = 0;
int i;
- get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
+ get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
sbdn = sysconf.sbdn;
m = sysconf.mb;
@@ -69,13 +69,13 @@ unsigned long write_pirq_routing_table(unsigned long addr)
printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);
pirq = (void *)(addr);
- v = (uint8_t *)(addr);
+ v = (uint8_t *) (addr);
pirq->signature = PIRQ_SIGNATURE;
- pirq->version = PIRQ_VERSION;
+ pirq->version = PIRQ_VERSION;
pirq->rtr_bus = m->bus_mcp55[0];
- pirq->rtr_devfn = ((sbdn+6)<<3)|0;
+ pirq->rtr_devfn = ((sbdn + 6) << 3) | 0;
pirq->exclusive_irqs = 0;
@@ -86,27 +86,37 @@ unsigned long write_pirq_routing_table(unsigned long addr)
memset(pirq->rfu, 0, sizeof(pirq->rfu));
- pirq_info = (void *) ( &pirq->checksum + 1);
+ 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, 0x4ca0, 0x2, 0x4ca0, 0x3, 0x4ca0, 0x4, 0x4ca0, 0, 0);
- pirq_info++; slot_num++;
-
- for(i=1; i< sysconf.hc_possible_num; i++) {
- if(!(sysconf.pci1234[i] & 0x1) ) continue;
+ write_pirq_info(pirq_info, m->bus_mcp55[0], ((sbdn + 6) << 3) | 0, 0x1,
+ 0x4ca0, 0x2, 0x4ca0, 0x3, 0x4ca0, 0x4, 0x4ca0, 0, 0);
+ pirq_info++;
+ slot_num++;
+
+ for (i = 1; i < sysconf.hc_possible_num; i++) {
+ if (!(sysconf.pci1234[i] & 0x1))
+ continue;
unsigned busn = (sysconf.pci1234[i] >> 12) & 0xff;
unsigned devn = sysconf.hcdn[i] & 0xff;
- write_pirq_info(pirq_info, busn, (devn<<3)|0, 0x1, 0x4ca0, 0x2, 0x4ca0, 0x3, 0x4ca0, 0x4, 0x4ca0, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, busn, (devn << 3) | 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, 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, 0x4ca0, 0x2, 0x4ca0, 0x3, 0x4ca0, 0x4, 0x4ca0, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, CONFIG_CBB, (0 << 3) | 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,
+ 0x4ca0, 0x2, 0x4ca0, 0x3, 0x4ca0, 0x4, 0x4ca0,
+ 0, 0);
+ pirq_info++;
+ slot_num++;
}
#endif
@@ -123,6 +133,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
printk(BIOS_INFO, "done.\n");
- return (unsigned long) pirq_info;
+ return (unsigned long)pirq_info;
}
diff --git a/src/mainboard/supermicro/h8scm/irq_tables.c b/src/mainboard/supermicro/h8scm/irq_tables.c
index 13df4c39a4..09d8f861bb 100644
--- a/src/mainboard/supermicro/h8scm/irq_tables.c
+++ b/src/mainboard/supermicro/h8scm/irq_tables.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-
#include <console/console.h>
#include <device/pci.h>
#include <string.h>
@@ -21,11 +20,10 @@
#include <arch/pirq_routing.h>
#include <cpu/amd/amdfam10_sysconf.h>
-
static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
- u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
- u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
- u8 slot, u8 rfu)
+ u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
+ u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
+ u8 slot, u8 rfu)
{
pirq_info->bus = bus;
pirq_info->devfn = devfn;
diff --git a/src/mainboard/supermicro/h8scm_fam10/irq_tables.c b/src/mainboard/supermicro/h8scm_fam10/irq_tables.c
index f4bff315d6..73f440ffd6 100644
--- a/src/mainboard/supermicro/h8scm_fam10/irq_tables.c
+++ b/src/mainboard/supermicro/h8scm_fam10/irq_tables.c
@@ -21,8 +21,6 @@
#include <cpu/amd/amdfam10_sysconf.h>
-
-
static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
@@ -41,6 +39,7 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
pirq_info->slot = slot;
pirq_info->rfu = rfu;
}
+
extern u8 bus_isa;
extern u8 bus_rs780[8];
extern u8 bus_sp5100[2];
@@ -87,9 +86,9 @@ unsigned long write_pirq_routing_table(unsigned long addr)
slot_num = 0;
/* pci bridge */
- write_pirq_info(pirq_info, bus_sp5100[0], ((sbdn_sp5100 + 0x14) << 3) | 4,
- 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0,
- 0);
+ write_pirq_info(pirq_info, bus_sp5100[0],
+ ((sbdn_sp5100 + 0x14) << 3) | 4, 0x1, 0xdef8, 0x2,
+ 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
pirq_info++;
slot_num++;
diff --git a/src/mainboard/technexion/tim5690/irq_tables.c b/src/mainboard/technexion/tim5690/irq_tables.c
index f2be994780..4c2a48dff7 100644
--- a/src/mainboard/technexion/tim5690/irq_tables.c
+++ b/src/mainboard/technexion/tim5690/irq_tables.c
@@ -21,8 +21,6 @@
#include <cpu/amd/amdk8_sysconf.h>
-
-
static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
@@ -41,6 +39,7 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
pirq_info->slot = slot;
pirq_info->rfu = rfu;
}
+
extern u8 bus_rs690[8];
extern u8 bus_sb600[2];
extern unsigned long sbdn_sb600;
diff --git a/src/mainboard/technexion/tim8690/irq_tables.c b/src/mainboard/technexion/tim8690/irq_tables.c
index f2be994780..4c2a48dff7 100644
--- a/src/mainboard/technexion/tim8690/irq_tables.c
+++ b/src/mainboard/technexion/tim8690/irq_tables.c
@@ -21,8 +21,6 @@
#include <cpu/amd/amdk8_sysconf.h>
-
-
static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
@@ -41,6 +39,7 @@ static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
pirq_info->slot = slot;
pirq_info->rfu = rfu;
}
+
extern u8 bus_rs690[8];
extern u8 bus_sb600[2];
extern unsigned long sbdn_sb600;
diff --git a/src/mainboard/tyan/s2912/irq_tables.c b/src/mainboard/tyan/s2912/irq_tables.c
index 117aabce3a..1c997d8db2 100644
--- a/src/mainboard/tyan/s2912/irq_tables.c
+++ b/src/mainboard/tyan/s2912/irq_tables.c
@@ -24,26 +24,26 @@
#include <cpu/amd/amdk8_sysconf.h>
#include "mb_sysconf.h"
-static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus, uint8_t devfn, uint8_t link0, uint16_t bitmap0,
- uint8_t link1, uint16_t bitmap1, uint8_t link2, uint16_t bitmap2,uint8_t link3, uint16_t bitmap3,
- uint8_t slot, uint8_t rfu)
+static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus,
+ uint8_t devfn, uint8_t link0, uint16_t bitmap0,
+ uint8_t link1, uint16_t bitmap1, uint8_t link2,
+ uint16_t bitmap2, uint8_t link3, uint16_t bitmap3,
+ uint8_t slot, uint8_t rfu)
{
pirq_info->bus = bus;
pirq_info->devfn = devfn;
- pirq_info->irq[0].link = link0;
- pirq_info->irq[0].bitmap = bitmap0;
- pirq_info->irq[1].link = link1;
- pirq_info->irq[1].bitmap = bitmap1;
- pirq_info->irq[2].link = link2;
- pirq_info->irq[2].bitmap = bitmap2;
- pirq_info->irq[3].link = link3;
- pirq_info->irq[3].bitmap = bitmap3;
+ pirq_info->irq[0].link = link0;
+ pirq_info->irq[0].bitmap = bitmap0;
+ pirq_info->irq[1].link = link1;
+ pirq_info->irq[1].bitmap = bitmap1;
+ pirq_info->irq[2].link = link2;
+ pirq_info->irq[2].bitmap = bitmap2;
+ pirq_info->irq[3].link = link3;
+ pirq_info->irq[3].bitmap = bitmap3;
pirq_info->slot = slot;
pirq_info->rfu = rfu;
}
-
-
unsigned long write_pirq_routing_table(unsigned long addr)
{
@@ -54,10 +54,10 @@ unsigned long write_pirq_routing_table(unsigned long addr)
struct mb_sysconf_t *m;
unsigned sbdn;
- uint8_t sum=0;
+ uint8_t sum = 0;
int i;
- get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
+ get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
sbdn = sysconf.sbdn;
m = sysconf.mb;
@@ -69,13 +69,13 @@ unsigned long write_pirq_routing_table(unsigned long addr)
printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);
pirq = (void *)(addr);
- v = (uint8_t *)(addr);
+ v = (uint8_t *) (addr);
pirq->signature = PIRQ_SIGNATURE;
- pirq->version = PIRQ_VERSION;
+ pirq->version = PIRQ_VERSION;
pirq->rtr_bus = m->bus_mcp55[0];
- pirq->rtr_devfn = ((sbdn+6)<<3)|0;
+ pirq->rtr_devfn = ((sbdn + 6) << 3) | 0;
pirq->exclusive_irqs = 0;
@@ -86,19 +86,24 @@ unsigned long write_pirq_routing_table(unsigned long addr)
memset(pirq->rfu, 0, sizeof(pirq->rfu));
- pirq_info = (void *) ( &pirq->checksum + 1);
+ 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, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
- pirq_info++; slot_num++;
-
- for(i=1; i< sysconf.hc_possible_num; i++) {
- if(!(sysconf.pci1234[i] & 0x1) ) continue;
+ write_pirq_info(pirq_info, m->bus_mcp55[0], ((sbdn + 6) << 3) | 0, 0x1,
+ 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
+ pirq_info++;
+ slot_num++;
+
+ for (i = 1; i < sysconf.hc_possible_num; i++) {
+ if (!(sysconf.pci1234[i] & 0x1))
+ continue;
unsigned busn = (sysconf.pci1234[i] >> 16) & 0xff;
unsigned devn = sysconf.hcdn[i] & 0xff;
- write_pirq_info(pirq_info, busn, (devn<<3)|0, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, busn, (devn << 3) | 0, 0x1, 0xdef8,
+ 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
+ pirq_info++;
+ slot_num++;
}
pirq->size = 32 + 16 * slot_num;
@@ -114,6 +119,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
printk(BIOS_INFO, "done.\n");
- return (unsigned long) pirq_info;
+ return (unsigned long)pirq_info;
}
diff --git a/src/mainboard/tyan/s2912_fam10/irq_tables.c b/src/mainboard/tyan/s2912_fam10/irq_tables.c
index c11707d79a..513fd57c58 100644
--- a/src/mainboard/tyan/s2912_fam10/irq_tables.c
+++ b/src/mainboard/tyan/s2912_fam10/irq_tables.c
@@ -24,26 +24,26 @@
#include <cpu/amd/amdfam10_sysconf.h>
#include "mb_sysconf.h"
-static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus, uint8_t devfn, uint8_t link0, uint16_t bitmap0,
- uint8_t link1, uint16_t bitmap1, uint8_t link2, uint16_t bitmap2,uint8_t link3, uint16_t bitmap3,
- uint8_t slot, uint8_t rfu)
+static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus,
+ uint8_t devfn, uint8_t link0, uint16_t bitmap0,
+ uint8_t link1, uint16_t bitmap1, uint8_t link2,
+ uint16_t bitmap2, uint8_t link3, uint16_t bitmap3,
+ uint8_t slot, uint8_t rfu)
{
pirq_info->bus = bus;
pirq_info->devfn = devfn;
- pirq_info->irq[0].link = link0;
- pirq_info->irq[0].bitmap = bitmap0;
- pirq_info->irq[1].link = link1;
- pirq_info->irq[1].bitmap = bitmap1;
- pirq_info->irq[2].link = link2;
- pirq_info->irq[2].bitmap = bitmap2;
- pirq_info->irq[3].link = link3;
- pirq_info->irq[3].bitmap = bitmap3;
+ pirq_info->irq[0].link = link0;
+ pirq_info->irq[0].bitmap = bitmap0;
+ pirq_info->irq[1].link = link1;
+ pirq_info->irq[1].bitmap = bitmap1;
+ pirq_info->irq[2].link = link2;
+ pirq_info->irq[2].bitmap = bitmap2;
+ pirq_info->irq[3].link = link3;
+ pirq_info->irq[3].bitmap = bitmap3;
pirq_info->slot = slot;
pirq_info->rfu = rfu;
}
-
-
unsigned long write_pirq_routing_table(unsigned long addr)
{
@@ -54,10 +54,10 @@ unsigned long write_pirq_routing_table(unsigned long addr)
struct mb_sysconf_t *m;
unsigned sbdn;
- uint8_t sum=0;
+ uint8_t sum = 0;
int i;
- get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
+ get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
sbdn = sysconf.sbdn;
m = sysconf.mb;
@@ -69,13 +69,13 @@ unsigned long write_pirq_routing_table(unsigned long addr)
printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);
pirq = (void *)(addr);
- v = (uint8_t *)(addr);
+ v = (uint8_t *) (addr);
pirq->signature = PIRQ_SIGNATURE;
- pirq->version = PIRQ_VERSION;
+ pirq->version = PIRQ_VERSION;
pirq->rtr_bus = m->bus_mcp55[0];
- pirq->rtr_devfn = ((sbdn+6)<<3)|0;
+ pirq->rtr_devfn = ((sbdn + 6) << 3) | 0;
pirq->exclusive_irqs = 0;
@@ -86,27 +86,37 @@ unsigned long write_pirq_routing_table(unsigned long addr)
memset(pirq->rfu, 0, sizeof(pirq->rfu));
- pirq_info = (void *) ( &pirq->checksum + 1);
+ 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, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
- pirq_info++; slot_num++;
-
- for(i=1; i< sysconf.hc_possible_num; i++) {
- if(!(sysconf.pci1234[i] & 0x1) ) continue;
+ write_pirq_info(pirq_info, m->bus_mcp55[0], ((sbdn + 6) << 3) | 0, 0x1,
+ 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
+ pirq_info++;
+ slot_num++;
+
+ for (i = 1; i < sysconf.hc_possible_num; i++) {
+ if (!(sysconf.pci1234[i] & 0x1))
+ continue;
unsigned busn = (sysconf.pci1234[i] >> 12) & 0xff;
unsigned devn = sysconf.hcdn[i] & 0xff;
- write_pirq_info(pirq_info, busn, (devn<<3)|0, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, busn, (devn << 3) | 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, 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, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, CONFIG_CBB, (0 << 3) | 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,
+ 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8,
+ 0, 0);
+ pirq_info++;
+ slot_num++;
}
#endif
@@ -123,6 +133,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
printk(BIOS_INFO, "done.\n");
- return (unsigned long) pirq_info;
+ return (unsigned long)pirq_info;
}
diff --git a/src/mainboard/tyan/s8226/irq_tables.c b/src/mainboard/tyan/s8226/irq_tables.c
index bbcea89d4d..a94bc15193 100644
--- a/src/mainboard/tyan/s8226/irq_tables.c
+++ b/src/mainboard/tyan/s8226/irq_tables.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-
#include <console/console.h>
#include <device/pci.h>
#include <string.h>
@@ -21,11 +20,10 @@
#include <arch/pirq_routing.h>
#include <cpu/amd/amdfam10_sysconf.h>
-
static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
- u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
- u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
- u8 slot, u8 rfu)
+ u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
+ u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
+ u8 slot, u8 rfu)
{
pirq_info->bus = bus;
pirq_info->devfn = devfn;
@@ -80,19 +78,14 @@ unsigned long write_pirq_routing_table(unsigned long addr)
pirq_info = (void *)(&pirq->checksum + 1);
slot_num = 0;
-
/* pci bridge */
write_pirq_info(pirq_info, 0, PCI_DEVFN(0x14, 4),
0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0,
0);
pirq_info++;
-
-
slot_num++;
-
-
pirq->size = 32 + 16 * slot_num;
for (i = 0; i < pirq->size; i++)
diff --git a/src/mainboard/winent/mb6047/irq_tables.c b/src/mainboard/winent/mb6047/irq_tables.c
index d03f2c40f8..63e28aa4ca 100644
--- a/src/mainboard/winent/mb6047/irq_tables.c
+++ b/src/mainboard/winent/mb6047/irq_tables.c
@@ -6,30 +6,32 @@
#include <cpu/amd/amdk8_sysconf.h>
-static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus, uint8_t devfn, uint8_t link0, uint16_t bitmap0,
- uint8_t link1, uint16_t bitmap1, uint8_t link2, uint16_t bitmap2,uint8_t link3, uint16_t bitmap3,
- uint8_t slot, uint8_t rfu)
+static void write_pirq_info(struct irq_info *pirq_info, uint8_t bus,
+ uint8_t devfn, uint8_t link0, uint16_t bitmap0,
+ uint8_t link1, uint16_t bitmap1, uint8_t link2,
+ uint16_t bitmap2, uint8_t link3, uint16_t bitmap3,
+ uint8_t slot, uint8_t rfu)
{
pirq_info->bus = bus;
pirq_info->devfn = devfn;
- pirq_info->irq[0].link = link0;
- pirq_info->irq[0].bitmap = bitmap0;
- pirq_info->irq[1].link = link1;
- pirq_info->irq[1].bitmap = bitmap1;
- pirq_info->irq[2].link = link2;
- pirq_info->irq[2].bitmap = bitmap2;
- pirq_info->irq[3].link = link3;
- pirq_info->irq[3].bitmap = bitmap3;
+ pirq_info->irq[0].link = link0;
+ pirq_info->irq[0].bitmap = bitmap0;
+ pirq_info->irq[1].link = link1;
+ pirq_info->irq[1].bitmap = bitmap1;
+ pirq_info->irq[2].link = link2;
+ pirq_info->irq[2].bitmap = bitmap2;
+ pirq_info->irq[3].link = link3;
+ pirq_info->irq[3].bitmap = bitmap3;
pirq_info->slot = slot;
pirq_info->rfu = rfu;
}
-extern unsigned char bus_ck804_0; //1
-extern unsigned char bus_ck804_1; //2
-extern unsigned char bus_ck804_2; //3
-extern unsigned char bus_ck804_3; //4
-extern unsigned char bus_ck804_4; //5
-extern unsigned char bus_ck804_5; //6
+extern unsigned char bus_ck804_0; //1
+extern unsigned char bus_ck804_1; //2
+extern unsigned char bus_ck804_2; //3
+extern unsigned char bus_ck804_3; //4
+extern unsigned char bus_ck804_4; //5
+extern unsigned char bus_ck804_5; //6
unsigned long write_pirq_routing_table(unsigned long addr)
{
@@ -40,10 +42,10 @@ unsigned long write_pirq_routing_table(unsigned long addr)
uint8_t *v;
unsigned sbdn;
- uint8_t sum=0;
+ uint8_t sum = 0;
int i;
- get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
+ get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
sbdn = sysconf.sbdn;
/* Align the table to be 16 byte aligned. */
@@ -54,13 +56,13 @@ unsigned long write_pirq_routing_table(unsigned long addr)
printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);
pirq = (void *)(addr);
- v = (uint8_t *)(addr);
+ v = (uint8_t *) (addr);
pirq->signature = PIRQ_SIGNATURE;
- pirq->version = PIRQ_VERSION;
+ pirq->version = PIRQ_VERSION;
pirq->rtr_bus = bus_ck804_0;
- pirq->rtr_devfn = ((sbdn+9)<<3)|0;
+ pirq->rtr_devfn = ((sbdn + 9) << 3) | 0;
pirq->exclusive_irqs = 0;
@@ -71,45 +73,65 @@ unsigned long write_pirq_routing_table(unsigned long addr)
memset(pirq->rfu, 0, sizeof(pirq->rfu));
- pirq_info = (void *) ( &pirq->checksum + 1);
+ pirq_info = (void *)(&pirq->checksum + 1);
slot_num = 0;
//pci bridge
- write_pirq_info(pirq_info, bus_ck804_0, ((sbdn+9)<<3)|0, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, bus_ck804_0, ((sbdn + 9) << 3) | 0, 0x1,
+ 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0, 0);
+ pirq_info++;
+ slot_num++;
#if 0
//smbus
- write_pirq_info(pirq_info, bus_ck804_0, ((sbdn+1)<<3)|0, 0x2, 0xdef8, 0, 0, 0, 0, 0, 0, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, bus_ck804_0, ((sbdn + 1) << 3) | 0, 0x2,
+ 0xdef8, 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, 0xdef8, 0x2, 0xdef8, 0, 0, 0, 0, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, bus_ck804_0, ((sbdn + 2) << 3) | 0, 0x1,
+ 0xdef8, 0x2, 0xdef8, 0, 0, 0, 0, 0, 0);
+ pirq_info++;
+ slot_num++;
//audio
- write_pirq_info(pirq_info, bus_ck804_0, ((sbdn+4)<<3)|0, 0x1, 0xdef8, 0, 0, 0, 0, 0, 0, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, bus_ck804_0, ((sbdn + 4) << 3) | 0, 0x1,
+ 0xdef8, 0, 0, 0, 0, 0, 0, 0, 0);
+ pirq_info++;
+ slot_num++;
//sata
- write_pirq_info(pirq_info, bus_ck804_0, ((sbdn+7)<<3)|0, 0x1, 0xdef8, 0, 0, 0, 0, 0, 0, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, bus_ck804_0, ((sbdn + 7) << 3) | 0, 0x1,
+ 0xdef8, 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, 0xdef8, 0, 0, 0, 0, 0, 0, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, bus_ck804_0, ((sbdn + 8) << 3) | 0, 0x1,
+ 0xdef8, 0, 0, 0, 0, 0, 0, 0, 0);
+ pirq_info++;
+ slot_num++;
//nic
- write_pirq_info(pirq_info, bus_ck804_0, ((sbdn+0xa)<<3)|0, 0x1, 0xdef8, 0, 0, 0, 0, 0, 0, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, bus_ck804_0, ((sbdn + 0xa) << 3) | 0, 0x1,
+ 0xdef8, 0, 0, 0, 0, 0, 0, 0, 0);
+ pirq_info++;
+ slot_num++;
//Slot1 PCIE x16
- write_pirq_info(pirq_info, bus_ck804_5, (0<<3)|0, 0x3, 0xdef8, 0x4, 0xdef8, 0x1, 0xdef8, 0x2, 0xdef8, 1, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, bus_ck804_5, (0 << 3) | 0, 0x3, 0xdef8, 0x4,
+ 0xdef8, 0x1, 0xdef8, 0x2, 0xdef8, 1, 0);
+ pirq_info++;
+ slot_num++;
//firewire
- write_pirq_info(pirq_info, bus_ck804_1, (0x5<<3)|0, 0x3, 0xdef8, 0, 0, 0, 0, 0, 0, 0, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, bus_ck804_1, (0x5 << 3) | 0, 0x3, 0xdef8, 0,
+ 0, 0, 0, 0, 0, 0, 0);
+ pirq_info++;
+ slot_num++;
//Slot2 pci
- write_pirq_info(pirq_info, bus_ck804_1, (0x4<<3)|0, 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 2, 0);
- pirq_info++; slot_num++;
+ write_pirq_info(pirq_info, bus_ck804_1, (0x4 << 3) | 0, 0x1, 0xdef8,
+ 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 2, 0);
+ pirq_info++;
+ slot_num++;
#endif
pirq->size = 32 + 16 * slot_num;
@@ -125,6 +147,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
printk(BIOS_INFO, "done.\n");
- return (unsigned long) pirq_info;
+ return (unsigned long)pirq_info;
}