Patrick Georgi | c49d7a3 | 2020-05-08 22:50:46 +0200 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0-only |
Frank Vibrans | 63e62b0 | 2011-02-14 18:38:14 +0000 | [diff] [blame] | 2 | |
| 3 | # SB800 Platform Files |
| 4 | |
Michał Żygowski | 08cd651 | 2019-11-28 14:14:52 +0100 | [diff] [blame] | 5 | bootblock-y += bootblock.c |
Michał Żygowski | 08cd651 | 2019-11-28 14:14:52 +0100 | [diff] [blame] | 6 | |
Frank Vibrans | 63e62b0 | 2011-02-14 18:38:14 +0000 | [diff] [blame] | 7 | romstage-y += cfg.c |
| 8 | romstage-y += early.c |
Kyösti Mälkki | a1ebbc4 | 2014-10-17 22:33:22 +0300 | [diff] [blame] | 9 | romstage-y += smbus.c smbus_spd.c |
Frank Vibrans | 63e62b0 | 2011-02-14 18:38:14 +0000 | [diff] [blame] | 10 | |
| 11 | ramstage-y += cfg.c |
| 12 | ramstage-y += late.c |
Kyösti Mälkki | 9db3987 | 2019-12-13 18:11:05 +0200 | [diff] [blame] | 13 | |
| 14 | all-y += reset.c |
Frank Vibrans | 63e62b0 | 2011-02-14 18:38:14 +0000 | [diff] [blame] | 15 | |
Martin Roth | e899e51 | 2012-12-05 16:07:11 -0700 | [diff] [blame] | 16 | ramstage-$(CONFIG_SB800_MANUAL_FAN_CONTROL) += fan.c |
| 17 | ramstage-$(CONFIG_SB800_IMC_FAN_CONTROL) += fan.c |
Kyösti Mälkki | adf3d6f | 2014-06-19 16:51:54 +0300 | [diff] [blame] | 18 | ramstage-$(CONFIG_SPI_FLASH) += spi.c |
Vladimir Serbinenko | 822bc65 | 2014-01-03 15:55:40 +0100 | [diff] [blame] | 19 | ramstage-$(CONFIG_HAVE_ACPI_TABLES) += fadt.c |
zbao | 01bd79f | 2012-03-23 11:36:08 +0800 | [diff] [blame] | 20 | |
Kyösti Mälkki | 63fac81 | 2017-09-02 16:41:43 +0300 | [diff] [blame] | 21 | postcar-y += ramtop.c |
Kyösti Mälkki | 61be360 | 2017-04-15 20:07:53 +0300 | [diff] [blame] | 22 | romstage-y += ramtop.c |
| 23 | ramstage-y += ramtop.c |
Kyösti Mälkki | 78c5d58 | 2015-01-09 23:48:47 +0200 | [diff] [blame] | 24 | |
Arthur Heymans | adc4753 | 2018-12-28 15:48:58 +0100 | [diff] [blame] | 25 | bootblock-$(CONFIG_USBDEBUG) += ../../sb800/enable_usbdebug.c |
| 26 | romstage-$(CONFIG_USBDEBUG) += ../../sb800/enable_usbdebug.c |
Kyösti Mälkki | 0010bf6 | 2013-06-11 16:32:01 +0300 | [diff] [blame] | 27 | ramstage-$(CONFIG_USBDEBUG) += ../../sb800/enable_usbdebug.c |
Zheng Bao | b01097e | 2012-12-14 15:58:15 +0800 | [diff] [blame] | 28 | |
Patrick Georgi | 23f38cd | 2012-11-16 14:50:32 +0100 | [diff] [blame] | 29 | ramstage-y += smbus.c |
| 30 | ramstage-y += lpc.c |
Frank Vibrans | 63e62b0 | 2011-02-14 18:38:14 +0000 | [diff] [blame] | 31 | |
Kerry Sheh | d4a0e7d | 2011-10-10 17:17:39 +0800 | [diff] [blame] | 32 | ifeq ($(CONFIG_SB800_SATA_AHCI), y) |
| 33 | ifdef CONFIG_SB800_AHCI_ROM |
| 34 | stripped_ahci_rom_id = $(call strip_quotes,$(CONFIG_AHCI_ROM_ID)) |
| 35 | cbfs-files-y += pci$(stripped_ahci_rom_id).rom |
| 36 | pci$(stripped_ahci_rom_id).rom-file := $(call strip_quotes,$(CONFIG_AHCI_ROM_FILE)) |
| 37 | pci$(stripped_ahci_rom_id).rom-type := optionrom |
| 38 | endif |
| 39 | endif |
Frank Vibrans | 63e62b0 | 2011-02-14 18:38:14 +0000 | [diff] [blame] | 40 | |
Kerry Sheh | d4a0e7d | 2011-10-10 17:17:39 +0800 | [diff] [blame] | 41 | ifeq ($(CONFIG_SB800_SATA_RAID), y) |
| 42 | stripped_raid_rom_id = $(call strip_quotes,$(CONFIG_RAID_ROM_ID)) |
| 43 | cbfs-files-y += pci$(stripped_raid_rom_id).rom |
| 44 | pci$(stripped_raid_rom_id).rom-file := $(call strip_quotes,$(CONFIG_RAID_ROM_FILE)) |
| 45 | pci$(stripped_raid_rom_id).rom-type := optionrom |
| 46 | |
| 47 | cbfs-files-y += raid/misc.bin |
| 48 | raid/misc.bin-file := $(call strip_quotes,$(CONFIG_RAID_MISC_ROM_FILE)) |
Kerry Sheh | 55437c5 | 2011-10-12 11:42:59 +0800 | [diff] [blame] | 49 | raid/misc.bin-position := $(CONFIG_RAID_MISC_ROM_POSITION) |
Kerry Sheh | d4a0e7d | 2011-10-10 17:17:39 +0800 | [diff] [blame] | 50 | raid/misc.bin-type := raw |
| 51 | endif |
Martin Roth | e899e51 | 2012-12-05 16:07:11 -0700 | [diff] [blame] | 52 | |
| 53 | ifeq ($(CONFIG_SB800_IMC_FWM), y) |
| 54 | |
| 55 | # ROMSIG At ROMBASE + 0x20000: |
| 56 | # +-----------+---------------+----------------+------------+ |
| 57 | # |0x55AA55AA |EC ROM Address |GEC ROM Address | | |
| 58 | # +-----------+---------------+----------------+------------+ |
| 59 | # EC ROM should be 64K aligned. |
| 60 | SB800_FWM_POSITION=$(shell printf %u $(CONFIG_SB800_FWM_POSITION)) |
| 61 | #assume the cbfs header is less than 128 bytes. |
| 62 | ROMSIG_SIZE=16 |
| 63 | |
Patrick Georgi | 3eefeea | 2014-11-12 19:11:50 +0100 | [diff] [blame] | 64 | SB800_IMC_POSITION=$(call int-align,$(call add-int,$(SB800_FWM_POSITION) $(ROMSIG_SIZE) 128),65536) |
Martin Roth | e899e51 | 2012-12-05 16:07:11 -0700 | [diff] [blame] | 65 | |
| 66 | $(obj)/coreboot_SB800_romsig.bin: \ |
| 67 | $(call strip_quotes, $(CONFIG_SB800_IMC_FWM_FILE)) \ |
| 68 | $(obj)/config.h \ |
| 69 | $(obj)/mainboard/$(MAINBOARDDIR)/static.c |
| 70 | echo " SB800 FW $@" |
| 71 | for fwm in 1437226410 \ |
| 72 | $(SB800_IMC_POSITION) \ |
| 73 | 0 \ |
| 74 | 0 ; do \ |
| 75 | echo $$fwm | LC_ALL=C awk '{printf ("%c%c%c%c", $$1 % 256, int($$1/256) % 256, int($$1/65536) % 256, int($$1/16777216));}'; \ |
| 76 | done > $@ |
| 77 | |
| 78 | cbfs-files-y += SB800/fwm |
| 79 | SB800/fwm-file := $(obj)/coreboot_SB800_romsig.bin |
| 80 | SB800/fwm-position := $(SB800_FWM_POSITION) |
| 81 | SB800/fwm-type := raw |
| 82 | |
| 83 | cbfs-files-y += SB800/imc |
| 84 | SB800/imc-file := $(call strip_quotes, $(CONFIG_SB800_IMC_FWM_FILE)) |
| 85 | SB800/imc-position := $(SB800_IMC_POSITION) |
| 86 | SB800/imc-type := raw |
| 87 | |
| 88 | endif |