diff options
author | Patrick Georgi <patrick.georgi@coresystems.de> | 2010-05-20 15:28:19 +0000 |
---|---|---|
committer | Patrick Georgi <patrick.georgi@coresystems.de> | 2010-05-20 15:28:19 +0000 |
commit | c5b87c8f895502b235e1619a23bd89dda955000e (patch) | |
tree | fba8dab93f0888a4254f31fb1309a1b924fb45b3 /src/mainboard/amd | |
parent | 1a169d2a46047e72e34977b74884b8d9d250f124 (diff) | |
download | coreboot-c5b87c8f895502b235e1619a23bd89dda955000e.tar.xz |
Move generation of mptable entries for ISA to generic code.
Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Myles Watson <mylesgw@gmail.com>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5575 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/mainboard/amd')
-rw-r--r-- | src/mainboard/amd/dbm690t/mptable.c | 18 | ||||
-rw-r--r-- | src/mainboard/amd/mahogany/mptable.c | 18 | ||||
-rw-r--r-- | src/mainboard/amd/mahogany_fam10/mptable.c | 18 | ||||
-rw-r--r-- | src/mainboard/amd/pistachio/mptable.c | 18 | ||||
-rw-r--r-- | src/mainboard/amd/serengeti_cheetah/mptable.c | 16 | ||||
-rw-r--r-- | src/mainboard/amd/serengeti_cheetah_fam10/mptable.c | 16 | ||||
-rw-r--r-- | src/mainboard/amd/tilapia_fam10/mptable.c | 18 |
7 files changed, 9 insertions, 113 deletions
diff --git a/src/mainboard/amd/dbm690t/mptable.c b/src/mainboard/amd/dbm690t/mptable.c index 43adaeaec6..daf7f0c9b5 100644 --- a/src/mainboard/amd/dbm690t/mptable.c +++ b/src/mainboard/amd/dbm690t/mptable.c @@ -121,23 +121,7 @@ static void *smp_write_config_table(void *v) #define IO_LOCAL_INT(type, intr, apicid, pin) \ smp_write_intsrc(mc, (type), MP_IRQ_TRIGGER_EDGE | MP_IRQ_POLARITY_HIGH, bus_isa, (intr), (apicid), (pin)); - IO_LOCAL_INT(mp_ExtINT, 0x0, apicid_sb600, 0x0); - - /* ISA ints are edge-triggered, and usually originate from the ISA bus, - * or its remainings. - */ -#define ISA_INT(intr, pin) \ - smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, bus_isa, (intr), apicid_sb600, (pin)) - - ISA_INT(0x1, 0x1); - ISA_INT(0x0, 0x2); - ISA_INT(0x3, 0x3); - ISA_INT(0x4, 0x4); - ISA_INT(0x6, 0x6); - ISA_INT(0x7, 0x7); - ISA_INT(0xc, 0xc); - ISA_INT(0xd, 0xd); - ISA_INT(0xe, 0xe); + mptable_add_isa_interrupts(mc, bus_isa, apicid_sb600, 0); /* PCI interrupts are level triggered, and are * associated with a specific bus/device/function tuple. diff --git a/src/mainboard/amd/mahogany/mptable.c b/src/mainboard/amd/mahogany/mptable.c index e2ab5abd8c..fee3080ec6 100644 --- a/src/mainboard/amd/mahogany/mptable.c +++ b/src/mainboard/amd/mahogany/mptable.c @@ -122,23 +122,7 @@ static void *smp_write_config_table(void *v) #define IO_LOCAL_INT(type, intr, apicid, pin) \ smp_write_intsrc(mc, (type), MP_IRQ_TRIGGER_EDGE | MP_IRQ_POLARITY_HIGH, bus_isa, (intr), (apicid), (pin)); - IO_LOCAL_INT(mp_ExtINT, 0x0, apicid_sb700, 0x0); - - /* ISA ints are edge-triggered, and usually originate from the ISA bus, - * or its remainings. - */ -#define ISA_INT(intr, pin) \ - smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, bus_isa, (intr), apicid_sb700, (pin)) - - ISA_INT(0x1, 0x1); - ISA_INT(0x0, 0x2); - ISA_INT(0x3, 0x3); - ISA_INT(0x4, 0x4); - ISA_INT(0x6, 0x6); - ISA_INT(0x7, 0x7); - ISA_INT(0xc, 0xc); - ISA_INT(0xd, 0xd); - ISA_INT(0xe, 0xe); + mptable_add_isa_interrupts(mc, bus_isa, apicid_sb700, 0); /* PCI interrupts are level triggered, and are * associated with a specific bus/device/function tuple. diff --git a/src/mainboard/amd/mahogany_fam10/mptable.c b/src/mainboard/amd/mahogany_fam10/mptable.c index 1e3b629d08..62e08f012e 100644 --- a/src/mainboard/amd/mahogany_fam10/mptable.c +++ b/src/mainboard/amd/mahogany_fam10/mptable.c @@ -122,23 +122,7 @@ static void *smp_write_config_table(void *v) #define IO_LOCAL_INT(type, intr, apicid, pin) \ smp_write_intsrc(mc, (type), MP_IRQ_TRIGGER_EDGE | MP_IRQ_POLARITY_HIGH, bus_isa, (intr), (apicid), (pin)); - IO_LOCAL_INT(mp_ExtINT, 0x0, apicid_sb700, 0x0); - - /* ISA ints are edge-triggered, and usually originate from the ISA bus, - * or its remainings. - */ -#define ISA_INT(intr, pin) \ - smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, bus_isa, (intr), apicid_sb700, (pin)) - - ISA_INT(0x1, 0x1); - ISA_INT(0x0, 0x2); - ISA_INT(0x3, 0x3); - ISA_INT(0x4, 0x4); - ISA_INT(0x6, 0x6); - ISA_INT(0x7, 0x7); - ISA_INT(0xc, 0xc); - ISA_INT(0xd, 0xd); - ISA_INT(0xe, 0xe); + mptable_add_isa_interrupts(mc, bus_isa, apicid_sb700, 0); /* PCI interrupts are level triggered, and are * associated with a specific bus/device/function tuple. diff --git a/src/mainboard/amd/pistachio/mptable.c b/src/mainboard/amd/pistachio/mptable.c index 64ce66eff6..6b757c18b4 100644 --- a/src/mainboard/amd/pistachio/mptable.c +++ b/src/mainboard/amd/pistachio/mptable.c @@ -121,23 +121,7 @@ static void *smp_write_config_table(void *v) #define IO_LOCAL_INT(type, intr, apicid, pin) \ smp_write_intsrc(mc, (type), MP_IRQ_TRIGGER_EDGE | MP_IRQ_POLARITY_HIGH, bus_isa, (intr), (apicid), (pin)); - IO_LOCAL_INT(mp_ExtINT, 0x0, apicid_sb600, 0x0); - - /* ISA ints are edge-triggered, and usually originate from the ISA bus, - * or its remainings. - */ -#define ISA_INT(intr, pin) \ - smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, bus_isa, (intr), apicid_sb600, (pin)) - - ISA_INT(0x1, 0x1); - ISA_INT(0x0, 0x2); - ISA_INT(0x3, 0x3); - ISA_INT(0x4, 0x4); - ISA_INT(0x6, 0x6); - ISA_INT(0x7, 0x7); - ISA_INT(0xc, 0xc); - ISA_INT(0xd, 0xd); - ISA_INT(0xe, 0xe); + mptable_add_isa_interrupts(mc, bus_isa, apicid_sb600, 0); /* PCI interrupts are level triggered, and are * associated with a specific bus/device/function tuple. diff --git a/src/mainboard/amd/serengeti_cheetah/mptable.c b/src/mainboard/amd/serengeti_cheetah/mptable.c index fe2f9440e2..8541ff4cdf 100644 --- a/src/mainboard/amd/serengeti_cheetah/mptable.c +++ b/src/mainboard/amd/serengeti_cheetah/mptable.c @@ -102,21 +102,9 @@ static void *smp_write_config_table(void *v) } + mptable_add_isa_interrupts(mc, m->bus_isa, m->apicid_8111, 0); + /*I/O Ints: Type Polarity Trigger Bus ID IRQ APIC ID PIN# */ - smp_write_intsrc(mc, mp_ExtINT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, m->bus_isa, 0x0, m->apicid_8111, 0x0); - smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, m->bus_isa, 0x1, m->apicid_8111, 0x1); - smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, m->bus_isa, 0x0, m->apicid_8111, 0x2); - smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, m->bus_isa, 0x3, m->apicid_8111, 0x3); - smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, m->bus_isa, 0x4, m->apicid_8111, 0x4); - smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, m->bus_isa, 0x5, m->apicid_8111, 0x5); - smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, m->bus_isa, 0x6, m->apicid_8111, 0x6); - smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, m->bus_isa, 0x7, m->apicid_8111, 0x7); - smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, m->bus_isa, 0x8, m->apicid_8111, 0x8); - smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, m->bus_isa, 0x9, m->apicid_8111, 0x9); - smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, m->bus_isa, 0xc, m->apicid_8111, 0xc); - smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, m->bus_isa, 0xd, m->apicid_8111, 0xd); - smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, m->bus_isa, 0xe, m->apicid_8111, 0xe); - smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, m->bus_isa, 0xf, m->apicid_8111, 0xf); //??? What smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_LEVEL|MP_IRQ_POLARITY_LOW, m->bus_8111_0, ((sysconf.sbdn+1)<<2)|3, m->apicid_8111, 0x13); diff --git a/src/mainboard/amd/serengeti_cheetah_fam10/mptable.c b/src/mainboard/amd/serengeti_cheetah_fam10/mptable.c index b10ffe2cf5..c0a4d8a0b3 100644 --- a/src/mainboard/amd/serengeti_cheetah_fam10/mptable.c +++ b/src/mainboard/amd/serengeti_cheetah_fam10/mptable.c @@ -122,21 +122,9 @@ static void *smp_write_config_table(void *v) } + mptable_add_isa_interrupts(mc, m->bus_isa, m->apicid_8111, 0); + /* I/O Ints: Type Polarity Trigger Bus ID IRQ APIC ID PIN#*/ - smp_write_intsrc(mc, mp_ExtINT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, m->bus_isa, 0x0, m->apicid_8111, 0x0); - smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, m->bus_isa, 0x1, m->apicid_8111, 0x1); - smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, m->bus_isa, 0x0, m->apicid_8111, 0x2); - smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, m->bus_isa, 0x3, m->apicid_8111, 0x3); - smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, m->bus_isa, 0x4, m->apicid_8111, 0x4); - smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, m->bus_isa, 0x5, m->apicid_8111, 0x5); - smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, m->bus_isa, 0x6, m->apicid_8111, 0x6); - smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, m->bus_isa, 0x7, m->apicid_8111, 0x7); - smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, m->bus_isa, 0x8, m->apicid_8111, 0x8); - smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, m->bus_isa, 0x9, m->apicid_8111, 0x9); - smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, m->bus_isa, 0xc, m->apicid_8111, 0xc); - smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, m->bus_isa, 0xd, m->apicid_8111, 0xd); - smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, m->bus_isa, 0xe, m->apicid_8111, 0xe); - smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, m->bus_isa, 0xf, m->apicid_8111, 0xf); //??? What smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_LEVEL|MP_IRQ_POLARITY_LOW, m->bus_8111_0, ((sysconf.sbdn+1)<<2)|3, m->apicid_8111, 0x13); diff --git a/src/mainboard/amd/tilapia_fam10/mptable.c b/src/mainboard/amd/tilapia_fam10/mptable.c index 758513a89b..9232973746 100644 --- a/src/mainboard/amd/tilapia_fam10/mptable.c +++ b/src/mainboard/amd/tilapia_fam10/mptable.c @@ -122,23 +122,7 @@ static void *smp_write_config_table(void *v) #define IO_LOCAL_INT(type, intr, apicid, pin) \ smp_write_intsrc(mc, (type), MP_IRQ_TRIGGER_EDGE | MP_IRQ_POLARITY_HIGH, bus_isa, (intr), (apicid), (pin)); - IO_LOCAL_INT(mp_ExtINT, 0x0, apicid_sb700, 0x0); - - /* ISA ints are edge-triggered, and usually originate from the ISA bus, - * or its remainings. - */ -#define ISA_INT(intr, pin) \ - smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, bus_isa, (intr), apicid_sb700, (pin)) - - ISA_INT(0x1, 0x1); - ISA_INT(0x0, 0x2); - ISA_INT(0x3, 0x3); - ISA_INT(0x4, 0x4); - ISA_INT(0x6, 0x6); - ISA_INT(0x7, 0x7); - ISA_INT(0xc, 0xc); - ISA_INT(0xd, 0xd); - ISA_INT(0xe, 0xe); + mptable_add_isa_interrupts(mc, bus_isa, apicid_sb700, 0); /* PCI interrupts are level triggered, and are * associated with a specific bus/device/function tuple. |