blob: f4a84b7c223d1c0cad1198508b5692fb545b058a [file] [log] [blame]
Frank Vibrans63e62b02011-02-14 18:38:14 +00001#
2# This file is part of the coreboot project.
3#
4# Copyright (C) 2011 Advanced Micro Devices, Inc.
5#
6# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; version 2 of the License.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software
Paul Menzela46a7122013-02-23 18:37:27 +010017# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Frank Vibrans63e62b02011-02-14 18:38:14 +000018#
19
Frank Vibrans63e62b02011-02-14 18:38:14 +000020
21# SB800 Platform Files
22
23romstage-y += cfg.c
24romstage-y += early.c
Kyösti Mälkkia1ebbc42014-10-17 22:33:22 +030025romstage-y += smbus.c smbus_spd.c
Kyösti Mälkki56892fc2013-06-16 17:12:37 +030026romstage-y += reset.c
Frank Vibrans63e62b02011-02-14 18:38:14 +000027
28ramstage-y += cfg.c
29ramstage-y += late.c
Kyösti Mälkki56892fc2013-06-16 17:12:37 +030030ramstage-y += reset.c
Frank Vibrans63e62b02011-02-14 18:38:14 +000031
Martin Rothe899e512012-12-05 16:07:11 -070032ramstage-$(CONFIG_SB800_MANUAL_FAN_CONTROL) += fan.c
33ramstage-$(CONFIG_SB800_IMC_FAN_CONTROL) += fan.c
Kyösti Mälkkiadf3d6f2014-06-19 16:51:54 +030034ramstage-$(CONFIG_SPI_FLASH) += spi.c
Vladimir Serbinenko822bc652014-01-03 15:55:40 +010035ramstage-$(CONFIG_HAVE_ACPI_TABLES) += fadt.c
zbao01bd79f2012-03-23 11:36:08 +080036
Kyösti Mälkkiac164052013-10-11 21:14:59 +030037romstage-$(CONFIG_USBDEBUG_IN_ROMSTAGE) += ../../sb800/enable_usbdebug.c
Kyösti Mälkki0010bf62013-06-11 16:32:01 +030038ramstage-$(CONFIG_USBDEBUG) += ../../sb800/enable_usbdebug.c
Zheng Baob01097e2012-12-14 15:58:15 +080039
Patrick Georgi23f38cd2012-11-16 14:50:32 +010040ramstage-y += smbus.c
41ramstage-y += lpc.c
Frank Vibrans63e62b02011-02-14 18:38:14 +000042
Kerry Shehd4a0e7d2011-10-10 17:17:39 +080043ifeq ($(CONFIG_SB800_SATA_AHCI), y)
44ifdef CONFIG_SB800_AHCI_ROM
45 stripped_ahci_rom_id = $(call strip_quotes,$(CONFIG_AHCI_ROM_ID))
46 cbfs-files-y += pci$(stripped_ahci_rom_id).rom
47 pci$(stripped_ahci_rom_id).rom-file := $(call strip_quotes,$(CONFIG_AHCI_ROM_FILE))
48 pci$(stripped_ahci_rom_id).rom-type := optionrom
49endif
50endif
Frank Vibrans63e62b02011-02-14 18:38:14 +000051
Kerry Shehd4a0e7d2011-10-10 17:17:39 +080052ifeq ($(CONFIG_SB800_SATA_RAID), y)
53 stripped_raid_rom_id = $(call strip_quotes,$(CONFIG_RAID_ROM_ID))
54 cbfs-files-y += pci$(stripped_raid_rom_id).rom
55 pci$(stripped_raid_rom_id).rom-file := $(call strip_quotes,$(CONFIG_RAID_ROM_FILE))
56 pci$(stripped_raid_rom_id).rom-type := optionrom
57
58 cbfs-files-y += raid/misc.bin
59 raid/misc.bin-file := $(call strip_quotes,$(CONFIG_RAID_MISC_ROM_FILE))
Kerry Sheh55437c52011-10-12 11:42:59 +080060 raid/misc.bin-position := $(CONFIG_RAID_MISC_ROM_POSITION)
Kerry Shehd4a0e7d2011-10-10 17:17:39 +080061 raid/misc.bin-type := raw
62endif
Martin Rothe899e512012-12-05 16:07:11 -070063
64ifeq ($(CONFIG_SB800_IMC_FWM), y)
65
66# ROMSIG At ROMBASE + 0x20000:
67# +-----------+---------------+----------------+------------+
68# |0x55AA55AA |EC ROM Address |GEC ROM Address | |
69# +-----------+---------------+----------------+------------+
70# EC ROM should be 64K aligned.
71SB800_FWM_POSITION=$(shell printf %u $(CONFIG_SB800_FWM_POSITION))
72#assume the cbfs header is less than 128 bytes.
73ROMSIG_SIZE=16
74
Patrick Georgi3eefeea2014-11-12 19:11:50 +010075SB800_IMC_POSITION=$(call int-align,$(call add-int,$(SB800_FWM_POSITION) $(ROMSIG_SIZE) 128),65536)
Martin Rothe899e512012-12-05 16:07:11 -070076
77$(obj)/coreboot_SB800_romsig.bin: \
78 $(call strip_quotes, $(CONFIG_SB800_IMC_FWM_FILE)) \
79 $(obj)/config.h \
80 $(obj)/mainboard/$(MAINBOARDDIR)/static.c
81 echo " SB800 FW $@"
82 for fwm in 1437226410 \
83 $(SB800_IMC_POSITION) \
84 0 \
85 0 ; do \
86 echo $$fwm | LC_ALL=C awk '{printf ("%c%c%c%c", $$1 % 256, int($$1/256) % 256, int($$1/65536) % 256, int($$1/16777216));}'; \
87 done > $@
88
89cbfs-files-y += SB800/fwm
90SB800/fwm-file := $(obj)/coreboot_SB800_romsig.bin
91SB800/fwm-position := $(SB800_FWM_POSITION)
92SB800/fwm-type := raw
93
94cbfs-files-y += SB800/imc
95SB800/imc-file := $(call strip_quotes, $(CONFIG_SB800_IMC_FWM_FILE))
96SB800/imc-position := $(SB800_IMC_POSITION)
97SB800/imc-type := raw
98
99endif