blob: f74d7ce60559a810441dab7bf8af8ea0ce678c50 [file] [log] [blame]
Frank Vibrans63e62b02011-02-14 18:38:14 +00001#
2# This file is part of the coreboot project.
3#
Frank Vibrans63e62b02011-02-14 18:38:14 +00004#
Patrick Georgic49d7a32020-05-08 22:50:46 +02005# SPDX-License-Identifier: GPL-2.0-only
Frank Vibrans63e62b02011-02-14 18:38:14 +00006
7# SB800 Platform Files
8
Michał Żygowski08cd6512019-11-28 14:14:52 +01009bootblock-y += bootblock.c
Michał Żygowski08cd6512019-11-28 14:14:52 +010010
Frank Vibrans63e62b02011-02-14 18:38:14 +000011romstage-y += cfg.c
12romstage-y += early.c
Kyösti Mälkkia1ebbc42014-10-17 22:33:22 +030013romstage-y += smbus.c smbus_spd.c
Frank Vibrans63e62b02011-02-14 18:38:14 +000014
15ramstage-y += cfg.c
16ramstage-y += late.c
Kyösti Mälkki9db39872019-12-13 18:11:05 +020017
18all-y += reset.c
Frank Vibrans63e62b02011-02-14 18:38:14 +000019
Martin Rothe899e512012-12-05 16:07:11 -070020ramstage-$(CONFIG_SB800_MANUAL_FAN_CONTROL) += fan.c
21ramstage-$(CONFIG_SB800_IMC_FAN_CONTROL) += fan.c
Kyösti Mälkkiadf3d6f2014-06-19 16:51:54 +030022ramstage-$(CONFIG_SPI_FLASH) += spi.c
Vladimir Serbinenko822bc652014-01-03 15:55:40 +010023ramstage-$(CONFIG_HAVE_ACPI_TABLES) += fadt.c
zbao01bd79f2012-03-23 11:36:08 +080024
Kyösti Mälkki63fac812017-09-02 16:41:43 +030025postcar-y += ramtop.c
Kyösti Mälkki61be3602017-04-15 20:07:53 +030026romstage-y += ramtop.c
27ramstage-y += ramtop.c
Kyösti Mälkki78c5d582015-01-09 23:48:47 +020028
Arthur Heymansadc47532018-12-28 15:48:58 +010029bootblock-$(CONFIG_USBDEBUG) += ../../sb800/enable_usbdebug.c
30romstage-$(CONFIG_USBDEBUG) += ../../sb800/enable_usbdebug.c
Kyösti Mälkki0010bf62013-06-11 16:32:01 +030031ramstage-$(CONFIG_USBDEBUG) += ../../sb800/enable_usbdebug.c
Zheng Baob01097e2012-12-14 15:58:15 +080032
Patrick Georgi23f38cd2012-11-16 14:50:32 +010033ramstage-y += smbus.c
34ramstage-y += lpc.c
Frank Vibrans63e62b02011-02-14 18:38:14 +000035
Kerry Shehd4a0e7d2011-10-10 17:17:39 +080036ifeq ($(CONFIG_SB800_SATA_AHCI), y)
37ifdef CONFIG_SB800_AHCI_ROM
38 stripped_ahci_rom_id = $(call strip_quotes,$(CONFIG_AHCI_ROM_ID))
39 cbfs-files-y += pci$(stripped_ahci_rom_id).rom
40 pci$(stripped_ahci_rom_id).rom-file := $(call strip_quotes,$(CONFIG_AHCI_ROM_FILE))
41 pci$(stripped_ahci_rom_id).rom-type := optionrom
42endif
43endif
Frank Vibrans63e62b02011-02-14 18:38:14 +000044
Kerry Shehd4a0e7d2011-10-10 17:17:39 +080045ifeq ($(CONFIG_SB800_SATA_RAID), y)
46 stripped_raid_rom_id = $(call strip_quotes,$(CONFIG_RAID_ROM_ID))
47 cbfs-files-y += pci$(stripped_raid_rom_id).rom
48 pci$(stripped_raid_rom_id).rom-file := $(call strip_quotes,$(CONFIG_RAID_ROM_FILE))
49 pci$(stripped_raid_rom_id).rom-type := optionrom
50
51 cbfs-files-y += raid/misc.bin
52 raid/misc.bin-file := $(call strip_quotes,$(CONFIG_RAID_MISC_ROM_FILE))
Kerry Sheh55437c52011-10-12 11:42:59 +080053 raid/misc.bin-position := $(CONFIG_RAID_MISC_ROM_POSITION)
Kerry Shehd4a0e7d2011-10-10 17:17:39 +080054 raid/misc.bin-type := raw
55endif
Martin Rothe899e512012-12-05 16:07:11 -070056
57ifeq ($(CONFIG_SB800_IMC_FWM), y)
58
59# ROMSIG At ROMBASE + 0x20000:
60# +-----------+---------------+----------------+------------+
61# |0x55AA55AA |EC ROM Address |GEC ROM Address | |
62# +-----------+---------------+----------------+------------+
63# EC ROM should be 64K aligned.
64SB800_FWM_POSITION=$(shell printf %u $(CONFIG_SB800_FWM_POSITION))
65#assume the cbfs header is less than 128 bytes.
66ROMSIG_SIZE=16
67
Patrick Georgi3eefeea2014-11-12 19:11:50 +010068SB800_IMC_POSITION=$(call int-align,$(call add-int,$(SB800_FWM_POSITION) $(ROMSIG_SIZE) 128),65536)
Martin Rothe899e512012-12-05 16:07:11 -070069
70$(obj)/coreboot_SB800_romsig.bin: \
71 $(call strip_quotes, $(CONFIG_SB800_IMC_FWM_FILE)) \
72 $(obj)/config.h \
73 $(obj)/mainboard/$(MAINBOARDDIR)/static.c
74 echo " SB800 FW $@"
75 for fwm in 1437226410 \
76 $(SB800_IMC_POSITION) \
77 0 \
78 0 ; do \
79 echo $$fwm | LC_ALL=C awk '{printf ("%c%c%c%c", $$1 % 256, int($$1/256) % 256, int($$1/65536) % 256, int($$1/16777216));}'; \
80 done > $@
81
82cbfs-files-y += SB800/fwm
83SB800/fwm-file := $(obj)/coreboot_SB800_romsig.bin
84SB800/fwm-position := $(SB800_FWM_POSITION)
85SB800/fwm-type := raw
86
87cbfs-files-y += SB800/imc
88SB800/imc-file := $(call strip_quotes, $(CONFIG_SB800_IMC_FWM_FILE))
89SB800/imc-position := $(SB800_IMC_POSITION)
90SB800/imc-type := raw
91
92endif