On Thu, Oct 22, 2009 at 10:20:32AM +0200, Stefan Reinauer wrote: > > And then there are various reset.c files in the mainboard directories > > which don't look board-specific at all. I propose to drop them all and > > provide one global hard_reset() function somewhere. Feasible? > > > It might silently break a lot of stuff. There's about 6 ways to reset a > machine (probably more) and it's not always trivial to see why a certain > reset method is needed at a certain time.
OK, we should add comments for this non-obvious stuff then (where we know the reason at least). I won't touch any of them for now without testing, though. > To your patch, I don't understand why you're suggesting to rename > hard_reset to board_name_hard_reset(). That seems like an awful idea... > Any reason for it? It was probably a stupid idea, yes. I removed those comments. The reason was that we have one i82801ca_hard_reset() function already in src/southbridge/intel/i82801ca/i82801ca_reset.c where src/mainboard/intel/xe7501devkit/reset.c has a hard_reset() function that is a simple wrapper around i82801ca_hard_reset(). That seems to be the only such function, all other southbridges name the function hard_reset() already. Maybe we should rename i82801ca_hard_reset() to hard_reset() and then drop src/southbridge/intel/i82801ca/i82801ca_reset.c? Either way, this is material for another patch, maybe I'll post something later. For now I kept the updated hard_reset() patch as simple as possible, in order to get a first round of cleanups in. I also left ruik's hard_reset() functions alone for now as Myles suggested, maybe we should rename soft_reset() to hard_reset() in that code, not sure. Updated patch attached. Uwe. -- http://www.hermann-uwe.de | http://www.randomprojects.org http://www.crazy-hacks.org | http://www.unmaintained-free-software.org
Major cleanups of the hard_reset() code and config in coreboot. - Drop unused "#object reset.o" entries. - Use CONFIG_HAVE_HARD_RESET for all "object reset.o" entries. - Drop dead/commented code, i.e. useless hard_reset() from: - supermicro/x6dhe_g/auto.c - supermicro/x6dhe_g2/auto.c - supermicro/x6dhe_g2/auto.updated.c - supermicro/x6dhr_ig/auto.c - supermicro/x6dhr_ig2/auto.c - digitallogic/msm586seg/auto.c - dell/s1850/auto.c - Add "obj-$(CONFIG_HAVE_HARD_RESET) += reset.o" to kconfig files of boards that actually have a reset.c file. Signed-off-by: Uwe Hermann <u...@hermann-uwe.de> Index: src/mainboard/iwill/dk8s2/Config.lb =================================================================== --- src/mainboard/iwill/dk8s2/Config.lb (Revision 4830) +++ src/mainboard/iwill/dk8s2/Config.lb (Arbeitskopie) @@ -15,7 +15,6 @@ driver mainboard.o if CONFIG_GENERATE_MP_TABLE object mptable.o end if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -#object reset.o ## ATI Rage XL framebuffering graphics driver dir /drivers/ati/ragexl Index: src/mainboard/iwill/dk8x/Config.lb =================================================================== --- src/mainboard/iwill/dk8x/Config.lb (Revision 4830) +++ src/mainboard/iwill/dk8x/Config.lb (Arbeitskopie) @@ -15,7 +15,6 @@ driver mainboard.o if CONFIG_GENERATE_MP_TABLE object mptable.o end if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -#object reset.o if CONFIG_USE_INIT Index: src/mainboard/broadcom/blast/Config.lb =================================================================== --- src/mainboard/broadcom/blast/Config.lb (Revision 4830) +++ src/mainboard/broadcom/blast/Config.lb (Arbeitskopie) @@ -18,8 +18,6 @@ object irq_tables.o end -#object reset.o - if CONFIG_USE_INIT makerule ./cache_as_ram_auto.o Index: src/mainboard/thomson/ip1000/Config.lb =================================================================== --- src/mainboard/thomson/ip1000/Config.lb (Revision 4830) +++ src/mainboard/thomson/ip1000/Config.lb (Arbeitskopie) @@ -25,7 +25,6 @@ arch i386 end driver mainboard.o if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -# object reset.o if CONFIG_GENERATE_ACPI_TABLES object fadt.o object dsdt.o Index: src/mainboard/supermicro/x6dai_g/Makefile.inc =================================================================== --- src/mainboard/supermicro/x6dai_g/Makefile.inc (Revision 4830) +++ src/mainboard/supermicro/x6dai_g/Makefile.inc (Arbeitskopie) @@ -19,6 +19,6 @@ ## ROMCCFLAGS=-mcpu=p4 -O2 - +obj-$(CONFIG_HAVE_HARD_RESET) += reset.o include $(src)/mainboard/Makefile.romccboard.inc Index: src/mainboard/supermicro/x6dai_g/Config.lb =================================================================== --- src/mainboard/supermicro/x6dai_g/Config.lb (Revision 4830) +++ src/mainboard/supermicro/x6dai_g/Config.lb (Arbeitskopie) @@ -20,7 +20,7 @@ driver mainboard.o if CONFIG_GENERATE_MP_TABLE object mptable.o end if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -object reset.o +if CONFIG_HAVE_HARD_RESET object reset.o end ## ## Romcc output Index: src/mainboard/supermicro/h8dmr/Config.lb =================================================================== --- src/mainboard/supermicro/h8dmr/Config.lb (Revision 4830) +++ src/mainboard/supermicro/h8dmr/Config.lb (Arbeitskopie) @@ -35,7 +35,6 @@ if CONFIG_GENERATE_MP_TABLE object mptable.o end if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -#object reset.o if CONFIG_USE_INIT makerule ./auto.o Index: src/mainboard/supermicro/x6dhe_g/Makefile.inc =================================================================== --- src/mainboard/supermicro/x6dhe_g/Makefile.inc (Revision 4830) +++ src/mainboard/supermicro/x6dhe_g/Makefile.inc (Arbeitskopie) @@ -19,6 +19,6 @@ ## ROMCCFLAGS=-mcpu=p4 -O2 - +obj-$(CONFIG_HAVE_HARD_RESET) += reset.o include $(src)/mainboard/Makefile.romccboard.inc Index: src/mainboard/supermicro/x6dhe_g/auto.c =================================================================== --- src/mainboard/supermicro/x6dhe_g/auto.c (Revision 4830) +++ src/mainboard/supermicro/x6dhe_g/auto.c (Arbeitskopie) @@ -43,16 +43,6 @@ #define RECVENA_CONFIG 0x0808090a #define RECVENB_CONFIG 0x0808090a -#if 0 -static void hard_reset(void) -{ - /* enable cf9 */ - pci_write_config8(PCI_DEV(0, 0x04, 3), 0x41, 0xf1); - /* reset */ - outb(0x0e, 0x0cf9); -} -#endif - static inline void activate_spd_rom(const struct mem_controller *ctrl) { /* nothing to do */ Index: src/mainboard/supermicro/x6dhe_g/Config.lb =================================================================== --- src/mainboard/supermicro/x6dhe_g/Config.lb (Revision 4830) +++ src/mainboard/supermicro/x6dhe_g/Config.lb (Arbeitskopie) @@ -19,7 +19,7 @@ driver mainboard.o if CONFIG_GENERATE_MP_TABLE object mptable.o end if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -object reset.o +if CONFIG_HAVE_HARD_RESET object reset.o end ## ## Romcc output Index: src/mainboard/supermicro/h8dme/Config.lb =================================================================== --- src/mainboard/supermicro/h8dme/Config.lb (Revision 4830) +++ src/mainboard/supermicro/h8dme/Config.lb (Arbeitskopie) @@ -32,7 +32,6 @@ if CONFIG_GENERATE_MP_TABLE object mptable.o end if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -#object reset.o if CONFIG_USE_INIT makerule ./auto.o Index: src/mainboard/supermicro/h8dmr_fam10/Config.lb =================================================================== --- src/mainboard/supermicro/h8dmr_fam10/Config.lb (Revision 4830) +++ src/mainboard/supermicro/h8dmr_fam10/Config.lb (Arbeitskopie) @@ -37,7 +37,6 @@ if CONFIG_GENERATE_MP_TABLE object mptable.o end if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -#object reset.o if CONFIG_USE_INIT makerule ./auto.o Index: src/mainboard/supermicro/x6dhe_g2/Makefile.inc =================================================================== --- src/mainboard/supermicro/x6dhe_g2/Makefile.inc (Revision 4830) +++ src/mainboard/supermicro/x6dhe_g2/Makefile.inc (Arbeitskopie) @@ -19,6 +19,6 @@ ## ROMCCFLAGS=-mcpu=p4 -O2 - +obj-$(CONFIG_HAVE_HARD_RESET) += reset.o include $(src)/mainboard/Makefile.romccboard.inc Index: src/mainboard/supermicro/x6dhe_g2/auto.c =================================================================== --- src/mainboard/supermicro/x6dhe_g2/auto.c (Revision 4830) +++ src/mainboard/supermicro/x6dhe_g2/auto.c (Arbeitskopie) @@ -43,16 +43,6 @@ #define RECVENA_CONFIG 0x0708090a #define RECVENB_CONFIG 0x0708090a -#if 0 -static void hard_reset(void) -{ - /* enable cf9 */ - pci_write_config8(PCI_DEV(0, 0x04, 3), 0x41, 0xf1); - /* reset */ - outb(0x0e, 0x0cf9); -} -#endif - static inline void activate_spd_rom(const struct mem_controller *ctrl) { /* nothing to do */ Index: src/mainboard/supermicro/x6dhe_g2/Config.lb =================================================================== --- src/mainboard/supermicro/x6dhe_g2/Config.lb (Revision 4830) +++ src/mainboard/supermicro/x6dhe_g2/Config.lb (Arbeitskopie) @@ -19,7 +19,7 @@ driver mainboard.o if CONFIG_GENERATE_MP_TABLE object mptable.o end if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -object reset.o +if CONFIG_HAVE_HARD_RESET object reset.o end ## ## Romcc output Index: src/mainboard/supermicro/x6dhe_g2/auto.updated.c =================================================================== --- src/mainboard/supermicro/x6dhe_g2/auto.updated.c (Revision 4830) +++ src/mainboard/supermicro/x6dhe_g2/auto.updated.c (Arbeitskopie) @@ -43,16 +43,6 @@ #define RECVENA_CONFIG 0x0708090a #define RECVENB_CONFIG 0x0708090a -#if 0 -static void hard_reset(void) -{ - /* enable cf9 */ - pci_write_config8(PCI_DEV(0, 0x04, 3), 0x41, 0xf1); - /* reset */ - outb(0x0e, 0x0cf9); -} -#endif - static inline void activate_spd_rom(const struct mem_controller *ctrl) { /* nothing to do */ Index: src/mainboard/supermicro/x6dhr_ig/Makefile.inc =================================================================== --- src/mainboard/supermicro/x6dhr_ig/Makefile.inc (Revision 4830) +++ src/mainboard/supermicro/x6dhr_ig/Makefile.inc (Arbeitskopie) @@ -19,6 +19,6 @@ ## ROMCCFLAGS=-mcpu=p4 -O2 - +obj-$(CONFIG_HAVE_HARD_RESET) += reset.o include $(src)/mainboard/Makefile.romccboard.inc Index: src/mainboard/supermicro/x6dhr_ig/auto.c =================================================================== --- src/mainboard/supermicro/x6dhr_ig/auto.c (Revision 4830) +++ src/mainboard/supermicro/x6dhr_ig/auto.c (Arbeitskopie) @@ -44,16 +44,6 @@ #define RECVENA_CONFIG 0x0808090a #define RECVENB_CONFIG 0x0808090a -#if 0 -static void hard_reset(void) -{ - /* enable cf9 */ - pci_write_config8(PCI_DEV(0, 0x04, 3), 0x41, 0xf1); - /* reset */ - outb(0x0e, 0x0cf9); -} -#endif - static inline void activate_spd_rom(const struct mem_controller *ctrl) { /* nothing to do */ Index: src/mainboard/supermicro/x6dhr_ig/Config.lb =================================================================== --- src/mainboard/supermicro/x6dhr_ig/Config.lb (Revision 4830) +++ src/mainboard/supermicro/x6dhr_ig/Config.lb (Arbeitskopie) @@ -20,7 +20,7 @@ driver mainboard.o if CONFIG_GENERATE_MP_TABLE object mptable.o end if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -object reset.o +if CONFIG_HAVE_HARD_RESET object reset.o end ## ## Romcc output Index: src/mainboard/supermicro/x6dhr_ig2/Makefile.inc =================================================================== --- src/mainboard/supermicro/x6dhr_ig2/Makefile.inc (Revision 4830) +++ src/mainboard/supermicro/x6dhr_ig2/Makefile.inc (Arbeitskopie) @@ -19,6 +19,6 @@ ## ROMCCFLAGS=-mcpu=p4 -O2 - +obj-$(CONFIG_HAVE_HARD_RESET) += reset.o include $(src)/mainboard/Makefile.romccboard.inc Index: src/mainboard/supermicro/x6dhr_ig2/auto.c =================================================================== --- src/mainboard/supermicro/x6dhr_ig2/auto.c (Revision 4830) +++ src/mainboard/supermicro/x6dhr_ig2/auto.c (Arbeitskopie) @@ -44,16 +44,6 @@ #define RECVENA_CONFIG 0x0808090a #define RECVENB_CONFIG 0x0808090a -#if 0 -static void hard_reset(void) -{ - /* enable cf9 */ - pci_write_config8(PCI_DEV(0, 0x04, 3), 0x41, 0xf1); - /* reset */ - outb(0x0e, 0x0cf9); -} -#endif - static inline void activate_spd_rom(const struct mem_controller *ctrl) { /* nothing to do */ Index: src/mainboard/supermicro/x6dhr_ig2/Config.lb =================================================================== --- src/mainboard/supermicro/x6dhr_ig2/Config.lb (Revision 4830) +++ src/mainboard/supermicro/x6dhr_ig2/Config.lb (Arbeitskopie) @@ -20,7 +20,7 @@ driver mainboard.o if CONFIG_GENERATE_MP_TABLE object mptable.o end if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -object reset.o +if CONFIG_HAVE_HARD_RESET object reset.o end ## ## Romcc output Index: src/mainboard/kontron/986lcd-m/Makefile.inc =================================================================== --- src/mainboard/kontron/986lcd-m/Makefile.inc (Revision 4830) +++ src/mainboard/kontron/986lcd-m/Makefile.inc (Arbeitskopie) @@ -32,6 +32,7 @@ obj-$(CONFIG_GENERATE_ACPI_TABLES) += dsdt.o obj-$(CONFIG_GENERATE_ACPI_TABLES) += acpi_tables.o obj-$(CONFIG_GENERATE_ACPI_TABLES) += fadt.o +obj-$(CONFIG_HAVE_HARD_RESET) += reset.o smmobj-$(CONFIG_HAVE_SMI_HANDLER) += mainboard_smi.o Index: src/mainboard/kontron/986lcd-m/Config.lb =================================================================== --- src/mainboard/kontron/986lcd-m/Config.lb (Revision 4830) +++ src/mainboard/kontron/986lcd-m/Config.lb (Arbeitskopie) @@ -61,7 +61,7 @@ object ./dsdt.o end -object reset.o +if CONFIG_HAVE_HARD_RESET object reset.o end if CONFIG_USE_INIT Index: src/mainboard/kontron/kt690/Config.lb =================================================================== --- src/mainboard/kontron/kt690/Config.lb (Revision 4830) +++ src/mainboard/kontron/kt690/Config.lb (Arbeitskopie) @@ -50,8 +50,6 @@ object ./dsdt.o end -#object reset.o - if CONFIG_USE_INIT makerule ./cache_as_ram_auto.o Index: src/mainboard/gigabyte/m57sli/Config.lb =================================================================== --- src/mainboard/gigabyte/m57sli/Config.lb (Revision 4830) +++ src/mainboard/gigabyte/m57sli/Config.lb (Arbeitskopie) @@ -35,7 +35,6 @@ if CONFIG_GENERATE_MP_TABLE object mptable.o end if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -#object reset.o if CONFIG_USE_INIT makerule ./cache_as_ram_auto.o Index: src/mainboard/gigabyte/ga_2761gxdk/Config.lb =================================================================== --- src/mainboard/gigabyte/ga_2761gxdk/Config.lb (Revision 4830) +++ src/mainboard/gigabyte/ga_2761gxdk/Config.lb (Arbeitskopie) @@ -37,7 +37,6 @@ if CONFIG_GENERATE_MP_TABLE object mptable.o end if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -#object reset.o if CONFIG_USE_INIT makerule ./cache_as_ram_auto.o Index: src/mainboard/digitallogic/adl855pc/Kconfig =================================================================== --- src/mainboard/digitallogic/adl855pc/Kconfig (Revision 4830) +++ src/mainboard/digitallogic/adl855pc/Kconfig (Arbeitskopie) @@ -8,6 +8,7 @@ select HAVE_PIRQ_TABLE select UDELAY_TSC select BOARD_ROMSIZE_KB_1024 + select HAVE_HARD_RESET config MAINBOARD_DIR string Index: src/mainboard/digitallogic/adl855pc/Config.lb =================================================================== --- src/mainboard/digitallogic/adl855pc/Config.lb (Revision 4830) +++ src/mainboard/digitallogic/adl855pc/Config.lb (Arbeitskopie) @@ -14,7 +14,6 @@ driver mainboard.o if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -#object reset.o ## ## Romcc output Index: src/mainboard/digitallogic/adl855pc/auto.c =================================================================== --- src/mainboard/digitallogic/adl855pc/auto.c (Revision 4830) +++ src/mainboard/digitallogic/adl855pc/auto.c (Arbeitskopie) @@ -31,7 +31,6 @@ #define SERIAL_DEV PNP_DEV(0x2e, W83627HF_SP1) - static void hard_reset(void) { outb(0x0e, 0x0cf9); Index: src/mainboard/digitallogic/msm586seg/Config.lb =================================================================== --- src/mainboard/digitallogic/msm586seg/Config.lb (Revision 4830) +++ src/mainboard/digitallogic/msm586seg/Config.lb (Arbeitskopie) @@ -16,7 +16,6 @@ driver mainboard.o if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -# object reset.o ## ## Romcc output Index: src/mainboard/digitallogic/msm586seg/auto.c =================================================================== --- src/mainboard/digitallogic/msm586seg/auto.c (Revision 4830) +++ src/mainboard/digitallogic/msm586seg/auto.c (Arbeitskopie) @@ -50,10 +50,6 @@ int i; }; -static void hard_reset(void) -{ -} - static void memreset_setup(void) { } Index: src/mainboard/olpc/btest/Config.lb =================================================================== --- src/mainboard/olpc/btest/Config.lb (Revision 4830) +++ src/mainboard/olpc/btest/Config.lb (Arbeitskopie) @@ -15,7 +15,6 @@ driver mainboard.o if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -#object reset.o ## ## Romcc output Index: src/mainboard/olpc/rev_a/Config.lb =================================================================== --- src/mainboard/olpc/rev_a/Config.lb (Revision 4830) +++ src/mainboard/olpc/rev_a/Config.lb (Arbeitskopie) @@ -15,7 +15,6 @@ driver mainboard.o if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -#object reset.o ## ## Romcc output Index: src/mainboard/emulation/qemu-x86/Config.lb =================================================================== --- src/mainboard/emulation/qemu-x86/Config.lb (Revision 4830) +++ src/mainboard/emulation/qemu-x86/Config.lb (Arbeitskopie) @@ -35,7 +35,6 @@ driver mainboard.o if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -#object reset.o ## ALL dependencies for CONFIG_USE_DCACHE_RAM go here. Index: src/mainboard/technologic/ts5300/Config.lb =================================================================== --- src/mainboard/technologic/ts5300/Config.lb (Revision 4830) +++ src/mainboard/technologic/ts5300/Config.lb (Arbeitskopie) @@ -17,7 +17,6 @@ driver mainboard.o if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -# object reset.o ## ## Romcc output Index: src/mainboard/amd/pistachio/Config.lb =================================================================== --- src/mainboard/amd/pistachio/Config.lb (Revision 4830) +++ src/mainboard/amd/pistachio/Config.lb (Arbeitskopie) @@ -50,8 +50,6 @@ object ./dsdt.o end -#object reset.o - if CONFIG_USE_INIT makerule ./cache_as_ram_auto.o Index: src/mainboard/amd/dbm690t/Config.lb =================================================================== --- src/mainboard/amd/dbm690t/Config.lb (Revision 4830) +++ src/mainboard/amd/dbm690t/Config.lb (Arbeitskopie) @@ -50,8 +50,6 @@ object ./dsdt.o end -#object reset.o - if CONFIG_USE_INIT makerule ./cache_as_ram_auto.o Index: src/mainboard/amd/rumba/Config.lb =================================================================== --- src/mainboard/amd/rumba/Config.lb (Revision 4830) +++ src/mainboard/amd/rumba/Config.lb (Arbeitskopie) @@ -15,7 +15,6 @@ driver mainboard.o if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -#object reset.o ## ## Romcc output Index: src/mainboard/amd/norwich/Config.lb =================================================================== --- src/mainboard/amd/norwich/Config.lb (Revision 4830) +++ src/mainboard/amd/norwich/Config.lb (Arbeitskopie) @@ -18,8 +18,6 @@ object irq_tables.o end -#object reset.o - #compile cache_as_ram.c to auto.inc makerule ./cache_as_ram_auto.inc depends "$(CONFIG_MAINBOARD)/cache_as_ram_auto.c option_table.h" Index: src/mainboard/nec/powermate2000/Config.lb =================================================================== --- src/mainboard/nec/powermate2000/Config.lb (Revision 4830) +++ src/mainboard/nec/powermate2000/Config.lb (Arbeitskopie) @@ -25,7 +25,6 @@ arch i386 end driver mainboard.o if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -# object reset.o makerule ./failover.E depends "$(CONFIG_MAINBOARD)/../../../arch/i386/lib/failover.c ../romcc" action "../romcc -E -O2 -mcpu=p2 --label-prefix=failover -I$(TOP)/src -I. $(CPPFLAGS) $(CONFIG_MAINBOARD)/../../../arch/i386/lib/failover.c -o $@" Index: src/mainboard/rca/rm4100/Config.lb =================================================================== --- src/mainboard/rca/rm4100/Config.lb (Revision 4830) +++ src/mainboard/rca/rm4100/Config.lb (Arbeitskopie) @@ -25,7 +25,6 @@ arch i386 end driver mainboard.o if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -# object reset.o if CONFIG_GENERATE_ACPI_TABLES object fadt.o object dsdt.o Index: src/mainboard/iei/nova4899r/Config.lb =================================================================== --- src/mainboard/iei/nova4899r/Config.lb (Revision 4830) +++ src/mainboard/iei/nova4899r/Config.lb (Arbeitskopie) @@ -16,7 +16,6 @@ driver mainboard.o if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -#object reset.o ## ## Romcc output Index: src/mainboard/iei/juki-511p/Config.lb =================================================================== --- src/mainboard/iei/juki-511p/Config.lb (Revision 4830) +++ src/mainboard/iei/juki-511p/Config.lb (Arbeitskopie) @@ -32,7 +32,6 @@ driver mainboard.o if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -#object reset.o ## ## Romcc output Index: src/mainboard/artecgroup/dbe61/Config.lb =================================================================== --- src/mainboard/artecgroup/dbe61/Config.lb (Revision 4830) +++ src/mainboard/artecgroup/dbe61/Config.lb (Arbeitskopie) @@ -15,7 +15,6 @@ driver mainboard.o if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -#object reset.o #compile cache_as_ram.c to auto.inc makerule ./cache_as_ram_auto.inc Index: src/mainboard/tyan/s2912/Config.lb =================================================================== --- src/mainboard/tyan/s2912/Config.lb (Revision 4830) +++ src/mainboard/tyan/s2912/Config.lb (Arbeitskopie) @@ -35,7 +35,6 @@ if CONFIG_GENERATE_MP_TABLE object mptable.o end if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -#object reset.o if CONFIG_USE_INIT makerule ./cache_as_ram_auto.o Index: src/mainboard/tyan/s2735/Config.lb =================================================================== --- src/mainboard/tyan/s2735/Config.lb (Revision 4830) +++ src/mainboard/tyan/s2735/Config.lb (Arbeitskopie) @@ -12,7 +12,7 @@ driver mainboard.o if CONFIG_GENERATE_MP_TABLE object mptable.o end if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -object reset.o +if CONFIG_HAVE_HARD_RESET object reset.o end if CONFIG_USE_INIT makerule ./auto.o Index: src/mainboard/tyan/s2735/reset.c =================================================================== --- src/mainboard/tyan/s2735/reset.c (Revision 4830) +++ src/mainboard/tyan/s2735/reset.c (Arbeitskopie) @@ -1,5 +1,6 @@ void i82801er_hard_reset(void); +/* FIXME: There's another hard_reset() in cache_as_ram_auto.c. Why? */ void hard_reset(void) { i82801er_hard_reset(); Index: src/mainboard/tyan/s2735/Makefile.inc =================================================================== --- src/mainboard/tyan/s2735/Makefile.inc (Revision 4830) +++ src/mainboard/tyan/s2735/Makefile.inc (Arbeitskopie) @@ -27,6 +27,7 @@ obj-$(CONFIG_GENERATE_MP_TABLE) += mptable.o obj-$(CONFIG_GENERATE_PIRQ_TABLE) += irq_tables.o +obj-$(CONFIG_HAVE_HARD_RESET) += reset.o #driver-y += ../../../drivers/i2c/i2cmux/i2cmux.o Index: src/mainboard/tyan/s2735/cache_as_ram_auto.c =================================================================== --- src/mainboard/tyan/s2735/cache_as_ram_auto.c (Revision 4830) +++ src/mainboard/tyan/s2735/cache_as_ram_auto.c (Arbeitskopie) @@ -37,6 +37,7 @@ #define SERIAL_DEV PNP_DEV(0x2e, W83627HF_SP1) +// FIXME: There's another hard_reset() in reset.c. Why? static void hard_reset(void) { /* full reset */ Index: src/mainboard/tyan/s2891/Config.lb =================================================================== --- src/mainboard/tyan/s2891/Config.lb (Revision 4830) +++ src/mainboard/tyan/s2891/Config.lb (Arbeitskopie) @@ -18,7 +18,6 @@ if CONFIG_GENERATE_MP_TABLE object mptable.o end if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -#object reset.o if CONFIG_GENERATE_ACPI_TABLES object acpi_tables.o Index: src/mainboard/tyan/s2892/Config.lb =================================================================== --- src/mainboard/tyan/s2892/Config.lb (Revision 4830) +++ src/mainboard/tyan/s2892/Config.lb (Arbeitskopie) @@ -19,7 +19,6 @@ if CONFIG_GENERATE_MP_TABLE object mptable.o end if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -#object reset.o if CONFIG_GENERATE_ACPI_TABLES object acpi_tables.o Index: src/mainboard/tyan/s2895/Config.lb =================================================================== --- src/mainboard/tyan/s2895/Config.lb (Revision 4830) +++ src/mainboard/tyan/s2895/Config.lb (Arbeitskopie) @@ -14,7 +14,6 @@ if CONFIG_GENERATE_MP_TABLE object mptable.o end if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -#object reset.o if CONFIG_GENERATE_ACPI_TABLES object acpi_tables.o Index: src/mainboard/tyan/s2912_fam10/Config.lb =================================================================== --- src/mainboard/tyan/s2912_fam10/Config.lb (Revision 4830) +++ src/mainboard/tyan/s2912_fam10/Config.lb (Arbeitskopie) @@ -35,7 +35,6 @@ if CONFIG_GENERATE_MP_TABLE object mptable.o end if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -#object reset.o if CONFIG_USE_INIT makerule ./cache_as_ram_auto.o Index: src/mainboard/lippert/frontrunner/Config.lb =================================================================== --- src/mainboard/lippert/frontrunner/Config.lb (Revision 4830) +++ src/mainboard/lippert/frontrunner/Config.lb (Arbeitskopie) @@ -15,7 +15,6 @@ driver mainboard.o if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -#object reset.o ## ## Romcc output Index: src/mainboard/via/vt8454c/reset.c =================================================================== --- src/mainboard/via/vt8454c/reset.c (Revision 4830) +++ src/mainboard/via/vt8454c/reset.c (Arbeitskopie) @@ -1,28 +0,0 @@ -/* - * This file is part of the coreboot project. - * - * Copyright (C) 2007-2009 coresystems GmbH - * - * 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. - * - * 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 "arch/romcc_io.h" - -void hard_reset(void) -{ - set_bios_reset(); - outb(0x06, 0x0cf9); -} Index: src/mainboard/via/epia-m/Config.lb =================================================================== --- src/mainboard/via/epia-m/Config.lb (Revision 4830) +++ src/mainboard/via/epia-m/Config.lb (Arbeitskopie) @@ -15,7 +15,6 @@ driver mainboard.o if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -#object reset.o object vgabios.o if CONFIG_GENERATE_ACPI_TABLES Index: src/mainboard/via/epia/Config.lb =================================================================== --- src/mainboard/via/epia/Config.lb (Revision 4830) +++ src/mainboard/via/epia/Config.lb (Arbeitskopie) @@ -14,7 +14,6 @@ driver mainboard.o if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -#object reset.o ## ## Romcc output Index: src/mainboard/dell/s1850/Makefile.inc =================================================================== --- src/mainboard/dell/s1850/Makefile.inc (Revision 4830) +++ src/mainboard/dell/s1850/Makefile.inc (Arbeitskopie) @@ -42,6 +42,7 @@ obj-$(CONFIG_GENERATE_MP_TABLE) += mptable.o obj-$(CONFIG_GENERATE_PIRQ_TABLE) += irq_tables.o +obj-$(CONFIG_HAVE_HARD_RESET) += reset.o ifdef POST_EVALUATION Index: src/mainboard/dell/s1850/auto.c =================================================================== --- src/mainboard/dell/s1850/auto.c (Revision 4830) +++ src/mainboard/dell/s1850/auto.c (Arbeitskopie) @@ -42,16 +42,6 @@ #define RECVENA_CONFIG 0x0808090a #define RECVENB_CONFIG 0x0808090a -#if 0 -static void hard_reset(void) -{ - /* enable cf9 */ - pci_write_config8(PCI_DEV(0, 0x04, 3), 0x41, 0xf1); - /* reset */ - outb(0x0e, 0x0cf9); -} -#endif - static inline void activate_spd_rom(const struct mem_controller *ctrl) { /* nothing to do */ Index: src/mainboard/dell/s1850/Config.lb =================================================================== --- src/mainboard/dell/s1850/Config.lb (Revision 4830) +++ src/mainboard/dell/s1850/Config.lb (Arbeitskopie) @@ -20,7 +20,7 @@ driver mainboard.o if CONFIG_GENERATE_MP_TABLE object mptable.o end if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -object reset.o +if CONFIG_HAVE_HARD_RESET object reset.o end ## ## Romcc output Index: src/mainboard/msi/ms9282/Config.lb =================================================================== --- src/mainboard/msi/ms9282/Config.lb (Revision 4830) +++ src/mainboard/msi/ms9282/Config.lb (Arbeitskopie) @@ -43,7 +43,6 @@ if CONFIG_GENERATE_MP_TABLE object mptable.o end if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -#object reset.o if CONFIG_USE_INIT Index: src/mainboard/msi/ms6178/Config.lb =================================================================== --- src/mainboard/msi/ms6178/Config.lb (Revision 4830) +++ src/mainboard/msi/ms6178/Config.lb (Arbeitskopie) @@ -25,7 +25,6 @@ arch i386 end driver mainboard.o if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -# object reset.o makerule ./failover.E depends "$(CONFIG_MAINBOARD)/../../../arch/i386/lib/failover.c ../romcc" action "../romcc -E -O --label-prefix=failover -I$(TOP)/src -I. $(CPPFLAGS) $(CONFIG_MAINBOARD)/../../../arch/i386/lib/failover.c -o $@" Index: src/mainboard/msi/ms7260/Config.lb =================================================================== --- src/mainboard/msi/ms7260/Config.lb (Revision 4830) +++ src/mainboard/msi/ms7260/Config.lb (Arbeitskopie) @@ -28,7 +28,6 @@ object get_bus_conf.o # Needed by irq_tables and mptable (and acpi_tables). if CONFIG_GENERATE_MP_TABLE object mptable.o end if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -# object reset.o if CONFIG_USE_INIT makerule ./cache_as_ram_auto.o Index: src/mainboard/sunw/ultra40/Config.lb =================================================================== --- src/mainboard/sunw/ultra40/Config.lb (Revision 4830) +++ src/mainboard/sunw/ultra40/Config.lb (Arbeitskopie) @@ -16,7 +16,6 @@ if CONFIG_GENERATE_MP_TABLE object mptable.o end if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -#object reset.o if CONFIG_USE_INIT makerule ./auto.o depends "$(CONFIG_MAINBOARD)/cache_as_ram_auto.c option_table.h" Index: src/mainboard/eaglelion/5bcm/Config.lb =================================================================== --- src/mainboard/eaglelion/5bcm/Config.lb (Revision 4830) +++ src/mainboard/eaglelion/5bcm/Config.lb (Arbeitskopie) @@ -15,7 +15,6 @@ driver mainboard.o if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -#object reset.o ## ## Romcc output Index: src/mainboard/Makefile.romccboard.inc =================================================================== --- src/mainboard/Makefile.romccboard.inc (Revision 4830) +++ src/mainboard/Makefile.romccboard.inc (Arbeitskopie) @@ -45,6 +45,7 @@ obj-$(CONFIG_GENERATE_MP_TABLE) += mptable.o obj-$(CONFIG_GENERATE_PIRQ_TABLE) += irq_tables.o +obj-$(CONFIG_HAVE_HARD_RESET) += reset.o ifdef POST_EVALUATION Index: src/mainboard/newisys/khepri/Config.lb =================================================================== --- src/mainboard/newisys/khepri/Config.lb (Revision 4830) +++ src/mainboard/newisys/khepri/Config.lb (Arbeitskopie) @@ -15,7 +15,6 @@ driver mainboard.o if CONFIG_GENERATE_MP_TABLE object mptable.o end if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -#object reset.o if CONFIG_USE_INIT Index: src/mainboard/technexion/tim8690/Config.lb =================================================================== --- src/mainboard/technexion/tim8690/Config.lb (Revision 4830) +++ src/mainboard/technexion/tim8690/Config.lb (Arbeitskopie) @@ -50,8 +50,6 @@ object ./dsdt.o end -#object reset.o - if CONFIG_USE_INIT makerule ./cache_as_ram_auto.o Index: src/mainboard/technexion/tim5690/Config.lb =================================================================== --- src/mainboard/technexion/tim5690/Config.lb (Revision 4830) +++ src/mainboard/technexion/tim5690/Config.lb (Arbeitskopie) @@ -50,8 +50,6 @@ object ./dsdt.o end -#object reset.o - if CONFIG_USE_INIT makerule ./cache_as_ram_auto.o Index: src/mainboard/ibm/e326/Config.lb =================================================================== --- src/mainboard/ibm/e326/Config.lb (Revision 4830) +++ src/mainboard/ibm/e326/Config.lb (Arbeitskopie) @@ -15,7 +15,6 @@ driver mainboard.o if CONFIG_GENERATE_MP_TABLE object mptable.o end if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -#object reset.o if CONFIG_USE_INIT Index: src/mainboard/ibm/e325/Config.lb =================================================================== --- src/mainboard/ibm/e325/Config.lb (Revision 4830) +++ src/mainboard/ibm/e325/Config.lb (Arbeitskopie) @@ -15,7 +15,6 @@ driver mainboard.o if CONFIG_GENERATE_MP_TABLE object mptable.o end if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -#object reset.o if CONFIG_USE_INIT Index: src/mainboard/nvidia/l1_2pvv/Config.lb =================================================================== --- src/mainboard/nvidia/l1_2pvv/Config.lb (Revision 4830) +++ src/mainboard/nvidia/l1_2pvv/Config.lb (Arbeitskopie) @@ -35,7 +35,6 @@ if CONFIG_GENERATE_MP_TABLE object mptable.o end if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -#object reset.o if CONFIG_GENERATE_ACPI_TABLES object acpi_tables.o Index: src/mainboard/intel/xe7501devkit/Makefile.inc =================================================================== --- src/mainboard/intel/xe7501devkit/Makefile.inc (Revision 4830) +++ src/mainboard/intel/xe7501devkit/Makefile.inc (Arbeitskopie) @@ -1,4 +1,5 @@ ROMCCFLAGS := -mcpu=p4 -O2 obj-$(CONFIG_GENERATE_ACPI_TABLES) += acpi_tables.o +obj-$(CONFIG_HAVE_HARD_RESET) += reset.o include $(src)/mainboard/Makefile.romccboard.inc Index: src/mainboard/intel/xe7501devkit/Config.lb =================================================================== --- src/mainboard/intel/xe7501devkit/Config.lb (Revision 4830) +++ src/mainboard/intel/xe7501devkit/Config.lb (Arbeitskopie) @@ -12,7 +12,7 @@ if CONFIG_GENERATE_MP_TABLE object mptable.o end if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end if CONFIG_GENERATE_ACPI_TABLES object acpi_tables.o end -object reset.o +if CONFIG_HAVE_HARD_RESET object reset.o end ## ## Romcc output Index: src/mainboard/intel/eagleheights/Makefile.inc =================================================================== --- src/mainboard/intel/eagleheights/Makefile.inc (Revision 4830) +++ src/mainboard/intel/eagleheights/Makefile.inc (Arbeitskopie) @@ -4,7 +4,7 @@ obj-$(CONFIG_GENERATE_ACPI_TABLES) += fadt.o obj-$(CONFIG_GENERATE_ACPI_TABLES) += acpi_tables.o obj-$(CONFIG_GENERATE_ACPI_TABLES) += dsdt.o -obj-y += reset.o +obj-$(CONFIG_HAVE_HARD_RESET) += reset.o # This is part of the conversion to init-obj and away from included code. Index: src/mainboard/intel/eagleheights/Config.lb =================================================================== --- src/mainboard/intel/eagleheights/Config.lb (Revision 4830) +++ src/mainboard/intel/eagleheights/Config.lb (Arbeitskopie) @@ -57,7 +57,7 @@ object ./dsdt.o end -object reset.o +if CONFIG_HAVE_HARD_RESET object reset.o end if CONFIG_USE_INIT Index: src/mainboard/intel/jarrell/Makefile.inc =================================================================== --- src/mainboard/intel/jarrell/Makefile.inc (Revision 4830) +++ src/mainboard/intel/jarrell/Makefile.inc (Arbeitskopie) @@ -1,4 +1,4 @@ -obj-y += reset.o +obj-$(CONFIG_HAVE_HARD_RESET) += reset.o ROMCCFLAGS := -mcpu=p4 -O2 include $(src)/mainboard/Makefile.romccboard.inc Index: src/mainboard/intel/jarrell/Config.lb =================================================================== --- src/mainboard/intel/jarrell/Config.lb (Revision 4830) +++ src/mainboard/intel/jarrell/Config.lb (Arbeitskopie) @@ -20,7 +20,7 @@ driver mainboard.o if CONFIG_GENERATE_MP_TABLE object mptable.o end if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -object reset.o +if CONFIG_HAVE_HARD_RESET object reset.o end ## ## Romcc output Index: src/mainboard/asus/a8v-e_se/Config.lb =================================================================== --- src/mainboard/asus/a8v-e_se/Config.lb (Revision 4830) +++ src/mainboard/asus/a8v-e_se/Config.lb (Arbeitskopie) @@ -39,7 +39,6 @@ end if CONFIG_GENERATE_MP_TABLE object mptable.o end if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -# object reset.o if CONFIG_USE_INIT makerule ./cache_as_ram_auto.o Index: src/mainboard/asus/mew-vm/Config.lb =================================================================== --- src/mainboard/asus/mew-vm/Config.lb (Revision 4830) +++ src/mainboard/asus/mew-vm/Config.lb (Arbeitskopie) @@ -15,7 +15,6 @@ driver mainboard.o if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end -#object reset.o ## ## Romcc output
-- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot