diff options
author | Stefan Reinauer <reinauer@chromium.org> | 2012-11-15 15:15:15 -0800 |
---|---|---|
committer | Ronald G. Minnich <rminnich@gmail.com> | 2012-11-16 05:07:28 +0100 |
commit | a47bd91ccaf14626cab51a74b998d93f3d8af18c (patch) | |
tree | df00189f77d9c48dcb6ed918093c11a7a69b4f29 /src/mainboard/asus | |
parent | 56cd70bba2906cb99b84d593d90f7653b0ce1e0b (diff) |
Fix PIRQ routing abstraction
intel_irq_routing_table is a local structure that should not be used
globally, because it might not be there on all mainboards.
Instead, the API has to be corrected to allow passing a PIRQ table in
where needed.
Change-Id: Icf08928b67727a366639b648bf6aac8e1a87e765
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: http://review.coreboot.org/1862
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/mainboard/asus')
-rw-r--r-- | src/mainboard/asus/dsbf/irq_tables.c | 4 | ||||
-rw-r--r-- | src/mainboard/asus/m2v/irq_tables.c | 4 | ||||
-rw-r--r-- | src/mainboard/asus/m4a78-em/irq_tables.c | 4 | ||||
-rw-r--r-- | src/mainboard/asus/m4a785-m/irq_tables.c | 4 | ||||
-rw-r--r-- | src/mainboard/asus/mew-am/irq_tables.c | 4 | ||||
-rw-r--r-- | src/mainboard/asus/mew-vm/irq_tables.c | 4 | ||||
-rw-r--r-- | src/mainboard/asus/p2b-d/irq_tables.c | 4 | ||||
-rw-r--r-- | src/mainboard/asus/p2b-ds/irq_tables.c | 4 | ||||
-rw-r--r-- | src/mainboard/asus/p2b-f/irq_tables.c | 4 | ||||
-rw-r--r-- | src/mainboard/asus/p2b-ls/irq_tables.c | 4 | ||||
-rw-r--r-- | src/mainboard/asus/p2b/irq_tables.c | 4 | ||||
-rw-r--r-- | src/mainboard/asus/p3b-f/irq_tables.c | 4 |
12 files changed, 24 insertions, 24 deletions
diff --git a/src/mainboard/asus/dsbf/irq_tables.c b/src/mainboard/asus/dsbf/irq_tables.c index 84f456a758..6fb5ed9587 100644 --- a/src/mainboard/asus/dsbf/irq_tables.c +++ b/src/mainboard/asus/dsbf/irq_tables.c @@ -20,7 +20,7 @@ #include <arch/pirq_routing.h> -const struct irq_routing_table intel_irq_routing_table = { +static const struct irq_routing_table intel_irq_routing_table = { PIRQ_SIGNATURE, /* u32 signature */ PIRQ_VERSION, /* u16 version */ 32 + 16 * CONFIG_IRQ_SLOT_COUNT, /* Max. number of devices on the bus */ @@ -53,5 +53,5 @@ const struct irq_routing_table intel_irq_routing_table = { unsigned long write_pirq_routing_table(unsigned long addr) { - return copy_pirq_routing_table(addr); + return copy_pirq_routing_table(addr, &intel_irq_routing_table); } diff --git a/src/mainboard/asus/m2v/irq_tables.c b/src/mainboard/asus/m2v/irq_tables.c index 0770f027bd..df50ba8cd4 100644 --- a/src/mainboard/asus/m2v/irq_tables.c +++ b/src/mainboard/asus/m2v/irq_tables.c @@ -43,7 +43,7 @@ #define LNKG 3 #define LNKH 4 -const struct irq_routing_table intel_irq_routing_table = { +static const struct irq_routing_table intel_irq_routing_table = { PIRQ_SIGNATURE, /* u32 signature */ PIRQ_VERSION, /* u16 version */ 32+16*CONFIG_IRQ_SLOT_COUNT, /* there can be total CONFIG_IRQ_SLOT_COUNT devices on the bus */ @@ -87,5 +87,5 @@ const struct irq_routing_table intel_irq_routing_table = { unsigned long write_pirq_routing_table(unsigned long addr) { - return copy_pirq_routing_table(addr); + return copy_pirq_routing_table(addr, &intel_irq_routing_table); } diff --git a/src/mainboard/asus/m4a78-em/irq_tables.c b/src/mainboard/asus/m4a78-em/irq_tables.c index 3e62f0c1db..6beaa946e4 100644 --- a/src/mainboard/asus/m4a78-em/irq_tables.c +++ b/src/mainboard/asus/m4a78-em/irq_tables.c @@ -20,7 +20,7 @@ #include <arch/pirq_routing.h> -const struct irq_routing_table intel_irq_routing_table = { +static const struct irq_routing_table intel_irq_routing_table = { PIRQ_SIGNATURE, /* u32 signature */ PIRQ_VERSION, /* u16 version */ 32 + 16 * CONFIG_IRQ_SLOT_COUNT, /* Max. number of devices on the bus */ @@ -60,5 +60,5 @@ const struct irq_routing_table intel_irq_routing_table = { unsigned long write_pirq_routing_table(unsigned long addr) { - return copy_pirq_routing_table(addr); + return copy_pirq_routing_table(addr, &intel_irq_routing_table); } diff --git a/src/mainboard/asus/m4a785-m/irq_tables.c b/src/mainboard/asus/m4a785-m/irq_tables.c index 4edeec11b4..00905eef0c 100644 --- a/src/mainboard/asus/m4a785-m/irq_tables.c +++ b/src/mainboard/asus/m4a785-m/irq_tables.c @@ -20,7 +20,7 @@ #include <arch/pirq_routing.h> -const struct irq_routing_table intel_irq_routing_table = { +static const struct irq_routing_table intel_irq_routing_table = { PIRQ_SIGNATURE, /* u32 signature */ PIRQ_VERSION, /* u16 version */ 32 + 16 * CONFIG_IRQ_SLOT_COUNT, /* Max. number of devices on the bus */ @@ -61,5 +61,5 @@ const struct irq_routing_table intel_irq_routing_table = { unsigned long write_pirq_routing_table(unsigned long addr) { - return copy_pirq_routing_table(addr); + return copy_pirq_routing_table(addr, &intel_irq_routing_table); } diff --git a/src/mainboard/asus/mew-am/irq_tables.c b/src/mainboard/asus/mew-am/irq_tables.c index c00b951fbd..e8efa471da 100644 --- a/src/mainboard/asus/mew-am/irq_tables.c +++ b/src/mainboard/asus/mew-am/irq_tables.c @@ -20,7 +20,7 @@ #include <arch/pirq_routing.h> -const struct irq_routing_table intel_irq_routing_table = { +static const struct irq_routing_table intel_irq_routing_table = { PIRQ_SIGNATURE, PIRQ_VERSION, 32 + 16 * CONFIG_IRQ_SLOT_COUNT,/* Max. number of devices on the bus */ @@ -47,5 +47,5 @@ const struct irq_routing_table intel_irq_routing_table = { unsigned long write_pirq_routing_table(unsigned long addr) { - return copy_pirq_routing_table(addr); + return copy_pirq_routing_table(addr, &intel_irq_routing_table); } diff --git a/src/mainboard/asus/mew-vm/irq_tables.c b/src/mainboard/asus/mew-vm/irq_tables.c index 212765b3df..4fbf122f20 100644 --- a/src/mainboard/asus/mew-vm/irq_tables.c +++ b/src/mainboard/asus/mew-vm/irq_tables.c @@ -7,7 +7,7 @@ #include <arch/pirq_routing.h> -const struct irq_routing_table intel_irq_routing_table = { +static const struct irq_routing_table intel_irq_routing_table = { PIRQ_SIGNATURE, /* u32 signature */ PIRQ_VERSION, /* u16 version */ 32+16*CONFIG_IRQ_SLOT_COUNT, /* there can be total CONFIG_IRQ_SLOT_COUNT devices on the bus */ @@ -38,5 +38,5 @@ that would give 0 after the sum of all bytes for this structure (including check unsigned long write_pirq_routing_table(unsigned long addr) { - return copy_pirq_routing_table(addr); + return copy_pirq_routing_table(addr, &intel_irq_routing_table); } diff --git a/src/mainboard/asus/p2b-d/irq_tables.c b/src/mainboard/asus/p2b-d/irq_tables.c index 26ec751a15..2175e636d7 100644 --- a/src/mainboard/asus/p2b-d/irq_tables.c +++ b/src/mainboard/asus/p2b-d/irq_tables.c @@ -20,7 +20,7 @@ #include <arch/pirq_routing.h> -const struct irq_routing_table intel_irq_routing_table = { +static const struct irq_routing_table intel_irq_routing_table = { PIRQ_SIGNATURE, PIRQ_VERSION, 32 + 16 * CONFIG_IRQ_SLOT_COUNT,/* Max. number of devices on the bus */ @@ -45,5 +45,5 @@ const struct irq_routing_table intel_irq_routing_table = { unsigned long write_pirq_routing_table(unsigned long addr) { - return copy_pirq_routing_table(addr); + return copy_pirq_routing_table(addr, &intel_irq_routing_table); } diff --git a/src/mainboard/asus/p2b-ds/irq_tables.c b/src/mainboard/asus/p2b-ds/irq_tables.c index 5f611c04b2..89720c9eea 100644 --- a/src/mainboard/asus/p2b-ds/irq_tables.c +++ b/src/mainboard/asus/p2b-ds/irq_tables.c @@ -20,7 +20,7 @@ #include <arch/pirq_routing.h> -const struct irq_routing_table intel_irq_routing_table = { +static const struct irq_routing_table intel_irq_routing_table = { PIRQ_SIGNATURE, PIRQ_VERSION, 32 + 16 * CONFIG_IRQ_SLOT_COUNT,/* Max. number of devices on the bus */ @@ -46,5 +46,5 @@ const struct irq_routing_table intel_irq_routing_table = { unsigned long write_pirq_routing_table(unsigned long addr) { - return copy_pirq_routing_table(addr); + return copy_pirq_routing_table(addr, &intel_irq_routing_table); } diff --git a/src/mainboard/asus/p2b-f/irq_tables.c b/src/mainboard/asus/p2b-f/irq_tables.c index a8cd9c14d8..5c588391cd 100644 --- a/src/mainboard/asus/p2b-f/irq_tables.c +++ b/src/mainboard/asus/p2b-f/irq_tables.c @@ -20,7 +20,7 @@ #include <arch/pirq_routing.h> -const struct irq_routing_table intel_irq_routing_table = { +static const struct irq_routing_table intel_irq_routing_table = { PIRQ_SIGNATURE, PIRQ_VERSION, 32 + 16 * CONFIG_IRQ_SLOT_COUNT,/* Max. number of devices on the bus */ @@ -46,5 +46,5 @@ const struct irq_routing_table intel_irq_routing_table = { unsigned long write_pirq_routing_table(unsigned long addr) { - return copy_pirq_routing_table(addr); + return copy_pirq_routing_table(addr, &intel_irq_routing_table); } diff --git a/src/mainboard/asus/p2b-ls/irq_tables.c b/src/mainboard/asus/p2b-ls/irq_tables.c index 369bc6b9e0..0a1995f2ca 100644 --- a/src/mainboard/asus/p2b-ls/irq_tables.c +++ b/src/mainboard/asus/p2b-ls/irq_tables.c @@ -20,7 +20,7 @@ #include <arch/pirq_routing.h> -const struct irq_routing_table intel_irq_routing_table = { +static const struct irq_routing_table intel_irq_routing_table = { PIRQ_SIGNATURE, PIRQ_VERSION, 32 + 16 * CONFIG_IRQ_SLOT_COUNT,/* Max. number of devices on the bus */ @@ -50,5 +50,5 @@ const struct irq_routing_table intel_irq_routing_table = { unsigned long write_pirq_routing_table(unsigned long addr) { - return copy_pirq_routing_table(addr); + return copy_pirq_routing_table(addr, &intel_irq_routing_table); } diff --git a/src/mainboard/asus/p2b/irq_tables.c b/src/mainboard/asus/p2b/irq_tables.c index 9c1befee4d..2710095c59 100644 --- a/src/mainboard/asus/p2b/irq_tables.c +++ b/src/mainboard/asus/p2b/irq_tables.c @@ -20,7 +20,7 @@ #include <arch/pirq_routing.h> -const struct irq_routing_table intel_irq_routing_table = { +static const struct irq_routing_table intel_irq_routing_table = { PIRQ_SIGNATURE, PIRQ_VERSION, 32 + 16 * CONFIG_IRQ_SLOT_COUNT,/* Max. number of devices on the bus */ @@ -45,5 +45,5 @@ const struct irq_routing_table intel_irq_routing_table = { unsigned long write_pirq_routing_table(unsigned long addr) { - return copy_pirq_routing_table(addr); + return copy_pirq_routing_table(addr, &intel_irq_routing_table); } diff --git a/src/mainboard/asus/p3b-f/irq_tables.c b/src/mainboard/asus/p3b-f/irq_tables.c index 6e82f52587..9fc4b06c7b 100644 --- a/src/mainboard/asus/p3b-f/irq_tables.c +++ b/src/mainboard/asus/p3b-f/irq_tables.c @@ -20,7 +20,7 @@ #include <arch/pirq_routing.h> -const struct irq_routing_table intel_irq_routing_table = { +static const struct irq_routing_table intel_irq_routing_table = { PIRQ_SIGNATURE, PIRQ_VERSION, 32 + 16 * CONFIG_IRQ_SLOT_COUNT,/* Max. number of devices on the bus */ @@ -47,5 +47,5 @@ const struct irq_routing_table intel_irq_routing_table = { unsigned long write_pirq_routing_table(unsigned long addr) { - return copy_pirq_routing_table(addr); + return copy_pirq_routing_table(addr, &intel_irq_routing_table); } |