blob: ca3d86ab0204409554655b26b00451eccdc03c28 [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älkki78c5d582015-01-09 23:48:47 +020037romstage-$(CONFIG_HAVE_ACPI_RESUME) += ramtop.c
38ramstage-$(CONFIG_HAVE_ACPI_RESUME) += ramtop.c
39
Kyösti Mälkkiac164052013-10-11 21:14:59 +030040romstage-$(CONFIG_USBDEBUG_IN_ROMSTAGE) += ../../sb800/enable_usbdebug.c
Kyösti Mälkki0010bf62013-06-11 16:32:01 +030041ramstage-$(CONFIG_USBDEBUG) += ../../sb800/enable_usbdebug.c
Zheng Baob01097e2012-12-14 15:58:15 +080042
Patrick Georgi23f38cd2012-11-16 14:50:32 +010043ramstage-y += smbus.c
44ramstage-y += lpc.c
Frank Vibrans63e62b02011-02-14 18:38:14 +000045
Kerry Shehd4a0e7d2011-10-10 17:17:39 +080046ifeq ($(CONFIG_SB800_SATA_AHCI), y)
47ifdef CONFIG_SB800_AHCI_ROM
48 stripped_ahci_rom_id = $(call strip_quotes,$(CONFIG_AHCI_ROM_ID))
49 cbfs-files-y += pci$(stripped_ahci_rom_id).rom
50 pci$(stripped_ahci_rom_id).rom-file := $(call strip_quotes,$(CONFIG_AHCI_ROM_FILE))
51 pci$(stripped_ahci_rom_id).rom-type := optionrom
52endif
53endif
Frank Vibrans63e62b02011-02-14 18:38:14 +000054
Kerry Shehd4a0e7d2011-10-10 17:17:39 +080055ifeq ($(CONFIG_SB800_SATA_RAID), y)
56 stripped_raid_rom_id = $(call strip_quotes,$(CONFIG_RAID_ROM_ID))
57 cbfs-files-y += pci$(stripped_raid_rom_id).rom
58 pci$(stripped_raid_rom_id).rom-file := $(call strip_quotes,$(CONFIG_RAID_ROM_FILE))
59 pci$(stripped_raid_rom_id).rom-type := optionrom
60
61 cbfs-files-y += raid/misc.bin
62 raid/misc.bin-file := $(call strip_quotes,$(CONFIG_RAID_MISC_ROM_FILE))
Kerry Sheh55437c52011-10-12 11:42:59 +080063 raid/misc.bin-position := $(CONFIG_RAID_MISC_ROM_POSITION)
Kerry Shehd4a0e7d2011-10-10 17:17:39 +080064 raid/misc.bin-type := raw
65endif
Martin Rothe899e512012-12-05 16:07:11 -070066
67ifeq ($(CONFIG_SB800_IMC_FWM), y)
68
69# ROMSIG At ROMBASE + 0x20000:
70# +-----------+---------------+----------------+------------+
71# |0x55AA55AA |EC ROM Address |GEC ROM Address | |
72# +-----------+---------------+----------------+------------+
73# EC ROM should be 64K aligned.
74SB800_FWM_POSITION=$(shell printf %u $(CONFIG_SB800_FWM_POSITION))
75#assume the cbfs header is less than 128 bytes.
76ROMSIG_SIZE=16
77
Patrick Georgi3eefeea2014-11-12 19:11:50 +010078SB800_IMC_POSITION=$(call int-align,$(call add-int,$(SB800_FWM_POSITION) $(ROMSIG_SIZE) 128),65536)
Martin Rothe899e512012-12-05 16:07:11 -070079
80$(obj)/coreboot_SB800_romsig.bin: \
81 $(call strip_quotes, $(CONFIG_SB800_IMC_FWM_FILE)) \
82 $(obj)/config.h \
83 $(obj)/mainboard/$(MAINBOARDDIR)/static.c
84 echo " SB800 FW $@"
85 for fwm in 1437226410 \
86 $(SB800_IMC_POSITION) \
87 0 \
88 0 ; do \
89 echo $$fwm | LC_ALL=C awk '{printf ("%c%c%c%c", $$1 % 256, int($$1/256) % 256, int($$1/65536) % 256, int($$1/16777216));}'; \
90 done > $@
91
92cbfs-files-y += SB800/fwm
93SB800/fwm-file := $(obj)/coreboot_SB800_romsig.bin
94SB800/fwm-position := $(SB800_FWM_POSITION)
95SB800/fwm-type := raw
96
97cbfs-files-y += SB800/imc
98SB800/imc-file := $(call strip_quotes, $(CONFIG_SB800_IMC_FWM_FILE))
99SB800/imc-position := $(SB800_IMC_POSITION)
100SB800/imc-type := raw
101
102endif