Frank Vibrans | 63e62b0 | 2011-02-14 18:38:14 +0000 | [diff] [blame] | 1 | # |
| 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 Menzel | a46a712 | 2013-02-23 18:37:27 +0100 | [diff] [blame] | 17 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
Frank Vibrans | 63e62b0 | 2011-02-14 18:38:14 +0000 | [diff] [blame] | 18 | # |
| 19 | |
Frank Vibrans | 63e62b0 | 2011-02-14 18:38:14 +0000 | [diff] [blame] | 20 | |
| 21 | # SB800 Platform Files |
| 22 | |
| 23 | romstage-y += cfg.c |
| 24 | romstage-y += early.c |
| 25 | romstage-y += smbus.c |
Kyösti Mälkki | 56892fc | 2013-06-16 17:12:37 +0300 | [diff] [blame] | 26 | romstage-y += reset.c |
Frank Vibrans | 63e62b0 | 2011-02-14 18:38:14 +0000 | [diff] [blame] | 27 | |
| 28 | ramstage-y += cfg.c |
| 29 | ramstage-y += late.c |
Kyösti Mälkki | 56892fc | 2013-06-16 17:12:37 +0300 | [diff] [blame] | 30 | ramstage-y += reset.c |
Frank Vibrans | 63e62b0 | 2011-02-14 18:38:14 +0000 | [diff] [blame] | 31 | |
Martin Roth | e899e51 | 2012-12-05 16:07:11 -0700 | [diff] [blame] | 32 | ramstage-$(CONFIG_SB800_MANUAL_FAN_CONTROL) += fan.c |
| 33 | ramstage-$(CONFIG_SB800_IMC_FAN_CONTROL) += fan.c |
Kyösti Mälkki | adf3d6f | 2014-06-19 16:51:54 +0300 | [diff] [blame] | 34 | ramstage-$(CONFIG_SPI_FLASH) += spi.c |
Vladimir Serbinenko | 822bc65 | 2014-01-03 15:55:40 +0100 | [diff] [blame^] | 35 | ramstage-$(CONFIG_HAVE_ACPI_TABLES) += fadt.c |
zbao | 01bd79f | 2012-03-23 11:36:08 +0800 | [diff] [blame] | 36 | |
Kyösti Mälkki | ac16405 | 2013-10-11 21:14:59 +0300 | [diff] [blame] | 37 | romstage-$(CONFIG_USBDEBUG_IN_ROMSTAGE) += ../../sb800/enable_usbdebug.c |
Kyösti Mälkki | 0010bf6 | 2013-06-11 16:32:01 +0300 | [diff] [blame] | 38 | ramstage-$(CONFIG_USBDEBUG) += ../../sb800/enable_usbdebug.c |
Zheng Bao | b01097e | 2012-12-14 15:58:15 +0800 | [diff] [blame] | 39 | |
Patrick Georgi | 23f38cd | 2012-11-16 14:50:32 +0100 | [diff] [blame] | 40 | ramstage-y += smbus.c |
| 41 | ramstage-y += lpc.c |
Frank Vibrans | 63e62b0 | 2011-02-14 18:38:14 +0000 | [diff] [blame] | 42 | |
Kerry Sheh | d4a0e7d | 2011-10-10 17:17:39 +0800 | [diff] [blame] | 43 | ifeq ($(CONFIG_SB800_SATA_AHCI), y) |
| 44 | ifdef 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 |
| 49 | endif |
| 50 | endif |
Frank Vibrans | 63e62b0 | 2011-02-14 18:38:14 +0000 | [diff] [blame] | 51 | |
Kerry Sheh | d4a0e7d | 2011-10-10 17:17:39 +0800 | [diff] [blame] | 52 | ifeq ($(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 Sheh | 55437c5 | 2011-10-12 11:42:59 +0800 | [diff] [blame] | 60 | raid/misc.bin-position := $(CONFIG_RAID_MISC_ROM_POSITION) |
Kerry Sheh | d4a0e7d | 2011-10-10 17:17:39 +0800 | [diff] [blame] | 61 | raid/misc.bin-type := raw |
| 62 | endif |
Martin Roth | e899e51 | 2012-12-05 16:07:11 -0700 | [diff] [blame] | 63 | |
| 64 | ifeq ($(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. |
| 71 | SB800_FWM_POSITION=$(shell printf %u $(CONFIG_SB800_FWM_POSITION)) |
| 72 | #assume the cbfs header is less than 128 bytes. |
| 73 | ROMSIG_SIZE=16 |
| 74 | |
Martin Roth | d2be1f1 | 2013-03-11 13:17:27 -0600 | [diff] [blame] | 75 | SB800_IMC_POSITION_UNALIGN=$(shell echo $(SB800_FWM_POSITION) $(ROMSIG_SIZE) \ |
| 76 | 128 65535 | awk '{printf("%.0f", $$1 + $$2 + $$3 + $$4)}') |
| 77 | SB800_IMC_POSITION=$(shell echo $(SB800_IMC_POSITION_UNALIGN) \ |
| 78 | | awk '{printf("%.0f", $$1 - $$1 % 65536)}') |
Martin Roth | e899e51 | 2012-12-05 16:07:11 -0700 | [diff] [blame] | 79 | |
| 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 | |
| 92 | cbfs-files-y += SB800/fwm |
| 93 | SB800/fwm-file := $(obj)/coreboot_SB800_romsig.bin |
| 94 | SB800/fwm-position := $(SB800_FWM_POSITION) |
| 95 | SB800/fwm-type := raw |
| 96 | |
| 97 | cbfs-files-y += SB800/imc |
| 98 | SB800/imc-file := $(call strip_quotes, $(CONFIG_SB800_IMC_FWM_FILE)) |
| 99 | SB800/imc-position := $(SB800_IMC_POSITION) |
| 100 | SB800/imc-type := raw |
| 101 | |
| 102 | endif |