"Das U-Boot" Source Tree

Merge tag 'xilinx-for-v2023.07-rc1' of https://source.denx.de/u-boot/custodians/u-boot-microblaze into next

Xilinx changes for v2023.07-rc1

cmd:
- Print results in hex instead of dec in smc command

firmware:
- Cover missing ZYNQMP_FIRMWARE dependencies

fpga:
- fix loads for unencrypted use case

relocation
- Add support for BE systems

spi:
- Fix xilinx_spi init reset sequence

arasan nand:
- Remove hardcoded bbt option
- Set ofnode value

xilinx:
- Enable SMC command
- Fix some sparse issues

zynqmp:
- Remove cdns,zynq-gem compatible string
- Add optee node
- Some DT cleanups

zynq:
- Some DT cleanups

microblaze
- Remove MANUAL_RELOC option

Tom Rini cefd0449 e63828bf

+174 -154
+7 -7
arch/arm/dts/zynq-7000.dtsi
··· 258 258 }; 259 259 260 260 gem0: ethernet@e000b000 { 261 - compatible = "xlnx,zynq-gem", "cdns,zynq-gem", "cdns,gem"; 261 + compatible = "xlnx,zynq-gem", "cdns,gem"; 262 262 reg = <0xe000b000 0x1000>; 263 263 status = "disabled"; 264 264 interrupts = <0 22 4>; ··· 269 269 }; 270 270 271 271 gem1: ethernet@e000c000 { 272 - compatible = "xlnx,zynq-gem", "cdns,zynq-gem", "cdns,gem"; 272 + compatible = "xlnx,zynq-gem", "cdns,gem"; 273 273 reg = <0xe000c000 0x1000>; 274 274 status = "disabled"; 275 275 interrupts = <0 45 4>; ··· 369 369 }; 370 370 }; 371 371 372 - dmac_s: dmac@f8003000 { 372 + dmac_s: dma-controller@f8003000 { 373 373 compatible = "arm,pl330", "arm,primecell"; 374 374 reg = <0xf8003000 0x1000>; 375 375 interrupt-parent = <&intc>; 376 - interrupt-names = "abort", "dma0", "dma1", "dma2", "dma3", 377 - "dma4", "dma5", "dma6", "dma7"; 376 + /* 377 + * interrupt-names = "abort", "dma0", "dma1", "dma2", "dma3", 378 + * "dma4", "dma5", "dma6", "dma7"; 379 + */ 378 380 interrupts = <0 13 4>, 379 381 <0 14 4>, <0 15 4>, 380 382 <0 16 4>, <0 17 4>, 381 383 <0 40 4>, <0 41 4>, 382 384 <0 42 4>, <0 43 4>; 383 385 #dma-cells = <1>; 384 - #dma-channels = <8>; 385 - #dma-requests = <4>; 386 386 clocks = <&clkc 27>; 387 387 clock-names = "apb_pclk"; 388 388 };
+2 -2
arch/arm/dts/zynq-zc702.dts
··· 34 34 gpio-keys { 35 35 compatible = "gpio-keys"; 36 36 autorepeat; 37 - sw14 { 37 + switch-14 { 38 38 label = "sw14"; 39 39 gpios = <&gpio0 12 0>; 40 40 linux,code = <108>; /* down */ 41 41 wakeup-source; 42 42 autorepeat; 43 43 }; 44 - sw13 { 44 + switch-13 { 45 45 label = "sw13"; 46 46 gpios = <&gpio0 14 0>; 47 47 linux,code = <103>; /* up */
+1 -1
arch/arm/dts/zynq-zturn-common.dtsi
··· 49 49 gpio-keys { 50 50 compatible = "gpio-keys"; 51 51 autorepeat; 52 - K1 { 52 + key { 53 53 label = "K1"; 54 54 gpios = <&gpio0 0x32 0x1>; 55 55 linux,code = <0x66>;
+1 -1
arch/arm/dts/zynqmp-sck-kr-g-revA.dts
··· 229 229 230 230 /* gem2/gem3 via PL with phys u79@2 and u80@3 */ 231 231 232 - &pinctrl0 { /* required by spec */ 232 + &pinctrl0 { 233 233 status = "okay"; 234 234 235 235 pinctrl_uart1_default: uart1-default {
+1 -1
arch/arm/dts/zynqmp-sck-kr-g-revB.dts
··· 229 229 230 230 /* gem2/gem3 via PL with phys u79@2 and u80@3 */ 231 231 232 - &pinctrl0 { /* required by spec */ 232 + &pinctrl0 { 233 233 status = "okay"; 234 234 235 235 pinctrl_uart1_default: uart1-default {
+2 -2
arch/arm/dts/zynqmp-sck-kv-g-revA.dts
··· 159 159 bus-width = <8>; 160 160 }; 161 161 162 - &gem3 { /* required by spec */ 162 + &gem3 { 163 163 status = "okay"; 164 164 pinctrl-names = "default"; 165 165 pinctrl-0 = <&pinctrl_gem3_default>; ··· 185 185 }; 186 186 }; 187 187 188 - &pinctrl0 { /* required by spec */ 188 + &pinctrl0 { 189 189 status = "okay"; 190 190 191 191 pinctrl_uart1_default: uart1-default {
+2 -2
arch/arm/dts/zynqmp-sck-kv-g-revB.dts
··· 146 146 bus-width = <8>; 147 147 }; 148 148 149 - &gem3 { /* required by spec */ 149 + &gem3 { 150 150 status = "okay"; 151 151 pinctrl-names = "default"; 152 152 pinctrl-0 = <&pinctrl_gem3_default>; ··· 172 172 }; 173 173 }; 174 174 175 - &pinctrl0 { /* required by spec */ 175 + &pinctrl0 { 176 176 status = "okay"; 177 177 178 178 pinctrl_uart1_default: uart1-default {
+2
arch/arm/dts/zynqmp-zc1751-xm016-dc2.dts
··· 142 142 label = "main-storage-0"; 143 143 nand-ecc-step-size = <1024>; 144 144 nand-ecc-strength = <24>; 145 + nand-on-flash-bbt; 145 146 146 147 partition@0 { /* for testing purpose */ 147 148 label = "nand-fsbl-uboot"; ··· 178 179 label = "main-storage-1"; 179 180 nand-ecc-step-size = <1024>; 180 181 nand-ecc-strength = <24>; 182 + nand-on-flash-bbt; 181 183 182 184 partition@0 { /* for testing purpose */ 183 185 label = "nand1-fsbl-uboot";
+71 -46
arch/arm/dts/zynqmp-zc1751-xm017-dc3.dts
··· 128 128 arasan,has-mdma; 129 129 num-cs = <2>; 130 130 131 - partition@0 { /* for testing purpose */ 132 - label = "nand-fsbl-uboot"; 133 - reg = <0x0 0x0 0x400000>; 131 + nand@0 { 132 + reg = <0x0>; 133 + #address-cells = <0x2>; 134 + #size-cells = <0x1>; 135 + nand-ecc-mode = "soft"; 136 + nand-ecc-algo = "bch"; 137 + nand-rb = <0>; 138 + label = "main-storage-0"; 139 + nand-ecc-step-size = <1024>; 140 + nand-ecc-strength = <24>; 141 + nand-on-flash-bbt; 142 + 143 + partition@0 { /* for testing purpose */ 144 + label = "nand-fsbl-uboot"; 145 + reg = <0x0 0x0 0x400000>; 146 + }; 147 + partition@1 { /* for testing purpose */ 148 + label = "nand-linux"; 149 + reg = <0x0 0x400000 0x1400000>; 150 + }; 151 + partition@2 { /* for testing purpose */ 152 + label = "nand-device-tree"; 153 + reg = <0x0 0x1800000 0x400000>; 154 + }; 155 + partition@3 { /* for testing purpose */ 156 + label = "nand-rootfs"; 157 + reg = <0x0 0x1C00000 0x1400000>; 158 + }; 159 + partition@4 { /* for testing purpose */ 160 + label = "nand-bitstream"; 161 + reg = <0x0 0x3000000 0x400000>; 162 + }; 163 + partition@5 { /* for testing purpose */ 164 + label = "nand-misc"; 165 + reg = <0x0 0x3400000 0xFCC00000>; 166 + }; 134 167 }; 135 - partition@1 { /* for testing purpose */ 136 - label = "nand-linux"; 137 - reg = <0x0 0x400000 0x1400000>; 138 - }; 139 - partition@2 { /* for testing purpose */ 140 - label = "nand-device-tree"; 141 - reg = <0x0 0x1800000 0x400000>; 142 - }; 143 - partition@3 { /* for testing purpose */ 144 - label = "nand-rootfs"; 145 - reg = <0x0 0x1C00000 0x1400000>; 146 - }; 147 - partition@4 { /* for testing purpose */ 148 - label = "nand-bitstream"; 149 - reg = <0x0 0x3000000 0x400000>; 150 - }; 151 - partition@5 { /* for testing purpose */ 152 - label = "nand-misc"; 153 - reg = <0x0 0x3400000 0xFCC00000>; 154 - }; 168 + nand@1 { 169 + reg = <0x1>; 170 + #address-cells = <0x2>; 171 + #size-cells = <0x1>; 172 + nand-ecc-mode = "soft"; 173 + nand-ecc-algo = "bch"; 174 + nand-rb = <0>; 175 + label = "main-storage-1"; 176 + nand-ecc-step-size = <1024>; 177 + nand-ecc-strength = <24>; 178 + nand-on-flash-bbt; 155 179 156 - partition@6 { /* for testing purpose */ 157 - label = "nand1-fsbl-uboot"; 158 - reg = <0x1 0x0 0x400000>; 159 - }; 160 - partition@7 { /* for testing purpose */ 161 - label = "nand1-linux"; 162 - reg = <0x1 0x400000 0x1400000>; 163 - }; 164 - partition@8 { /* for testing purpose */ 165 - label = "nand1-device-tree"; 166 - reg = <0x1 0x1800000 0x400000>; 167 - }; 168 - partition@9 { /* for testing purpose */ 169 - label = "nand1-rootfs"; 170 - reg = <0x1 0x1C00000 0x1400000>; 171 - }; 172 - partition@10 { /* for testing purpose */ 173 - label = "nand1-bitstream"; 174 - reg = <0x1 0x3000000 0x400000>; 175 - }; 176 - partition@11 { /* for testing purpose */ 177 - label = "nand1-misc"; 178 - reg = <0x1 0x3400000 0xFCC00000>; 180 + partition@0 { /* for testing purpose */ 181 + label = "nand1-fsbl-uboot"; 182 + reg = <0x0 0x0 0x400000>; 183 + }; 184 + partition@1 { /* for testing purpose */ 185 + label = "nand1-linux"; 186 + reg = <0x0 0x400000 0x1400000>; 187 + }; 188 + partition@2 { /* for testing purpose */ 189 + label = "nand1-device-tree"; 190 + reg = <0x0 0x1800000 0x400000>; 191 + }; 192 + partition@3 { /* for testing purpose */ 193 + label = "nand1-rootfs"; 194 + reg = <0x0 0x1C00000 0x1400000>; 195 + }; 196 + partition@4 { /* for testing purpose */ 197 + label = "nand1-bitstream"; 198 + reg = <0x0 0x3000000 0x400000>; 199 + }; 200 + partition@5 { /* for testing purpose */ 201 + label = "nand1-misc"; 202 + reg = <0x0 0x3400000 0xFCC00000>; 203 + }; 179 204 }; 180 205 }; 181 206
+1 -1
arch/arm/dts/zynqmp-zcu100-revC.dts
··· 95 95 linux,default-trigger = "bluetooth-power"; 96 96 }; 97 97 98 - vbus-det { /* U5 USB5744 VBUS detection via MIO25 */ 98 + led-vbus-det { /* U5 USB5744 VBUS detection via MIO25 */ 99 99 label = "vbus_det"; 100 100 gpios = <&gpio 25 GPIO_ACTIVE_HIGH>; 101 101 default-state = "on";
+11 -4
arch/arm/dts/zynqmp.dtsi
··· 147 147 }; 148 148 149 149 firmware { 150 + optee: optee { 151 + compatible = "linaro,optee-tz"; 152 + method = "smc"; 153 + }; 154 + 150 155 zynqmp_firmware: zynqmp-firmware { 151 156 compatible = "xlnx,zynqmp-firmware"; 152 157 #power-domain-cells = <1>; ··· 529 534 }; 530 535 531 536 gem0: ethernet@ff0b0000 { 532 - compatible = "xlnx,zynqmp-gem", "cdns,zynqmp-gem", "cdns,gem"; 537 + compatible = "xlnx,zynqmp-gem", "cdns,gem"; 533 538 status = "disabled"; 534 539 interrupt-parent = <&gic>; 535 540 interrupts = <0 57 4>, <0 57 4>; ··· 544 549 }; 545 550 546 551 gem1: ethernet@ff0c0000 { 547 - compatible = "xlnx,zynqmp-gem", "cdns,zynqmp-gem", "cdns,gem"; 552 + compatible = "xlnx,zynqmp-gem", "cdns,gem"; 548 553 status = "disabled"; 549 554 interrupt-parent = <&gic>; 550 555 interrupts = <0 59 4>, <0 59 4>; ··· 559 564 }; 560 565 561 566 gem2: ethernet@ff0d0000 { 562 - compatible = "xlnx,zynqmp-gem", "cdns,zynqmp-gem", "cdns,gem"; 567 + compatible = "xlnx,zynqmp-gem", "cdns,gem"; 563 568 status = "disabled"; 564 569 interrupt-parent = <&gic>; 565 570 interrupts = <0 61 4>, <0 61 4>; ··· 574 579 }; 575 580 576 581 gem3: ethernet@ff0e0000 { 577 - compatible = "xlnx,zynqmp-gem", "cdns,zynqmp-gem", "cdns,gem"; 582 + compatible = "xlnx,zynqmp-gem", "cdns,gem"; 578 583 status = "disabled"; 579 584 interrupt-parent = <&gic>; 580 585 interrupts = <0 63 4>, <0 63 4>; ··· 874 879 snps,enable_guctl1_resume_quirk; 875 880 snps,enable_guctl1_ipd_quirk; 876 881 snps,xhci-stream-quirk; 882 + snps,resume-hs-terminations; 877 883 /* dma-coherent; */ 878 884 }; 879 885 }; ··· 905 911 snps,enable_guctl1_resume_quirk; 906 912 snps,enable_guctl1_ipd_quirk; 907 913 snps,xhci-stream-quirk; 914 + snps,resume-hs-terminations; 908 915 /* dma-coherent; */ 909 916 }; 910 917 };
+1 -6
arch/arm/mach-versal-net/include/mach/sys_proto.h
··· 8 8 9 9 void mem_map_fill(void); 10 10 11 - static inline int zynqmp_mmio_write(const u32 address, const u32 mask, 12 - const u32 value) 13 - { 14 - BUILD_BUG(); 15 - return -EINVAL; 16 - } 11 + int zynqmp_mmio_write(const u32 address, const u32 mask, const u32 value);
+1 -5
arch/arm/mach-versal/include/mach/sys_proto.h
··· 13 13 void tcm_init(u8 mode); 14 14 void mem_map_fill(void); 15 15 16 - static inline int zynqmp_mmio_write(const u32 address, const u32 mask, const u32 value) 17 - { 18 - BUILD_BUG(); 19 - return -EINVAL; 20 - } 16 + int zynqmp_mmio_write(const u32 address, const u32 mask, const u32 value);
+1 -12
arch/microblaze/Kconfig
··· 4 4 config SYS_ARCH 5 5 default "microblaze" 6 6 7 - config NEEDS_MANUAL_RELOC 8 - bool "Disable position-independent pre-relocation code" 9 - default y 10 - help 11 - U-Boot expects to be linked to a specific hard-coded address, and to 12 - be loaded to and run from that address. This option lifts that 13 - restriction, thus allowing the code to be loaded to and executed from 14 - almost any 4K aligned address. This logic relies on the relocation 15 - information that is embedded in the binary to support U-Boot 16 - relocating itself to the top-of-RAM later during execution. 17 - 18 7 config STATIC_RELA 19 - def_bool y if !NEEDS_MANUAL_RELOC 8 + def_bool y 20 9 21 10 choice 22 11 prompt "Target select"
-4
arch/microblaze/config.mk
··· 13 13 14 14 ifeq ($(CONFIG_SPL_BUILD),) 15 15 PLATFORM_CPPFLAGS += -fPIC 16 - endif 17 - 18 - ifeq ($(CONFIG_STATIC_RELA),y) 19 - PLATFORM_CPPFLAGS += -fPIC 20 16 LDFLAGS_u-boot += -pic 21 17 endif 22 18
+1 -2
arch/microblaze/cpu/Makefile
··· 5 5 6 6 extra-y = start.o 7 7 obj-y = irq.o 8 - obj-y += interrupts.o cache.o exception.o cpuinfo.o 9 - obj-$(CONFIG_STATIC_RELA) += relocate.o 8 + obj-y += interrupts.o cache.o exception.o cpuinfo.o relocate.o 10 9 obj-$(CONFIG_XILINX_MICROBLAZE0_PVR) += pvr.o 11 10 obj-$(CONFIG_SPL_BUILD) += spl.o
-28
arch/microblaze/cpu/start.S
··· 10 10 #include <asm-offsets.h> 11 11 #include <config.h> 12 12 13 - #if defined(CONFIG_STATIC_RELA) 14 13 #define SYM_ADDR(reg, reg_add, symbol) \ 15 14 mfs r20, rpc; \ 16 15 addik r20, r20, _GLOBAL_OFFSET_TABLE_ + 8; \ 17 16 lwi reg, r20, symbol@GOT; \ 18 17 addk reg, reg reg_add; 19 - #else 20 - #define SYM_ADDR(reg, reg_add, symbol) \ 21 - addi reg, reg_add, symbol 22 - #endif 23 18 24 19 .text 25 20 .global _start ··· 35 30 addi r1, r0, CONFIG_SPL_STACK 36 31 #else 37 32 add r1, r0, r20 38 - #if defined(CONFIG_STATIC_RELA) 39 33 bri 1f 40 34 41 35 /* Force alignment for easier ASM code below */ ··· 67 61 68 62 brlid r15, mb_fix_rela 69 63 nop 70 - #endif 71 64 #endif 72 65 73 66 addi r1, r1, -4 /* Decrement SP to top of memory */ ··· 310 303 brlid r15, __setup_exceptions 311 304 nop 312 305 313 - #if defined(CONFIG_STATIC_RELA) 314 306 /* reloc_offset is current location */ 315 307 SYM_ADDR(r10, r0, _start) 316 308 ··· 331 323 add r9, r9, r5 332 324 brlid r15, mb_fix_rela 333 325 nop 334 - 335 326 /* end of code which does relocation */ 336 - #else 337 - /* Check if GOT exist */ 338 - addik r21, r23, _got_start 339 - addik r22, r23, _got_end 340 - cmpu r12, r21, r22 341 - beqi r12, 2f /* No GOT table - jump over */ 342 - 343 - /* Skip last 3 entries plus 1 because of loop boundary below */ 344 - addik r22, r22, -0x10 345 - 346 - /* Relocate the GOT. */ 347 - 3: lw r12, r21, r0 /* Load entry */ 348 - addk r12, r12, r23 /* Add reloc offset */ 349 - sw r12, r21, r0 /* Save entry back */ 350 - 351 - cmpu r12, r21, r22 /* Check if this cross boundary */ 352 - bneid r12, 3b 353 - addik r21. r21, 4 354 - #endif 355 327 356 328 /* Flush caches to ensure consistency */ 357 329 brlid r15, flush_cache_all
+1
board/xilinx/zynqmp/Kconfig
··· 6 6 7 7 config CMD_ZYNQMP 8 8 bool "Enable ZynqMP specific commands" 9 + depends on ZYNQMP_FIRMWARE 9 10 default y 10 11 help 11 12 Enable ZynqMP specific commands like "zynqmp secure"
+1 -1
cmd/smccc.c
··· 43 43 else 44 44 arm_smccc_hvc(fid, a1, a2, a3, a4, a5, a6, a7, &res); 45 45 46 - printf("Res: %ld %ld %ld %ld\n", res.a0, res.a1, res.a2, res.a3); 46 + printf("Res: 0x%lx 0x%lx 0x%lx 0x%lx\n", res.a0, res.a1, res.a2, res.a3); 47 47 48 48 return 0; 49 49 }
+1
configs/xilinx_versal_net_virt_defconfig
··· 48 48 CONFIG_CMD_EFIDEBUG=y 49 49 CONFIG_CMD_TIME=y 50 50 CONFIG_CMD_TIMER=y 51 + CONFIG_CMD_SMC=y 51 52 CONFIG_CMD_EXT4_WRITE=y 52 53 CONFIG_CMD_SQUASHFS=y 53 54 CONFIG_CMD_MTDPARTS=y
+1
configs/xilinx_versal_virt_defconfig
··· 48 48 CONFIG_CMD_EFIDEBUG=y 49 49 CONFIG_CMD_TIME=y 50 50 CONFIG_CMD_TIMER=y 51 + CONFIG_CMD_SMC=y 51 52 CONFIG_CMD_EXT4_WRITE=y 52 53 CONFIG_CMD_SQUASHFS=y 53 54 CONFIG_CMD_MTDPARTS=y
+1
configs/xilinx_zynqmp_virt_defconfig
··· 92 92 CONFIG_CMD_GETTIME=y 93 93 CONFIG_CMD_TIMER=y 94 94 CONFIG_CMD_REGULATOR=y 95 + CONFIG_CMD_SMC=y 95 96 CONFIG_CMD_TPM=y 96 97 CONFIG_CMD_EXT4_WRITE=y 97 98 CONFIG_CMD_SQUASHFS=y
+2 -2
drivers/clk/Kconfig
··· 185 185 config CLK_VERSAL 186 186 bool "Enable clock driver support for Versal" 187 187 depends on (ARCH_VERSAL || ARCH_VERSAL_NET) 188 - select ZYNQMP_FIRMWARE 188 + imply ZYNQMP_FIRMWARE 189 189 help 190 190 This clock driver adds support for clock realted settings for 191 191 Versal platform. ··· 219 219 config CLK_ZYNQMP 220 220 bool "Enable clock driver support for ZynqMP" 221 221 depends on ARCH_ZYNQMP 222 - select ZYNQMP_FIRMWARE 222 + imply ZYNQMP_FIRMWARE 223 223 help 224 224 This clock driver adds support for clock realted settings for 225 225 ZynqMP platform.
+1 -1
drivers/fpga/Kconfig
··· 75 75 76 76 config FPGA_ZYNQMPPL 77 77 bool "Enable Xilinx FPGA driver for ZynqMP" 78 - depends on FPGA_XILINX 78 + depends on FPGA_XILINX && ZYNQMP_FIRMWARE 79 79 help 80 80 Enable FPGA driver for loading bitstream in BIT and BIN format 81 81 on Xilinx Zynq UltraScale+ (ZynqMP) device.
+9 -3
drivers/fpga/zynqmppl.c
··· 332 332 buf_lo = lower_32_bits((ulong)buf); 333 333 buf_hi = upper_32_bits((ulong)buf); 334 334 335 - ret = xilinx_pm_request(PM_FPGA_LOAD, buf_lo, 335 + if ((u32)(uintptr_t)fpga_sec_info->userkey_addr) 336 + ret = xilinx_pm_request(PM_FPGA_LOAD, buf_lo, 336 337 buf_hi, 337 - (u32)(uintptr_t)fpga_sec_info->userkey_addr, 338 - flag, ret_payload); 338 + (u32)(uintptr_t)fpga_sec_info->userkey_addr, 339 + flag, ret_payload); 340 + else 341 + ret = xilinx_pm_request(PM_FPGA_LOAD, buf_lo, 342 + buf_hi, (u32)bsize, 343 + flag, ret_payload); 344 + 339 345 if (ret) 340 346 puts("PL FPGA LOAD fail\n"); 341 347 else
+3 -2
drivers/mmc/zynq_sdhci.c
··· 14 14 #include "mmc_private.h" 15 15 #include <log.h> 16 16 #include <reset.h> 17 + #include <asm/arch/sys_proto.h> 17 18 #include <dm/device_compat.h> 18 19 #include <linux/err.h> 19 20 #include <linux/libfdt.h> ··· 988 989 }; 989 990 #endif 990 991 991 - #if defined(CONFIG_ARCH_ZYNQMP) 992 + #if defined(CONFIG_ARCH_ZYNQMP) && defined(CONFIG_ZYNQMP_FIRMWARE) 992 993 static int sdhci_zynqmp_set_dynamic_config(struct arasan_sdhci_priv *priv, 993 994 struct udevice *dev) 994 995 { ··· 1090 1091 1091 1092 host = priv->host; 1092 1093 1093 - #if defined(CONFIG_ARCH_ZYNQMP) 1094 + #if defined(CONFIG_ARCH_ZYNQMP) && defined(CONFIG_ZYNQMP_FIRMWARE) 1094 1095 if (device_is_compatible(dev, "xlnx,zynqmp-8.9a")) { 1095 1096 ret = zynqmp_pm_is_function_supported(PM_IOCTL, 1096 1097 IOCTL_SET_SD_CONFIG);
+4 -1
drivers/mtd/nand/raw/arasan_nfc.c
··· 1230 1230 struct nand_drv *info = &arasan->nand_ctrl; 1231 1231 struct nand_config *nand = &info->config; 1232 1232 struct mtd_info *mtd; 1233 + ofnode child; 1233 1234 int err = -1; 1234 1235 1235 1236 info->reg = (struct nand_regs *)dev_read_addr(dev); 1236 1237 mtd = nand_to_mtd(nand_chip); 1237 1238 nand_set_controller_data(nand_chip, &arasan->nand_ctrl); 1239 + 1240 + ofnode_for_each_subnode(child, dev_ofnode(dev)) 1241 + nand_set_flash_node(nand_chip, child); 1238 1242 1239 1243 #ifdef CONFIG_SYS_NAND_NO_SUBPAGE_WRITE 1240 1244 nand_chip->options |= NAND_NO_SUBPAGE_WRITE; ··· 1248 1252 /* Buffer read/write routines */ 1249 1253 nand_chip->read_buf = arasan_nand_read_buf; 1250 1254 nand_chip->write_buf = arasan_nand_write_buf; 1251 - nand_chip->bbt_options = NAND_BBT_USE_FLASH; 1252 1255 1253 1256 writel(0x0, &info->reg->cmd_reg); 1254 1257 writel(0x0, &info->reg->pgm_reg);
+1 -1
drivers/net/zynq_gem.c
··· 738 738 u32 pm_info[2]; 739 739 int ret; 740 740 741 - if (IS_ENABLED(CONFIG_ARCH_ZYNQMP)) { 741 + if (IS_ENABLED(CONFIG_ARCH_ZYNQMP) && IS_ENABLED(CONFIG_ZYNQMP_FIRMWARE)) { 742 742 if (!zynqmp_pm_is_function_supported(PM_IOCTL, 743 743 IOCTL_SET_GEM_CONFIG)) { 744 744 ret = ofnode_read_u32_array(dev_ofnode(dev),
+2 -3
drivers/spi/xilinx_spi.c
··· 112 112 static int xilinx_spi_probe(struct udevice *bus) 113 113 { 114 114 struct xilinx_spi_priv *priv = dev_get_priv(bus); 115 - struct xilinx_spi_regs *regs = priv->regs; 115 + struct xilinx_spi_regs *regs; 116 116 117 - priv->regs = (struct xilinx_spi_regs *)dev_read_addr(bus); 118 - 117 + regs = priv->regs = (struct xilinx_spi_regs *)dev_read_addr(bus); 119 118 priv->fifo_depth = dev_read_u32_default(bus, "fifo-size", 0); 120 119 121 120 writel(SPISSR_RESET_VALUE, &regs->srr);
+5
drivers/spi/zynqmp_gqspi.c
··· 183 183 const struct spi_mem_op *op; 184 184 }; 185 185 186 + __weak int zynqmp_mmio_write(const u32 address, const u32 mask, const u32 value) 187 + { 188 + return 0; 189 + } 190 + 186 191 static int zynqmp_qspi_of_to_plat(struct udevice *bus) 187 192 { 188 193 struct zynqmp_qspi_plat *plat = dev_get_plat(bus);
+1
include/spl.h
··· 884 884 */ 885 885 struct legacy_img_hdr *spl_get_load_buffer(ssize_t offset, size_t size); 886 886 887 + void board_boot_order(u32 *spl_boot_list); 887 888 void spl_save_restore_data(void); 888 889 #endif
+36 -16
tools/relocate-rela.c
··· 45 45 #endif 46 46 47 47 static int ei_class; 48 + static int ei_data; 48 49 49 50 static uint64_t rela_start, rela_end, text_base, dyn_start; 50 51 ··· 59 60 vprintf(fmt, args); 60 61 va_end(args); 61 62 } 63 + } 64 + 65 + static uint16_t elf16_to_cpu(uint16_t data) 66 + { 67 + if (ei_data == ELFDATA2LSB) 68 + return le16_to_cpu(data); 69 + 70 + return be16_to_cpu(data); 71 + } 72 + 73 + static uint32_t elf32_to_cpu(uint32_t data) 74 + { 75 + if (ei_data == ELFDATA2LSB) 76 + return le32_to_cpu(data); 77 + 78 + return be32_to_cpu(data); 62 79 } 63 80 64 81 static bool supported_rela(Elf64_Rela *rela) ··· 234 251 return 25; 235 252 } 236 253 237 - machine = le16_to_cpu(header.e_machine); 254 + machine = elf16_to_cpu(header.e_machine); 238 255 debug("Machine %d\n", machine); 239 256 240 257 if (machine != EM_MICROBLAZE) { ··· 242 259 return 30; 243 260 } 244 261 245 - text_base = le32_to_cpu(header.e_entry); 246 - section_header_base = le32_to_cpu(header.e_shoff); 247 - section_header_size = le16_to_cpu(header.e_shentsize) * 248 - le16_to_cpu(header.e_shnum); 262 + text_base = elf32_to_cpu(header.e_entry); 263 + section_header_base = elf32_to_cpu(header.e_shoff); 264 + section_header_size = elf16_to_cpu(header.e_shentsize) * 265 + elf16_to_cpu(header.e_shnum); 249 266 250 267 sh_table = malloc(section_header_size); 251 268 if (!sh_table) { ··· 273 290 return 27; 274 291 } 275 292 276 - sh_index = le16_to_cpu(header.e_shstrndx); 277 - sh_size = le32_to_cpu(sh_table[sh_index].sh_size); 293 + sh_index = elf16_to_cpu(header.e_shstrndx); 294 + sh_size = elf32_to_cpu(sh_table[sh_index].sh_size); 278 295 debug("e_shstrndx %x, sh_size %lx\n", sh_index, sh_size); 279 296 280 297 sh_str = malloc(sh_size); ··· 289 306 * Specifies the byte offset from the beginning of the file 290 307 * to the first byte in the section. 291 308 */ 292 - sh_offset = le32_to_cpu(sh_table[sh_index].sh_offset); 293 - sh_num = le16_to_cpu(header.e_shnum); 309 + sh_offset = elf32_to_cpu(sh_table[sh_index].sh_offset); 310 + sh_num = elf16_to_cpu(header.e_shnum); 294 311 295 312 ret = fseek(felf, sh_offset, SEEK_SET); 296 313 if (ret) { ··· 312 329 } 313 330 314 331 for (i = 0; i < sh_num; i++) { 315 - char *sh_name = sh_str + le32_to_cpu(sh_table[i].sh_name); 332 + char *sh_name = sh_str + elf32_to_cpu(sh_table[i].sh_name); 316 333 317 334 debug("%s\n", sh_name); 318 335 319 - sh_addr = le64_to_cpu(sh_table[i].sh_addr); 320 - sh_offset = le64_to_cpu(sh_table[i].sh_offset); 321 - sh_size = le64_to_cpu(sh_table[i].sh_size); 336 + sh_addr = elf32_to_cpu(sh_table[i].sh_addr); 337 + sh_offset = elf32_to_cpu(sh_table[i].sh_offset); 338 + sh_size = elf32_to_cpu(sh_table[i].sh_size); 322 339 323 340 if (!strcmp(".rela.dyn", sh_name)) { 324 341 debug("Found section\t\".rela_dyn\"\n"); ··· 383 400 384 401 ei_class = e_ident[4]; 385 402 debug("EI_CLASS(1=32bit, 2=64bit) %d\n", ei_class); 403 + 404 + ei_data = e_ident[5]; 405 + debug("EI_DATA(1=little endian, 2=big endian) %d\n", ei_data); 386 406 387 407 if (ei_class == 2) 388 408 return decode_elf64(felf, argv); ··· 520 540 PRIu32 " r_addend:\t%" PRIx32 "\n", 521 541 rela.r_offset, rela.r_info, rela.r_addend); 522 542 523 - swrela.r_offset = le32_to_cpu(rela.r_offset); 524 - swrela.r_info = le32_to_cpu(rela.r_info); 525 - swrela.r_addend = le32_to_cpu(rela.r_addend); 543 + swrela.r_offset = elf32_to_cpu(rela.r_offset); 544 + swrela.r_info = elf32_to_cpu(rela.r_info); 545 + swrela.r_addend = elf32_to_cpu(rela.r_addend); 526 546 527 547 debug("SWRela:\toffset:\t%" PRIx32 " r_info:\t%" 528 548 PRIu32 " r_addend:\t%" PRIx32 "\n",