Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0+ |
Nobuhiro Iwamatsu | f3db9da | 2012-06-13 16:29:47 +0900 | [diff] [blame] | 2 | # |
| 3 | # (C) Copyright 2000-2006 |
| 4 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
Nobuhiro Iwamatsu | f3db9da | 2012-06-13 16:29:47 +0900 | [diff] [blame] | 5 | |
Nobuhiro Iwamatsu | 4752711 | 2013-11-21 17:06:44 +0900 | [diff] [blame] | 6 | obj-y = cpu_info.o |
Masahiro Yamada | d449575 | 2013-10-17 17:34:48 +0900 | [diff] [blame] | 7 | obj-y += emac.o |
Nobuhiro Iwamatsu | f3db9da | 2012-06-13 16:29:47 +0900 | [diff] [blame] | 8 | |
Masahiro Yamada | d449575 | 2013-10-17 17:34:48 +0900 | [diff] [blame] | 9 | obj-$(CONFIG_DISPLAY_BOARDINFO) += board.o |
Marek Vasut | 19d7805 | 2018-05-02 12:09:23 +0200 | [diff] [blame] | 10 | obj-$(CONFIG_TMU_TIMER) += ../../sh/lib/time.o |
Marek Vasut | 19d7805 | 2018-05-02 12:09:23 +0200 | [diff] [blame] | 11 | obj-$(CONFIG_RCAR_GEN2) += lowlevel_init_ca15.o cpu_info-rcar.o |
Paul Barker | d5e2e69 | 2023-10-16 10:25:41 +0100 | [diff] [blame] | 12 | obj-$(CONFIG_RCAR_64) += lowlevel_init_gen3.o |
| 13 | obj-$(CONFIG_RCAR_GEN3) += cpu_info-rcar.o memmap-gen3.o |
| 14 | obj-$(CONFIG_RCAR_GEN4) += cpu_info-rcar.o memmap-gen3.o |
Biju Das | 2f611af | 2021-03-17 14:11:50 +0000 | [diff] [blame] | 15 | obj-$(CONFIG_RZ_G2) += cpu_info-rzg.o |
Paul Barker | d5e2e69 | 2023-10-16 10:25:41 +0100 | [diff] [blame] | 16 | obj-$(CONFIG_RZG2L) += cpu_info-rzg2l.o memmap-rzg2l.o |
Marek Vasut | e39fa7d | 2018-10-03 12:44:13 +0200 | [diff] [blame] | 17 | |
Hai Pham | d3cf5c6 | 2020-10-27 19:06:51 +0700 | [diff] [blame] | 18 | ifneq ($(CONFIG_R8A779A0),) |
| 19 | obj-$(CONFIG_ARMV8_PSCI) += psci-r8a779a0.o |
| 20 | endif |
| 21 | |
Marek Vasut | e39fa7d | 2018-10-03 12:44:13 +0200 | [diff] [blame] | 22 | OBJCOPYFLAGS_u-boot-spl.srec := -O srec |
| 23 | quiet_cmd_objcopy = OBJCOPY $@ |
| 24 | cmd_objcopy = $(OBJCOPY) --gap-fill=0x00 $(OBJCOPYFLAGS) \ |
| 25 | $(OBJCOPYFLAGS_$(@F)) $< $@ |
| 26 | |
| 27 | spl/u-boot-spl.srec: spl/u-boot-spl FORCE |
| 28 | $(call if_changed,objcopy) |
| 29 | |
Hai Pham | 1e34963 | 2023-06-20 00:43:18 +0200 | [diff] [blame] | 30 | srec_cat_gte_160 := ${shell expr `srec_cat -VERSION | grep ^srec_cat | sed 's/^.* //g' | cut -f1-2 -d.` \>= "1.60"} |
| 31 | ifeq "$(srec_cat_gte_160)" "1" |
| 32 | srec_cat_le_cmd := "-constant-l-e" |
| 33 | else |
| 34 | srec_cat_le_cmd := "-l-e-constant" |
| 35 | endif |
| 36 | |
Lad Prabhakar | bef12c1 | 2021-03-15 22:24:06 +0000 | [diff] [blame] | 37 | ifneq ($(CONFIG_R8A774C0)$(CONFIG_R8A77990)$(CONFIG_R8A77995),) |
Marek Vasut | e39fa7d | 2018-10-03 12:44:13 +0200 | [diff] [blame] | 38 | # |
| 39 | # The first 6 generate statements generate the R-Car Gen3 SCIF loader header. |
| 40 | # The subsequent generate statements represent the following chunk of assembler |
| 41 | # code, which copies the loaded data from 0xe6304030 to 0xe6318000. This is to |
| 42 | # work around a limitation of the D3/E3 BootROM, which does not permit loading |
| 43 | # to 0xe6318000 directly. |
| 44 | # |
| 45 | # mov x0, #0xe6000000 |
| 46 | # orr x0, x0, #0x00300000 |
| 47 | # orr x1, x0, #0x00004000 |
| 48 | # orr x1, x1, #0x00000030 |
| 49 | # |
| 50 | # orr x2, x0, #0x00018000 |
| 51 | # mov x0, x2 |
| 52 | # mov x3, #0x7000 |
| 53 | #1: ldp x4, x5, [x1], #16 |
| 54 | # |
| 55 | # stp x4, x5, [x2], #16 |
| 56 | # subs x3, x3, #16 |
| 57 | # b.ge 1b |
| 58 | # br x0 |
| 59 | # |
| 60 | quiet_cmd_srec_cat = SRECCAT $@ |
| 61 | cmd_srec_cat = srec_cat -output $@ -M 8 $< -M 8 \ |
| 62 | -offset -0x13fd0 \ |
| 63 | -Output_Block_Size 16 \ |
Hai Pham | 1e34963 | 2023-06-20 00:43:18 +0200 | [diff] [blame] | 64 | -generate 0xe6300400 0xe6300404 $(srec_cat_le_cmd) 0x0 4 \ |
| 65 | -generate 0xe630048c 0xe6300490 $(srec_cat_le_cmd) 0x0 4 \ |
| 66 | -generate 0xe63005d4 0xe63005d8 $(srec_cat_le_cmd) 0xe6304000 4 \ |
| 67 | -generate 0xe63006e4 0xe63006e8 $(srec_cat_le_cmd) $2 4 \ |
| 68 | -generate 0xe6301154 0xe6301158 $(srec_cat_le_cmd) 0xe6304000 4 \ |
| 69 | -generate 0xe6301264 0xe6301268 $(srec_cat_le_cmd) $2 4 \ |
| 70 | -generate 0xe6304000 0xe6304004 $(srec_cat_le_cmd) 0xd2bcc000 4 \ |
| 71 | -generate 0xe6304004 0xe6304008 $(srec_cat_le_cmd) 0xb26c0400 4 \ |
| 72 | -generate 0xe6304008 0xe630400c $(srec_cat_le_cmd) 0xb2720001 4 \ |
| 73 | -generate 0xe630400c 0xe6304010 $(srec_cat_le_cmd) 0xb27c0421 4 \ |
| 74 | -generate 0xe6304010 0xe6304014 $(srec_cat_le_cmd) 0xb2710402 4 \ |
| 75 | -generate 0xe6304014 0xe6304018 $(srec_cat_le_cmd) 0xaa0203e0 4 \ |
| 76 | -generate 0xe6304018 0xe630401c $(srec_cat_le_cmd) 0xd28e0003 4 \ |
| 77 | -generate 0xe630401c 0xe6304020 $(srec_cat_le_cmd) 0xa8c11424 4 \ |
| 78 | -generate 0xe6304020 0xe6304024 $(srec_cat_le_cmd) 0xa8811444 4 \ |
| 79 | -generate 0xe6304024 0xe6304028 $(srec_cat_le_cmd) 0xf1004063 4 \ |
| 80 | -generate 0xe6304028 0xe630402c $(srec_cat_le_cmd) 0x54ffffaa 4 \ |
| 81 | -generate 0xe630402c 0xe6304030 $(srec_cat_le_cmd) 0xd61f0000 4 |
Marek Vasut | e39fa7d | 2018-10-03 12:44:13 +0200 | [diff] [blame] | 82 | else |
| 83 | quiet_cmd_srec_cat = SRECCAT $@ |
| 84 | cmd_srec_cat = srec_cat -output $@ -M 8 $< -M 8 \ |
| 85 | -Output_Block_Size 16 \ |
Hai Pham | 1e34963 | 2023-06-20 00:43:18 +0200 | [diff] [blame] | 86 | -generate 0xe6300400 0xe6300404 $(srec_cat_le_cmd) 0x0 4 \ |
| 87 | -generate 0xe630048c 0xe6300490 $(srec_cat_le_cmd) 0x0 4 \ |
| 88 | -generate 0xe63005d4 0xe63005d8 $(srec_cat_le_cmd) $(CONFIG_SPL_TEXT_BASE) 4 \ |
| 89 | -generate 0xe63006e4 0xe63006e8 $(srec_cat_le_cmd) $2 4 \ |
| 90 | -generate 0xe6301154 0xe6301158 $(srec_cat_le_cmd) $(CONFIG_SPL_TEXT_BASE) 4 \ |
| 91 | -generate 0xe6301264 0xe6301268 $(srec_cat_le_cmd) $2 4 |
Marek Vasut | e39fa7d | 2018-10-03 12:44:13 +0200 | [diff] [blame] | 92 | endif |
| 93 | |
| 94 | spl/u-boot-spl.scif: spl/u-boot-spl.srec spl/u-boot-spl.bin |
| 95 | $(call cmd,srec_cat,$(shell wc -c spl/u-boot-spl.bin | awk '{printf("0x%08x\n",$$1)}')) |
| 96 | |
| 97 | # if srec_cat is present build u-boot-spl.scif by default |
| 98 | has_srec_cat = $(call try-run,srec_cat -VERSion,y,n) |
Simon Glass | c46090d | 2020-07-19 13:56:01 -0600 | [diff] [blame] | 99 | INPUTS-$(has_srec_cat) += u-boot-spl.scif |
Marek Vasut | e39fa7d | 2018-10-03 12:44:13 +0200 | [diff] [blame] | 100 | CLEAN_FILES += u-boot-spl.scif |