From 2ab88d1179d46e4e5242286b59ee8519fa79bb05 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Sat, 24 Apr 2004 23:01:33 +0000 Subject: Major merge of YhLu's code from 2004/04/20: add s2875, various other updates, cleanups. Drop "driver" code from mainboard directories and use them from the driver directory instead git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1534 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/mainboard/tyan/s2881/Config.lb | 67 ++++++++++++++++++----------------- src/mainboard/tyan/s2881/auto.c | 14 ++++---- src/mainboard/tyan/s2881/irq_tables.c | 2 +- src/mainboard/tyan/s2881/mainboard.c | 9 +++-- src/mainboard/tyan/s2881/mptable.c | 2 +- 5 files changed, 47 insertions(+), 47 deletions(-) (limited to 'src/mainboard/tyan/s2881') diff --git a/src/mainboard/tyan/s2881/Config.lb b/src/mainboard/tyan/s2881/Config.lb index 786391095a..a82d0b0fe6 100644 --- a/src/mainboard/tyan/s2881/Config.lb +++ b/src/mainboard/tyan/s2881/Config.lb @@ -37,7 +37,8 @@ driver mainboard.o #driver adaptec_scsi.o #driver si_sata.o #driver intel_nic.o -#driver broadcom_nic.o +#dir ../drivers/broadcom_nic_ipmi +dir ../drivers/ati_graph #object reset.o if HAVE_MP_TABLE object mptable.o end if HAVE_PIRQ_TABLE object irq_tables.o end @@ -117,9 +118,6 @@ mainboardinit cpu/i386/bist32_fail.inc ### ### Romcc output ### -#makerule ./failover.E dep "$(MAINBOARD)/failover.c" act "$(CPP) -I$(TOP)/src $(CPPFLAGS) $(MAINBOARD)/failover.c > ./failever.E" -#makerule ./failover.inc dep "./romcc ./failover.E" act "./romcc -O ./failover.E > failover.inc" -#mainboardinit .failover.inc makerule ./failover.E depends "$(MAINBOARD)/failover.c" @@ -128,7 +126,7 @@ end makerule ./failover.inc depends "./romcc ./failover.E" - action "./romcc -O -o failover.inc --label-prefix=failover ./failover.E"end + action "./romcc -O2 -o failover.inc --label-prefix=failover ./failover.E"end makerule ./auto.E depends "$(MAINBOARD)/auto.c option_table.h" @@ -136,8 +134,7 @@ makerule ./auto.E end makerule ./auto.inc depends "./romcc ./auto.E" - action "./romcc -O -mcpu=k8 -o auto.inc --label-prefix=auto ./auto.E" -# action "./romcc -mcpu=k8 -O ./auto.E > auto.inc" + action "./romcc -O2 -mcpu=k8 -o auto.inc --label-prefix=auto ./auto.E" end mainboardinit cpu/k8/enable_mmx_sse.inc mainboardinit ./auto.inc @@ -146,6 +143,9 @@ mainboardinit cpu/k8/disable_mmx_sse.inc ### ### Include the secondary Configuration files ### + +dir /pc80 + northbridge amd/amdk8 "mc0" pci 0:18.0 pci 0:18.0 @@ -171,31 +171,33 @@ northbridge amd/amdk8 "mc0" pci 1:0.1 on pci 1:0.2 on pci 1:1.0 off - superio winbond/w83627hf link 1 - pnp 2e.0 off # Floppy - io 0x60 = 0x3f0 - irq 0x70 = 6 - drq 0x74 = 2 - pnp 2e.1 off # Parallel Port - io 0x60 = 0x378 - irq 0x70 = 7 - pnp 2e.2 on # Com1 - io 0x60 = 0x3f8 - irq 0x70 = 4 - pnp 2e.3 off # Com2 - io 0x60 = 0x2f8 - irq 0x70 = 3 - pnp 2e.5 on # Keyboard - io 0x60 = 0x60 - io 0x62 = 0x64 - irq 0x70 = 1 - pnp 2e.6 off # CIR - pnp 2e.7 off # GAME_MIDI_GIPO1 - pnp 2e.8 off # GPIO2 - pnp 2e.9 off # GPIO3 - pnp 2e.a off # ACPI - pnp 2e.b off # HW Monitor - end +# superio winbond/w83627hf link 1 +# pnp 2e.0 on # Floppy +# io 0x60 = 0x3f0 +# irq 0x70 = 6 +# drq 0x74 = 2 +# pnp 2e.1 off # Parallel Port +# io 0x60 = 0x378 +# irq 0x70 = 7 +# pnp 2e.2 on # Com1 +# io 0x60 = 0x3f8 +# irq 0x70 = 4 +# pnp 2e.3 off # Com2 +# io 0x60 = 0x2f8 +# irq 0x70 = 3 +# pnp 2e.5 on # Keyboard +# io 0x60 = 0x60 +# io 0x62 = 0x64 +# irq 0x70 = 1 +# irq 0x72 = 12 +# pnp 2e.6 off # CIR +# pnp 2e.7 off # GAME_MIDI_GIPO1 +# pnp 2e.8 off # GPIO2 +# pnp 2e.9 off # GPIO3 +# pnp 2e.a off # ACPI +# pnp 2e.b on # HW Monitor +# io 0x60 = 0x290 +# end end end @@ -209,7 +211,6 @@ northbridge amd/amdk8 "mc1" end -dir /pc80 #dir /bioscall cpu k8 "cpu0" register "up" = "{.chip = &amd8131, .ht_width=16, .ht_speed=600}" diff --git a/src/mainboard/tyan/s2881/auto.c b/src/mainboard/tyan/s2881/auto.c index d23e4a69b2..41dce71397 100644 --- a/src/mainboard/tyan/s2881/auto.c +++ b/src/mainboard/tyan/s2881/auto.c @@ -39,24 +39,24 @@ static void soft_reset(void) pci_write_config8(PCI_DEV(0, 0x04, 0), 0x47, 1); } -#define REV_B_RESET 0 static void memreset_setup(void) { -#if REV_B_RESET==1 + if (is_cpu_pre_c0()) { outb((0 << 7)|(0 << 6)|(0<<5)|(0<<4)|(1<<2)|(0<<0), SMBUS_IO_BASE + 0xc0 + 16); //REVC_MEMRST_EN=0 -#else + } + else { outb((0 << 7)|(0 << 6)|(0<<5)|(0<<4)|(1<<2)|(1<<0), SMBUS_IO_BASE + 0xc0 + 16); //REVC_MEMRST_EN=1 -#endif + } outb((0 << 7)|(0 << 6)|(0<<5)|(0<<4)|(1<<2)|(0<<0), SMBUS_IO_BASE + 0xc0 + 17); } static void memreset(int controllers, const struct mem_controller *ctrl) { + if (is_cpu_pre_c0()) { udelay(800); -#if REV_B_RESET==1 outb((0<<7)|(0<<6)|(0<<5)|(0<<4)|(1<<2)|(1<<0), SMBUS_IO_BASE + 0xc0 + 17); //REVB_MEMRST_L=1 -#endif udelay(90); + } } static unsigned int generate_row(uint8_t node, uint8_t row, uint8_t maxnodes) @@ -165,7 +165,7 @@ static void main(void) needs_reset = setup_coherent_ht_domain(); needs_reset |= ht_setup_chain(PCI_DEV(0, 0x18, 0), 0xc0); if (needs_reset) { - print_info("ht reset -\r\t"); + print_info("ht reset -\r\n"); soft_reset(); } diff --git a/src/mainboard/tyan/s2881/irq_tables.c b/src/mainboard/tyan/s2881/irq_tables.c index 1dd342f373..37c5df677e 100644 --- a/src/mainboard/tyan/s2881/irq_tables.c +++ b/src/mainboard/tyan/s2881/irq_tables.c @@ -18,7 +18,7 @@ const struct irq_routing_table intel_irq_routing_table = { 0x746b, /* Device */ 0, /* Crap (miniport) */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* u8 rfu[11] */ - 0x3d, /* u8 checksum , this hase to set to some value that would give 0 after the sum of all bytes for this structure (including checksum) */ + 0x66, /* u8 checksum , this hase to set to some value that would give 0 after the sum of all bytes for this structure (including checksum) */ { {1,(4<<3)|0, {{0x1, 0xdef8}, {0x2, 0xdef8}, {0x3, 0xdef8}, {0x4, 0xdef8}}, 0, 0}, {0x4,0, {{0, 0}, {0, 0}, {0, 0}, {0x4, 0xdef8}}, 0, 0}, diff --git a/src/mainboard/tyan/s2881/mainboard.c b/src/mainboard/tyan/s2881/mainboard.c index 3ba458866c..86158b7551 100644 --- a/src/mainboard/tyan/s2881/mainboard.c +++ b/src/mainboard/tyan/s2881/mainboard.c @@ -38,7 +38,7 @@ static void fixup_lsi_53c1030(struct device *pdev) } #endif //extern static void lsi_scsi_init(struct device *dev); -#if 1 +#if 0 static void print_pci_regs(struct device *dev) { uint8_t byte; @@ -152,12 +152,11 @@ enable(struct chip *chip, enum chip_pass pass) // case CONF_PASS_PRE_PCI: // case CONF_PASS_POST_PCI: case CONF_PASS_PRE_BOOT: - if (conf->fixup_scsi) - onboard_scsi_fixup(); +// if (conf->fixup_scsi) + // onboard_scsi_fixup(); // if (conf->fixup_vga) // vga_fixup(); - printk_debug("mainboard fixup pass %d done\r\n", - pass); +// printk_debug("mainboard fixup pass %d done\r\n",pass); break; } diff --git a/src/mainboard/tyan/s2881/mptable.c b/src/mainboard/tyan/s2881/mptable.c index cb1dfc8f2d..3a9bfebe55 100644 --- a/src/mainboard/tyan/s2881/mptable.c +++ b/src/mainboard/tyan/s2881/mptable.c @@ -137,7 +137,7 @@ void *smp_write_config_table(void *v, unsigned long * processor_map) smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_LEVEL|MP_IRQ_POLARITY_LOW, bus_8131_1, (8<<2)|3, 0x3, 0x2);// -//On Board NIC and LSI scsi +//On Board NIC and adaptec scsi smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_LEVEL|MP_IRQ_POLARITY_LOW, bus_8131_1, (9<<2)|0, 0x3, 0x0); smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_LEVEL|MP_IRQ_POLARITY_LOW, bus_8131_1, (9<<2)|1, 0x3, 0x1); smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_LEVEL|MP_IRQ_POLARITY_LOW, bus_8131_1, (0xa<<2)|0, 0x3, 0x0); -- cgit v1.2.3