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