blob: 624b63322d23b20c7167de66c3e70cea7b2f8e13 [file] [log] [blame]
Vadim Bendebury0b341b32014-04-23 11:09:44 -07001##
2## This file is part of the coreboot project.
3##
4## Copyright 2014 Google 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##
Vadim Bendebury0b341b32014-04-23 11:09:44 -070015
Stefan Reinaueraae53ab2015-04-27 14:03:57 -070016ifeq ($(CONFIG_SOC_QC_IPQ806X),y)
17
Vadim Bendeburydb3e2f02014-04-09 19:23:54 -070018bootblock-y += clock.c
Furquan Shaikh9d91aba2014-04-10 20:35:05 -070019bootblock-y += gpio.c
Vadim Bendebury0e2d9b62014-05-01 19:37:18 -070020bootblock-$(CONFIG_SPI_FLASH) += spi.c
Marc Jones017287a2014-12-29 16:52:59 -070021bootblock-y += timer.c
Vadim Bendebury11c4c922014-04-23 14:26:01 -070022bootblock-$(CONFIG_DRIVERS_UART) += uart.c
Furquan Shaikh76570572014-03-19 14:29:48 -070023
Vadim Bendeburyfa00ae72014-12-10 20:11:30 -080024verstage-y += clock.c
25verstage-y += gpio.c
Julius Wernere91d1702017-03-20 15:32:15 -070026verstage-y += gsbi.c
27verstage-y += i2c.c
28verstage-y += qup.c
29verstage-y += spi.c
Vadim Bendeburyfa00ae72014-12-10 20:11:30 -080030verstage-y += timer.c
Patrick Georgi3cbbf192015-06-29 22:50:45 +020031verstage-$(CONFIG_DRIVERS_UART) += uart.c
Vadim Bendeburyfa00ae72014-12-10 20:11:30 -080032
Vadim Bendeburydb3e2f02014-04-09 19:23:54 -070033romstage-y += clock.c
Vadim Bendeburyef77f872014-12-10 20:42:58 -080034romstage-y += blobs_init.c
Furquan Shaikh9d91aba2014-04-10 20:35:05 -070035romstage-y += gpio.c
Vadim Bendebury0e2d9b62014-05-01 19:37:18 -070036romstage-$(CONFIG_SPI_FLASH) += spi.c
Marc Jones017287a2014-12-29 16:52:59 -070037romstage-y += timer.c
Vadim Bendebury11c4c922014-04-23 14:26:01 -070038romstage-$(CONFIG_DRIVERS_UART) += uart.c
Vadim Bendebury15c98b02014-05-01 14:45:56 -070039romstage-y += cbmem.c
Furquan Shaikh76570572014-03-19 14:29:48 -070040
Vikas Das08f249e2014-09-22 17:49:56 -070041ramstage-y += blobs_init.c
Vadim Bendebury15c98b02014-05-01 14:45:56 -070042ramstage-y += cbmem.c
Vadim Bendeburydb3e2f02014-04-09 19:23:54 -070043ramstage-y += clock.c
Furquan Shaikh9d91aba2014-04-10 20:35:05 -070044ramstage-y += gpio.c
Vadim Bendebury3cfb6a02015-02-11 15:13:04 -080045ramstage-y += lcc.c
Vadim Bendebury41a5d0d2014-05-13 17:47:57 -070046ramstage-y += soc.c
Vadim Bendebury0e2d9b62014-05-01 19:37:18 -070047ramstage-$(CONFIG_SPI_FLASH) += spi.c
Vadim Bendeburyf4b209f2014-04-09 19:23:04 -070048ramstage-y += timer.c
Vadim Bendebury7c256402015-01-13 13:07:48 -080049ramstage-y += uart.c # Want the UART always ready for the kernels' earlyprintk
Julius Werner028cba92014-05-30 18:01:44 -070050ramstage-y += usb.c
Vikas Das08f249e2014-09-22 17:49:56 -070051ramstage-y += tz_wrapper.S
Furquan Shaikha7f11b82016-07-25 16:57:46 -070052ramstage-y += gsbi.c
53ramstage-y += i2c.c
54ramstage-y += qup.c
55ramstage-y += spi.c
Vadim Bendeburyb1709bd2014-04-07 15:26:39 -070056
Vadim Bendebury9cb70ae2014-04-07 18:59:53 -070057ifeq ($(CONFIG_USE_BLOBS),y)
Vadim Bendeburyb1709bd2014-04-07 15:26:39 -070058
Vadim Bendebury9cb70ae2014-04-07 18:59:53 -070059# Add MBN header to allow SBL3 to start coreboot bootblock
Aaron Durbind972f782015-09-17 17:02:53 -050060$(objcbfs)/bootblock.mbn: $(objcbfs)/bootblock.raw.bin
Vadim Bendebury9cb70ae2014-04-07 18:59:53 -070061 @printf " ADD MBN $(subst $(obj)/,,$(@))\n"
Julius Wernerec5e5e02014-08-20 15:29:56 -070062 ./util/ipqheader/ipqheader.py $(call loadaddr,bootblock) $< $@.tmp
Vadim Bendebury9cb70ae2014-04-07 18:59:53 -070063 @mv $@.tmp $@
64
65# Create a complete bootblock which will start up the system
Vadim Bendeburye83c80c2014-04-15 14:42:30 -070066$(objcbfs)/bootblock.bin: $(call strip_quotes,$(CONFIG_SBL_BLOB)) \
Vadim Bendebury9cb70ae2014-04-07 18:59:53 -070067 $(objcbfs)/bootblock.mbn
Vadim Bendeburye39ac752014-11-30 16:10:46 -080068 @printf " MBNCAT $(subst $(obj)/,,$(@))\n"
69 @util/ipqheader/mbncat.py -o $@.tmp $^
Vadim Bendebury9cb70ae2014-04-07 18:59:53 -070070 @mv $@.tmp $@
71
Vadim Bendeburyb1709bd2014-04-07 15:26:39 -070072endif
Furquan Shaikh75b4beb2014-04-10 20:53:32 -070073
Furquan Shaikh9d91aba2014-04-10 20:35:05 -070074CPPFLAGS_common += -Isrc/soc/qualcomm/ipq806x/include
Vadim Bendeburyf85640d2014-12-06 18:24:56 -080075
76# List of binary blobs coreboot needs in CBFS to be able to boot up this SOC
77mbn-files := cdt.mbn ddr.mbn rpm.mbn tz.mbn
78
79# Location of the binary blobs
Patrick Georgi26e24cc2015-05-05 22:27:25 +020080mbn-root := 3rdparty/blobs/cpu/qualcomm/ipq806x
Vadim Bendeburyf85640d2014-12-06 18:24:56 -080081
82# Create make variables to aid cbfs-files-handler in processing the blobs (add
83# them all as raw binaries at the root level).
84$(foreach f,$(mbn-files),$(eval cbfs-files-y += $(f))\
85 $(eval $(f)-file := $(mbn-root)/$(f))\
86 $(eval $(f)-type := raw))
Stefan Reinaueraae53ab2015-04-27 14:03:57 -070087
88endif