From 12b3887088866f68cd4846e85c69a90eec43c1bf Mon Sep 17 00:00:00 2001 From: Svyatoslav Ryhel Date: Fri, 30 Jun 2023 10:29:00 +0300 Subject: configs: tegra-common-post: add GPIO keyboard as STDIN device GPIO keyboard is used on many newly upstreamed devices. Tested-by: Andreas Westman Dorcsak # ASUS Grouper E1565 Tested-by: Svyatoslav Ryhel # LG P895 T30 Signed-off-by: Svyatoslav Ryhel Signed-off-by: Thierry Reding --- include/configs/tegra-common-post.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/tegra-common-post.h b/include/configs/tegra-common-post.h index 991ffbb7dff..2d5095639ac 100644 --- a/include/configs/tegra-common-post.h +++ b/include/configs/tegra-common-post.h @@ -35,6 +35,12 @@ #define STDIN_KBD_USB "" #endif +#ifdef CONFIG_BUTTON_KEYBOARD +#define STDIN_BTN_KBD ",button-kbd" +#else +#define STDIN_BTN_KBD "" +#endif + #ifdef CONFIG_VIDEO #define STDOUT_VIDEO ",vidconsole" #else @@ -48,7 +54,7 @@ #endif #define TEGRA_DEVICE_SETTINGS \ - "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB STDOUT_CROS_EC "\0" \ + "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB STDOUT_CROS_EC STDIN_BTN_KBD "\0" \ "stdout=serial" STDOUT_VIDEO "\0" \ "stderr=serial" STDOUT_VIDEO "\0" \ "" -- cgit v1.2.3 From c8cd4db6f1c1eab526b93d640e13697fce0ebe42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Schw=C3=B6bel?= Date: Fri, 30 Jun 2023 10:29:01 +0300 Subject: configs: tegra-common-post: make PXE and DHCP boot targets optional MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Disabling the network related features in defconfig causes build to fail so make them optional. Tested-by: Andreas Westman Dorcsak # ASUS Grouper E1565 Tested-by: Svyatoslav Ryhel # LG P895 T30 Signed-off-by: Jonas Schwöbel Signed-off-by: Svyatoslav Ryhel Signed-off-by: Thierry Reding --- include/configs/tegra-common-post.h | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/configs/tegra-common-post.h b/include/configs/tegra-common-post.h index 2d5095639ac..0d0965ecce2 100644 --- a/include/configs/tegra-common-post.h +++ b/include/configs/tegra-common-post.h @@ -8,9 +8,21 @@ #define __TEGRA_COMMON_POST_H #if IS_ENABLED(CONFIG_CMD_USB) -# define BOOT_TARGET_USB(func) func(USB, usb, 0) +#define BOOT_TARGET_USB(func) func(USB, usb, 0) #else -# define BOOT_TARGET_USB(func) +#define BOOT_TARGET_USB(func) +#endif + +#if CONFIG_IS_ENABLED(CMD_DHCP) && CONFIG_IS_ENABLED(CMD_PXE) +#define BOOT_TARGET_PXE(func) func(PXE, pxe, na) +#else +#define BOOT_TARGET_PXE(func) +#endif + +#if CONFIG_IS_ENABLED(CMD_DHCP) +#define BOOT_TARGET_DHCP(func) func(DHCP, dhcp, na) +#else +#define BOOT_TARGET_DHCP(func) #endif #ifndef BOOT_TARGET_DEVICES @@ -18,8 +30,8 @@ func(MMC, mmc, 1) \ func(MMC, mmc, 0) \ BOOT_TARGET_USB(func) \ - func(PXE, pxe, na) \ - func(DHCP, dhcp, na) + BOOT_TARGET_PXE(func) \ + BOOT_TARGET_DHCP(func) #endif #include -- cgit v1.2.3 From 15be9a7b3b08fa11d046162aaeb899e5d726cb90 Mon Sep 17 00:00:00 2001 From: Svyatoslav Ryhel Date: Fri, 30 Jun 2023 10:29:03 +0300 Subject: board: asus: transformer: add ASUS Transformer T30 family support The ASUS Transformer T30 family are 2-in-1 detachable tablets and AiO developed by ASUS that run the Android operating system (TF600T runs Windows RT and P1801-T runs Android and Windows). The T30 Transformers feature a 10.1-inch display (apart P1801-T), an Nvidia Tegra 3 quad-core chip, 1/2 GB of RAM, and 16/32 GB of storage. Transformers board derives from Nvidia Cardhu development board. This patch brings support for 7 known Transformer devices: - ASUS Transformer Prime TF201 - ASUS Transformer Pad TF300T/TF300TG/TF300TL - ASUS VivoTab RT TF600T (Windows RT based) - ASUS Transformer Infinity TF700T - ASUS Portable AiO P1801-T Tested-by: Andreas Westman Dorcsak # all devices Signed-off-by: Svyatoslav Ryhel Signed-off-by: Thierry Reding --- include/configs/transformer-common.h | 94 ++++++++++++++++++++++++++++++++++++ include/configs/transformer-t30.h | 23 +++++++++ 2 files changed, 117 insertions(+) create mode 100644 include/configs/transformer-common.h create mode 100644 include/configs/transformer-t30.h (limited to 'include') diff --git a/include/configs/transformer-common.h b/include/configs/transformer-common.h new file mode 100644 index 00000000000..dcdda1ec5b4 --- /dev/null +++ b/include/configs/transformer-common.h @@ -0,0 +1,94 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2022, Svyatoslav Ryhel . + */ + +#ifndef __TRANSFORMER_COMMON_H +#define __TRANSFORMER_COMMON_H + +/* High-level configuration options */ +#define CFG_TEGRA_BOARD_STRING "ASUS Transformer" + +#define TRANSFORMER_FLASH_UBOOT \ + "flash_uboot=echo Preparing RAM;" \ + "mw ${kernel_addr_r} 0 ${boot_block_size_r};" \ + "mw ${ramdisk_addr_r} 0 ${boot_block_size_r};" \ + "echo Reading BCT;" \ + "mmc dev 0 1;" \ + "mmc read ${kernel_addr_r} 0 ${boot_block_size};" \ + "echo Reading bootloader;" \ + "if load mmc 1:1 ${ramdisk_addr_r} ${bootloader_file};" \ + "then echo Calculating bootloader size;" \ + "size mmc 1:1 ${bootloader_file};" \ + "ebtupdate ${kernel_addr_r} ${ramdisk_addr_r} ${filesize};" \ + "echo Writing bootloader to eMMC;" \ + "mmc dev 0 1;" \ + "mmc write ${kernel_addr_r} 0 ${boot_block_size};" \ + "mmc dev 0 2;" \ + "mmc write ${ramdisk_addr_r} 0 ${boot_block_size};" \ + "echo Bootloader written successfully;" \ + "pause 'Press ANY key to reboot device...'; reset;" \ + "else echo Reading bootloader failed;" \ + "pause 'Press ANY key to return to bootmenu...'; bootmenu; fi\0" + +#define TRANSFORMER_FLASH_SPI \ + "update_spi=sf probe 0:1;" \ + "echo Dumping current SPI flash content ...;" \ + "sf read ${kernel_addr_r} 0x0 ${spi_size};" \ + "if fatwrite mmc 1:1 ${kernel_addr_r} spi-flash-backup.bin ${spi_size};" \ + "then echo SPI flash content was successfully written into spi-flash-backup.bin;" \ + "echo Reading SPI flash binary;" \ + "if load mmc 1:1 ${kernel_addr_r} repart-block.bin;" \ + "then echo Writing bootloader into SPI flash;" \ + "sf probe 0:1;" \ + "sf update ${kernel_addr_r} 0x0 ${spi_size};" \ + "poweroff;" \ + "else echo Preparing RAM;" \ + "mw ${kernel_addr_r} 0 ${boot_block_size_r};" \ + "mw ${ramdisk_addr_r} 0 ${boot_block_size_r};" \ + "echo Reading BCT;" \ + "sf read ${kernel_addr_r} 0x0 ${boot_block_size_r};" \ + "echo Reading bootloader;" \ + "if load mmc 1:1 ${ramdisk_addr_r} ${bootloader_file};" \ + "then echo Calculating bootloader size;" \ + "size mmc 1:1 ${bootloader_file};" \ + "ebtupdate ${kernel_addr_r} ${ramdisk_addr_r} ${filesize};" \ + "echo Writing bootloader into SPI flash;" \ + "sf probe 0:1;" \ + "sf update ${kernel_addr_r} 0x0 ${boot_block_size_r};" \ + "sf update ${ramdisk_addr_r} ${boot_block_size_r} ${boot_block_size_r};" \ + "echo Bootloader written successfully; poweroff;" \ + "else echo Reading bootloader failed;" \ + "poweroff; fi;" \ + "fi;" \ + "else echo SPI flash backup FAILED! Aborting ...;" \ + "poweroff; fi\0" + +#define TRANSFORMER_REFRESH_USB \ + "refresh_usb=usb start; usb reset; usb tree; usb info;" \ + "pause 'Press ANY key to return to bootmenu...'; bootmenu\0" + +#define TRANSFORMER_BOOTMENU \ + TRANSFORMER_FLASH_UBOOT \ + TRANSFORMER_FLASH_SPI \ + TRANSFORMER_REFRESH_USB \ + "bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu\0" \ + "bootmenu_1=mount external storage=usb start && ums 0 mmc 1; bootmenu\0" \ + "bootmenu_2=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu\0" \ + "bootmenu_3=update bootloader=run flash_uboot\0" \ + "bootmenu_4=refresh USB=run refresh_usb\0" \ + "bootmenu_5=reboot RCM=enterrcm\0" \ + "bootmenu_6=reboot=reset\0" \ + "bootmenu_7=power off=poweroff\0" \ + "bootmenu_delay=-1\0" + +#define BOARD_EXTRA_ENV_SETTINGS \ + "spi_size=0x400000\0" \ + "boot_block_size_r=0x200000\0" \ + "boot_block_size=0x1000\0" \ + "check_button=gpio input ${gpio_button}; test $? -eq 0;\0" \ + "bootloader_file=u-boot-dtb-tegra.bin\0" \ + "partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}\0" \ + TRANSFORMER_BOOTMENU + +#endif /* __CONFIG_H */ diff --git a/include/configs/transformer-t30.h b/include/configs/transformer-t30.h new file mode 100644 index 00000000000..d2a16f12c18 --- /dev/null +++ b/include/configs/transformer-t30.h @@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * (C) Copyright 2010,2012 + * NVIDIA Corporation + * + * (C) Copyright 2022 + * Svyatoslav Ryhel + */ + +#ifndef __CONFIG_H +#define __CONFIG_H + +#include + +#include "tegra30-common.h" +#include "transformer-common.h" + +/* Board-specific serial config */ +#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE + +#include "tegra-common-post.h" + +#endif /* __CONFIG_H */ -- cgit v1.2.3 From 855ffdfa650aa54edf2bfdd99da50cd6255453b8 Mon Sep 17 00:00:00 2001 From: Svyatoslav Ryhel Date: Fri, 30 Jun 2023 10:29:04 +0300 Subject: board: asus: grouper: add Google Nexus 7 (2012) support Nexus 7 is a mini tablet computer co-developed by Google and Asus that runs the Android operating system. The Nexus 7 features a 7" display, an Nvidia Tegra 3 quad-core chip, 1 GB of RAM and 8/16 GB of internal storage. This patch brings support for all 3 known ASUS/Google devices: - Nexus 7 (2012) E1565 - Nexus 7 (2012) PM269 - Nexus 7 (2012) 3G - tilapia Tested-by: Andreas Westman Dorcsak # ASUS Grouper E1565 Tested-by: Svyatoslav Ryhel # ASUS Grouper E1565 Signed-off-by: Svyatoslav Ryhel Signed-off-by: Thierry Reding --- include/configs/grouper.h | 61 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 include/configs/grouper.h (limited to 'include') diff --git a/include/configs/grouper.h b/include/configs/grouper.h new file mode 100644 index 00000000000..93304ddc6e8 --- /dev/null +++ b/include/configs/grouper.h @@ -0,0 +1,61 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2010-2012, NVIDIA CORPORATION. All rights reserved. + */ + +#ifndef __CONFIG_H +#define __CONFIG_H + +#include + +#include "tegra30-common.h" + +/* High-level configuration options */ +#define CFG_TEGRA_BOARD_STRING "ASUS Google Nexus 7 (2012)" + +#define GROUPER_FLASH_UBOOT \ + "flash_uboot=echo Preparing RAM;" \ + "mw ${kernel_addr_r} 0 ${boot_block_size_r};" \ + "mw ${ramdisk_addr_r} 0 ${boot_block_size_r};" \ + "echo Reading BCT;" \ + "mmc dev 0 1;" \ + "mmc read ${kernel_addr_r} 0 ${boot_block_size};" \ + "echo Reading bootloader;" \ + "if load mmc 0:1 ${ramdisk_addr_r} ${bootloader_file};" \ + "then echo Calculating bootloader size;" \ + "size mmc 0:1 ${bootloader_file};" \ + "ebtupdate ${kernel_addr_r} ${ramdisk_addr_r} ${filesize};" \ + "echo Writing bootloader to eMMC;" \ + "mmc dev 0 1;" \ + "mmc write ${kernel_addr_r} 0 ${boot_block_size};" \ + "mmc dev 0 2;" \ + "mmc write ${ramdisk_addr_r} 0 ${boot_block_size};" \ + "echo Bootloader written successfully;" \ + "pause 'Press ANY key to reboot device...'; reset;" \ + "else echo Reading bootloader failed;" \ + "pause 'Press ANY key to return to bootmenu...'; bootmenu; fi\0" + +#define GROUPER_BOOTMENU \ + GROUPER_FLASH_UBOOT \ + "bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu\0" \ + "bootmenu_1=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu\0" \ + "bootmenu_2=update bootloader=run flash_uboot\0" \ + "bootmenu_3=reboot RCM=enterrcm\0" \ + "bootmenu_4=reboot=reset\0" \ + "bootmenu_5=power off=poweroff\0" \ + "bootmenu_delay=-1\0" + +#define BOARD_EXTRA_ENV_SETTINGS \ + "boot_block_size_r=0x200000\0" \ + "boot_block_size=0x1000\0" \ + "bootloader_file=u-boot-dtb-tegra.bin\0" \ + "check_button=gpio input 131; test $? -eq 0;\0" \ + "partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}\0" \ + GROUPER_BOOTMENU + +/* Board-specific serial config */ +#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE + +#include "tegra-common-post.h" + +#endif /* __CONFIG_H */ -- cgit v1.2.3 From 623a8c812e127c4f008dfbb60f29edc8c7d94e09 Mon Sep 17 00:00:00 2001 From: Svyatoslav Ryhel Date: Fri, 30 Jun 2023 10:29:05 +0300 Subject: board: lg: x3: add Optimus 4X HD and Optimus Vu support LG X3 is a development board based on Nvidia Tegra 3 SoC on base of which Optimus 4X HD and Optimus Vu were created. Both smartphones feature a 4.7" and 5" panels respectively, an Nvidia Tegra 3 quad-core chip, 1 GB of RAM and 16/32 GB of internal storage. Optimux 4X HD additionally has a micro SD slot. Tested-by: Andreas Westman Dorcsak # LG P880 T30 Tested-by: Svyatoslav Ryhel # LG P895 T30 Signed-off-by: Svyatoslav Ryhel Signed-off-by: Thierry Reding --- include/configs/x3-t30.h | 77 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 include/configs/x3-t30.h (limited to 'include') diff --git a/include/configs/x3-t30.h b/include/configs/x3-t30.h new file mode 100644 index 00000000000..d29ea700b2e --- /dev/null +++ b/include/configs/x3-t30.h @@ -0,0 +1,77 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * (C) Copyright 2010,2012 + * NVIDIA Corporation + * + * (C) Copyright 2022 + * Svyatoslav Ryhel + */ + +#ifndef __CONFIG_H +#define __CONFIG_H + +#include + +#include "tegra30-common.h" + +#define CFG_TEGRA_BOARD_STRING "LG X3 Board" + +#ifdef CONFIG_DEVICE_P880 +/* High-level configuration options */ +#undef CFG_TEGRA_BOARD_STRING +#define CFG_TEGRA_BOARD_STRING "LG Optimus 4X HD" +#endif + +#ifdef CONFIG_DEVICE_P895 +/* High-level configuration options */ +#undef CFG_TEGRA_BOARD_STRING +#define CFG_TEGRA_BOARD_STRING "LG Optimus Vu" +#endif + +#define X3_FLASH_UBOOT \ + "flash_uboot=echo Preparing RAM;" \ + "mw ${kernel_addr_r} 0 ${boot_block_size_r};" \ + "mw ${ramdisk_addr_r} 0 ${boot_block_size_r};" \ + "echo Reading BCT;" \ + "mmc dev 0 1;" \ + "mmc read ${kernel_addr_r} 0 ${boot_block_size};" \ + "echo Reading bootloader;" \ + "if load mmc 0:1 ${ramdisk_addr_r} ${bootloader_file};" \ + "then echo Calculating bootloader size;" \ + "size mmc 0:1 ${bootloader_file};" \ + "ebtupdate ${kernel_addr_r} ${ramdisk_addr_r} ${filesize};" \ + "echo Writing bootloader to eMMC;" \ + "mmc dev 0 1;" \ + "mmc write ${kernel_addr_r} 0 ${boot_block_size};" \ + "mmc dev 0 2;" \ + "mmc write ${ramdisk_addr_r} 0 ${boot_block_size};" \ + "echo Bootloader written successfully;" \ + "pause 'Press ANY key to reboot device...'; reset;" \ + "else echo Reading bootloader failed;" \ + "pause 'Press ANY key to return to bootmenu...'; bootmenu; fi\0" + +#define X3_BOOTMENU \ + X3_FLASH_UBOOT \ + "bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu\0" \ + "bootmenu_1=mount external storage=usb start && ums 0 mmc 1; bootmenu\0" \ + "bootmenu_2=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu\0" \ + "bootmenu_3=update bootloader=run flash_uboot\0" \ + "bootmenu_4=reboot RCM=enterrcm\0" \ + "bootmenu_5=reboot=reset\0" \ + "bootmenu_6=power off=poweroff\0" \ + "bootmenu_delay=-1\0" + +#define BOARD_EXTRA_ENV_SETTINGS \ + "boot_block_size_r=0x200000\0" \ + "boot_block_size=0x1000\0" \ + "bootloader_file=u-boot-dtb-tegra.bin\0" \ + "check_button=gpio input 116; test $? -eq 0\0" \ + "partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}\0" \ + X3_BOOTMENU + +/* Board-specific serial config */ +#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTD_BASE + +#include "tegra-common-post.h" + +#endif /* __CONFIG_H */ -- cgit v1.2.3 From bdf9dead86f06c7d6980c399a4a6339430b531ec Mon Sep 17 00:00:00 2001 From: Svyatoslav Ryhel Date: Fri, 30 Jun 2023 10:29:06 +0300 Subject: board: htc: endeavoru: add One X support The HTC One X is a touchscreen-based, slate-sized smartphone designed and manufactured by HTC that runs the Android operating system. The One X features a 4.7" display, an Nvidia Tegra 3 quad-core chip, 1 GB of RAM and non-extendable 32 GB of internal storage. UART-A is default debug port. Tested-by: Andreas Westman Dorcsak Tested-by: Ion Agorria Tested-by: Svyatoslav Ryhel Signed-off-by: Svyatoslav Ryhel Signed-off-by: Thierry Reding --- include/configs/endeavoru.h | 65 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 include/configs/endeavoru.h (limited to 'include') diff --git a/include/configs/endeavoru.h b/include/configs/endeavoru.h new file mode 100644 index 00000000000..46c582e963e --- /dev/null +++ b/include/configs/endeavoru.h @@ -0,0 +1,65 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * (C) Copyright 2010,2012 + * NVIDIA Corporation + * + * (C) Copyright 2022 + * Svyatoslav Ryhel + */ + +#ifndef __CONFIG_H +#define __CONFIG_H + +#include + +#include "tegra30-common.h" + +/* High-level configuration options */ +#define CFG_TEGRA_BOARD_STRING "HTC One X" + +#define ENDEAVORU_FLASH_UBOOT \ + "flash_uboot=echo Preparing RAM;" \ + "mw ${kernel_addr_r} 0 ${boot_block_size_r};" \ + "mw ${ramdisk_addr_r} 0 ${boot_block_size_r};" \ + "echo Reading BCT;" \ + "mmc dev 0 1;" \ + "mmc read ${kernel_addr_r} 0 ${boot_block_size};" \ + "echo Reading bootloader;" \ + "if load mmc 0:1 ${ramdisk_addr_r} ${bootloader_file};" \ + "then echo Calculating bootloader size;" \ + "size mmc 0:1 ${bootloader_file};" \ + "ebtupdate ${kernel_addr_r} ${ramdisk_addr_r} ${filesize};" \ + "echo Writing bootloader to eMMC;" \ + "mmc dev 0 1;" \ + "mmc write ${kernel_addr_r} 0 ${boot_block_size};" \ + "mmc dev 0 2;" \ + "mmc write ${ramdisk_addr_r} 0 ${boot_block_size};" \ + "echo Bootloader written successfully;" \ + "pause 'Press ANY key to reboot device...'; reset;" \ + "else echo Reading bootloader failed;" \ + "pause 'Press ANY key to return to bootmenu...'; bootmenu; fi\0" + +#define ENDEAVORU_BOOTMENU \ + ENDEAVORU_FLASH_UBOOT \ + "bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu\0" \ + "bootmenu_1=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu\0" \ + "bootmenu_2=update bootloader=run flash_uboot\0" \ + "bootmenu_3=reboot RCM=enterrcm\0" \ + "bootmenu_4=reboot=reset\0" \ + "bootmenu_5=power off=poweroff\0" \ + "bootmenu_delay=-1\0" + +#define BOARD_EXTRA_ENV_SETTINGS \ + "boot_block_size_r=0x200000\0" \ + "boot_block_size=0x1000\0" \ + "bootloader_file=u-boot-dtb-tegra.bin\0" \ + "check_button=gpio input 179; test $? -eq 0\0" \ + "partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}\0" \ + ENDEAVORU_BOOTMENU + +/* Board-specific serial config */ +#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE + +#include "tegra-common-post.h" + +#endif /* __CONFIG_H */ -- cgit v1.2.3 From d99873517907b806fe35f5a009c2b729c39d5808 Mon Sep 17 00:00:00 2001 From: Abdellatif El Khlifi Date: Fri, 4 Aug 2023 14:33:37 +0100 Subject: arm64: smccc: add support for SMCCCv1.2 x0-x17 registers add support for x0-x17 registers used by the SMC calls In SMCCC v1.2 [1] arguments are passed in registers x1-x17. Results are returned in x0-x17. This work is inspired from the following kernel commit: arm64: smccc: Add support for SMCCCv1.2 extended input/output registers [1]: https://documentation-service.arm.com/static/5f8edaeff86e16515cdbe4c6?token= Signed-off-by: Abdellatif El Khlifi Reviewed-by: Ilias Apalodimas Reviewed-by: Jens Wiklander Reviewed-by: Simon Glass Cc: Tom Rini --- include/linux/arm-smccc.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) (limited to 'include') diff --git a/include/linux/arm-smccc.h b/include/linux/arm-smccc.h index e1d09884a1c..f44e9e8f930 100644 --- a/include/linux/arm-smccc.h +++ b/include/linux/arm-smccc.h @@ -1,6 +1,10 @@ /* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (c) 2015, Linaro Limited + * Copyright 2022-2023 Arm Limited and/or its affiliates + * + * Authors: + * Abdellatif El Khlifi */ #ifndef __LINUX_ARM_SMCCC_H #define __LINUX_ARM_SMCCC_H @@ -70,6 +74,47 @@ struct arm_smccc_res { unsigned long a3; }; +#ifdef CONFIG_ARM64 +/** + * struct arm_smccc_1_2_regs - Arguments for or Results from SMC call + * @a0-a17 argument values from registers 0 to 17 + */ +struct arm_smccc_1_2_regs { + unsigned long a0; + unsigned long a1; + unsigned long a2; + unsigned long a3; + unsigned long a4; + unsigned long a5; + unsigned long a6; + unsigned long a7; + unsigned long a8; + unsigned long a9; + unsigned long a10; + unsigned long a11; + unsigned long a12; + unsigned long a13; + unsigned long a14; + unsigned long a15; + unsigned long a16; + unsigned long a17; +}; + +/** + * arm_smccc_1_2_smc() - make SMC calls + * @args: arguments passed via struct arm_smccc_1_2_regs + * @res: result values via struct arm_smccc_1_2_regs + * + * This function is used to make SMC calls following SMC Calling Convention + * v1.2 or above. The content of the supplied param are copied from the + * structure to registers prior to the SMC instruction. The return values + * are updated with the content from registers on return from the SMC + * instruction. + */ +asmlinkage void arm_smccc_1_2_smc(const struct arm_smccc_1_2_regs *args, + struct arm_smccc_1_2_regs *res); +#endif + /** * struct arm_smccc_quirk - Contains quirk information * @id: quirk identification -- cgit v1.2.3 From 7048f26ccb181fc106a995e7e170b219087769f5 Mon Sep 17 00:00:00 2001 From: Abdellatif El Khlifi Date: Fri, 4 Aug 2023 14:33:38 +0100 Subject: lib: uuid: introduce uuid_str_to_le_bin function convert UUID string to little endian binary data Signed-off-by: Abdellatif El Khlifi Reviewed-by: Simon Glass Cc: Tom Rini Cc: Ilias Apalodimas Cc: Jens Wiklander --- include/uuid.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'include') diff --git a/include/uuid.h b/include/uuid.h index 4a4883d3b5b..89b93e642b7 100644 --- a/include/uuid.h +++ b/include/uuid.h @@ -2,6 +2,10 @@ /* * Copyright (C) 2014 Samsung Electronics * Przemyslaw Marczak + * Copyright 2022-2023 Arm Limited and/or its affiliates + * + * Authors: + * Abdellatif El Khlifi */ #ifndef __UUID_H__ #define __UUID_H__ @@ -44,4 +48,15 @@ int uuid_guid_get_bin(const char *guid_str, unsigned char *guid_bin); const char *uuid_guid_get_str(const unsigned char *guid_bin); void gen_rand_uuid(unsigned char *uuid_bin); void gen_rand_uuid_str(char *uuid_str, int str_format); + +/** + * uuid_str_to_le_bin() - Convert string UUID to little endian binary data. + * @uuid_str: pointer to UUID string + * @uuid_bin: pointer to allocated array for little endian output [16B] + * Return: + * uuid_bin filled with little endian UUID data + * On success 0 is returned. Otherwise, failure code. + */ +int uuid_str_to_le_bin(const char *uuid_str, unsigned char *uuid_bin); + #endif -- cgit v1.2.3 From 39d383bdace4b39b10665c7df2f1ef17399f6f1e Mon Sep 17 00:00:00 2001 From: Abdellatif El Khlifi Date: Fri, 4 Aug 2023 14:33:40 +0100 Subject: arm_ffa: introduce Arm FF-A support Add Arm FF-A support implementing Arm Firmware Framework for Armv8-A v1.0 The Firmware Framework for Arm A-profile processors (FF-A v1.0) [1] describes interfaces (ABIs) that standardize communication between the Secure World and Normal World leveraging TrustZone technology. This driver uses 64-bit registers as per SMCCCv1.2 spec and comes on top of the SMCCC layer. The driver provides the FF-A ABIs needed for querying the FF-A framework from the secure world. The driver uses SMC32 calling convention which means using the first 32-bit data of the Xn registers. All supported ABIs come with their 32-bit version except FFA_RXTX_MAP which has 64-bit version supported. Both 32-bit and 64-bit direct messaging are supported which allows both 32-bit and 64-bit clients to use the FF-A bus. FF-A is a discoverable bus and similar to architecture features. FF-A bus is discovered using ARM_SMCCC_FEATURES mechanism performed by the PSCI driver. Clients are able to probe then use the FF-A bus by calling the DM class searching APIs (e.g: uclass_first_device). The Secure World is considered as one entity to communicate with using the FF-A bus. FF-A communication is handled by one device and one instance (the bus). This FF-A driver takes care of all the interactions between Normal world and Secure World. The driver exports its operations to be used by upper layers. Exported operations: - ffa_partition_info_get - ffa_sync_send_receive - ffa_rxtx_unmap Generic FF-A methods are implemented in the Uclass (arm-ffa-uclass.c). Arm specific methods are implemented in the Arm driver (arm-ffa.c). For more details please refer to the driver documentation [2]. [1]: https://developer.arm.com/documentation/den0077/latest/ [2]: doc/arch/arm64.ffa.rst Signed-off-by: Abdellatif El Khlifi Reviewed-by: Simon Glass Reviewed-by: Ilias Apalodimas Cc: Tom Rini Cc: Jens Wiklander Cc: Heinrich Schuchardt --- include/arm_ffa.h | 213 ++++++++++++++++++++++++++++++++++++++++++ include/arm_ffa_priv.h | 246 +++++++++++++++++++++++++++++++++++++++++++++++++ include/dm/uclass-id.h | 6 ++ 3 files changed, 465 insertions(+) create mode 100644 include/arm_ffa.h create mode 100644 include/arm_ffa_priv.h (limited to 'include') diff --git a/include/arm_ffa.h b/include/arm_ffa.h new file mode 100644 index 00000000000..db9b1be995e --- /dev/null +++ b/include/arm_ffa.h @@ -0,0 +1,213 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2022-2023 Arm Limited and/or its affiliates + * + * Authors: + * Abdellatif El Khlifi + */ + +#ifndef __ARM_FFA_H +#define __ARM_FFA_H + +#include + +/* + * This header is public. It can be used by clients to access + * data structures and definitions they need + */ + +/* + * struct ffa_partition_info - Partition information descriptor + * @id: Partition ID + * @exec_ctxt: Execution context count + * @properties: Partition properties + * + * Data structure containing information about partitions instantiated in the system + * This structure is filled with the data queried by FFA_PARTITION_INFO_GET + */ +struct ffa_partition_info { + u16 id; + u16 exec_ctxt; +/* partition supports receipt of direct requests */ +#define FFA_PARTITION_DIRECT_RECV BIT(0) +/* partition can send direct requests. */ +#define FFA_PARTITION_DIRECT_SEND BIT(1) +/* partition can send and receive indirect messages. */ +#define FFA_PARTITION_INDIRECT_MSG BIT(2) + u32 properties; +}; + +/* + * struct ffa_partition_uuid - 16 bytes UUID transmitted by FFA_PARTITION_INFO_GET + * @a1-4: 32-bit words access to the UUID data + * + */ +struct ffa_partition_uuid { + u32 a1; /* w1 */ + u32 a2; /* w2 */ + u32 a3; /* w3 */ + u32 a4; /* w4 */ +}; + +/** + * struct ffa_partition_desc - the secure partition descriptor + * @info: partition information + * @sp_uuid: the secure partition UUID + * + * Each partition has its descriptor containing the partitions information and the UUID + */ +struct ffa_partition_desc { + struct ffa_partition_info info; + struct ffa_partition_uuid sp_uuid; +}; + +/* + * struct ffa_send_direct_data - Data structure hosting the data + * used by FFA_MSG_SEND_DIRECT_{REQ,RESP} + * @data0-4: Data read/written from/to x3-x7 registers + * + * Data structure containing the data to be sent by FFA_MSG_SEND_DIRECT_REQ + * or read from FFA_MSG_SEND_DIRECT_RESP + */ + +/* For use with FFA_MSG_SEND_DIRECT_{REQ,RESP} which pass data via registers */ +struct ffa_send_direct_data { + ulong data0; /* w3/x3 */ + ulong data1; /* w4/x4 */ + ulong data2; /* w5/x5 */ + ulong data3; /* w6/x6 */ + ulong data4; /* w7/x7 */ +}; + +struct udevice; + +/** + * struct ffa_bus_ops - Operations for FF-A + * @partition_info_get: callback for the FFA_PARTITION_INFO_GET + * @sync_send_receive: callback for the FFA_MSG_SEND_DIRECT_REQ + * @rxtx_unmap: callback for the FFA_RXTX_UNMAP + * + * The data structure providing all the operations supported by the driver. + * This structure is EFI runtime resident. + */ +struct ffa_bus_ops { + int (*partition_info_get)(struct udevice *dev, const char *uuid_str, + u32 *sp_count, struct ffa_partition_desc **sp_descs); + int (*sync_send_receive)(struct udevice *dev, u16 dst_part_id, + struct ffa_send_direct_data *msg, + bool is_smc64); + int (*rxtx_unmap)(struct udevice *dev); +}; + +#define ffa_get_ops(dev) ((struct ffa_bus_ops *)(dev)->driver->ops) + +/** + * ffa_rxtx_unmap() - FFA_RXTX_UNMAP driver operation + * Please see ffa_unmap_rxtx_buffers_hdlr() description for more details. + */ +int ffa_rxtx_unmap(struct udevice *dev); + +/** + * ffa_unmap_rxtx_buffers_hdlr() - FFA_RXTX_UNMAP handler function + * @dev: The arm_ffa bus device + * + * This function implements FFA_RXTX_UNMAP FF-A function + * to unmap the RX/TX buffers + * + * Return: + * + * 0 on success. Otherwise, failure + */ +int ffa_unmap_rxtx_buffers_hdlr(struct udevice *dev); + +/** + * ffa_sync_send_receive() - FFA_MSG_SEND_DIRECT_{REQ,RESP} driver operation + * Please see ffa_msg_send_direct_req_hdlr() description for more details. + */ +int ffa_sync_send_receive(struct udevice *dev, u16 dst_part_id, + struct ffa_send_direct_data *msg, bool is_smc64); + +/** + * ffa_msg_send_direct_req_hdlr() - FFA_MSG_SEND_DIRECT_{REQ,RESP} handler function + * @dev: The arm_ffa bus device + * @dst_part_id: destination partition ID + * @msg: pointer to the message data preallocated by the client (in/out) + * @is_smc64: select 64-bit or 32-bit FF-A ABI + * + * This function implements FFA_MSG_SEND_DIRECT_{REQ,RESP} + * FF-A functions. + * + * FFA_MSG_SEND_DIRECT_REQ is used to send the data to the secure partition. + * The response from the secure partition is handled by reading the + * FFA_MSG_SEND_DIRECT_RESP arguments. + * + * The maximum size of the data that can be exchanged is 40 bytes which is + * sizeof(struct ffa_send_direct_data) as defined by the FF-A specification 1.0 + * in the section relevant to FFA_MSG_SEND_DIRECT_{REQ,RESP} + * + * Return: + * + * 0 on success. Otherwise, failure + */ +int ffa_msg_send_direct_req_hdlr(struct udevice *dev, u16 dst_part_id, + struct ffa_send_direct_data *msg, bool is_smc64); + +/** + * ffa_partition_info_get() - FFA_PARTITION_INFO_GET driver operation + * Please see ffa_get_partitions_info_hdlr() description for more details. + */ +int ffa_partition_info_get(struct udevice *dev, const char *uuid_str, + u32 *sp_count, struct ffa_partition_desc **sp_descs); + +/** + * ffa_get_partitions_info_hdlr() - FFA_PARTITION_INFO_GET handler function + * @uuid_str: pointer to the UUID string + * @sp_count: address of the variable containing the number of partitions matching the UUID + * The variable is set by the driver + * @sp_descs: address of the descriptors of the partitions matching the UUID + * The address is set by the driver + * + * Return the number of partitions and their descriptors matching the UUID + * + * Query the secure partition data from uc_priv. + * If not found, invoke FFA_PARTITION_INFO_GET + * FF-A function to query the partition information from secure world. + * + * A client of the FF-A driver should know the UUID of the service it wants to + * access. It should use the UUID to request the FF-A driver to provide the + * partition(s) information of the service. The FF-A driver uses + * PARTITION_INFO_GET to obtain this information. This is implemented through + * ffa_get_partitions_info_hdlr() function. + * A new FFA_PARTITION_INFO_GET call is issued (first one performed through + * ffa_cache_partitions_info) allowing to retrieve the partition(s) information. + * They are not saved (already done). We only update the UUID in the cached area. + * This assumes that partitions data does not change in the secure world. + * Otherwise u-boot will have an outdated partition data. The benefit of caching + * the information in the FF-A driver is to accommodate discovery after + * ExitBootServices(). + * + * Return: + * + * @sp_count: the number of partitions + * @sp_descs: address of the partitions descriptors + * + * On success 0 is returned. Otherwise, failure + */ +int ffa_get_partitions_info_hdlr(struct udevice *dev, const char *uuid_str, + u32 *sp_count, struct ffa_partition_desc **sp_descs); + +struct ffa_priv; + +/** + * ffa_set_smc_conduit() - Set the SMC conduit + * @dev: The FF-A bus device + * + * Selects the SMC conduit by setting the FF-A ABI invoke function. + * + * Return: + * + * 0 on success. Otherwise, failure + */ +int ffa_set_smc_conduit(struct udevice *dev); + +#endif diff --git a/include/arm_ffa_priv.h b/include/arm_ffa_priv.h new file mode 100644 index 00000000000..d564c33c647 --- /dev/null +++ b/include/arm_ffa_priv.h @@ -0,0 +1,246 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2022-2023 Arm Limited and/or its affiliates + * + * Authors: + * Abdellatif El Khlifi + */ + +#ifndef __ARM_FFA_PRV_H +#define __ARM_FFA_PRV_H + +#include +#include +#include + +/* This header is exclusively used by the FF-A Uclass and FF-A driver(s) */ + +/* Arm FF-A driver name */ +#define FFA_DRV_NAME "arm_ffa" + +/* The FF-A SMC function definitions */ + +#if CONFIG_IS_ENABLED(SANDBOX) + +/* Providing Arm SMCCC declarations to sandbox */ + +/** + * struct sandbox_smccc_1_2_regs - emulated SMC call arguments or results + * @a0-a17 argument values from registers 0 to 17 + */ +struct sandbox_smccc_1_2_regs { + ulong a0; + ulong a1; + ulong a2; + ulong a3; + ulong a4; + ulong a5; + ulong a6; + ulong a7; + ulong a8; + ulong a9; + ulong a10; + ulong a11; + ulong a12; + ulong a13; + ulong a14; + ulong a15; + ulong a16; + ulong a17; +}; + +typedef struct sandbox_smccc_1_2_regs ffa_value_t; + +#define ARM_SMCCC_FAST_CALL 1UL +#define ARM_SMCCC_OWNER_STANDARD 4 +#define ARM_SMCCC_SMC_32 0 +#define ARM_SMCCC_SMC_64 1 +#define ARM_SMCCC_TYPE_SHIFT 31 +#define ARM_SMCCC_CALL_CONV_SHIFT 30 +#define ARM_SMCCC_OWNER_MASK 0x3f +#define ARM_SMCCC_OWNER_SHIFT 24 +#define ARM_SMCCC_FUNC_MASK 0xffff + +#define ARM_SMCCC_CALL_VAL(type, calling_convention, owner, func_num) \ + (((type) << ARM_SMCCC_TYPE_SHIFT) | \ + ((calling_convention) << ARM_SMCCC_CALL_CONV_SHIFT) | \ + (((owner) & ARM_SMCCC_OWNER_MASK) << ARM_SMCCC_OWNER_SHIFT) | \ + ((func_num) & ARM_SMCCC_FUNC_MASK)) + +#else +/* CONFIG_ARM64 */ +#include +typedef struct arm_smccc_1_2_regs ffa_value_t; +#endif + +/* Defining the function pointer type for the function executing the FF-A ABIs */ +typedef void (*invoke_ffa_fn_t)(ffa_value_t args, ffa_value_t *res); + +/* FF-A driver version definitions */ + +#define MAJOR_VERSION_MASK GENMASK(30, 16) +#define MINOR_VERSION_MASK GENMASK(15, 0) +#define GET_FFA_MAJOR_VERSION(x) \ + ((u16)(FIELD_GET(MAJOR_VERSION_MASK, (x)))) +#define GET_FFA_MINOR_VERSION(x) \ + ((u16)(FIELD_GET(MINOR_VERSION_MASK, (x)))) +#define PACK_VERSION_INFO(major, minor) \ + (FIELD_PREP(MAJOR_VERSION_MASK, (major)) | \ + FIELD_PREP(MINOR_VERSION_MASK, (minor))) + +#define FFA_MAJOR_VERSION (1) +#define FFA_MINOR_VERSION (0) +#define FFA_VERSION_1_0 \ + PACK_VERSION_INFO(FFA_MAJOR_VERSION, FFA_MINOR_VERSION) + +/* Endpoint ID mask (u-boot endpoint ID) */ + +#define GET_SELF_ENDPOINT_ID_MASK GENMASK(15, 0) +#define GET_SELF_ENDPOINT_ID(x) \ + ((u16)(FIELD_GET(GET_SELF_ENDPOINT_ID_MASK, (x)))) + +#define PREP_SELF_ENDPOINT_ID_MASK GENMASK(31, 16) +#define PREP_SELF_ENDPOINT_ID(x) \ + (FIELD_PREP(PREP_SELF_ENDPOINT_ID_MASK, (x))) + +/* Partition endpoint ID mask (partition with which u-boot communicates with) */ + +#define PREP_PART_ENDPOINT_ID_MASK GENMASK(15, 0) +#define PREP_PART_ENDPOINT_ID(x) \ + (FIELD_PREP(PREP_PART_ENDPOINT_ID_MASK, (x))) + +/* Definitions of the Arm FF-A interfaces supported by the Arm FF-A driver */ + +#define FFA_SMC(calling_convention, func_num) \ + ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, (calling_convention), \ + ARM_SMCCC_OWNER_STANDARD, (func_num)) + +#define FFA_SMC_32(func_num) FFA_SMC(ARM_SMCCC_SMC_32, (func_num)) +#define FFA_SMC_64(func_num) FFA_SMC(ARM_SMCCC_SMC_64, (func_num)) + +enum ffa_abis { + FFA_ERROR = 0x60, + FFA_SUCCESS = 0x61, + FFA_INTERRUPT = 0x62, + FFA_VERSION = 0x63, + FFA_FEATURES = 0x64, + FFA_RX_RELEASE = 0x65, + FFA_RXTX_MAP = 0x66, + FFA_RXTX_UNMAP = 0x67, + FFA_PARTITION_INFO_GET = 0x68, + FFA_ID_GET = 0x69, + FFA_RUN = 0x6d, + FFA_MSG_SEND_DIRECT_REQ = 0x6f, + FFA_MSG_SEND_DIRECT_RESP = 0x70, + + /* To be updated when adding new FFA IDs */ + FFA_FIRST_ID = FFA_ERROR, /* Lowest number ID */ + FFA_LAST_ID = FFA_MSG_SEND_DIRECT_RESP, /* Highest number ID */ +}; + +enum ffa_abi_errcode { + NOT_SUPPORTED = 1, + INVALID_PARAMETERS, + NO_MEMORY, + BUSY, + INTERRUPTED, + DENIED, + RETRY, + ABORTED, + MAX_NUMBER_FFA_ERR +}; + +extern int ffa_to_std_errmap[MAX_NUMBER_FFA_ERR]; + +/* Container structure and helper macros to map between an FF-A error and relevant error log */ +struct ffa_abi_errmap { + char *err_str[MAX_NUMBER_FFA_ERR]; +}; + +#define FFA_ERRMAP_COUNT (FFA_LAST_ID - FFA_FIRST_ID + 1) +#define FFA_ID_TO_ERRMAP_ID(ffa_id) ((ffa_id) - FFA_FIRST_ID) + +/** + * enum ffa_rxtx_buf_sizes - minimum sizes supported + * for the RX/TX buffers + */ +enum ffa_rxtx_buf_sizes { + RXTX_4K, + RXTX_64K, + RXTX_16K +}; + +/** + * struct ffa_rxtxpair - Hosts the RX/TX buffers virtual addresses + * @rxbuf: virtual address of the RX buffer + * @txbuf: virtual address of the TX buffer + * @rxtx_min_pages: RX/TX buffers minimum size in pages + * + * Hosts the virtual addresses of the mapped RX/TX buffers + * These addresses are used by the FF-A functions that use the RX/TX buffers + */ +struct ffa_rxtxpair { + void *rxbuf; /* Virtual address returned by memalign */ + void *txbuf; /* Virtual address returned by memalign */ + size_t rxtx_min_pages; /* Minimum number of pages in each of the RX/TX buffers */ +}; + +struct ffa_partition_desc; + +/** + * struct ffa_partitions - descriptors for all secure partitions + * @count: The number of partitions descriptors + * @descs The partitions descriptors table + * + * Contains the partitions descriptors table + */ +struct ffa_partitions { + u32 count; + struct ffa_partition_desc *descs; /* Virtual address */ +}; + +/** + * struct ffa_priv - the driver private data structure + * + * @fwk_version: FF-A framework version + * @emul: FF-A sandbox emulator + * @id: u-boot endpoint ID + * @partitions: The partitions descriptors structure + * @pair: The RX/TX buffers pair + * + * The device private data structure containing all the + * data read from secure world. + */ +struct ffa_priv { + u32 fwk_version; + struct udevice *emul; + u16 id; + struct ffa_partitions partitions; + struct ffa_rxtxpair pair; +}; + +/** + * ffa_get_version_hdlr() - FFA_VERSION handler function + * @dev: The FF-A bus device + * + * Implement FFA_VERSION FF-A function + * to get from the secure world the FF-A framework version + * FFA_VERSION is used to discover the FF-A framework. + * + * Return: + * + * 0 on success. Otherwise, failure + */ +int ffa_get_version_hdlr(struct udevice *dev); + +/** + * invoke_ffa_fn() - SMC wrapper + * @args: FF-A ABI arguments to be copied to Xn registers + * @res: FF-A ABI return data to be copied from Xn registers + * + * Calls low level SMC implementation. + * This function should be implemented by the user driver. + */ +void invoke_ffa_fn(ffa_value_t args, ffa_value_t *res); + +#endif diff --git a/include/dm/uclass-id.h b/include/dm/uclass-id.h index 307ad6931ca..3c6af2e3d2f 100644 --- a/include/dm/uclass-id.h +++ b/include/dm/uclass-id.h @@ -4,6 +4,11 @@ * * (C) Copyright 2012 * Pavel Herrmann + * + * Copyright 2022-2023 Arm Limited and/or its affiliates + * + * Authors: + * Abdellatif El Khlifi */ #ifndef _DM_UCLASS_ID_H @@ -57,6 +62,7 @@ enum uclass_id { UCLASS_ETH, /* Ethernet device */ UCLASS_ETH_PHY, /* Ethernet PHY device */ UCLASS_EXTCON, /* External Connector Class */ + UCLASS_FFA, /* Arm Firmware Framework for Armv8-A */ UCLASS_FIRMWARE, /* Firmware */ UCLASS_FPGA, /* FPGA device */ UCLASS_FUZZING_ENGINE, /* Fuzzing engine */ -- cgit v1.2.3 From a09852d862bc203b80368ca671ff36e80bcb510f Mon Sep 17 00:00:00 2001 From: Abdellatif El Khlifi Date: Fri, 4 Aug 2023 14:33:41 +0100 Subject: arm_ffa: introduce sandbox FF-A support Emulate Secure World's FF-A ABIs and allow testing U-Boot FF-A support Features of the sandbox FF-A support: - Introduce an FF-A emulator - Introduce an FF-A device driver for FF-A comms with emulated Secure World - Provides test methods allowing to read the status of the inspected ABIs The sandbox FF-A emulator supports only 64-bit direct messaging. Signed-off-by: Abdellatif El Khlifi Reviewed-by: Simon Glass Cc: Tom Rini Cc: Ilias Apalodimas Cc: Jens Wiklander Cc: Heinrich Schuchardt --- include/dm/uclass-id.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/dm/uclass-id.h b/include/dm/uclass-id.h index 3c6af2e3d2f..0432c95c9ed 100644 --- a/include/dm/uclass-id.h +++ b/include/dm/uclass-id.h @@ -63,6 +63,7 @@ enum uclass_id { UCLASS_ETH_PHY, /* Ethernet PHY device */ UCLASS_EXTCON, /* External Connector Class */ UCLASS_FFA, /* Arm Firmware Framework for Armv8-A */ + UCLASS_FFA_EMUL, /* sandbox FF-A device emulator */ UCLASS_FIRMWARE, /* Firmware */ UCLASS_FPGA, /* FPGA device */ UCLASS_FUZZING_ENGINE, /* Fuzzing engine */ -- cgit v1.2.3 From 218b062e8f20233181ecbcca1d627f5d44c4617d Mon Sep 17 00:00:00 2001 From: Abdellatif El Khlifi Date: Fri, 4 Aug 2023 14:33:44 +0100 Subject: arm_ffa: efi: introduce FF-A MM communication Add MM communication support using FF-A transport This feature allows accessing MM partitions services through EFI MM communication protocol. MM partitions such as StandAlonneMM or smm-gateway secure partitions which reside in secure world. An MM shared buffer and a door bell event are used to exchange the data. The data is used by EFI services such as GetVariable()/SetVariable() and copied from the communication buffer to the MM shared buffer. The secure partition is notified about availability of data in the MM shared buffer by an FF-A message (door bell). On such event, MM SP can read the data and updates the MM shared buffer with the response data. The response data is copied back to the communication buffer and consumed by the EFI subsystem. MM communication protocol supports FF-A 64-bit direct messaging. We tested the FF-A MM communication on the Corstone-1000 platform. We ran the UEFI SCT test suite containing EFI setVariable, getVariable and getNextVariable tests which involve FF-A MM communication and all tests are passing with the current changes. We made the SCT test reports (part of the ACS results) public following the latest Corstone-1000 platform software release. Please find the test reports at [1]. [1]: https://gitlab.arm.com/arm-reference-solutions/arm-reference-solutions-test-report/-/tree/master/embedded-a/corstone1000/CORSTONE1000-2023.06/acs_results_fpga.zip Signed-off-by: Abdellatif El Khlifi Tested-by: Gowtham Suresh Kumar Reviewed-by: Simon Glass Cc: Tom Rini Cc: Ilias Apalodimas Cc: Jens Wiklander Reviewed-by: Ilias Apalodimas Reviewed-by: Tom Rini --- include/mm_communication.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'include') diff --git a/include/mm_communication.h b/include/mm_communication.h index e65fbde60d0..f38f1a5344b 100644 --- a/include/mm_communication.h +++ b/include/mm_communication.h @@ -6,6 +6,9 @@ * Copyright (c) 2017, Intel Corporation. All rights reserved. * Copyright (C) 2020 Linaro Ltd. * Copyright (C) 2020 Linaro Ltd. + * Copyright 2022-2023 Arm Limited and/or its affiliates + * Authors: + * Abdellatif El Khlifi */ #ifndef _MM_COMMUNICATION_H_ @@ -13,6 +16,11 @@ #include +#if CONFIG_IS_ENABLED(ARM_FFA_TRANSPORT) +/* MM service UUID string (big-endian format). This UUID is common across all MM SPs */ +#define MM_SP_UUID "33d532ed-e699-0942-c09c-a798d9cd722d" +#endif + /* * Interface to the pseudo Trusted Application (TA), which provides a * communication channel with the Standalone MM (Management Mode) @@ -248,4 +256,13 @@ struct smm_variable_var_check_property { u16 name[]; }; +#if CONFIG_IS_ENABLED(ARM_FFA_TRANSPORT) +/* supported MM transports */ +enum mm_comms_select { + MM_COMMS_UNDEFINED, + MM_COMMS_FFA, + MM_COMMS_OPTEE +}; +#endif + #endif /* _MM_COMMUNICATION_H_ */ -- cgit v1.2.3 From 4c4ccc5a0499cf2abdca95415caf7443c760a26d Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 11:15:12 -0600 Subject: usb: Return -ENOENT when no devices are found When USB finds no devices it currently returns -EPERM which bootstd does not understand. This causes other bootdevs of the same priority to be skipped. Fix this by returning the correct error code. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- include/usb.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/usb.h b/include/usb.h index 42b001c3dd5..09e3f0cb309 100644 --- a/include/usb.h +++ b/include/usb.h @@ -257,7 +257,14 @@ int usb_kbd_deregister(int force); #endif /* routines */ -int usb_init(void); /* initialize the USB Controller */ + +/* + * usb_init() - initialize the USB Controllers + * + * Returns: 0 if OK, -ENOENT if there are no USB devices + */ +int usb_init(void); + int usb_stop(void); /* stop the USB Controller */ int usb_detect_change(void); /* detect if a USB device has been (un)plugged */ -- cgit v1.2.3 From d7d78576bbfddd52b258771c9e926bd51b50d91e Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 11:15:14 -0600 Subject: bootstd: Rename bootdev_setup_sibling_blk() This name is a little confusing since it suggests that it sets up the sibling block device. In fact it sets up a bootdev for it. Rename the function to make this clearer. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Reviewed-by: Mattijs Korpershoek --- include/bootdev.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/bootdev.h b/include/bootdev.h index 1533adfe506..848233187f8 100644 --- a/include/bootdev.h +++ b/include/bootdev.h @@ -371,7 +371,7 @@ int bootdev_next_prio(struct bootflow_iter *iter, struct udevice **devp); /** * bootdev_setup_for_dev() - Bind a new bootdev device (deprecated) * - * Please use bootdev_setup_sibling_blk() instead since it supports multiple + * Please use bootdev_setup_for_sibling_blk() instead since it supports multiple * (child) block devices for each media device. * * Creates a bootdev device as a child of @parent. This should be called from @@ -386,7 +386,7 @@ int bootdev_next_prio(struct bootflow_iter *iter, struct udevice **devp); int bootdev_setup_for_dev(struct udevice *parent, const char *drv_name); /** - * bootdev_setup_for_blk() - Bind a new bootdev device for a blk device + * bootdev_setup_for_sibling_blk() - Bind a new bootdev device for a blk device * * Creates a bootdev device as a sibling of @blk. This should be called from * the driver's bind() method or its uclass' post_bind() method, at the same @@ -398,7 +398,7 @@ int bootdev_setup_for_dev(struct udevice *parent, const char *drv_name); * @drv_name: Name of bootdev driver to bind * Return: 0 if OK, -ve on error */ -int bootdev_setup_sibling_blk(struct udevice *blk, const char *drv_name); +int bootdev_setup_for_sibling_blk(struct udevice *blk, const char *drv_name); /** * bootdev_get_sibling_blk() - Locate the block device for a bootdev @@ -428,8 +428,8 @@ static inline int bootdev_setup_for_dev(struct udevice *parent, return 0; } -static inline int bootdev_setup_sibling_blk(struct udevice *blk, - const char *drv_name) +static inline int bootdev_setup_for_sibling_blk(struct udevice *blk, + const char *drv_name) { return 0; } -- cgit v1.2.3 From 5e541a05f70296dbad07fc1f4e8678ad207bb476 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:01:45 -0600 Subject: env: Use include/env for text-environment includes The 'environment' word is too long. We mostly use 'env' in U-Boot, so use that as the name of the include directory too. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- include/configs/am335x_evm.h | 2 +- include/configs/am43xx_evm.h | 2 +- include/configs/am57xx_evm.h | 2 +- include/configs/am62ax_evm.h | 4 +- include/configs/am62x_evm.h | 2 +- include/configs/am64x_evm.h | 4 +- include/configs/am65x_evm.h | 6 +- include/configs/da850evm.h | 2 +- include/configs/dra7xx_evm.h | 2 +- include/configs/omap3_evm.h | 2 +- include/configs/omapl138_lcdk.h | 2 +- include/configs/phycore_am335x_r2.h | 4 +- include/configs/sifive-unleashed.h | 2 +- include/configs/ti_omap4_common.h | 2 +- include/configs/ti_omap5_common.h | 4 +- include/env/distro/sf.h | 41 ++++++++++++++ include/env/pg-wcom/common.env | 68 ++++++++++++++++++++++ include/env/pg-wcom/ls102xa.env | 29 ++++++++++ include/env/pg-wcom/powerpc.env | 16 ++++++ include/env/ti/dfu.h | 81 +++++++++++++++++++++++++++ include/env/ti/k3_dfu.env | 30 ++++++++++ include/env/ti/k3_dfu.h | 46 +++++++++++++++ include/env/ti/k3_rproc.env | 26 +++++++++ include/env/ti/k3_rproc.h | 52 +++++++++++++++++ include/env/ti/mmc.env | 76 +++++++++++++++++++++++++ include/env/ti/mmc.h | 73 ++++++++++++++++++++++++ include/env/ti/nand.env | 14 +++++ include/env/ti/nand.h | 25 +++++++++ include/env/ti/ti_armv7_common.env | 34 +++++++++++ include/env/ti/ti_armv7_keystone2.env | 61 ++++++++++++++++++++ include/env/ti/ufs.env | 22 ++++++++ include/env/ti/ufs.h | 33 +++++++++++ include/environment/distro/sf.h | 41 -------------- include/environment/pg-wcom/common.env | 68 ---------------------- include/environment/pg-wcom/ls102xa.env | 29 ---------- include/environment/pg-wcom/powerpc.env | 16 ------ include/environment/ti/dfu.h | 81 --------------------------- include/environment/ti/k3_dfu.env | 30 ---------- include/environment/ti/k3_dfu.h | 46 --------------- include/environment/ti/k3_rproc.env | 26 --------- include/environment/ti/k3_rproc.h | 52 ----------------- include/environment/ti/mmc.env | 76 ------------------------- include/environment/ti/mmc.h | 73 ------------------------ include/environment/ti/nand.env | 14 ----- include/environment/ti/nand.h | 25 --------- include/environment/ti/ti_armv7_common.env | 34 ----------- include/environment/ti/ti_armv7_keystone2.env | 61 -------------------- include/environment/ti/ufs.env | 22 -------- include/environment/ti/ufs.h | 33 ----------- 49 files changed, 748 insertions(+), 748 deletions(-) create mode 100644 include/env/distro/sf.h create mode 100644 include/env/pg-wcom/common.env create mode 100644 include/env/pg-wcom/ls102xa.env create mode 100644 include/env/pg-wcom/powerpc.env create mode 100644 include/env/ti/dfu.h create mode 100644 include/env/ti/k3_dfu.env create mode 100644 include/env/ti/k3_dfu.h create mode 100644 include/env/ti/k3_rproc.env create mode 100644 include/env/ti/k3_rproc.h create mode 100644 include/env/ti/mmc.env create mode 100644 include/env/ti/mmc.h create mode 100644 include/env/ti/nand.env create mode 100644 include/env/ti/nand.h create mode 100644 include/env/ti/ti_armv7_common.env create mode 100644 include/env/ti/ti_armv7_keystone2.env create mode 100644 include/env/ti/ufs.env create mode 100644 include/env/ti/ufs.h delete mode 100644 include/environment/distro/sf.h delete mode 100644 include/environment/pg-wcom/common.env delete mode 100644 include/environment/pg-wcom/ls102xa.env delete mode 100644 include/environment/pg-wcom/powerpc.env delete mode 100644 include/environment/ti/dfu.h delete mode 100644 include/environment/ti/k3_dfu.env delete mode 100644 include/environment/ti/k3_dfu.h delete mode 100644 include/environment/ti/k3_rproc.env delete mode 100644 include/environment/ti/k3_rproc.h delete mode 100644 include/environment/ti/mmc.env delete mode 100644 include/environment/ti/mmc.h delete mode 100644 include/environment/ti/nand.env delete mode 100644 include/environment/ti/nand.h delete mode 100644 include/environment/ti/ti_armv7_common.env delete mode 100644 include/environment/ti/ti_armv7_keystone2.env delete mode 100644 include/environment/ti/ufs.env delete mode 100644 include/environment/ti/ufs.h (limited to 'include') diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 5b477785174..504b1f02283 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -76,7 +76,7 @@ #include #ifndef CONFIG_SPL_BUILD -#include +#include #define CFG_EXTRA_ENV_SETTINGS \ DEFAULT_LINUX_BOOT_ENV \ diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h index a2f73c47543..7ee7b7e4f4f 100644 --- a/include/configs/am43xx_evm.h +++ b/include/configs/am43xx_evm.h @@ -64,7 +64,7 @@ #include #ifndef CONFIG_SPL_BUILD -#include +#include #define CFG_EXTRA_ENV_SETTINGS \ DEFAULT_LINUX_BOOT_ENV \ diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h index ba91f2b0545..06edde69028 100644 --- a/include/configs/am57xx_evm.h +++ b/include/configs/am57xx_evm.h @@ -11,7 +11,7 @@ #ifndef __CONFIG_AM57XX_EVM_H #define __CONFIG_AM57XX_EVM_H -#include +#include #include #define CFG_SYS_NS16550_COM1 UART1_BASE /* Base EVM has UART0 */ diff --git a/include/configs/am62ax_evm.h b/include/configs/am62ax_evm.h index 3997ce558a4..57003f120f9 100644 --- a/include/configs/am62ax_evm.h +++ b/include/configs/am62ax_evm.h @@ -9,8 +9,8 @@ #define __CONFIG_AM62AX_EVM_H #include -#include -#include +#include +#include /* DDR Configuration */ #define CFG_SYS_SDRAM_BASE1 0x880000000 diff --git a/include/configs/am62x_evm.h b/include/configs/am62x_evm.h index 6b2a6ee0d0c..44180dc7687 100644 --- a/include/configs/am62x_evm.h +++ b/include/configs/am62x_evm.h @@ -10,7 +10,7 @@ #define __CONFIG_AM625_EVM_H #include -#include +#include /* DDR Configuration */ #define CFG_SYS_SDRAM_BASE1 0x880000000 diff --git a/include/configs/am64x_evm.h b/include/configs/am64x_evm.h index 1e37ab47b9a..062102a610d 100644 --- a/include/configs/am64x_evm.h +++ b/include/configs/am64x_evm.h @@ -11,9 +11,9 @@ #include #include -#include +#include #include -#include +#include /* DDR Configuration */ #define CFG_SYS_SDRAM_BASE1 0x880000000 diff --git a/include/configs/am65x_evm.h b/include/configs/am65x_evm.h index 2fa658d5396..9e90239a1c1 100644 --- a/include/configs/am65x_evm.h +++ b/include/configs/am65x_evm.h @@ -10,9 +10,9 @@ #define __CONFIG_AM654_EVM_H #include -#include -#include -#include +#include +#include +#include /* DDR Configuration */ #define CFG_SYS_SDRAM_BASE1 0x880000000 diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h index 736af88a024..cef404218ed 100644 --- a/include/configs/da850evm.h +++ b/include/configs/da850evm.h @@ -143,7 +143,7 @@ "fdtaddr=0xc0600000\0" \ "scriptaddr=0xc0600000\0" -#include +#include #define CFG_EXTRA_ENV_SETTINGS \ DEFAULT_LINUX_BOOT_ENV \ diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h index ef1d5a11260..633ec1f32fa 100644 --- a/include/configs/dra7xx_evm.h +++ b/include/configs/dra7xx_evm.h @@ -11,7 +11,7 @@ #ifndef __CONFIG_DRA7XX_EVM_H #define __CONFIG_DRA7XX_EVM_H -#include +#include #define CFG_MAX_MEM_MAPPED 0x80000000 diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h index adb25a62970..f44967787c9 100644 --- a/include/configs/omap3_evm.h +++ b/include/configs/omap3_evm.h @@ -67,7 +67,7 @@ #include -#include +#include #define CFG_EXTRA_ENV_SETTINGS \ DEFAULT_LINUX_BOOT_ENV \ diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h index af0093511a0..fc2655a17b9 100644 --- a/include/configs/omapl138_lcdk.h +++ b/include/configs/omapl138_lcdk.h @@ -135,7 +135,7 @@ "fdtaddr=0xc0600000\0" \ "scriptaddr=0xc0600000\0" -#include +#include #define CFG_EXTRA_ENV_SETTINGS \ DEFAULT_LINUX_BOOT_ENV \ diff --git a/include/configs/phycore_am335x_r2.h b/include/configs/phycore_am335x_r2.h index 4e6dc79f41b..8668da6eba5 100644 --- a/include/configs/phycore_am335x_r2.h +++ b/include/configs/phycore_am335x_r2.h @@ -59,8 +59,8 @@ func(NAND, nand, 0) #include -#include -#include +#include +#include #define CFG_EXTRA_ENV_SETTINGS \ DEFAULT_MMC_TI_ARGS \ diff --git a/include/configs/sifive-unleashed.h b/include/configs/sifive-unleashed.h index f208f5e20db..2996b375723 100644 --- a/include/configs/sifive-unleashed.h +++ b/include/configs/sifive-unleashed.h @@ -26,7 +26,7 @@ func(DHCP, dhcp, na) #include -#include +#include #define TYPE_GUID_LOADER1 "5B193300-FC78-40CD-8002-E86C45580B47" #define TYPE_GUID_LOADER2 "2E54B353-1271-4842-806F-E436D6AF6985" diff --git a/include/configs/ti_omap4_common.h b/include/configs/ti_omap4_common.h index 9e312ac16d1..c4f116aabf8 100644 --- a/include/configs/ti_omap4_common.h +++ b/include/configs/ti_omap4_common.h @@ -56,7 +56,7 @@ func(DHCP, dhcp, na) #include -#include +#include #define CFG_EXTRA_ENV_SETTINGS \ DEFAULT_LINUX_BOOT_ENV \ diff --git a/include/configs/ti_omap5_common.h b/include/configs/ti_omap5_common.h index 74a39c40785..4e5aa74147d 100644 --- a/include/configs/ti_omap5_common.h +++ b/include/configs/ti_omap5_common.h @@ -39,8 +39,8 @@ #define DFUARGS #endif -#include -#include +#include +#include #ifndef CONSOLEDEV #define CONSOLEDEV "ttyS2" diff --git a/include/env/distro/sf.h b/include/env/distro/sf.h new file mode 100644 index 00000000000..ee48a8a4e8f --- /dev/null +++ b/include/env/distro/sf.h @@ -0,0 +1,41 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2020 Amarula Solutions(India) + * + * SF distro configurations. + */ + +#ifndef __DISTRO_SF_CONFIG_H +#define __DISTRO_SF_CONFIG_H + +#if IS_ENABLED(CONFIG_CMD_SF) +#define BOOTENV_SHARED_SF(devtypel) \ + #devtypel "_boot=" \ + "if " #devtypel " probe ${busnum}; then " \ + "devtype=" #devtypel "; " \ + "run scan_sf_for_scripts; " \ + "fi\0" +#define BOOTENV_DEV_SF(devtypeu, devtypel, instance) \ + "bootcmd_" #devtypel #instance "=" \ + "busnum=" #instance "; " \ + "run " #devtypel "_boot\0" +#define BOOTENV_DEV_NAME_SF(devtypeu, devtypel, instance) \ + #devtypel #instance " " +#else +#define BOOTENV_SHARED_SF(devtypel) +#define BOOTENV_DEV_SF \ + BOOT_TARGET_DEVICES_references_SF_without_CONFIG_CMD_SF +#define BOOTENV_DEV_NAME_SF \ + BOOT_TARGET_DEVICES_references_SF_without_CONFIG_CMD_SF + +#endif /* CONFIG_CMD_SF */ + +#define BOOTENV_SF \ + BOOTENV_SHARED_SF(sf) \ + "scan_sf_for_scripts=" \ + "${devtype} read ${scriptaddr} " \ + "${script_offset_f} ${script_size_f}; " \ + "source ${scriptaddr}; " \ + "echo SCRIPT FAILED: continuing...\0" + +#endif /* __DISTRO_SF_CONFIG_H */ diff --git a/include/env/pg-wcom/common.env b/include/env/pg-wcom/common.env new file mode 100644 index 00000000000..4b660cebd67 --- /dev/null +++ b/include/env/pg-wcom/common.env @@ -0,0 +1,68 @@ + +#ifndef WCOM_UBI_PARTITION_APP +/* one flash chip only called boot */ +# define WCOM_UBI_LINUX_MTD ubi.mtd=ubi0 +ubiattach=ubi part ubi0 +#else /* WCOM_UBI_PARTITION_APP */ +/* two flash chips called boot and app */ +# define WCOM_UBI_LINUX_MTD ubi.mtd=ubi0 ubi.mtd=ubi1 +ubiattach=if test ${boot_bank} -eq 0; + then; + ubi part ubi0; + else; + ubi part ubi1; + fi +#endif /* WCOMC_UBI_PARTITION_APP */ + +actual_bank=0 + +add_default=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off: + console=ttyS0,${baudrate} mem=${kernelmem} init=${init} + phram.phram=phvar,${varaddr},CONFIG_KM_PHRAM + WCOM_UBI_LINUX_MTD + +addpanic=setenv bootargs ${bootargs} panic=1 panic_on_oops=1 +altbootcmd=run bootcmd +backup_bank=0 +boot=bootm ${load_addr_r} - ${fdt_addr_r} + +bootcmd=km_checkbidhwk && + setenv bootcmd 'if km_checktestboot; + then; + setenv boot_bank ${test_bank}; + else; + setenv boot_bank ${actual_bank}; + fi; + run ${subbootcmds}; reset' && + setenv altbootcmd 'setenv boot_bank ${backup_bank}; + run ${subbootcmds}; + reset' && + saveenv && + saveenv && + boot + +cramfsaddr=CONFIG_KM_CRAMFS_ADDR +cramfsloadfdt=cramfsload ${fdt_addr_r} fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb +cramfsloadkernel=cramfsload ${load_addr_r} ${uimage} + +develop=tftp ${load_addr_r} scripts/develop-${arch}.txt && + env import -t ${load_addr_r} ${filesize} && + run setup_debug_env + +env_version=1 +fdt_addr_r=CONFIG_KM_FDT_ADDR +flashargs=setenv bootargs root=mtdblock:rootfs${boot_bank} rootfstype=squashfs ro +init=/sbin/init-overlay.sh +load=tftpboot ${load_addr_r} ${hostname}/u-boot.bin +load_addr_r=CONFIG_KM_KERNEL_ADDR +pnvramsize=CONFIG_KM_PNVRAM + +ramfs=tftp ${load_addr_r} scripts/ramfs-${arch}.txt && + env import -t ${load_addr_r} ${filesize} && + run setup_debug_env + +release=run newenv; reset +subbootcmds=ubiattach ubicopy checkfdt cramfsloadfdt set_fdthigh + cramfsloadkernel flashargs add_default addpanic boot +testbootcmd=setenv boot_bank ${test_bank}; run ${subbootcmds}; reset +ubicopy=ubi read ${cramfsaddr} bootfs${boot_bank} diff --git a/include/env/pg-wcom/ls102xa.env b/include/env/pg-wcom/ls102xa.env new file mode 100644 index 00000000000..abbec424574 --- /dev/null +++ b/include/env/pg-wcom/ls102xa.env @@ -0,0 +1,29 @@ +#define WCOM_UBI_PARTITION_APP + +#include + +EEprom_ivm=pca9547:70:9 +boot=bootm $load_addr_r - $fdt_addr_r +checkfdt=true +cramfsloadfdt=cramfsload $fdt_addr_r fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb +ethrotate=no +hwconfig=devdis:esdhc,usb3,usb2,sata,sec,dcu,duart2,qspi,can1,can2_4,ftm2_8,i2c2_3,sai1_4,lpuart2_6,asrc,spdif,lpuart1,ftm1 +netdev=eth2 + +newenv=protect off CONFIG_ENV_ADDR_REDUND +0x40000 && + erase CONFIG_ENV_ADDR_REDUND +0x40000 && + protect on CONFIG_ENV_ADDR_REDUND +0x40000 + +set_fdthigh=true + +update=protect off CONFIG_SYS_MONITOR_BASE +${filesize} && + erase CONFIG_SYS_MONITOR_BASE +${filesize} && + cp.b ${load_addr_r} CONFIG_SYS_MONITOR_BASE ${filesize} && + protect on CONFIG_SYS_MONITOR_BASE +${filesize} + +update-nor=protect off CONFIG_SYS_FLASH_BASE +${filesize} && + erase CONFIG_SYS_FLASH_BASE +${filesize} && + cp.b ${load_addr_r} CONFIG_SYS_FLASH_BASE ${filesize} && + protect on CONFIG_SYS_MONITOR_BASE +0x100000 + +uimage=uImage diff --git a/include/env/pg-wcom/powerpc.env b/include/env/pg-wcom/powerpc.env new file mode 100644 index 00000000000..744c07388c9 --- /dev/null +++ b/include/env/pg-wcom/powerpc.env @@ -0,0 +1,16 @@ +#define BOOTFLASH_START 0xF0000000 + +arch=ppc_82xx +bootm_mapsize=CONFIG_SYS_BOOTM_LEN +checkfdt=true +set_fdthigh=true + +update=protect off BOOTFLASH_START +${filesize} && + erase BOOTFLASH_START +${filesize} && + cp.b ${load_addr_r} BOOTFLASH_START ${filesize} && + protect on BOOTFLASH_START +${filesize} + +newenv=prot off CONFIG_ENV_ADDR +0x40000 && + era CONFIG_ENV_ADDR +0x40000 + +unlock=yes diff --git a/include/env/ti/dfu.h b/include/env/ti/dfu.h new file mode 100644 index 00000000000..3c90570107e --- /dev/null +++ b/include/env/ti/dfu.h @@ -0,0 +1,81 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2016 Texas Instruments Incorporated - http://www.ti.com + * + * Environment variable definitions for DFU on TI boards. + */ + +#ifndef __TI_DFU_H +#define __TI_DFU_H + +#define DFU_ALT_INFO_MMC \ + "dfu_alt_info_mmc=" \ + "boot part 0 1;" \ + "rootfs part 0 2;" \ + "MLO fat 0 1;" \ + "MLO.raw raw 0x100 0x200;" \ + "u-boot.img.raw raw 0x300 0x1000;" \ + "u-env.raw raw 0x1300 0x200;" \ + "spl-os-args.raw raw 0x1500 0x200;" \ + "spl-os-image.raw raw 0x1700 0x6900;" \ + "spl-os-args fat 0 1;" \ + "spl-os-image fat 0 1;" \ + "u-boot.img fat 0 1;" \ + "uEnv.txt fat 0 1\0" + +#define DFU_ALT_INFO_EMMC \ + "dfu_alt_info_emmc=" \ + "rawemmc raw 0 3751936;" \ + "boot part 1 1;" \ + "rootfs part 1 2;" \ + "MLO fat 1 1;" \ + "MLO.raw raw 0x100 0x200;" \ + "u-boot.img.raw raw 0x300 0x1000;" \ + "u-env.raw raw 0x1300 0x200;" \ + "spl-os-args.raw raw 0x1500 0x200;" \ + "spl-os-image.raw raw 0x1700 0x6900;" \ + "spl-os-args fat 1 1;" \ + "spl-os-image fat 1 1;" \ + "u-boot.img fat 1 1;" \ + "uEnv.txt fat 1 1\0" + +#ifdef CONFIG_MTD_RAW_NAND +#define DFU_ALT_INFO_NAND \ + "dfu_alt_info_nand=" \ + "SPL part 0 1;" \ + "SPL.backup1 part 0 2;" \ + "SPL.backup2 part 0 3;" \ + "SPL.backup3 part 0 4;" \ + "u-boot part 0 5;" \ + "u-boot-spl-os part 0 6;" \ + "kernel part 0 8;" \ + "rootfs part 0 9\0" +#else +#define DFU_ALT_INFO_NAND "" +#endif + +#define DFU_ALT_INFO_RAM \ + "dfu_alt_info_ram=" \ + "kernel ram 0x80200000 0x4000000;" \ + "fdt ram 0x80f80000 0x80000;" \ + "ramdisk ram 0x81000000 0x4000000\0" + +#define DFU_ALT_INFO_QSPI_XIP \ + "dfu_alt_info_qspi=" \ + "u-boot.bin raw 0x0 0x080000;" \ + "u-boot.backup raw 0x080000 0x080000;" \ + "u-boot-spl-os raw 0x100000 0x010000;" \ + "u-boot-env raw 0x110000 0x010000;" \ + "u-boot-env.backup raw 0x120000 0x010000;" \ + "kernel raw 0x130000 0x800000\0" + +#define DFU_ALT_INFO_QSPI \ + "dfu_alt_info_qspi=" \ + "MLO raw 0x0 0x040000;" \ + "u-boot.img raw 0x040000 0x0100000;" \ + "u-boot-spl-os raw 0x140000 0x080000;" \ + "u-boot-env raw 0x1C0000 0x010000;" \ + "u-boot-env.backup raw 0x1D0000 0x010000;" \ + "kernel raw 0x1E0000 0x800000\0" + +#endif /* __TI_DFU_H */ diff --git a/include/env/ti/k3_dfu.env b/include/env/ti/k3_dfu.env new file mode 100644 index 00000000000..201529636cc --- /dev/null +++ b/include/env/ti/k3_dfu.env @@ -0,0 +1,30 @@ +dfu_alt_info_mmc= + boot part 1 1; + rootfs part 1 2; + tiboot3.bin fat 1 1; + tispl.bin fat 1 1; + u-boot.img fat 1 1; + uEnv.txt fat 1 1; + sysfw.itb fat 1 1 + +dfu_alt_info_emmc= + rawemmc raw 0 0x800000 mmcpart 1; + rootfs part 0 1 mmcpart 0; + tiboot3.bin.raw raw 0x0 0x400 mmcpart 1; + tispl.bin.raw raw 0x400 0x1000 mmcpart 1; + u-boot.img.raw raw 0x1400 0x2000 mmcpart 1; + u-env.raw raw 0x3400 0x100 mmcpart 1; + sysfw.itb.raw raw 0x3600 0x800 mmcpart 1 + +dfu_alt_info_ospi= + tiboot3.bin raw 0x0 0x080000; + tispl.bin raw 0x080000 0x200000; + u-boot.img raw 0x280000 0x400000; + u-boot-env raw 0x680000 0x020000; + sysfw.itb raw 0x6c0000 0x100000; + rootfs raw 0x800000 0x3800000 + +dfu_alt_info_ram= + tispl.bin ram 0x80080000 0x200000; + u-boot.img ram 0x81000000 0x400000 + diff --git a/include/env/ti/k3_dfu.h b/include/env/ti/k3_dfu.h new file mode 100644 index 00000000000..a16a3adecaf --- /dev/null +++ b/include/env/ti/k3_dfu.h @@ -0,0 +1,46 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com + * + * Environment variable definitions for DFU on TI K3 SoCs. + * + */ + +#ifndef __TI_DFU_H +#define __TI_DFU_H + +#define DFU_ALT_INFO_MMC \ + "dfu_alt_info_mmc=" \ + "boot part 1 1;" \ + "rootfs part 1 2;" \ + "tiboot3.bin fat 1 1;" \ + "tispl.bin fat 1 1;" \ + "u-boot.img fat 1 1;" \ + "uEnv.txt fat 1 1;" \ + "sysfw.itb fat 1 1\0" + +#define DFU_ALT_INFO_EMMC \ + "dfu_alt_info_emmc=" \ + "rawemmc raw 0 0x800000 mmcpart 1;" \ + "rootfs part 0 1 mmcpart 0;" \ + "tiboot3.bin.raw raw 0x0 0x400 mmcpart 1;" \ + "tispl.bin.raw raw 0x400 0x1000 mmcpart 1;" \ + "u-boot.img.raw raw 0x1400 0x2000 mmcpart 1;" \ + "u-env.raw raw 0x3400 0x100 mmcpart 1;" \ + "sysfw.itb.raw raw 0x3600 0x800 mmcpart 1\0" + +#define DFU_ALT_INFO_OSPI \ + "dfu_alt_info_ospi=" \ + "tiboot3.bin raw 0x0 0x080000;" \ + "tispl.bin raw 0x080000 0x200000;" \ + "u-boot.img raw 0x280000 0x400000;" \ + "u-boot-env raw 0x680000 0x020000;" \ + "sysfw.itb raw 0x6c0000 0x100000;" \ + "rootfs raw 0x800000 0x3800000\0" + +#define DFU_ALT_INFO_RAM \ + "dfu_alt_info_ram=" \ + "tispl.bin ram 0x80080000 0x200000;" \ + "u-boot.img ram 0x81000000 0x400000\0" \ + +#endif /* __TI_DFU_H */ diff --git a/include/env/ti/k3_rproc.env b/include/env/ti/k3_rproc.env new file mode 100644 index 00000000000..87d9d76eba4 --- /dev/null +++ b/include/env/ti/k3_rproc.env @@ -0,0 +1,26 @@ +dorprocboot=0 +boot_rprocs= + if test ${dorprocboot} -eq 1 && test ${boot} = mmc; then + rproc init; + run boot_rprocs_mmc; + fi; +rproc_load_and_boot_one= + if load mmc ${bootpart} $loadaddr ${rproc_fw}; then + if rproc load ${rproc_id} ${loadaddr} ${filesize}; then + rproc start ${rproc_id}; + fi; + fi +boot_rprocs_mmc= + env set rproc_id; + env set rproc_fw; + for i in ${rproc_fw_binaries} ; do + if test -z "${rproc_id}" ; then + env set rproc_id $i; + else + env set rproc_fw $i; + run rproc_load_and_boot_one; + env set rproc_id; + env set rproc_fw; + fi; + done + diff --git a/include/env/ti/k3_rproc.h b/include/env/ti/k3_rproc.h new file mode 100644 index 00000000000..3418cb42be5 --- /dev/null +++ b/include/env/ti/k3_rproc.h @@ -0,0 +1,52 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com + * + * rproc environment variable definitions for various TI K3 SoCs. + */ + +#ifndef __TI_RPROC_H +#define __TI_RPROC_H + +/* + * should contain a list of tuplies, + * override in board config files with the actual list + */ +#define DEFAULT_RPROCS "" + +#ifdef CONFIG_CMD_REMOTEPROC +#define EXTRA_ENV_RPROC_SETTINGS \ + "dorprocboot=0\0" \ + "boot_rprocs=" \ + "if test ${dorprocboot} -eq 1 && test ${boot} = mmc; then "\ + "rproc init;" \ + "run boot_rprocs_mmc;" \ + "fi;\0" \ + "rproc_load_and_boot_one=" \ + "if load mmc ${bootpart} $loadaddr ${rproc_fw}; then " \ + "if rproc load ${rproc_id} ${loadaddr} ${filesize}; then "\ + "rproc start ${rproc_id};" \ + "fi;" \ + "fi\0" \ + "boot_rprocs_mmc=" \ + "env set rproc_id;" \ + "env set rproc_fw;" \ + "for i in ${rproc_fw_binaries} ; do " \ + "if test -z \"${rproc_id}\" ; then " \ + "env set rproc_id $i;" \ + "else " \ + "env set rproc_fw $i;" \ + "run rproc_load_and_boot_one;" \ + "env set rproc_id;" \ + "env set rproc_fw;" \ + "fi;" \ + "done\0" \ + "rproc_fw_binaries=" \ + DEFAULT_RPROCS \ + "\0" +#else +#define EXTRA_ENV_RPROC_SETTINGS \ + "boot_rprocs= \0" +#endif /* CONFIG_CMD_REMOTEPROC */ + +#endif /* __TI_RPROC_H */ diff --git a/include/env/ti/mmc.env b/include/env/ti/mmc.env new file mode 100644 index 00000000000..6fb47fb2667 --- /dev/null +++ b/include/env/ti/mmc.env @@ -0,0 +1,76 @@ +mmcdev=0 +mmcrootfstype=ext4 rootwait +finduuid=part uuid ${boot} ${bootpart} uuid +args_mmc=run finduuid;setenv bootargs console=${console} + ${optargs} + root=PARTUUID=${uuid} rw + rootfstype=${mmcrootfstype} +loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr +bootscript=echo Running bootscript from mmc${mmcdev} ...; + source ${loadaddr} +bootenvfile=uEnv.txt +importbootenv=echo Importing environment from mmc${mmcdev} ...; + env import -t ${loadaddr} ${filesize} +loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile} +loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile} +loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/dtb/${fdtfile} +get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/dtb/${name_fdt} +envboot=mmc dev ${mmcdev}; + if mmc rescan; then + echo SD/MMC found on device ${mmcdev}; + if run loadbootscript; then + run bootscript; + else + if run loadbootenv; then + echo Loaded env from ${bootenvfile}; + run importbootenv; + fi; + if test -n $uenvcmd; then + echo Running uenvcmd ...; + run uenvcmd; + fi; + fi; + fi; +mmcloados= + if test ${boot_fdt} = yes || test ${boot_fdt} = try; then + if run get_fdt_mmc; then + bootz ${loadaddr} - ${fdtaddr}; + else + if test ${boot_fdt} = try; then + bootz; + else + echo WARN: Cannot load the DT; + fi; + fi; + else + bootz; + fi; +mmcboot=mmc dev ${mmcdev}; + devnum=${mmcdev}; + devtype=mmc; + if mmc rescan; then + echo SD/MMC found on device ${mmcdev}; + if run loadimage; then + run args_mmc; + if test ${boot_fit} -eq 1; then + run run_fit; + else + run mmcloados; + fi; + fi; +fi; + +init_mmc=run args_all args_mmc +get_overlay_mmc= + fdt address ${fdtaddr}; + fdt resize 0x100000; + for overlay in $name_overlays; + do; + load mmc ${bootpart} ${dtboaddr} ${bootdir}/dtb/${overlay} && + fdt apply ${dtboaddr}; + done; +get_kern_mmc=load mmc ${bootpart} ${loadaddr} + ${bootdir}/${name_kern} +get_fit_mmc=load mmc ${bootpart} ${addr_fit} + ${bootdir}/${name_fit} +partitions=name=rootfs,start=0,size=-,uuid=${uuid_gpt_rootfs} diff --git a/include/env/ti/mmc.h b/include/env/ti/mmc.h new file mode 100644 index 00000000000..769ea9d5ef7 --- /dev/null +++ b/include/env/ti/mmc.h @@ -0,0 +1,73 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com + * + * Environment variable definitions for MMC/SD on TI boards. + */ + +#ifndef __TI_MMC_H +#define __TI_MMC_H + +#define DEFAULT_MMC_TI_ARGS \ + "mmcdev=0\0" \ + "mmcrootfstype=ext4 rootwait\0" \ + "finduuid=part uuid ${boot} ${bootpart} uuid\0" \ + "args_mmc=run finduuid;setenv bootargs console=${console} " \ + "${optargs} " \ + "root=PARTUUID=${uuid} rw " \ + "rootfstype=${mmcrootfstype}\0" \ + "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \ + "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \ + "source ${loadaddr}\0" \ + "bootenvfile=uEnv.txt\0" \ + "importbootenv=echo Importing environment from mmc${mmcdev} ...; " \ + "env import -t ${loadaddr} ${filesize}\0" \ + "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}\0" \ + "loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \ + "loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \ + "envboot=mmc dev ${mmcdev}; " \ + "if mmc rescan; then " \ + "echo SD/MMC found on device ${mmcdev};" \ + "if run loadbootscript; then " \ + "run bootscript;" \ + "else " \ + "if run loadbootenv; then " \ + "echo Loaded env from ${bootenvfile};" \ + "run importbootenv;" \ + "fi;" \ + "if test -n $uenvcmd; then " \ + "echo Running uenvcmd ...;" \ + "run uenvcmd;" \ + "fi;" \ + "fi;" \ + "fi;\0" \ + "mmcloados=" \ + "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ + "if run loadfdt; then " \ + "bootz ${loadaddr} - ${fdtaddr}; " \ + "else " \ + "if test ${boot_fdt} = try; then " \ + "bootz; " \ + "else " \ + "echo WARN: Cannot load the DT; " \ + "fi; " \ + "fi; " \ + "else " \ + "bootz; " \ + "fi;\0" \ + "mmcboot=mmc dev ${mmcdev}; " \ + "devnum=${mmcdev}; " \ + "devtype=mmc; " \ + "if mmc rescan; then " \ + "echo SD/MMC found on device ${mmcdev};" \ + "if run loadimage; then " \ + "run args_mmc; " \ + "if test ${boot_fit} -eq 1; then " \ + "run run_fit; " \ + "else " \ + "run mmcloados;" \ + "fi;" \ + "fi;" \ + "fi;\0" + +#endif /* __TI_MMC_H */ diff --git a/include/env/ti/nand.env b/include/env/ti/nand.env new file mode 100644 index 00000000000..4e185c1b5fe --- /dev/null +++ b/include/env/ti/nand.env @@ -0,0 +1,14 @@ +mtdids=nor0=47040000.spi.0,nor0=47034000.hyperbus +mtdparts=mtdparts=47040000.spi.0:512k(ospi.tiboot3),2m(ospi.tispl),4m(ospi.u-boot),256k(ospi.env),256k(ospi.env.backup),57088k@8m(ospi.rootfs),256k(ospi.phypattern);47034000.hyperbus:512k(hbmc.tiboot3),2m(hbmc.tispl),4m(hbmc.u-boot),256k(hbmc.env),-@8m(hbmc.rootfs) +nandargs=setenv bootargs console=${console} + ${optargs} + root=${nandroot} + rootfstype=${nandrootfstype} +nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048 +nandrootfstype=ubifs rootwait +nandboot=echo Booting from nand ...; + run nandargs; + nand read ${fdtaddr} NAND.u-boot-spl-os; + nand read ${loadaddr} NAND.kernel; + bootz ${loadaddr} - ${fdtaddr} + diff --git a/include/env/ti/nand.h b/include/env/ti/nand.h new file mode 100644 index 00000000000..7d00afa2b10 --- /dev/null +++ b/include/env/ti/nand.h @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com + * + * Environment variable definitions for NAND on TI boards. + */ + +#ifdef CONFIG_MTD_RAW_NAND +#define NANDARGS \ + "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ + "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ + "nandargs=setenv bootargs console=${console} " \ + "${optargs} " \ + "root=${nandroot} " \ + "rootfstype=${nandrootfstype}\0" \ + "nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048\0" \ + "nandrootfstype=ubifs rootwait\0" \ + "nandboot=echo Booting from nand ...; " \ + "run nandargs; " \ + "nand read ${fdtaddr} NAND.u-boot-spl-os; " \ + "nand read ${loadaddr} NAND.kernel; " \ + "bootz ${loadaddr} - ${fdtaddr}\0" +#else +#define NANDARGS "" +#endif diff --git a/include/env/ti/ti_armv7_common.env b/include/env/ti/ti_armv7_common.env new file mode 100644 index 00000000000..e87a41a6590 --- /dev/null +++ b/include/env/ti/ti_armv7_common.env @@ -0,0 +1,34 @@ +loadaddr=0x82000000 +kernel_addr_r=0x82000000 +fdtaddr=0x88000000 +dtboaddr=0x89000000 +fdt_addr_r=0x88000000 +fdtoverlay_addr_r=0x89000000 +rdaddr=0x88080000 +ramdisk_addr_r=0x88080000 +scriptaddr=0x80000000 +pxefile_addr_r=0x80100000 +bootm_size=0x10000000 +boot_fdt=try + +boot_fit=0 +addr_fit=0x90000000 +name_fit=fitImage +update_to_fit=setenv loadaddr ${addr_fit}; setenv bootfile ${name_fit} +get_overlaystring= + for overlay in $name_overlays; + do; + setenv overlaystring ${overlaystring}'#'${overlay}; + done; +get_fit_config=setexpr name_fit_config gsub / _ conf-${fdtfile} +run_fit=run get_fit_config; bootm ${addr_fit}#${name_fit_config}${overlaystring} +bootcmd_ti_mmc= + run findfdt; run init_${boot}; +#if CONFIG_CMD_REMOTEPROC + run main_cpsw0_qsgmii_phyinit; run boot_rprocs; +#endif + if test ${boot_fit} -eq 1; + then run get_fit_${boot}; run get_overlaystring; run run_fit; + else; + run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern; + fi; diff --git a/include/env/ti/ti_armv7_keystone2.env b/include/env/ti/ti_armv7_keystone2.env new file mode 100644 index 00000000000..e0395d302cb --- /dev/null +++ b/include/env/ti/ti_armv7_keystone2.env @@ -0,0 +1,61 @@ +name_fw_rd=k2-fw-initrd.cpio.gz +set_rd_spec=setenv rd_spec ${rdaddr}:${filesize} +init_fw_rd_net=dhcp ${rdaddr} ${tftp_root}/${name_fw_rd}; run set_rd_spec +init_fw_rd_nfs=nfs ${rdaddr} ${nfs_root}/boot/${name_fw_rd}; run set_rd_spec +init_fw_rd_ramfs=setenv rd_spec - +init_fw_rd_ubi=ubifsload ${rdaddr} ${bootdir}/${name_fw_rd}; run set_rd_spec + +dfu_bufsiz=0x10000 +dfu_alt_info_mmc= + MLO fat 0 1; + u-boot.img fat 0 1; + uEnv.txt fat 0 1 + +bootdir=/boot +tftp_root=/ +nfs_root=/export +mem_lpae=1 +uinitrd_fixup=1 +addr_ubi=0x82000000 +addr_secdb_key=0xc000000 +name_kern=zImage +addr_mon=0x87000000 +addr_non_sec_mon=0x0c097fc0 +addr_load_sec_bm=0x0c09c000 +run_mon=mon_install ${addr_mon} +run_mon_hs=mon_install ${addr_non_sec_mon} ${addr_load_sec_bm} +run_kern=bootz ${loadaddr} ${rd_spec} ${fdtaddr} +init_net=run args_all args_net +init_nfs=setenv autoload no; dhcp; run args_all args_net +init_ubi=run args_all args_ubi; ubi part ubifs; ubifsmount ubi:rootfs; +get_fdt_net=dhcp ${fdtaddr} ${tftp_root}/${name_fdt} +get_fdt_nfs=nfs ${fdtaddr} ${nfs_root}/boot/${name_fdt} +get_fdt_ubi=ubifsload ${fdtaddr} ${bootdir}/${name_fdt} +get_kern_net=dhcp ${loadaddr} ${tftp_root}/${name_kern} +get_kern_nfs=nfs ${loadaddr} ${nfs_root}/boot/${name_kern} +get_kern_ubi=ubifsload ${loadaddr} ${bootdir}/${name_kern} +get_mon_net=dhcp ${addr_mon} ${tftp_root}/${name_mon} +get_mon_nfs=nfs ${addr_mon} ${nfs_root}/boot/${name_mon} +get_mon_ubi=ubifsload ${addr_mon} ${bootdir}/${name_mon} +get_fit_net=dhcp ${addr_fit} ${tftp_root}/${name_fit} +get_fit_nfs=nfs ${addr_fit} ${nfs_root}/boot/${name_fit} +get_fit_ubi=ubifsload ${addr_fit} ${bootdir}/${name_fit} +get_fit_mmc=load mmc ${bootpart} ${addr_fit} ${bootdir}/${name_fit} +get_uboot_net=dhcp ${loadaddr} ${tftp_root}/${name_uboot} +get_uboot_nfs=nfs ${loadaddr} ${nfs_root}/boot/${name_uboot} +burn_uboot_spi=sf probe; sf erase 0 0x100000; sf write ${loadaddr} 0 ${filesize} +burn_uboot_nand=nand erase 0 0x100000; nand write ${loadaddr} 0 ${filesize} +args_all=setenv bootargs console=ttyS0,115200n8 rootwait +args_net=setenv bootargs ${bootargs} rootfstype=nfs root=/dev/nfs rw nfsroot=${serverip}:${nfs_root},${nfs_options} ip=dhcp +nfs_options=v3,tcp,rsize=4096,wsize=4096 +get_fdt_ramfs=dhcp ${fdtaddr} ${tftp_root}/${name_fdt} +get_kern_ramfs=dhcp ${loadaddr} ${tftp_root}/${name_kern} +get_mon_ramfs=dhcp ${addr_mon} ${tftp_root}/${name_mon} +get_fit_ramfs=dhcp ${addr_fit} ${tftp_root}/${name_fit} +get_fs_ramfs=dhcp ${rdaddr} ${tftp_root}/${name_fs} +get_ubi_net=dhcp ${addr_ubi} ${tftp_root}/${name_ubi} +get_ubi_nfs=nfs ${addr_ubi} ${nfs_root}/boot/${name_ubi} +burn_ubi=nand erase.part ubifs; nand write ${addr_ubi} ubifs ${filesize} +init_ramfs=run args_all args_ramfs get_fs_ramfs +args_ramfs=setenv bootargs ${bootargs} rdinit=/sbin/init rw root=/dev/ram0 initrd=0x808080000,80M +no_post=1 diff --git a/include/env/ti/ufs.env b/include/env/ti/ufs.env new file mode 100644 index 00000000000..509a87b89eb --- /dev/null +++ b/include/env/ti/ufs.env @@ -0,0 +1,22 @@ +scsirootfstype=ext4 rootwait +ufs_finduuid=part uuid scsi ${bootpart} uuid +args_ufs=setenv devtype scsi;setenv bootpart 1:1; + run ufs_finduuid; + setenv bootargs console = ${console} + ${optargs} + root=PARTUUID=${uuid} rw + rootfstype=${scsirootfstype}; + setenv devtype scsi; + setenv bootpart 1:1 +init_ufs=ufs init; scsi scan; run args_ufs +get_kern_ufs=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${name_kern} +get_fdt_ufs=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile} +get_overlay_ufs= + fdt address ${fdtaddr}; + fdt resize 0x100000; + for overlay in $name_overlays; + do; + load scsi ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && + fdt apply ${dtboaddr}; + done; + diff --git a/include/env/ti/ufs.h b/include/env/ti/ufs.h new file mode 100644 index 00000000000..6619ec9c88e --- /dev/null +++ b/include/env/ti/ufs.h @@ -0,0 +1,33 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com + * + * Environment variable definitions for UFS on TI boards. + */ + +#ifndef __TI_UFS_H +#define __TI_UFS_H + +#define DEFAULT_UFS_TI_ARGS \ + "scsirootfstype=ext4 rootwait\0" \ + "ufs_finduuid=part uuid scsi ${bootpart} uuid\0" \ + "args_ufs=setenv devtype scsi;setenv bootpart 1:1;" \ + "run ufs_finduuid;setenv bootargs console = ${console} " \ + "${optargs}" \ + "root=PARTUUID=${uuid} rw " \ + "rootfstype=${scsirootfstype};" \ + "setenv devtype scsi;" \ + "setenv bootpart 1:1\0" \ + "init_ufs=ufs init; scsi scan; run args_ufs\0" \ + "get_kern_ufs=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${name_kern}\0" \ + "get_fdt_ufs=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \ + "get_overlay_ufs=" \ + "fdt address ${fdtaddr};" \ + "fdt resize 0x100000;" \ + "for overlay in $name_overlays;" \ + "do;" \ + "load scsi ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && " \ + "fdt apply ${dtboaddr};" \ + "done;\0" + +#endif diff --git a/include/environment/distro/sf.h b/include/environment/distro/sf.h deleted file mode 100644 index ee48a8a4e8f..00000000000 --- a/include/environment/distro/sf.h +++ /dev/null @@ -1,41 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2020 Amarula Solutions(India) - * - * SF distro configurations. - */ - -#ifndef __DISTRO_SF_CONFIG_H -#define __DISTRO_SF_CONFIG_H - -#if IS_ENABLED(CONFIG_CMD_SF) -#define BOOTENV_SHARED_SF(devtypel) \ - #devtypel "_boot=" \ - "if " #devtypel " probe ${busnum}; then " \ - "devtype=" #devtypel "; " \ - "run scan_sf_for_scripts; " \ - "fi\0" -#define BOOTENV_DEV_SF(devtypeu, devtypel, instance) \ - "bootcmd_" #devtypel #instance "=" \ - "busnum=" #instance "; " \ - "run " #devtypel "_boot\0" -#define BOOTENV_DEV_NAME_SF(devtypeu, devtypel, instance) \ - #devtypel #instance " " -#else -#define BOOTENV_SHARED_SF(devtypel) -#define BOOTENV_DEV_SF \ - BOOT_TARGET_DEVICES_references_SF_without_CONFIG_CMD_SF -#define BOOTENV_DEV_NAME_SF \ - BOOT_TARGET_DEVICES_references_SF_without_CONFIG_CMD_SF - -#endif /* CONFIG_CMD_SF */ - -#define BOOTENV_SF \ - BOOTENV_SHARED_SF(sf) \ - "scan_sf_for_scripts=" \ - "${devtype} read ${scriptaddr} " \ - "${script_offset_f} ${script_size_f}; " \ - "source ${scriptaddr}; " \ - "echo SCRIPT FAILED: continuing...\0" - -#endif /* __DISTRO_SF_CONFIG_H */ diff --git a/include/environment/pg-wcom/common.env b/include/environment/pg-wcom/common.env deleted file mode 100644 index 4b660cebd67..00000000000 --- a/include/environment/pg-wcom/common.env +++ /dev/null @@ -1,68 +0,0 @@ - -#ifndef WCOM_UBI_PARTITION_APP -/* one flash chip only called boot */ -# define WCOM_UBI_LINUX_MTD ubi.mtd=ubi0 -ubiattach=ubi part ubi0 -#else /* WCOM_UBI_PARTITION_APP */ -/* two flash chips called boot and app */ -# define WCOM_UBI_LINUX_MTD ubi.mtd=ubi0 ubi.mtd=ubi1 -ubiattach=if test ${boot_bank} -eq 0; - then; - ubi part ubi0; - else; - ubi part ubi1; - fi -#endif /* WCOMC_UBI_PARTITION_APP */ - -actual_bank=0 - -add_default=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off: - console=ttyS0,${baudrate} mem=${kernelmem} init=${init} - phram.phram=phvar,${varaddr},CONFIG_KM_PHRAM - WCOM_UBI_LINUX_MTD - -addpanic=setenv bootargs ${bootargs} panic=1 panic_on_oops=1 -altbootcmd=run bootcmd -backup_bank=0 -boot=bootm ${load_addr_r} - ${fdt_addr_r} - -bootcmd=km_checkbidhwk && - setenv bootcmd 'if km_checktestboot; - then; - setenv boot_bank ${test_bank}; - else; - setenv boot_bank ${actual_bank}; - fi; - run ${subbootcmds}; reset' && - setenv altbootcmd 'setenv boot_bank ${backup_bank}; - run ${subbootcmds}; - reset' && - saveenv && - saveenv && - boot - -cramfsaddr=CONFIG_KM_CRAMFS_ADDR -cramfsloadfdt=cramfsload ${fdt_addr_r} fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb -cramfsloadkernel=cramfsload ${load_addr_r} ${uimage} - -develop=tftp ${load_addr_r} scripts/develop-${arch}.txt && - env import -t ${load_addr_r} ${filesize} && - run setup_debug_env - -env_version=1 -fdt_addr_r=CONFIG_KM_FDT_ADDR -flashargs=setenv bootargs root=mtdblock:rootfs${boot_bank} rootfstype=squashfs ro -init=/sbin/init-overlay.sh -load=tftpboot ${load_addr_r} ${hostname}/u-boot.bin -load_addr_r=CONFIG_KM_KERNEL_ADDR -pnvramsize=CONFIG_KM_PNVRAM - -ramfs=tftp ${load_addr_r} scripts/ramfs-${arch}.txt && - env import -t ${load_addr_r} ${filesize} && - run setup_debug_env - -release=run newenv; reset -subbootcmds=ubiattach ubicopy checkfdt cramfsloadfdt set_fdthigh - cramfsloadkernel flashargs add_default addpanic boot -testbootcmd=setenv boot_bank ${test_bank}; run ${subbootcmds}; reset -ubicopy=ubi read ${cramfsaddr} bootfs${boot_bank} diff --git a/include/environment/pg-wcom/ls102xa.env b/include/environment/pg-wcom/ls102xa.env deleted file mode 100644 index 5b5bda95e28..00000000000 --- a/include/environment/pg-wcom/ls102xa.env +++ /dev/null @@ -1,29 +0,0 @@ -#define WCOM_UBI_PARTITION_APP - -#include - -EEprom_ivm=pca9547:70:9 -boot=bootm $load_addr_r - $fdt_addr_r -checkfdt=true -cramfsloadfdt=cramfsload $fdt_addr_r fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb -ethrotate=no -hwconfig=devdis:esdhc,usb3,usb2,sata,sec,dcu,duart2,qspi,can1,can2_4,ftm2_8,i2c2_3,sai1_4,lpuart2_6,asrc,spdif,lpuart1,ftm1 -netdev=eth2 - -newenv=protect off CONFIG_ENV_ADDR_REDUND +0x40000 && - erase CONFIG_ENV_ADDR_REDUND +0x40000 && - protect on CONFIG_ENV_ADDR_REDUND +0x40000 - -set_fdthigh=true - -update=protect off CONFIG_SYS_MONITOR_BASE +${filesize} && - erase CONFIG_SYS_MONITOR_BASE +${filesize} && - cp.b ${load_addr_r} CONFIG_SYS_MONITOR_BASE ${filesize} && - protect on CONFIG_SYS_MONITOR_BASE +${filesize} - -update-nor=protect off CONFIG_SYS_FLASH_BASE +${filesize} && - erase CONFIG_SYS_FLASH_BASE +${filesize} && - cp.b ${load_addr_r} CONFIG_SYS_FLASH_BASE ${filesize} && - protect on CONFIG_SYS_MONITOR_BASE +0x100000 - -uimage=uImage diff --git a/include/environment/pg-wcom/powerpc.env b/include/environment/pg-wcom/powerpc.env deleted file mode 100644 index 744c07388c9..00000000000 --- a/include/environment/pg-wcom/powerpc.env +++ /dev/null @@ -1,16 +0,0 @@ -#define BOOTFLASH_START 0xF0000000 - -arch=ppc_82xx -bootm_mapsize=CONFIG_SYS_BOOTM_LEN -checkfdt=true -set_fdthigh=true - -update=protect off BOOTFLASH_START +${filesize} && - erase BOOTFLASH_START +${filesize} && - cp.b ${load_addr_r} BOOTFLASH_START ${filesize} && - protect on BOOTFLASH_START +${filesize} - -newenv=prot off CONFIG_ENV_ADDR +0x40000 && - era CONFIG_ENV_ADDR +0x40000 - -unlock=yes diff --git a/include/environment/ti/dfu.h b/include/environment/ti/dfu.h deleted file mode 100644 index 3c90570107e..00000000000 --- a/include/environment/ti/dfu.h +++ /dev/null @@ -1,81 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2016 Texas Instruments Incorporated - http://www.ti.com - * - * Environment variable definitions for DFU on TI boards. - */ - -#ifndef __TI_DFU_H -#define __TI_DFU_H - -#define DFU_ALT_INFO_MMC \ - "dfu_alt_info_mmc=" \ - "boot part 0 1;" \ - "rootfs part 0 2;" \ - "MLO fat 0 1;" \ - "MLO.raw raw 0x100 0x200;" \ - "u-boot.img.raw raw 0x300 0x1000;" \ - "u-env.raw raw 0x1300 0x200;" \ - "spl-os-args.raw raw 0x1500 0x200;" \ - "spl-os-image.raw raw 0x1700 0x6900;" \ - "spl-os-args fat 0 1;" \ - "spl-os-image fat 0 1;" \ - "u-boot.img fat 0 1;" \ - "uEnv.txt fat 0 1\0" - -#define DFU_ALT_INFO_EMMC \ - "dfu_alt_info_emmc=" \ - "rawemmc raw 0 3751936;" \ - "boot part 1 1;" \ - "rootfs part 1 2;" \ - "MLO fat 1 1;" \ - "MLO.raw raw 0x100 0x200;" \ - "u-boot.img.raw raw 0x300 0x1000;" \ - "u-env.raw raw 0x1300 0x200;" \ - "spl-os-args.raw raw 0x1500 0x200;" \ - "spl-os-image.raw raw 0x1700 0x6900;" \ - "spl-os-args fat 1 1;" \ - "spl-os-image fat 1 1;" \ - "u-boot.img fat 1 1;" \ - "uEnv.txt fat 1 1\0" - -#ifdef CONFIG_MTD_RAW_NAND -#define DFU_ALT_INFO_NAND \ - "dfu_alt_info_nand=" \ - "SPL part 0 1;" \ - "SPL.backup1 part 0 2;" \ - "SPL.backup2 part 0 3;" \ - "SPL.backup3 part 0 4;" \ - "u-boot part 0 5;" \ - "u-boot-spl-os part 0 6;" \ - "kernel part 0 8;" \ - "rootfs part 0 9\0" -#else -#define DFU_ALT_INFO_NAND "" -#endif - -#define DFU_ALT_INFO_RAM \ - "dfu_alt_info_ram=" \ - "kernel ram 0x80200000 0x4000000;" \ - "fdt ram 0x80f80000 0x80000;" \ - "ramdisk ram 0x81000000 0x4000000\0" - -#define DFU_ALT_INFO_QSPI_XIP \ - "dfu_alt_info_qspi=" \ - "u-boot.bin raw 0x0 0x080000;" \ - "u-boot.backup raw 0x080000 0x080000;" \ - "u-boot-spl-os raw 0x100000 0x010000;" \ - "u-boot-env raw 0x110000 0x010000;" \ - "u-boot-env.backup raw 0x120000 0x010000;" \ - "kernel raw 0x130000 0x800000\0" - -#define DFU_ALT_INFO_QSPI \ - "dfu_alt_info_qspi=" \ - "MLO raw 0x0 0x040000;" \ - "u-boot.img raw 0x040000 0x0100000;" \ - "u-boot-spl-os raw 0x140000 0x080000;" \ - "u-boot-env raw 0x1C0000 0x010000;" \ - "u-boot-env.backup raw 0x1D0000 0x010000;" \ - "kernel raw 0x1E0000 0x800000\0" - -#endif /* __TI_DFU_H */ diff --git a/include/environment/ti/k3_dfu.env b/include/environment/ti/k3_dfu.env deleted file mode 100644 index 201529636cc..00000000000 --- a/include/environment/ti/k3_dfu.env +++ /dev/null @@ -1,30 +0,0 @@ -dfu_alt_info_mmc= - boot part 1 1; - rootfs part 1 2; - tiboot3.bin fat 1 1; - tispl.bin fat 1 1; - u-boot.img fat 1 1; - uEnv.txt fat 1 1; - sysfw.itb fat 1 1 - -dfu_alt_info_emmc= - rawemmc raw 0 0x800000 mmcpart 1; - rootfs part 0 1 mmcpart 0; - tiboot3.bin.raw raw 0x0 0x400 mmcpart 1; - tispl.bin.raw raw 0x400 0x1000 mmcpart 1; - u-boot.img.raw raw 0x1400 0x2000 mmcpart 1; - u-env.raw raw 0x3400 0x100 mmcpart 1; - sysfw.itb.raw raw 0x3600 0x800 mmcpart 1 - -dfu_alt_info_ospi= - tiboot3.bin raw 0x0 0x080000; - tispl.bin raw 0x080000 0x200000; - u-boot.img raw 0x280000 0x400000; - u-boot-env raw 0x680000 0x020000; - sysfw.itb raw 0x6c0000 0x100000; - rootfs raw 0x800000 0x3800000 - -dfu_alt_info_ram= - tispl.bin ram 0x80080000 0x200000; - u-boot.img ram 0x81000000 0x400000 - diff --git a/include/environment/ti/k3_dfu.h b/include/environment/ti/k3_dfu.h deleted file mode 100644 index a16a3adecaf..00000000000 --- a/include/environment/ti/k3_dfu.h +++ /dev/null @@ -1,46 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com - * - * Environment variable definitions for DFU on TI K3 SoCs. - * - */ - -#ifndef __TI_DFU_H -#define __TI_DFU_H - -#define DFU_ALT_INFO_MMC \ - "dfu_alt_info_mmc=" \ - "boot part 1 1;" \ - "rootfs part 1 2;" \ - "tiboot3.bin fat 1 1;" \ - "tispl.bin fat 1 1;" \ - "u-boot.img fat 1 1;" \ - "uEnv.txt fat 1 1;" \ - "sysfw.itb fat 1 1\0" - -#define DFU_ALT_INFO_EMMC \ - "dfu_alt_info_emmc=" \ - "rawemmc raw 0 0x800000 mmcpart 1;" \ - "rootfs part 0 1 mmcpart 0;" \ - "tiboot3.bin.raw raw 0x0 0x400 mmcpart 1;" \ - "tispl.bin.raw raw 0x400 0x1000 mmcpart 1;" \ - "u-boot.img.raw raw 0x1400 0x2000 mmcpart 1;" \ - "u-env.raw raw 0x3400 0x100 mmcpart 1;" \ - "sysfw.itb.raw raw 0x3600 0x800 mmcpart 1\0" - -#define DFU_ALT_INFO_OSPI \ - "dfu_alt_info_ospi=" \ - "tiboot3.bin raw 0x0 0x080000;" \ - "tispl.bin raw 0x080000 0x200000;" \ - "u-boot.img raw 0x280000 0x400000;" \ - "u-boot-env raw 0x680000 0x020000;" \ - "sysfw.itb raw 0x6c0000 0x100000;" \ - "rootfs raw 0x800000 0x3800000\0" - -#define DFU_ALT_INFO_RAM \ - "dfu_alt_info_ram=" \ - "tispl.bin ram 0x80080000 0x200000;" \ - "u-boot.img ram 0x81000000 0x400000\0" \ - -#endif /* __TI_DFU_H */ diff --git a/include/environment/ti/k3_rproc.env b/include/environment/ti/k3_rproc.env deleted file mode 100644 index 87d9d76eba4..00000000000 --- a/include/environment/ti/k3_rproc.env +++ /dev/null @@ -1,26 +0,0 @@ -dorprocboot=0 -boot_rprocs= - if test ${dorprocboot} -eq 1 && test ${boot} = mmc; then - rproc init; - run boot_rprocs_mmc; - fi; -rproc_load_and_boot_one= - if load mmc ${bootpart} $loadaddr ${rproc_fw}; then - if rproc load ${rproc_id} ${loadaddr} ${filesize}; then - rproc start ${rproc_id}; - fi; - fi -boot_rprocs_mmc= - env set rproc_id; - env set rproc_fw; - for i in ${rproc_fw_binaries} ; do - if test -z "${rproc_id}" ; then - env set rproc_id $i; - else - env set rproc_fw $i; - run rproc_load_and_boot_one; - env set rproc_id; - env set rproc_fw; - fi; - done - diff --git a/include/environment/ti/k3_rproc.h b/include/environment/ti/k3_rproc.h deleted file mode 100644 index 3418cb42be5..00000000000 --- a/include/environment/ti/k3_rproc.h +++ /dev/null @@ -1,52 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com - * - * rproc environment variable definitions for various TI K3 SoCs. - */ - -#ifndef __TI_RPROC_H -#define __TI_RPROC_H - -/* - * should contain a list of tuplies, - * override in board config files with the actual list - */ -#define DEFAULT_RPROCS "" - -#ifdef CONFIG_CMD_REMOTEPROC -#define EXTRA_ENV_RPROC_SETTINGS \ - "dorprocboot=0\0" \ - "boot_rprocs=" \ - "if test ${dorprocboot} -eq 1 && test ${boot} = mmc; then "\ - "rproc init;" \ - "run boot_rprocs_mmc;" \ - "fi;\0" \ - "rproc_load_and_boot_one=" \ - "if load mmc ${bootpart} $loadaddr ${rproc_fw}; then " \ - "if rproc load ${rproc_id} ${loadaddr} ${filesize}; then "\ - "rproc start ${rproc_id};" \ - "fi;" \ - "fi\0" \ - "boot_rprocs_mmc=" \ - "env set rproc_id;" \ - "env set rproc_fw;" \ - "for i in ${rproc_fw_binaries} ; do " \ - "if test -z \"${rproc_id}\" ; then " \ - "env set rproc_id $i;" \ - "else " \ - "env set rproc_fw $i;" \ - "run rproc_load_and_boot_one;" \ - "env set rproc_id;" \ - "env set rproc_fw;" \ - "fi;" \ - "done\0" \ - "rproc_fw_binaries=" \ - DEFAULT_RPROCS \ - "\0" -#else -#define EXTRA_ENV_RPROC_SETTINGS \ - "boot_rprocs= \0" -#endif /* CONFIG_CMD_REMOTEPROC */ - -#endif /* __TI_RPROC_H */ diff --git a/include/environment/ti/mmc.env b/include/environment/ti/mmc.env deleted file mode 100644 index 6fb47fb2667..00000000000 --- a/include/environment/ti/mmc.env +++ /dev/null @@ -1,76 +0,0 @@ -mmcdev=0 -mmcrootfstype=ext4 rootwait -finduuid=part uuid ${boot} ${bootpart} uuid -args_mmc=run finduuid;setenv bootargs console=${console} - ${optargs} - root=PARTUUID=${uuid} rw - rootfstype=${mmcrootfstype} -loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr -bootscript=echo Running bootscript from mmc${mmcdev} ...; - source ${loadaddr} -bootenvfile=uEnv.txt -importbootenv=echo Importing environment from mmc${mmcdev} ...; - env import -t ${loadaddr} ${filesize} -loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile} -loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile} -loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/dtb/${fdtfile} -get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/dtb/${name_fdt} -envboot=mmc dev ${mmcdev}; - if mmc rescan; then - echo SD/MMC found on device ${mmcdev}; - if run loadbootscript; then - run bootscript; - else - if run loadbootenv; then - echo Loaded env from ${bootenvfile}; - run importbootenv; - fi; - if test -n $uenvcmd; then - echo Running uenvcmd ...; - run uenvcmd; - fi; - fi; - fi; -mmcloados= - if test ${boot_fdt} = yes || test ${boot_fdt} = try; then - if run get_fdt_mmc; then - bootz ${loadaddr} - ${fdtaddr}; - else - if test ${boot_fdt} = try; then - bootz; - else - echo WARN: Cannot load the DT; - fi; - fi; - else - bootz; - fi; -mmcboot=mmc dev ${mmcdev}; - devnum=${mmcdev}; - devtype=mmc; - if mmc rescan; then - echo SD/MMC found on device ${mmcdev}; - if run loadimage; then - run args_mmc; - if test ${boot_fit} -eq 1; then - run run_fit; - else - run mmcloados; - fi; - fi; -fi; - -init_mmc=run args_all args_mmc -get_overlay_mmc= - fdt address ${fdtaddr}; - fdt resize 0x100000; - for overlay in $name_overlays; - do; - load mmc ${bootpart} ${dtboaddr} ${bootdir}/dtb/${overlay} && - fdt apply ${dtboaddr}; - done; -get_kern_mmc=load mmc ${bootpart} ${loadaddr} - ${bootdir}/${name_kern} -get_fit_mmc=load mmc ${bootpart} ${addr_fit} - ${bootdir}/${name_fit} -partitions=name=rootfs,start=0,size=-,uuid=${uuid_gpt_rootfs} diff --git a/include/environment/ti/mmc.h b/include/environment/ti/mmc.h deleted file mode 100644 index 769ea9d5ef7..00000000000 --- a/include/environment/ti/mmc.h +++ /dev/null @@ -1,73 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com - * - * Environment variable definitions for MMC/SD on TI boards. - */ - -#ifndef __TI_MMC_H -#define __TI_MMC_H - -#define DEFAULT_MMC_TI_ARGS \ - "mmcdev=0\0" \ - "mmcrootfstype=ext4 rootwait\0" \ - "finduuid=part uuid ${boot} ${bootpart} uuid\0" \ - "args_mmc=run finduuid;setenv bootargs console=${console} " \ - "${optargs} " \ - "root=PARTUUID=${uuid} rw " \ - "rootfstype=${mmcrootfstype}\0" \ - "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \ - "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \ - "source ${loadaddr}\0" \ - "bootenvfile=uEnv.txt\0" \ - "importbootenv=echo Importing environment from mmc${mmcdev} ...; " \ - "env import -t ${loadaddr} ${filesize}\0" \ - "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}\0" \ - "loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \ - "loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \ - "envboot=mmc dev ${mmcdev}; " \ - "if mmc rescan; then " \ - "echo SD/MMC found on device ${mmcdev};" \ - "if run loadbootscript; then " \ - "run bootscript;" \ - "else " \ - "if run loadbootenv; then " \ - "echo Loaded env from ${bootenvfile};" \ - "run importbootenv;" \ - "fi;" \ - "if test -n $uenvcmd; then " \ - "echo Running uenvcmd ...;" \ - "run uenvcmd;" \ - "fi;" \ - "fi;" \ - "fi;\0" \ - "mmcloados=" \ - "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ - "if run loadfdt; then " \ - "bootz ${loadaddr} - ${fdtaddr}; " \ - "else " \ - "if test ${boot_fdt} = try; then " \ - "bootz; " \ - "else " \ - "echo WARN: Cannot load the DT; " \ - "fi; " \ - "fi; " \ - "else " \ - "bootz; " \ - "fi;\0" \ - "mmcboot=mmc dev ${mmcdev}; " \ - "devnum=${mmcdev}; " \ - "devtype=mmc; " \ - "if mmc rescan; then " \ - "echo SD/MMC found on device ${mmcdev};" \ - "if run loadimage; then " \ - "run args_mmc; " \ - "if test ${boot_fit} -eq 1; then " \ - "run run_fit; " \ - "else " \ - "run mmcloados;" \ - "fi;" \ - "fi;" \ - "fi;\0" - -#endif /* __TI_MMC_H */ diff --git a/include/environment/ti/nand.env b/include/environment/ti/nand.env deleted file mode 100644 index 4e185c1b5fe..00000000000 --- a/include/environment/ti/nand.env +++ /dev/null @@ -1,14 +0,0 @@ -mtdids=nor0=47040000.spi.0,nor0=47034000.hyperbus -mtdparts=mtdparts=47040000.spi.0:512k(ospi.tiboot3),2m(ospi.tispl),4m(ospi.u-boot),256k(ospi.env),256k(ospi.env.backup),57088k@8m(ospi.rootfs),256k(ospi.phypattern);47034000.hyperbus:512k(hbmc.tiboot3),2m(hbmc.tispl),4m(hbmc.u-boot),256k(hbmc.env),-@8m(hbmc.rootfs) -nandargs=setenv bootargs console=${console} - ${optargs} - root=${nandroot} - rootfstype=${nandrootfstype} -nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048 -nandrootfstype=ubifs rootwait -nandboot=echo Booting from nand ...; - run nandargs; - nand read ${fdtaddr} NAND.u-boot-spl-os; - nand read ${loadaddr} NAND.kernel; - bootz ${loadaddr} - ${fdtaddr} - diff --git a/include/environment/ti/nand.h b/include/environment/ti/nand.h deleted file mode 100644 index 7d00afa2b10..00000000000 --- a/include/environment/ti/nand.h +++ /dev/null @@ -1,25 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com - * - * Environment variable definitions for NAND on TI boards. - */ - -#ifdef CONFIG_MTD_RAW_NAND -#define NANDARGS \ - "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ - "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ - "nandargs=setenv bootargs console=${console} " \ - "${optargs} " \ - "root=${nandroot} " \ - "rootfstype=${nandrootfstype}\0" \ - "nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048\0" \ - "nandrootfstype=ubifs rootwait\0" \ - "nandboot=echo Booting from nand ...; " \ - "run nandargs; " \ - "nand read ${fdtaddr} NAND.u-boot-spl-os; " \ - "nand read ${loadaddr} NAND.kernel; " \ - "bootz ${loadaddr} - ${fdtaddr}\0" -#else -#define NANDARGS "" -#endif diff --git a/include/environment/ti/ti_armv7_common.env b/include/environment/ti/ti_armv7_common.env deleted file mode 100644 index e87a41a6590..00000000000 --- a/include/environment/ti/ti_armv7_common.env +++ /dev/null @@ -1,34 +0,0 @@ -loadaddr=0x82000000 -kernel_addr_r=0x82000000 -fdtaddr=0x88000000 -dtboaddr=0x89000000 -fdt_addr_r=0x88000000 -fdtoverlay_addr_r=0x89000000 -rdaddr=0x88080000 -ramdisk_addr_r=0x88080000 -scriptaddr=0x80000000 -pxefile_addr_r=0x80100000 -bootm_size=0x10000000 -boot_fdt=try - -boot_fit=0 -addr_fit=0x90000000 -name_fit=fitImage -update_to_fit=setenv loadaddr ${addr_fit}; setenv bootfile ${name_fit} -get_overlaystring= - for overlay in $name_overlays; - do; - setenv overlaystring ${overlaystring}'#'${overlay}; - done; -get_fit_config=setexpr name_fit_config gsub / _ conf-${fdtfile} -run_fit=run get_fit_config; bootm ${addr_fit}#${name_fit_config}${overlaystring} -bootcmd_ti_mmc= - run findfdt; run init_${boot}; -#if CONFIG_CMD_REMOTEPROC - run main_cpsw0_qsgmii_phyinit; run boot_rprocs; -#endif - if test ${boot_fit} -eq 1; - then run get_fit_${boot}; run get_overlaystring; run run_fit; - else; - run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern; - fi; diff --git a/include/environment/ti/ti_armv7_keystone2.env b/include/environment/ti/ti_armv7_keystone2.env deleted file mode 100644 index e0395d302cb..00000000000 --- a/include/environment/ti/ti_armv7_keystone2.env +++ /dev/null @@ -1,61 +0,0 @@ -name_fw_rd=k2-fw-initrd.cpio.gz -set_rd_spec=setenv rd_spec ${rdaddr}:${filesize} -init_fw_rd_net=dhcp ${rdaddr} ${tftp_root}/${name_fw_rd}; run set_rd_spec -init_fw_rd_nfs=nfs ${rdaddr} ${nfs_root}/boot/${name_fw_rd}; run set_rd_spec -init_fw_rd_ramfs=setenv rd_spec - -init_fw_rd_ubi=ubifsload ${rdaddr} ${bootdir}/${name_fw_rd}; run set_rd_spec - -dfu_bufsiz=0x10000 -dfu_alt_info_mmc= - MLO fat 0 1; - u-boot.img fat 0 1; - uEnv.txt fat 0 1 - -bootdir=/boot -tftp_root=/ -nfs_root=/export -mem_lpae=1 -uinitrd_fixup=1 -addr_ubi=0x82000000 -addr_secdb_key=0xc000000 -name_kern=zImage -addr_mon=0x87000000 -addr_non_sec_mon=0x0c097fc0 -addr_load_sec_bm=0x0c09c000 -run_mon=mon_install ${addr_mon} -run_mon_hs=mon_install ${addr_non_sec_mon} ${addr_load_sec_bm} -run_kern=bootz ${loadaddr} ${rd_spec} ${fdtaddr} -init_net=run args_all args_net -init_nfs=setenv autoload no; dhcp; run args_all args_net -init_ubi=run args_all args_ubi; ubi part ubifs; ubifsmount ubi:rootfs; -get_fdt_net=dhcp ${fdtaddr} ${tftp_root}/${name_fdt} -get_fdt_nfs=nfs ${fdtaddr} ${nfs_root}/boot/${name_fdt} -get_fdt_ubi=ubifsload ${fdtaddr} ${bootdir}/${name_fdt} -get_kern_net=dhcp ${loadaddr} ${tftp_root}/${name_kern} -get_kern_nfs=nfs ${loadaddr} ${nfs_root}/boot/${name_kern} -get_kern_ubi=ubifsload ${loadaddr} ${bootdir}/${name_kern} -get_mon_net=dhcp ${addr_mon} ${tftp_root}/${name_mon} -get_mon_nfs=nfs ${addr_mon} ${nfs_root}/boot/${name_mon} -get_mon_ubi=ubifsload ${addr_mon} ${bootdir}/${name_mon} -get_fit_net=dhcp ${addr_fit} ${tftp_root}/${name_fit} -get_fit_nfs=nfs ${addr_fit} ${nfs_root}/boot/${name_fit} -get_fit_ubi=ubifsload ${addr_fit} ${bootdir}/${name_fit} -get_fit_mmc=load mmc ${bootpart} ${addr_fit} ${bootdir}/${name_fit} -get_uboot_net=dhcp ${loadaddr} ${tftp_root}/${name_uboot} -get_uboot_nfs=nfs ${loadaddr} ${nfs_root}/boot/${name_uboot} -burn_uboot_spi=sf probe; sf erase 0 0x100000; sf write ${loadaddr} 0 ${filesize} -burn_uboot_nand=nand erase 0 0x100000; nand write ${loadaddr} 0 ${filesize} -args_all=setenv bootargs console=ttyS0,115200n8 rootwait -args_net=setenv bootargs ${bootargs} rootfstype=nfs root=/dev/nfs rw nfsroot=${serverip}:${nfs_root},${nfs_options} ip=dhcp -nfs_options=v3,tcp,rsize=4096,wsize=4096 -get_fdt_ramfs=dhcp ${fdtaddr} ${tftp_root}/${name_fdt} -get_kern_ramfs=dhcp ${loadaddr} ${tftp_root}/${name_kern} -get_mon_ramfs=dhcp ${addr_mon} ${tftp_root}/${name_mon} -get_fit_ramfs=dhcp ${addr_fit} ${tftp_root}/${name_fit} -get_fs_ramfs=dhcp ${rdaddr} ${tftp_root}/${name_fs} -get_ubi_net=dhcp ${addr_ubi} ${tftp_root}/${name_ubi} -get_ubi_nfs=nfs ${addr_ubi} ${nfs_root}/boot/${name_ubi} -burn_ubi=nand erase.part ubifs; nand write ${addr_ubi} ubifs ${filesize} -init_ramfs=run args_all args_ramfs get_fs_ramfs -args_ramfs=setenv bootargs ${bootargs} rdinit=/sbin/init rw root=/dev/ram0 initrd=0x808080000,80M -no_post=1 diff --git a/include/environment/ti/ufs.env b/include/environment/ti/ufs.env deleted file mode 100644 index 509a87b89eb..00000000000 --- a/include/environment/ti/ufs.env +++ /dev/null @@ -1,22 +0,0 @@ -scsirootfstype=ext4 rootwait -ufs_finduuid=part uuid scsi ${bootpart} uuid -args_ufs=setenv devtype scsi;setenv bootpart 1:1; - run ufs_finduuid; - setenv bootargs console = ${console} - ${optargs} - root=PARTUUID=${uuid} rw - rootfstype=${scsirootfstype}; - setenv devtype scsi; - setenv bootpart 1:1 -init_ufs=ufs init; scsi scan; run args_ufs -get_kern_ufs=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${name_kern} -get_fdt_ufs=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile} -get_overlay_ufs= - fdt address ${fdtaddr}; - fdt resize 0x100000; - for overlay in $name_overlays; - do; - load scsi ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && - fdt apply ${dtboaddr}; - done; - diff --git a/include/environment/ti/ufs.h b/include/environment/ti/ufs.h deleted file mode 100644 index 6619ec9c88e..00000000000 --- a/include/environment/ti/ufs.h +++ /dev/null @@ -1,33 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com - * - * Environment variable definitions for UFS on TI boards. - */ - -#ifndef __TI_UFS_H -#define __TI_UFS_H - -#define DEFAULT_UFS_TI_ARGS \ - "scsirootfstype=ext4 rootwait\0" \ - "ufs_finduuid=part uuid scsi ${bootpart} uuid\0" \ - "args_ufs=setenv devtype scsi;setenv bootpart 1:1;" \ - "run ufs_finduuid;setenv bootargs console = ${console} " \ - "${optargs}" \ - "root=PARTUUID=${uuid} rw " \ - "rootfstype=${scsirootfstype};" \ - "setenv devtype scsi;" \ - "setenv bootpart 1:1\0" \ - "init_ufs=ufs init; scsi scan; run args_ufs\0" \ - "get_kern_ufs=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${name_kern}\0" \ - "get_fdt_ufs=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \ - "get_overlay_ufs=" \ - "fdt address ${fdtaddr};" \ - "fdt resize 0x100000;" \ - "for overlay in $name_overlays;" \ - "do;" \ - "load scsi ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && " \ - "fdt apply ${dtboaddr};" \ - "done;\0" - -#endif -- cgit v1.2.3 From edd53bda53b9489aafe6b728b2b71044bb92f248 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:01:47 -0600 Subject: x86: Drop CFG_SYS_STACK_SIZE This is only used in one file and the value is the same for both boards which define it. Use the fixed value of 32KB and drop the CFG. This will allow removal of the config.h files. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- include/configs/edison.h | 4 ---- include/configs/x86-common.h | 10 ---------- 2 files changed, 14 deletions(-) (limited to 'include') diff --git a/include/configs/edison.h b/include/configs/edison.h index 455a889b64c..558c74d7b46 100644 --- a/include/configs/edison.h +++ b/include/configs/edison.h @@ -8,8 +8,4 @@ #include -/* Miscellaneous configurable options */ - -#define CFG_SYS_STACK_SIZE (32 * 1024) - #endif diff --git a/include/configs/x86-common.h b/include/configs/x86-common.h index c1c5a09a35c..608c5ba7b0a 100644 --- a/include/configs/x86-common.h +++ b/include/configs/x86-common.h @@ -10,16 +10,6 @@ #ifndef __CONFIG_X86_COMMON_H #define __CONFIG_X86_COMMON_H -/*----------------------------------------------------------------------- - * CPU Features - */ - -#define CFG_SYS_STACK_SIZE (32 * 1024) - -/*----------------------------------------------------------------------- - * Environment configuration - */ - /*----------------------------------------------------------------------- * USB configuration */ -- cgit v1.2.3 From c0def3207db502e2fab6dec90c035d0f067efdac Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:01:49 -0600 Subject: x86: edison: Drop inclusion of ibmpc.h This should be included by files that need it, not the config.h file. Drop it. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- include/configs/edison.h | 7 ------- 1 file changed, 7 deletions(-) (limited to 'include') diff --git a/include/configs/edison.h b/include/configs/edison.h index 558c74d7b46..127c2c4546e 100644 --- a/include/configs/edison.h +++ b/include/configs/edison.h @@ -2,10 +2,3 @@ /* * Copyright (c) 2017 Intel Corp. */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -#include - -#endif -- cgit v1.2.3 From 8c0090b0690c292cb46e690a33489ecbb1396975 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:01:50 -0600 Subject: x86: Drop inclusion of ibmpc.h This is not needed in this file anymore. Drop it. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- include/configs/x86-common.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include') diff --git a/include/configs/x86-common.h b/include/configs/x86-common.h index 608c5ba7b0a..e05f667d722 100644 --- a/include/configs/x86-common.h +++ b/include/configs/x86-common.h @@ -5,8 +5,6 @@ * Graeme Russ, graeme.russ@gmail.com. */ -#include - #ifndef __CONFIG_X86_COMMON_H #define __CONFIG_X86_COMMON_H -- cgit v1.2.3 From f726545a62aba1e56f33afc8d95cb76e55720896 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:01:51 -0600 Subject: x86: Drop unused distro settings No x86 board uses distro boot, so drop these settings. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- include/configs/x86-common.h | 7 ------- 1 file changed, 7 deletions(-) (limited to 'include') diff --git a/include/configs/x86-common.h b/include/configs/x86-common.h index e05f667d722..8bd0716c08d 100644 --- a/include/configs/x86-common.h +++ b/include/configs/x86-common.h @@ -20,18 +20,11 @@ #define CFG_OTHBOOTARGS "othbootargs=acpi=off\0" #endif -#if defined(CONFIG_DISTRO_DEFAULTS) -#define DISTRO_BOOTENV BOOTENV -#else -#define DISTRO_BOOTENV -#endif - #ifndef SPLASH_SETTINGS #define SPLASH_SETTINGS #endif #define CFG_EXTRA_ENV_SETTINGS \ - DISTRO_BOOTENV \ CFG_STD_DEVICES_SETTINGS \ SPLASH_SETTINGS \ "pciconfighost=1\0" \ -- cgit v1.2.3 From 876bc404bdcdce8b1a16837a940ae36dc4425e5f Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:01:52 -0600 Subject: x86: Add a common include for environment settings Create a text-file version of x86-common.h which can be used by x86 boards. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- include/env/x86.env | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 include/env/x86.env (limited to 'include') diff --git a/include/env/x86.env b/include/env/x86.env new file mode 100644 index 00000000000..d00d98f70a1 --- /dev/null +++ b/include/env/x86.env @@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +/* + * Copyright (c) 2011 The Chromium OS Authors. + * (C) Copyright 2008 + * Graeme Russ, graeme.russ@gmail.com + */ + +pciconfighost=1 +netdev=eth0 +consoledev=ttyS0 +scriptaddr=0x7000000 +kernel_addr_r=0x1000000 +ramdisk_addr_r=0x4000000 +ramdiskfile=initramfs.gz + +/* common console settings */ +stdin=serial,i8042-kbd,usbkbd +stdout=serial,vidconsole +stderr=serial,vidconsole -- cgit v1.2.3 From c49a767a6a9f02eeacadd91c5352fa848c9ec668 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:01:53 -0600 Subject: x86: coreboot: Convert to text environment Use the common include and add some options specific to this board. Drop everything from the config.h file. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- include/configs/coreboot.h | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'include') diff --git a/include/configs/coreboot.h b/include/configs/coreboot.h index b4f49bf5289..e00c408f29a 100644 --- a/include/configs/coreboot.h +++ b/include/configs/coreboot.h @@ -2,23 +2,3 @@ /* * Copyright (C) 2018, Bin Meng */ - -/* - * board/config.h - configuration options, board specific - */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -#define SPLASH_SETTINGS "splashsource=virtio_fs\0" \ - "splashimage=0x1000000\0" - -#include - -#define CFG_STD_DEVICES_SETTINGS "stdin=serial,i8042-kbd,usbkbd\0" \ - "stdout=serial,vidconsole\0" \ - "stderr=serial,vidconsole\0" - -/* ATA/IDE support */ - -#endif /* __CONFIG_H */ -- cgit v1.2.3 From f1e7abf4b9f06e64734dc74909fd47d1c935ec9e Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:01:54 -0600 Subject: x86: crownbay: Convert to text environment Use the common include. Drop everything from the config.h file. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- include/configs/crownbay.h | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'include') diff --git a/include/configs/crownbay.h b/include/configs/crownbay.h index 387bb8800e8..0c842dd01eb 100644 --- a/include/configs/crownbay.h +++ b/include/configs/crownbay.h @@ -2,20 +2,3 @@ /* * Copyright (C) 2014, Bin Meng */ - -/* - * board/config.h - configuration options, board specific - */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -#include - -#define CFG_STD_DEVICES_SETTINGS "stdin=serial,i8042-kbd,usbkbd\0" \ - "stdout=serial,vidconsole\0" \ - "stderr=serial,vidconsole\0" - -/* Environment configuration */ - -#endif /* __CONFIG_H */ -- cgit v1.2.3 From df827efecdda09b0e947e350a2e9d5388166fe36 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:01:55 -0600 Subject: x86: bayleybay: Convert to text environment Use the common include. Drop everything from the config.h file. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- include/configs/bayleybay.h | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'include') diff --git a/include/configs/bayleybay.h b/include/configs/bayleybay.h index b0df328cd84..9b0f5cedcd7 100644 --- a/include/configs/bayleybay.h +++ b/include/configs/bayleybay.h @@ -2,20 +2,3 @@ /* * Copyright (C) 2015, Bin Meng */ - -/* - * board/config.h - configuration options, board specific - */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -#include - -#define CFG_STD_DEVICES_SETTINGS "stdin=serial,usbkbd\0" \ - "stdout=serial,vidconsole\0" \ - "stderr=serial,vidconsole\0" - -/* Environment configuration */ - -#endif /* __CONFIG_H */ -- cgit v1.2.3 From b5948c5d39fba007c8f4b10ea0007747db479e37 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:01:56 -0600 Subject: x86: galileo: Convert to text environment Use the common include. Drop everything from the config.h file. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- include/configs/galileo.h | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'include') diff --git a/include/configs/galileo.h b/include/configs/galileo.h index 0380ac287be..9b0f5cedcd7 100644 --- a/include/configs/galileo.h +++ b/include/configs/galileo.h @@ -2,22 +2,3 @@ /* * Copyright (C) 2015, Bin Meng */ - -/* - * board/config.h - configuration options, board specific - */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -#include - -/* ns16550 UART is memory-mapped in Quark SoC */ - -#define CFG_STD_DEVICES_SETTINGS "stdin=serial\0" \ - "stdout=serial\0" \ - "stderr=serial\0" - -/* Environment configuration */ - -#endif /* __CONFIG_H */ -- cgit v1.2.3 From 5ccb18a75210c4f6a09255c430cd01466d1dd85d Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:01:58 -0600 Subject: x86: cherryhill: Convert to text environment Use the common include. Drop everything from the config.h file. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- include/configs/cherryhill.h | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'include') diff --git a/include/configs/cherryhill.h b/include/configs/cherryhill.h index d6ce70a96ae..a3009571de9 100644 --- a/include/configs/cherryhill.h +++ b/include/configs/cherryhill.h @@ -2,16 +2,3 @@ /* * Copyright (C) 2017, Bin Meng */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -#include - -#define CFG_STD_DEVICES_SETTINGS "stdin=usbkbd,serial\0" \ - "stdout=vidconsole,serial\0" \ - "stderr=vidconsole,serial\0" - -/* Environment configuration */ - -#endif /* __CONFIG_H */ -- cgit v1.2.3 From c166298ed238f2d654b0bbaafa354541a2de317a Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:01:59 -0600 Subject: x86: cougarcanyon2: Convert to text environment Use the common include. The existing environment includes "vga" but that is not valid anymore, so let it use vidconsole Drop everything from the config.h file. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- include/configs/cougarcanyon2.h | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'include') diff --git a/include/configs/cougarcanyon2.h b/include/configs/cougarcanyon2.h index 31639e48da8..0406786f7c6 100644 --- a/include/configs/cougarcanyon2.h +++ b/include/configs/cougarcanyon2.h @@ -2,16 +2,3 @@ /* * Copyright (C) 2016, Bin Meng */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -#include - -#define CFG_STD_DEVICES_SETTINGS "stdin=serial,i8042-kbd,usbkbd\0" \ - "stdout=serial,vga\0" \ - "stderr=serial,vga\0" - -/* Environment configuration */ - -#endif /* __CONFIG_H */ -- cgit v1.2.3 From d9e6318ce9018e3116d1240ffe8b278016c30c83 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:02:00 -0600 Subject: x86: minnowmax: Convert to text environment Use the common include along with some additions. Drop everything from the config.h file. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- include/configs/minnowmax.h | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'include') diff --git a/include/configs/minnowmax.h b/include/configs/minnowmax.h index 842672d5575..068a2af2c1f 100644 --- a/include/configs/minnowmax.h +++ b/include/configs/minnowmax.h @@ -2,19 +2,3 @@ /* * Copyright (C) 2015 Google, Inc */ - -/* - * board/config.h - configuration options, board specific - */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -#include - -#define CFG_STD_DEVICES_SETTINGS "stdin=usbkbd,serial\0" \ - "stdout=vidconsole,serial\0" \ - "stderr=vidconsole,serial\0" \ - "usb_pgood_delay=40\0" - -#endif /* __CONFIG_H */ -- cgit v1.2.3 From 2d6ebda7560b29bcc8044b01627eb3d3267806c0 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:02:01 -0600 Subject: x86: slimbootloader: Convert to text environment Use the common include along with some additions. Drop everything from the config.h file. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng [Drop common env from slimbootloader.env] Signed-off-by: Bin Meng --- include/configs/slimbootloader.h | 35 ----------------------------------- 1 file changed, 35 deletions(-) (limited to 'include') diff --git a/include/configs/slimbootloader.h b/include/configs/slimbootloader.h index 20b99a1021d..85f6a968e04 100644 --- a/include/configs/slimbootloader.h +++ b/include/configs/slimbootloader.h @@ -2,38 +2,3 @@ /* * Copyright (C) 2019 Intel Corporation */ - -#ifndef __SLIMBOOTLOADER_CONFIG_H__ -#define __SLIMBOOTLOADER_CONFIG_H__ - -#include - -#define CFG_STD_DEVICES_SETTINGS \ - "stdin=serial,i8042-kbd,usbkbd\0" \ - "stdout=serial\0" \ - "stderr=serial\0" - -/* - * Override CFG_EXTRA_ENV_SETTINGS in x86-common.h - */ -#undef CFG_EXTRA_ENV_SETTINGS -#define CFG_EXTRA_ENV_SETTINGS \ - CFG_STD_DEVICES_SETTINGS \ - "netdev=eth0\0" \ - "consoledev=ttyS0\0" \ - "ramdiskaddr=0x4000000\0" \ - "ramdiskfile=initrd\0" \ - "bootdev=usb\0" \ - "bootdevnum=0\0" \ - "bootdevpart=0\0" \ - "bootfsload=fatload\0" \ - "bootusb=setenv bootdev usb; boot\0" \ - "bootscsi=setenv bootdev scsi; boot\0" \ - "bootmmc=setenv bootdev mmc; boot\0" \ - "bootargs=console=ttyS0,115200 console=tty0\0" - -/* - * Override CONFIG_BOOTCOMMAND in x86-common.h - */ - -#endif /* __SLIMBOOTLOADER_CONFIG_H__ */ -- cgit v1.2.3 From 6ed1cb3552c0d590f681176878bd625373ea0c6b Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:02:02 -0600 Subject: x86: efi-x86_app: Convert to text environment Use the common include. Drop the unnecessary changes, since missing stdio drivers will be ignored. Drop everything from the config.h file. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- include/configs/efi-x86_app.h | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'include') diff --git a/include/configs/efi-x86_app.h b/include/configs/efi-x86_app.h index 843ed8b9d1d..d5824049d69 100644 --- a/include/configs/efi-x86_app.h +++ b/include/configs/efi-x86_app.h @@ -2,14 +2,3 @@ /* * Copyright (c) 2015 Google, Inc */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -#include - -#define CFG_STD_DEVICES_SETTINGS "stdin=serial\0" \ - "stdout=vidconsole\0" \ - "stderr=vidconsole\0" - -#endif -- cgit v1.2.3 From 17b2398534c5212dd3b32db7d965e813c8a31e59 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:02:03 -0600 Subject: x86: efi-x86_payload: Convert to text environment Use the common include. Drop everything from the config.h file. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- include/configs/efi-x86_payload.h | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'include') diff --git a/include/configs/efi-x86_payload.h b/include/configs/efi-x86_payload.h index c72b067c367..e00c408f29a 100644 --- a/include/configs/efi-x86_payload.h +++ b/include/configs/efi-x86_payload.h @@ -2,20 +2,3 @@ /* * Copyright (C) 2018, Bin Meng */ - -/* - * board/config.h - configuration options, board specific - */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -#include - -#define CFG_STD_DEVICES_SETTINGS "stdin=serial,i8042-kbd,usbkbd\0" \ - "stdout=serial,vidconsole\0" \ - "stderr=serial,vidconsole\0" - -/* ATA/IDE support */ - -#endif /* __CONFIG_H */ -- cgit v1.2.3 From 9234b77b9d42ebd77585091a072b4ab958ba83ed Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:02:05 -0600 Subject: x86: qemu-x86: Convert to text environment Use the common include. Drop everything from the config.h file. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- include/configs/qemu-x86.h | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'include') diff --git a/include/configs/qemu-x86.h b/include/configs/qemu-x86.h index 3e5235291a2..9b0f5cedcd7 100644 --- a/include/configs/qemu-x86.h +++ b/include/configs/qemu-x86.h @@ -2,26 +2,3 @@ /* * Copyright (C) 2015, Bin Meng */ - -/* - * board/config.h - configuration options, board specific - */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -#include - -#include - -#define CFG_STD_DEVICES_SETTINGS "stdin=serial,i8042-kbd\0" \ - "stdout=serial,vidconsole\0" \ - "stderr=serial,vidconsole\0" - -/* - * ATA/SATA support for QEMU x86 targets - * - Only legacy IDE controller is supported for QEMU '-M pc' target - * - AHCI controller is supported for QEMU '-M q35' target - */ - -#endif /* __CONFIG_H */ -- cgit v1.2.3 From 2fa09b455a73a9bda0c616eaecd5dfafd5c19502 Mon Sep 17 00:00:00 2001 From: Jagan Teki Date: Sat, 29 Jul 2023 19:11:42 +0530 Subject: rockchip: rv1126: Enable fdtoverlay support Add fdtoverlay_addr_r and enable OF_LIBFDT_OVERLAY for the use of DT overlay in RV1126. Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- include/configs/rv1126_common.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/configs/rv1126_common.h b/include/configs/rv1126_common.h index 1ec1640f99d..a64c0c63642 100644 --- a/include/configs/rv1126_common.h +++ b/include/configs/rv1126_common.h @@ -24,6 +24,7 @@ "scriptaddr=0x00000000\0" \ "pxefile_addr_r=0x00100000\0" \ "fdt_addr_r=0x08300000\0" \ + "fdtoverlay_addr_r=0x02000000\0" \ "kernel_addr_r=0x02008000\0" \ "ramdisk_addr_r=0x0a200000\0" -- cgit v1.2.3 From 78246baa8d82a8d01feeefbcf8d97f23a9d5c728 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Sat, 12 Aug 2023 19:09:32 +0200 Subject: lmb: description lmb_is_reserved, lmb_is_reserved_flags * provide a description for function lmb_is_reserved() * improve the description of funciton lmb_is_reserved_flags() Signed-off-by: Heinrich Schuchardt --- include/lmb.h | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/lmb.h b/include/lmb.h index 07bf22144ea..231b68b27d9 100644 --- a/include/lmb.h +++ b/include/lmb.h @@ -116,16 +116,31 @@ phys_addr_t __lmb_alloc_base(struct lmb *lmb, phys_size_t size, ulong align, phys_addr_t max_addr); phys_addr_t lmb_alloc_addr(struct lmb *lmb, phys_addr_t base, phys_size_t size); phys_size_t lmb_get_free_size(struct lmb *lmb, phys_addr_t addr); + +/** + * lmb_is_reserved() - test if address is in reserved region + * + * The function checks if a reserved region comprising @addr exists. + * + * @lmb: the logical memory block struct + * @addr: address to be tested + * Return: 1 if reservation exists, 0 otherwise + */ int lmb_is_reserved(struct lmb *lmb, phys_addr_t addr); + /** - * lmb_is_reserved_flags - test if tha address is in reserved region with a bitfield flag + * lmb_is_reserved_flags() - test if address is in reserved region with flag bits set + * + * The function checks if a reserved region comprising @addr exists which has + * all flag bits set which are set in @flags. * * @lmb: the logical memory block struct * @addr: address to be tested - * @flags: flags bitfied to be tested - * Return: if not reserved or reserved without the requested flag else 1 + * @flags: bitmap with bits to be tested + * Return: 1 if matching reservation exists, 0 otherwise */ int lmb_is_reserved_flags(struct lmb *lmb, phys_addr_t addr, int flags); + long lmb_free(struct lmb *lmb, phys_addr_t base, phys_size_t size); void lmb_dump_all(struct lmb *lmb); -- cgit v1.2.3 From 289bd72ea41fd45237a34593065ff107afc2a9a9 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Mon, 14 Aug 2023 08:44:26 +0200 Subject: doc: description of board_get_usable_ram_top() Improve the description of function board_get_usable_ram_top(). Signed-off-by: Heinrich Schuchardt Reviewed-by: Simon Glass --- include/init.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/init.h b/include/init.h index 88730816851..dc3c1f220c3 100644 --- a/include/init.h +++ b/include/init.h @@ -296,13 +296,18 @@ int checkboard(void); int show_board_info(void); /** - * Get the uppermost pointer that is valid to access + * board_get_usable_ram_top() - get uppermost address for U-Boot relocation * - * Some systems may not map all of their address space. This function allows - * boards to indicate what their highest support pointer value is for DRAM - * access. + * Some systems have reserved memory areas in high memory. By implementing this + * function boards can indicate the highest address value to be used when + * relocating U-Boot. The returned address is exclusive (i.e. 1 byte above the + * last usable address). * - * @param total_size Size of U-Boot (unused?) + * Due to overflow on systems with 32bit phys_addr_t a value 0 is used instead + * of 4GiB. + * + * @total_size: monitor length in bytes (size of U-Boot code) + * Return: uppermost address for U-Boot relocation */ phys_size_t board_get_usable_ram_top(phys_size_t total_size); -- cgit v1.2.3 From 5aae021c30940a57862c1ea6a3cf8eeb88ca2c1c Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Tue, 15 Aug 2023 12:30:19 +0200 Subject: doc: add partition API to HTML documentation * Convert comments in part.h to Sphinx style. * Create documentation page for the partition API. * Add the partition API page to the API index page. Signed-off-by: Heinrich Schuchardt Reviewed-by: Simon Glass --- include/part.h | 210 ++++++++++++++++++++++++++++++--------------------------- 1 file changed, 112 insertions(+), 98 deletions(-) (limited to 'include') diff --git a/include/part.h b/include/part.h index edc46f8dcbe..8e451bbdff9 100644 --- a/include/part.h +++ b/include/part.h @@ -98,8 +98,8 @@ struct disk_part { * @ifname: Interface name (e.g. "ide", "scsi") * @dev: Device number (0 for first device on that interface, 1 for * second, etc. - * Return: pointer to the block device, or NULL if not available, or an - * error occurred. + * Return: + * pointer to the block device, or NULL if not available, or an error occurred. */ struct blk_desc *blk_get_dev(const char *ifname, int dev); @@ -128,6 +128,10 @@ int part_get_info(struct blk_desc *dev_desc, int part, /** * part_get_info_whole_disk() - get partition info for the special case of * a partition occupying the entire disk. + * + * @dev_desc: block device descriptor + * @info: returned partition information + * Return: 0 on success */ int part_get_info_whole_disk(struct blk_desc *dev_desc, struct disk_partition *info); @@ -170,15 +174,18 @@ int blk_get_device_by_str(const char *ifname, const char *dev_str, * This calls blk_get_device_by_str() to look up a device. It also looks up * a partition and returns information about it. * - * @dev_part_str is in the format: - * .: where is the device number, - * is the optional hardware partition number and - * is the partition number + * @dev_part_str is in the format .: where + * + * * is the device number, + * + * * is the optional hardware partition number and * - * If ifname is "hostfs" then this function returns the sandbox host block + * * is the partition number. + * + * If @ifname is "hostfs", then this function returns the sandbox host block * device. * - * If ifname is ubi, then this function returns 0, with @info set to a + * If @ifname is "ubi", then this function returns 0, with @info set to a * special UBI device. * * If @dev_part_str is NULL or empty or "-", then this function looks up @@ -187,13 +194,13 @@ int blk_get_device_by_str(const char *ifname, const char *dev_str, * If the partition string is empty then the first partition is used. If the * partition string is "auto" then the first bootable partition is used. * - * @ifname: Interface name (e.g. "ide", "scsi") + * @ifname: Interface name (e.g. "ide", "scsi") * @dev_part_str: Device and partition string - * @dev_desc: Returns a pointer to the block device on success - * @info: Returns partition information + * @dev_desc: Returns a pointer to the block device on success + * @info: Returns partition information * @allow_whole_dev: true to allow the user to select partition 0 - * (which means the whole device), false to require a valid - * partition number >= 1 + * (which means the whole device), false to require a valid + * partition number >= 1 * Return: partition number, or -1 on error * */ @@ -205,18 +212,20 @@ int blk_get_device_part_str(const char *ifname, const char *dev_part_str, * part_get_info_by_name() - Search for a partition by name * among all available registered partitions * - * @param dev_desc - block device descriptor - * @param gpt_name - the specified table entry name - * @param info - returns the disk partition info + * @dev_desc: block device descriptor + * @name: the specified table entry name + * @info: returns the disk partition info * - * Return: - the partition number on match (starting on 1), -1 on no match, + * Return: the partition number on match (starting on 1), -1 on no match, * otherwise error */ int part_get_info_by_name(struct blk_desc *dev_desc, const char *name, struct disk_partition *info); /** - * Get partition info from dev number + part name, or dev number + part number. + * part_get_info_by_dev_and_name_or_num() - Get partition info from dev number + * and part name, or dev number and + * part number. * * Parse a device number and partition description (either name or number) * in the form of device number plus partition name separated by a "#" @@ -225,14 +234,14 @@ int part_get_info_by_name(struct blk_desc *dev_desc, * partition descriptions for a given interface. If the partition is found, sets * dev_desc and part_info accordingly with the information of the partition. * - * @param[in] dev_iface Device interface - * @param[in] dev_part_str Input partition description, like "0#misc" or "0:1" - * @param[out] dev_desc Place to store the device description pointer - * @param[out] part_info Place to store the partition information - * @param[in] allow_whole_dev true to allow the user to select partition 0 - * (which means the whole device), false to require a valid - * partition number >= 1 - * Return: the partition number on success, or negative errno on error + * @dev_iface: Device interface + * @dev_part_str: Input partition description, like "0#misc" or "0:1" + * @dev_desc: Place to store the device description pointer + * @part_info: Place to store the partition information + * @allow_whole_dev: true to allow the user to select partition 0 + * (which means the whole device), false to require a valid + * partition number >= 1 + * Return: the partition number on success, or negative errno on error */ int part_get_info_by_dev_and_name_or_num(const char *dev_iface, const char *dev_part_str, @@ -322,7 +331,7 @@ int part_create_block_devices(struct udevice *blk_dev); * @start: Start block number to read in the partition (0=first) * @blkcnt: Number of blocks to read * @buffer: Destination buffer for data read - * Returns: number of blocks read, or -ve error number (see the + * Return: number of blocks read, or -ve error number (see the * IS_ERR_VALUE() macro */ ulong disk_blk_read(struct udevice *dev, lbaint_t start, lbaint_t blkcnt, @@ -335,7 +344,7 @@ ulong disk_blk_read(struct udevice *dev, lbaint_t start, lbaint_t blkcnt, * @start: Start block number to write in the partition (0=first) * @blkcnt: Number of blocks to write * @buffer: Source buffer for data to write - * Returns: number of blocks written, or -ve error number (see the + * Return: number of blocks written, or -ve error number (see the * IS_ERR_VALUE() macro */ ulong disk_blk_write(struct udevice *dev, lbaint_t start, lbaint_t blkcnt, @@ -347,7 +356,7 @@ ulong disk_blk_write(struct udevice *dev, lbaint_t start, lbaint_t blkcnt, * @dev: Device to (partially) erase (UCLASS_PARTITION) * @start: Start block number to erase in the partition (0=first) * @blkcnt: Number of blocks to erase - * Returns: number of blocks erased, or -ve error number (see the + * Return: number of blocks erased, or -ve error number (see the * IS_ERR_VALUE() macro */ ulong disk_blk_erase(struct udevice *dev, lbaint_t start, lbaint_t blkcnt); @@ -369,35 +378,40 @@ ulong disk_blk_erase(struct udevice *dev, lbaint_t start, lbaint_t blkcnt); #define part_get_info_ptr(x) x #endif - +/** + * struct part_driver - partition driver + */ struct part_driver { + /** @name: partition name */ const char *name; + /** @part_type: (MBR) partition type */ int part_type; - const int max_entries; /* maximum number of entries to search */ - + /** @max_entries: maximum number of partition table entries */ + const int max_entries; /** - * get_info() - Get information about a partition + * @get_info: Get information about a partition * - * @dev_desc: Block device descriptor - * @part: Partition number (1 = first) - * @info: Returns partition information + * @get_info.dev_desc: Block device descriptor + * @get_info.part: Partition number (1 = first) + * @get_info.info: Returns partition information */ int (*get_info)(struct blk_desc *dev_desc, int part, struct disk_partition *info); /** - * print() - Print partition information + * @print: Print partition information * - * @dev_desc: Block device descriptor + * @print.dev_desc: Block device descriptor */ void (*print)(struct blk_desc *dev_desc); /** - * test() - Test if a device contains this partition type + * @test: Test if a device contains this partition type * - * @dev_desc: Block device descriptor - * @return 0 if the block device appears to contain this partition - * type, -ve if not + * @test.dev_desc: Block device descriptor + * @test.Return: + * 0 if the block device appears to contain this partition type, + * -ve if not */ int (*test)(struct blk_desc *dev_desc); }; @@ -413,52 +427,52 @@ struct part_driver { /** * write_gpt_table() - Write the GUID Partition Table to disk * - * @param dev_desc - block device descriptor - * @param gpt_h - pointer to GPT header representation - * @param gpt_e - pointer to GPT partition table entries + * @dev_desc: block device descriptor + * @gpt_h: pointer to GPT header representation + * @gpt_e: pointer to GPT partition table entries * - * Return: - zero on success, otherwise error + * Return: zero on success, otherwise error */ int write_gpt_table(struct blk_desc *dev_desc, gpt_header *gpt_h, gpt_entry *gpt_e); /** - * gpt_fill_pte(): Fill the GPT partition table entry + * gpt_fill_pte() - Fill the GPT partition table entry * - * @param dev_desc - block device descriptor - * @param gpt_h - GPT header representation - * @param gpt_e - GPT partition table entries - * @param partitions - list of partitions - * @param parts - number of partitions + * @dev_desc: block device descriptor + * @gpt_h: GPT header representation + * @gpt_e: GPT partition table entries + * @partitions: list of partitions + * @parts: number of partitions * - * Return: zero on success + * Return: zero on success */ int gpt_fill_pte(struct blk_desc *dev_desc, gpt_header *gpt_h, gpt_entry *gpt_e, struct disk_partition *partitions, int parts); /** - * gpt_fill_header(): Fill the GPT header + * gpt_fill_header() - Fill the GPT header * - * @param dev_desc - block device descriptor - * @param gpt_h - GPT header representation - * @param str_guid - disk guid string representation - * @param parts_count - number of partitions + * @dev_desc: block device descriptor + * @gpt_h: GPT header representation + * @str_guid: disk guid string representation + * @parts_count: number of partitions * - * Return: - error on str_guid conversion error + * Return: error on str_guid conversion error */ int gpt_fill_header(struct blk_desc *dev_desc, gpt_header *gpt_h, char *str_guid, int parts_count); /** - * gpt_restore(): Restore GPT partition table + * gpt_restore() - Restore GPT partition table * - * @param dev_desc - block device descriptor - * @param str_disk_guid - disk GUID - * @param partitions - list of partitions - * @param parts - number of partitions + * @dev_desc: block device descriptor + * @str_disk_guid: disk GUID + * @partitions: list of partitions + * @parts_count: number of partitions * - * Return: zero on success + * Return: 0 on success */ int gpt_restore(struct blk_desc *dev_desc, char *str_disk_guid, struct disk_partition *partitions, const int parts_count); @@ -466,34 +480,34 @@ int gpt_restore(struct blk_desc *dev_desc, char *str_disk_guid, /** * is_valid_gpt_buf() - Ensure that the Primary GPT information is valid * - * @param dev_desc - block device descriptor - * @param buf - buffer which contains the MBR and Primary GPT info + * @dev_desc: block device descriptor + * @buf: buffer which contains the MBR and Primary GPT info * - * Return: - '0' on success, otherwise error + * Return: 0 on success, otherwise error */ int is_valid_gpt_buf(struct blk_desc *dev_desc, void *buf); /** * write_mbr_and_gpt_partitions() - write MBR, Primary GPT and Backup GPT * - * @param dev_desc - block device descriptor - * @param buf - buffer which contains the MBR and Primary GPT info + * @dev_desc: block device descriptor + * @buf: buffer which contains the MBR and Primary GPT info * - * Return: - '0' on success, otherwise error + * Return: 0 on success, otherwise error */ int write_mbr_and_gpt_partitions(struct blk_desc *dev_desc, void *buf); /** - * gpt_verify_headers() - Function to read and CRC32 check of the GPT's header + * gpt_verify_headers() - Read and check CRC32 of the GPT's header * and partition table entries (PTE) * * As a side effect if sets gpt_head and gpt_pte so they point to GPT data. * - * @param dev_desc - block device descriptor - * @param gpt_head - pointer to GPT header data read from medium - * @param gpt_pte - pointer to GPT partition table enties read from medium + * @dev_desc: block device descriptor + * @gpt_head: pointer to GPT header data read from medium + * @gpt_pte: pointer to GPT partition table enties read from medium * - * Return: - '0' on success, otherwise error + * Return: 0 on success, otherwise error */ int gpt_verify_headers(struct blk_desc *dev_desc, gpt_header *gpt_head, gpt_entry **gpt_pte); @@ -502,9 +516,9 @@ int gpt_verify_headers(struct blk_desc *dev_desc, gpt_header *gpt_head, * gpt_repair_headers() - Function to repair the GPT's header * and partition table entries (PTE) * - * @param dev_desc - block device descriptor + * @dev_desc: block device descriptor * - * Return: - '0' on success, otherwise error + * Return: 0 on success, otherwise error */ int gpt_repair_headers(struct blk_desc *dev_desc); @@ -516,13 +530,13 @@ int gpt_repair_headers(struct blk_desc *dev_desc); * provided in '$partitions' environment variable. Specificially, name, start * and size of the partition is checked. * - * @param dev_desc - block device descriptor - * @param partitions - partition data read from '$partitions' env variable - * @param parts - number of partitions read from '$partitions' env variable - * @param gpt_head - pointer to GPT header data read from medium - * @param gpt_pte - pointer to GPT partition table enties read from medium + * @dev_desc: block device descriptor + * @partitions: partition data read from '$partitions' env variable + * @parts: number of partitions read from '$partitions' env variable + * @gpt_head: pointer to GPT header data read from medium + * @gpt_pte: pointer to GPT partition table enties read from medium * - * Return: - '0' on success, otherwise error + * Return: 0 on success, otherwise error */ int gpt_verify_partitions(struct blk_desc *dev_desc, struct disk_partition *partitions, int parts, @@ -530,15 +544,15 @@ int gpt_verify_partitions(struct blk_desc *dev_desc, /** - * get_disk_guid() - Function to read the GUID string from a device's GPT + * get_disk_guid() - Read the GUID string from a device's GPT * * This function reads the GUID string from a block device whose descriptor * is provided. * - * @param dev_desc - block device descriptor - * @param guid - pre-allocated string in which to return the GUID + * @dev_desc: block device descriptor + * @guid: pre-allocated string in which to return the GUID * - * Return: - '0' on success, otherwise error + * Return: 0 on success, otherwise error */ int get_disk_guid(struct blk_desc *dev_desc, char *guid); @@ -548,19 +562,19 @@ int get_disk_guid(struct blk_desc *dev_desc, char *guid); /** * is_valid_dos_buf() - Ensure that a DOS MBR image is valid * - * @param buf - buffer which contains the MBR + * @buf: buffer which contains the MBR * - * Return: - '0' on success, otherwise error + * Return: 0 on success, otherwise error */ int is_valid_dos_buf(void *buf); /** * write_mbr_sector() - write DOS MBR * - * @param dev_desc - block device descriptor - * @param buf - buffer which contains the MBR + * @dev_desc: block device descriptor + * @buf: buffer which contains the MBR * - * Return: - '0' on success, otherwise error + * Return: 0 on success, otherwise error */ int write_mbr_sector(struct blk_desc *dev_desc, void *buf); @@ -575,7 +589,7 @@ int layout_mbr_partitions(struct disk_partition *p, int count, /** * part_driver_get_count() - get partition driver count * - * Return: - number of partition drivers + * Return: number of partition drivers */ static inline int part_driver_get_count(void) { @@ -585,7 +599,7 @@ static inline int part_driver_get_count(void) /** * part_driver_get_first() - get first partition driver * - * Return: - pointer to first partition driver on success, otherwise NULL + * Return: pointer to first partition driver on success, otherwise NULL */ static inline struct part_driver *part_driver_get_first(void) { @@ -595,9 +609,9 @@ static inline struct part_driver *part_driver_get_first(void) /** * part_get_type_by_name() - Get partition type by name * - * @name: Name of partition type to look up (not case-sensitive) - * Returns: Corresponding partition type (PART_TYPE_...) or PART_TYPE_UNKNOWN if - * not known + * @name: Name of partition type to look up (not case-sensitive) + * Return: + * Corresponding partition type (PART\_TYPE\_...) or PART\_TYPE\_UNKNOWN */ int part_get_type_by_name(const char *name); -- cgit v1.2.3 From d768dd88552df18d4a0527cf3d6ddd05dc072f02 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Sat, 12 Aug 2023 20:16:58 +0200 Subject: common: return type board_get_usable_ram_top board_get_usable_ram_top() returns a physical address that is stored in gd->ram_top. The return type of the function should be phys_addr_t like the current type of gd->ram_top. Signed-off-by: Heinrich Schuchardt --- include/init.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/init.h b/include/init.h index dc3c1f220c3..3bf30476a2e 100644 --- a/include/init.h +++ b/include/init.h @@ -309,7 +309,7 @@ int show_board_info(void); * @total_size: monitor length in bytes (size of U-Boot code) * Return: uppermost address for U-Boot relocation */ -phys_size_t board_get_usable_ram_top(phys_size_t total_size); +phys_addr_t board_get_usable_ram_top(phys_size_t total_size); int board_early_init_f(void); -- cgit v1.2.3 From 284b08fb51b60255cbedcfe7aa7dcf319450d7e3 Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Mon, 10 Jul 2023 13:30:59 +0200 Subject: board: stm32mp1: add splash screen with stmicroelectronics logo Display the STMicroelectronics logo with features VIDEO_LOGO and SPLASH_SCREEN on STMicroelectronics boards. With CONFIG_SYS_VENDOR = "st", the logo st.bmp is selected, loaded at the address indicated by splashimage and centered with "splashpos=m,m". Signed-off-by: Patrick Delaunay Reviewed-by: Patrice Chotard --- include/configs/stm32mp15_st_common.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/stm32mp15_st_common.h b/include/configs/stm32mp15_st_common.h index b45982a35b8..60838cb0e3f 100644 --- a/include/configs/stm32mp15_st_common.h +++ b/include/configs/stm32mp15_st_common.h @@ -10,7 +10,9 @@ #define STM32MP_BOARD_EXTRA_ENV \ "usb_pgood_delay=2000\0" \ - "console=ttySTM0\0" + "console=ttySTM0\0" \ + "splashimage=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ + "splashpos=m,m\0" #include -- cgit v1.2.3 From 52029b783bfb3b55f8845d7d88ba1bcc728c4e08 Mon Sep 17 00:00:00 2001 From: Paul Barker Date: Mon, 14 Aug 2023 20:13:34 +0100 Subject: clk: Fix typo in header comment Signed-off-by: Paul Barker Reviewed-by: Heinrich Schuchardt --- include/clk-uclass.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/clk-uclass.h b/include/clk-uclass.h index 65ebff9ed27..a22f1a5d848 100644 --- a/include/clk-uclass.h +++ b/include/clk-uclass.h @@ -64,7 +64,7 @@ int of_xlate(struct clk *clock, struct ofnode_phandle_args *args); /** * request() - Request a translated clock. - * @clock: The clock struct to request; this has been fille in by + * @clock: The clock struct to request; this has been filled in by * a previoux xxx_xlate() function call, or by the caller * of clk_request(). * -- cgit v1.2.3 From 99a4e5865e34f7d493e5bb96f8d327e93066a802 Mon Sep 17 00:00:00 2001 From: Paul Barker Date: Mon, 14 Aug 2023 20:13:35 +0100 Subject: irq: Fix typo in header comment Signed-off-by: Paul Barker Reviewed-by: Heinrich Schuchardt --- include/irq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/irq.h b/include/irq.h index 1d08cb858d0..5638c10128e 100644 --- a/include/irq.h +++ b/include/irq.h @@ -109,7 +109,7 @@ struct irq_ops { * xxx_xlate() call, or as the only step in implementing a client's * irq_request() call. * - * @irq: The irq struct to request; this has been fille in by + * @irq: The irq struct to request; this has been filled in by * a previoux xxx_xlate() function call, or by the caller * of irq_request(). * @return 0 if OK, or a negative error code. -- cgit v1.2.3