Patchwork [The,604,CAR,crusades] Cyborg Bear

login
register
about
Submitter Alexandru Gagniuc
Date 2011-03-10 00:26:10
Message ID <4D781AA2.6070703@gmail.com>
Download mbox | patch
Permalink /patch/2766/
State New
Headers show

Comments

Alexandru Gagniuc - 2011-03-10 00:26:10
Two more boards, right here, right now.

Patch

CARing for the Supermicro X6DHR-IG

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>

Index: src/mainboard/supermicro/x6dhr_ig/Kconfig
===================================================================
--- src/mainboard/supermicro/x6dhr_ig/Kconfig	(revision 6429)
+++ src/mainboard/supermicro/x6dhr_ig/Kconfig	(working copy)
@@ -1,3 +1,23 @@ 
+##
+## This file is part of the coreboot project.
+##
+## Copyright (C) 2011  Alexandru Gagniuc <mr.nuke.me@gmail.com>
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+##
+
 if BOARD_SUPERMICRO_X6DHR_IG
 
 config BOARD_SPECIFIC_OPTIONS # dummy
@@ -8,7 +28,6 @@ 
 	select SOUTHBRIDGE_INTEL_I82801EX
 	select SOUTHBRIDGE_INTEL_PXHD
 	select SUPERIO_WINBOND_W83627HF
-	select ROMCC
 	select HAVE_HARD_RESET
 	select BOARD_HAS_HARD_RESET
 	select HAVE_OPTION_TABLE
Index: src/mainboard/supermicro/x6dhr_ig/watchdog.c
===================================================================
--- src/mainboard/supermicro/x6dhr_ig/watchdog.c	(revision 6429)
+++ src/mainboard/supermicro/x6dhr_ig/watchdog.c	(working copy)
@@ -1,3 +1,23 @@ 
+/*
+ * This file is part of the coreboot project.
+ * 
+ * Copyright (C) 2011  Alexandru Gagniuc <mr.nuke.me@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ */
+
 #include <device/pnp_def.h>
 
 #define NSC_WD_DEV PNP_DEV(0x2e, 0xa)
@@ -5,9 +25,9 @@ 
 #define ICH5_WDBASE 0x400
 #define ICH5_GPIOBASE 0x500
 
+#if 0
 static void disable_sio_watchdog(device_t dev)
 {
-#if 0
 	/* FIXME move me somewhere more appropriate */
 	pnp_set_logical_device(dev);
 	pnp_set_enable(dev, 1);
@@ -15,8 +35,8 @@ 
 	/* disable the sio watchdog */
 	outb(0, NSC_WDBASE + 0);
 	pnp_set_enable(dev, 0);
+}
 #endif
-}
 
 static void disable_ich5_watchdog(void)
 {
@@ -47,9 +67,9 @@ 
 	outw(0x0002, base + 0x06);
 }
 
+#if 0
 static void disable_jarell_frb3(void)
 {
-#if 0
 	device_t dev;
 	unsigned long value, base;
 	dev = pci_locate_device(PCI_ID(0x8086, 0x24d0), 0);
@@ -86,8 +106,8 @@ 
 	outl(value, base + 0x38);
 	value &= ~(1 << 16);
 	outl(value, base + 0x38);
+}
 #endif
-}
 
 static void disable_watchdogs(void)
 {
Index: src/mainboard/supermicro/x6dhr_ig/romstage.c
===================================================================
--- src/mainboard/supermicro/x6dhr_ig/romstage.c	(revision 6429)
+++ src/mainboard/supermicro/x6dhr_ig/romstage.c	(working copy)
@@ -1,3 +1,23 @@ 
+/*
+ * This file is part of the coreboot project.
+ * 
+ * Copyright (C) 2011  Alexandru Gagniuc <mr.nuke.me@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ */
+
 #include <stdint.h>
 #include <device/pci_def.h>
 #include <arch/io.h>
@@ -9,14 +29,12 @@ 
 #include "southbridge/intel/i82801ex/early_smbus.c"
 #include "northbridge/intel/e7520/raminit.h"
 #include "superio/winbond/w83627hf/w83627hf.h"
-#include "cpu/x86/lapic/boot_cpu.c"
 #include "cpu/x86/mtrr/earlymtrr.c"
 #include "debug.c"
 #include "watchdog.c"
 #include "reset.c"
 #include "superio/winbond/w83627hf/early_serial.c"
 #include "northbridge/intel/e7520/memory_initialized.c"
-#include "cpu/x86/bist.h"
 #include <spd.h>
 
 #define CONSOLE_SERIAL_DEV PNP_DEV(0x2e, W83627HF_SP1)
@@ -33,7 +51,6 @@ 
 	0 )
 #define DEVPRES1_CONFIG (DEVPRES1_D0F1 | DEVPRES1_D8F0)
 
-static void mch_reset(void) {}
 static void mainboard_set_e7520_pll(unsigned bits) {}
 static void mainboard_set_e7520_leds(void) {}
 
@@ -44,9 +61,8 @@ 
 
 #include "northbridge/intel/e7520/raminit.c"
 #include "lib/generic_sdram.c"
-#include "arch/x86/lib/stages.c"
 
-static void main(unsigned long bist)
+void main(unsigned long bist)
 {
 	static const struct mem_controller mch[] = {
 		{
@@ -58,9 +74,9 @@ 
 
 	if (bist == 0) {
 		/* Skip this if there was a built in self test failure */
-		early_mtrr_init();
+		/* MTRR init is now handled in cache_as_ram.inc */
 		if (memory_initialized())
-			skip_romstage();
+			return;
 	}
 
 	w83627hf_set_clksel_48(DUMMY_DEV);
@@ -80,28 +96,10 @@ 
         pci_write_config32(dev, 0xe8, 0x00000000);
         pci_write_config8(dev, 0xf0, 0x00);
 
-#if 0
-	display_cpuid_update_microcode();
-	print_pci_devices();
-#endif
-#if 1
 	enable_smbus();
-#endif
-#if 0
-//	dump_spd_registers(&cpu[0]);
-	int i;
-	for(i = 0; i < 1; i++)
-		dump_spd_registers();
-#endif
+
 	disable_watchdogs();
-//	dump_ipmi_registers();
 	mainboard_set_e7520_leds();
 	sdram_initialize(ARRAY_SIZE(mch), mch);
-#if 1
-	dump_pci_devices();
-#endif
-#if 0
-	dump_pci_device(PCI_DEV(0, 0x00, 0));
-	dump_bar14(PCI_DEV(0, 0x00, 0));
-#endif
+
 }
Index: src/mainboard/supermicro/x6dhr_ig/debug.c
===================================================================
--- src/mainboard/supermicro/x6dhr_ig/debug.c	(revision 6429)
+++ src/mainboard/supermicro/x6dhr_ig/debug.c	(working copy)
@@ -1,5 +1,26 @@ 
+/*
+ * This file is part of the coreboot project.
+ * 
+ * Copyright (C) 2011  Alexandru Gagniuc <mr.nuke.me@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ */
+
 #include <spd.h>
 
+#ifdef DEFINED_BUT_NOT_USED
 static void print_reg(unsigned char index)
 {
         unsigned char data;
@@ -278,7 +299,6 @@ 
 		print_debug_hex8(device);
 
                 for(i = 0; (i < 256) ; i++) {
-	                unsigned char byte;
                         if ((i % 16) == 0) {
 				print_debug("\n");
 				print_debug_hex8(i);
@@ -311,7 +331,6 @@ 
 		print_debug_hex8(device);
 
                 for(i = 0; (i < 8) ; i++) {
-	                unsigned char byte;
 			status = smbus_read_byte(device, 2);
                         if (status < 0) {
 			         print_debug("bad device: ");
@@ -326,3 +345,4 @@ 
 		print_debug("\n");
 	}
 }
+#endif /* DEFINED_BUT_NOT_USED */