From 2e8d47c641aa951c8d8a7f401e2c652af1355f28 Mon Sep 17 00:00:00 2001 From: Neil Armstrong Date: Fri, 17 Sep 2021 09:37:00 +0200 Subject: ARM: meson: Sync Amlogic DT from Linux 5.14 Import Amlogic DT changes from Linux commit 7d2a07b76933 ("Linux 5.14"), dt-bindings clock changes and new meson-g12b-gsking-x.dts, meson-sm1-bananapi-m5 & odroid-hc4 boards. Signed-off-by: Neil Armstrong --- include/dt-bindings/clock/axg-clkc.h | 26 +++++++++++++++++++++++++- include/dt-bindings/clock/g12a-clkc.h | 2 ++ 2 files changed, 27 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/dt-bindings/clock/axg-clkc.h b/include/dt-bindings/clock/axg-clkc.h index fd1f938c38d..93752ea107e 100644 --- a/include/dt-bindings/clock/axg-clkc.h +++ b/include/dt-bindings/clock/axg-clkc.h @@ -70,7 +70,31 @@ #define CLKID_HIFI_PLL 69 #define CLKID_PCIE_CML_EN0 79 #define CLKID_PCIE_CML_EN1 80 -#define CLKID_MIPI_ENABLE 81 #define CLKID_GEN_CLK 84 +#define CLKID_VPU_0_SEL 92 +#define CLKID_VPU_0 93 +#define CLKID_VPU_1_SEL 95 +#define CLKID_VPU_1 96 +#define CLKID_VPU 97 +#define CLKID_VAPB_0_SEL 99 +#define CLKID_VAPB_0 100 +#define CLKID_VAPB_1_SEL 102 +#define CLKID_VAPB_1 103 +#define CLKID_VAPB_SEL 104 +#define CLKID_VAPB 105 +#define CLKID_VCLK 106 +#define CLKID_VCLK2 107 +#define CLKID_VCLK_DIV1 122 +#define CLKID_VCLK_DIV2 123 +#define CLKID_VCLK_DIV4 124 +#define CLKID_VCLK_DIV6 125 +#define CLKID_VCLK_DIV12 126 +#define CLKID_VCLK2_DIV1 127 +#define CLKID_VCLK2_DIV2 128 +#define CLKID_VCLK2_DIV4 129 +#define CLKID_VCLK2_DIV6 130 +#define CLKID_VCLK2_DIV12 131 +#define CLKID_CTS_ENCL 133 +#define CLKID_VDIN_MEAS 136 #endif /* __AXG_CLKC_H */ diff --git a/include/dt-bindings/clock/g12a-clkc.h b/include/dt-bindings/clock/g12a-clkc.h index 40d49940d8a..a93b58c5e18 100644 --- a/include/dt-bindings/clock/g12a-clkc.h +++ b/include/dt-bindings/clock/g12a-clkc.h @@ -147,5 +147,7 @@ #define CLKID_SPICC1_SCLK 261 #define CLKID_NNA_AXI_CLK 264 #define CLKID_NNA_CORE_CLK 267 +#define CLKID_MIPI_DSI_PXCLK_SEL 269 +#define CLKID_MIPI_DSI_PXCLK 270 #endif /* __G12A_CLKC_H */ -- cgit v1.2.3 From f485e9dfa75597c7876ffbe97c91b4f6828f4135 Mon Sep 17 00:00:00 2001 From: Neil Armstrong Date: Fri, 17 Sep 2021 09:37:04 +0200 Subject: configs: meson64: add SCSI boot target Add SCSI target to be able to boot from the SATA disks on the Odroid HC4 using an on-board AHCI PCIe controller. Signed-off-by: Neil Armstrong Signed-off-by: Mark Kettenis --- include/configs/meson64.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/configs/meson64.h b/include/configs/meson64.h index b779363b2b0..cb202d55556 100644 --- a/include/configs/meson64.h +++ b/include/configs/meson64.h @@ -62,6 +62,12 @@ #define BOOT_TARGET_NVME(func) #endif +#ifdef CONFIG_CMD_SCSI + #define BOOT_TARGET_SCSI(func) func(SCSI, scsi, 0) +#else + #define BOOT_TARGET_SCSI(func) +#endif + #ifndef BOOT_TARGET_DEVICES #define BOOT_TARGET_DEVICES(func) \ func(ROMUSB, romusb, na) \ @@ -70,6 +76,7 @@ func(MMC, mmc, 2) \ BOOT_TARGET_DEVICES_USB(func) \ BOOT_TARGET_NVME(func) \ + BOOT_TARGET_SCSI(func) \ func(PXE, pxe, na) \ func(DHCP, dhcp, na) #endif -- cgit v1.2.3 From d565a35dbd0662de31770e4f132b7a4a337d0ade Mon Sep 17 00:00:00 2001 From: Neil Armstrong Date: Fri, 17 Sep 2021 09:37:05 +0200 Subject: distro_bootcmd: run pci enum for scsi_boot just like it is done for nvme_boot The SCSI device can be a PCIe adapter, so run pcie enum if enabled. Signed-off-by: Mark Kettenis Signed-off-by: Neil Armstrong --- include/config_distro_bootcmd.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h index 750e9e04e8f..3f724aa10f4 100644 --- a/include/config_distro_bootcmd.h +++ b/include/config_distro_bootcmd.h @@ -226,6 +226,7 @@ "fi\0" \ \ "scsi_boot=" \ + BOOTENV_RUN_PCI_ENUM \ BOOTENV_RUN_SCSI_INIT \ BOOTENV_SHARED_BLKDEV_BODY(scsi) #define BOOTENV_DEV_SCSI BOOTENV_DEV_BLKDEV -- cgit v1.2.3 From 15eda54676058226fac7c642db03f3f533026522 Mon Sep 17 00:00:00 2001 From: Vyacheslav Bocharov Date: Mon, 20 Sep 2021 11:40:14 +0300 Subject: ARM: amlogic: add JetHub common config header JetHub devices uses its own boot sequence with "rescue" button Signed-off-by: Vyacheslav Bocharov Signed-off-by: Neil Armstrong --- include/configs/jethub.h | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 include/configs/jethub.h (limited to 'include') diff --git a/include/configs/jethub.h b/include/configs/jethub.h new file mode 100644 index 00000000000..35f85095aca --- /dev/null +++ b/include/configs/jethub.h @@ -0,0 +1,40 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Configuration for JetHome devices + * Copyright (C) 2021 Vyacheslav Bocharov + * Author: Vyacheslav Bocharov + */ + +#ifndef __JETHUB_CONFIG_H +#define __JETHUB_CONFIG_H + +#if defined(CONFIG_MESON_AXG) +#define BOOTENV_DEV_RESCUE(devtypeu, devtypel, instance) \ + "bootcmd_rescue=" \ + "if gpio input 10; then " \ + "run bootcmd_usb0;" \ + "fi;\0" +#else +#define BOOTENV_DEV_RESCUE(devtypeu, devtypel, instance) \ + "bootcmd_rescue=" \ + "if test \"${userbutton}\" = \"true\"; then " \ + "run bootcmd_mmc0; " \ + "fi;\0" +#endif + +#define BOOTENV_DEV_NAME_RESCUE(devtypeu, devtypel, instance) \ + "rescue " + +#ifndef BOOT_TARGET_DEVICES +#define BOOT_TARGET_DEVICES(func) \ + func(RESCUE, rescue, na) \ + func(MMC, mmc, 1) \ + func(MMC, mmc, 0) \ + BOOT_TARGET_DEVICES_USB(func) \ + func(PXE, pxe, na) \ + func(DHCP, dhcp, na) +#endif + +#include + +#endif /* __JETHUB_CONFIG_H */ -- cgit v1.2.3 From b703dcb0fe5d296bb55a8932147d9f754625b739 Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Thu, 2 Sep 2021 12:02:06 +0200 Subject: arm: stm32: Disable ATAGs support These platforms never had to support an ATAGs-based Linux Kernel, so remove the options. Cc: Marek Vasut Signed-off-by: Tom Rini Signed-off-by: Patrick Delaunay Reviewed-by: Patrice Chotard Tested-by: Patrice Chotard Reviewed-by: Alexandru Gagniuc --- include/configs/stm32f429-discovery.h | 5 ----- include/configs/stm32f429-evaluation.h | 5 ----- include/configs/stm32f469-discovery.h | 5 ----- include/configs/stm32f746-disco.h | 5 ----- include/configs/stm32h743-disco.h | 5 ----- include/configs/stm32h743-eval.h | 5 ----- include/configs/stm32h750-art-pi.h | 5 ----- include/configs/stm32mp1.h | 5 ----- 8 files changed, 40 deletions(-) (limited to 'include') diff --git a/include/configs/stm32f429-discovery.h b/include/configs/stm32f429-discovery.h index 9d029fbcc6f..dbbce494759 100644 --- a/include/configs/stm32f429-discovery.h +++ b/include/configs/stm32f429-discovery.h @@ -27,11 +27,6 @@ #define CONFIG_SYS_HZ_CLOCK 1000000 /* Timer is clocked at 1MHz */ -#define CONFIG_CMDLINE_TAG -#define CONFIG_SETUP_MEMORY_TAGS -#define CONFIG_INITRD_TAG -#define CONFIG_REVISION_TAG - #define CONFIG_SYS_CBSIZE 1024 #define CONFIG_SYS_MALLOC_LEN (2 << 20) diff --git a/include/configs/stm32f429-evaluation.h b/include/configs/stm32f429-evaluation.h index fefdb2dd152..29a41e80676 100644 --- a/include/configs/stm32f429-evaluation.h +++ b/include/configs/stm32f429-evaluation.h @@ -29,11 +29,6 @@ #define CONFIG_SYS_HZ_CLOCK 1000000 /* Timer is clocked at 1MHz */ -#define CONFIG_CMDLINE_TAG -#define CONFIG_SETUP_MEMORY_TAGS -#define CONFIG_INITRD_TAG -#define CONFIG_REVISION_TAG - #define CONFIG_SYS_CBSIZE 1024 #define CONFIG_SYS_MALLOC_LEN (1 * 1024 * 1024) diff --git a/include/configs/stm32f469-discovery.h b/include/configs/stm32f469-discovery.h index ba9f05a61b4..b9b932c6510 100644 --- a/include/configs/stm32f469-discovery.h +++ b/include/configs/stm32f469-discovery.h @@ -29,11 +29,6 @@ #define CONFIG_SYS_HZ_CLOCK 1000000 /* Timer is clocked at 1MHz */ -#define CONFIG_CMDLINE_TAG -#define CONFIG_SETUP_MEMORY_TAGS -#define CONFIG_INITRD_TAG -#define CONFIG_REVISION_TAG - #define CONFIG_SYS_CBSIZE 1024 #define CONFIG_SYS_MALLOC_LEN (1 * 1024 * 1024) diff --git a/include/configs/stm32f746-disco.h b/include/configs/stm32f746-disco.h index 08d050adfa5..b72b989c2c2 100644 --- a/include/configs/stm32f746-disco.h +++ b/include/configs/stm32f746-disco.h @@ -36,11 +36,6 @@ #define CONFIG_SYS_HZ_CLOCK 1000000 /* Timer is clocked at 1MHz */ -#define CONFIG_CMDLINE_TAG -#define CONFIG_SETUP_MEMORY_TAGS -#define CONFIG_INITRD_TAG -#define CONFIG_REVISION_TAG - #define CONFIG_SYS_CBSIZE 1024 #define CONFIG_SYS_MALLOC_LEN (1 * 1024 * 1024) diff --git a/include/configs/stm32h743-disco.h b/include/configs/stm32h743-disco.h index 6e10dbdfe94..e5bb08eec71 100644 --- a/include/configs/stm32h743-disco.h +++ b/include/configs/stm32h743-disco.h @@ -24,11 +24,6 @@ #define CONFIG_SYS_HZ_CLOCK 1000000 -#define CONFIG_CMDLINE_TAG -#define CONFIG_SETUP_MEMORY_TAGS -#define CONFIG_INITRD_TAG -#define CONFIG_REVISION_TAG - #define CONFIG_SYS_MAXARGS 16 #define CONFIG_SYS_MALLOC_LEN (1 * 1024 * 1024) diff --git a/include/configs/stm32h743-eval.h b/include/configs/stm32h743-eval.h index 268d39c7ad6..89169f85d5b 100644 --- a/include/configs/stm32h743-eval.h +++ b/include/configs/stm32h743-eval.h @@ -24,11 +24,6 @@ #define CONFIG_SYS_HZ_CLOCK 1000000 -#define CONFIG_CMDLINE_TAG -#define CONFIG_SETUP_MEMORY_TAGS -#define CONFIG_INITRD_TAG -#define CONFIG_REVISION_TAG - #define CONFIG_SYS_MAXARGS 16 #define CONFIG_SYS_MALLOC_LEN (1 * 1024 * 1024) diff --git a/include/configs/stm32h750-art-pi.h b/include/configs/stm32h750-art-pi.h index 3fd54611677..a9006e224aa 100644 --- a/include/configs/stm32h750-art-pi.h +++ b/include/configs/stm32h750-art-pi.h @@ -24,11 +24,6 @@ #define CONFIG_SYS_HZ_CLOCK 1000000 -#define CONFIG_CMDLINE_TAG -#define CONFIG_SETUP_MEMORY_TAGS -#define CONFIG_INITRD_TAG -#define CONFIG_REVISION_TAG - #define CONFIG_SYS_MAXARGS 16 #define CONFIG_SYS_MALLOC_LEN (1 * 1024 * 1024) diff --git a/include/configs/stm32mp1.h b/include/configs/stm32mp1.h index b372838be82..fb4e4fb0bc4 100644 --- a/include/configs/stm32mp1.h +++ b/include/configs/stm32mp1.h @@ -33,11 +33,6 @@ #define CONFIG_LOADADDR 0xc2000000 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR -/* ATAGs */ -#define CONFIG_CMDLINE_TAG -#define CONFIG_SETUP_MEMORY_TAGS -#define CONFIG_INITRD_TAG - /* * For booting Linux, use the first 256 MB of memory, since this is * the maximum mapped by the Linux kernel during initialization. -- cgit v1.2.3 From 2d0808161b2b07a21119c2037c088dae1ab80c0a Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Mon, 4 Oct 2021 13:48:08 +0200 Subject: Revert "configs: stm32mp1: only support SD card after NOR in bootcmd_stm32mp" This reverts commit d5d726d3cc47691ace3c68fa31147ad104aaf579, which breaks boards which ship with multiple SD/eMMC sockets. This stm32mp1.h config is not used only by the ST reference boards, but all the other STM32MP1 based boards in U-Boot, so changes to this stm32mp1.h cannot break the other boards. Signed-off-by: Marek Vasut Cc: Patrice Chotard Cc: Patrick Delaunay Reviewed-by: Patrick Delaunay --- include/configs/stm32mp1.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'include') diff --git a/include/configs/stm32mp1.h b/include/configs/stm32mp1.h index fb4e4fb0bc4..2dab1db6bb3 100644 --- a/include/configs/stm32mp1.h +++ b/include/configs/stm32mp1.h @@ -115,7 +115,7 @@ * for serial/usb: execute the stm32prog command * for mmc boot (eMMC, SD card), boot only on the same device * for nand or spi-nand boot, boot with on ubifs partition on UBI partition - * for nor boot, use SD card = mmc0 + * for nor boot, use the default order */ #define STM32MP_BOOTCMD "bootcmd_stm32mp=" \ "echo \"Boot over ${boot_device}${boot_instance}!\";" \ @@ -128,8 +128,6 @@ "if test ${boot_device} = nand ||" \ " test ${boot_device} = spi-nand ;" \ "then env set boot_targets ubifs0; fi;" \ - "if test ${boot_device} = nor;" \ - "then env set boot_targets mmc0; fi;" \ "run distro_bootcmd;" \ "fi;\0" -- cgit v1.2.3 From cc30ea584ef8f3533448dd75716e8a4d28c9e495 Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Mon, 4 Oct 2021 11:05:52 +0200 Subject: Convert CONFIG_STM32_FLASH to Kconfig This converts the CONFIG_STM32_FLASH to Kconfig by using tools/moveconfig.py Signed-off-by: Patrick Delaunay Reviewed-by: Patrice Chotard --- include/configs/stm32f429-discovery.h | 2 -- include/configs/stm32f429-evaluation.h | 2 -- include/configs/stm32f469-discovery.h | 2 -- include/configs/stm32f746-disco.h | 2 -- 4 files changed, 8 deletions(-) (limited to 'include') diff --git a/include/configs/stm32f429-discovery.h b/include/configs/stm32f429-discovery.h index dbbce494759..9b040a0ca35 100644 --- a/include/configs/stm32f429-discovery.h +++ b/include/configs/stm32f429-discovery.h @@ -23,8 +23,6 @@ #define CONFIG_RED_LED 110 #define CONFIG_GREEN_LED 109 -#define CONFIG_STM32_FLASH - #define CONFIG_SYS_HZ_CLOCK 1000000 /* Timer is clocked at 1MHz */ #define CONFIG_SYS_CBSIZE 1024 diff --git a/include/configs/stm32f429-evaluation.h b/include/configs/stm32f429-evaluation.h index 29a41e80676..3b6223d7371 100644 --- a/include/configs/stm32f429-evaluation.h +++ b/include/configs/stm32f429-evaluation.h @@ -25,8 +25,6 @@ #define CONFIG_SYS_MAX_FLASH_SECT 12 #define CONFIG_SYS_MAX_FLASH_BANKS 2 -#define CONFIG_STM32_FLASH - #define CONFIG_SYS_HZ_CLOCK 1000000 /* Timer is clocked at 1MHz */ #define CONFIG_SYS_CBSIZE 1024 diff --git a/include/configs/stm32f469-discovery.h b/include/configs/stm32f469-discovery.h index b9b932c6510..6a0fa02451e 100644 --- a/include/configs/stm32f469-discovery.h +++ b/include/configs/stm32f469-discovery.h @@ -25,8 +25,6 @@ #define CONFIG_SYS_MAX_FLASH_SECT 12 #define CONFIG_SYS_MAX_FLASH_BANKS 2 -#define CONFIG_STM32_FLASH - #define CONFIG_SYS_HZ_CLOCK 1000000 /* Timer is clocked at 1MHz */ #define CONFIG_SYS_CBSIZE 1024 diff --git a/include/configs/stm32f746-disco.h b/include/configs/stm32f746-disco.h index b72b989c2c2..247191a4755 100644 --- a/include/configs/stm32f746-disco.h +++ b/include/configs/stm32f746-disco.h @@ -29,8 +29,6 @@ #define CONFIG_SYS_MAX_FLASH_SECT 8 #define CONFIG_SYS_MAX_FLASH_BANKS 1 -#define CONFIG_STM32_FLASH - #define CONFIG_DW_GMAC_DEFAULT_DMA_PBL (8) #define CONFIG_DW_ALTDESCRIPTOR -- cgit v1.2.3 From 454994727d0937bb232f339cfd01bd78ca722828 Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Mon, 4 Oct 2021 11:23:41 +0200 Subject: configs: Move some usb config in defconfig Using the tools moveconfig.py to move the following config in the defconfig files: CONFIG_USB_HOST_ETHER CONFIG_USB_ETHER_ASIX CONFIG_USB_ETHER_MCS7830 CONFIG_USB_ETHER_SMSC95XX These option are already migrated since the commit f58ad98a621c ("usb: net: migrate USB Ethernet adapters to Kconfig") and the commit ae3584498bf8 ("usb: net: migrate CONFIG_USB_HOST_ETHER to Kconfig"). Signed-off-by: Patrick Delaunay Reviewed-by: Mark Kettenis Reviewed-by: Ian Ray Reviewed-by: Patrice Chotard --- include/configs/dh_imx6.h | 2 -- include/configs/kp_imx6q_tpc.h | 2 -- include/configs/mx53ppd.h | 4 ---- include/configs/stih410-b2260.h | 5 ----- 4 files changed, 13 deletions(-) (limited to 'include') diff --git a/include/configs/dh_imx6.h b/include/configs/dh_imx6.h index d9be1c38c44..0198126de59 100644 --- a/include/configs/dh_imx6.h +++ b/include/configs/dh_imx6.h @@ -58,8 +58,6 @@ /* USB Configs */ #ifdef CONFIG_CMD_USB #define CONFIG_EHCI_HCD_INIT_AFTER_RESET -#define CONFIG_USB_HOST_ETHER -#define CONFIG_USB_ETHER_ASIX #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 /* Enabled USB controller number */ diff --git a/include/configs/kp_imx6q_tpc.h b/include/configs/kp_imx6q_tpc.h index 749e880f36f..7216939265f 100644 --- a/include/configs/kp_imx6q_tpc.h +++ b/include/configs/kp_imx6q_tpc.h @@ -30,8 +30,6 @@ /* USB Configs */ #ifdef CONFIG_CMD_USB #define CONFIG_EHCI_HCD_INIT_AFTER_RESET -#define CONFIG_USB_HOST_ETHER -#define CONFIG_USB_ETHER_ASIX #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 /* Enabled USB controller number */ diff --git a/include/configs/mx53ppd.h b/include/configs/mx53ppd.h index b1e6a5638b6..c9fecc3f9ba 100644 --- a/include/configs/mx53ppd.h +++ b/include/configs/mx53ppd.h @@ -23,10 +23,6 @@ #define CONFIG_REVISION_TAG /* USB Configs */ -#define CONFIG_USB_HOST_ETHER -#define CONFIG_USB_ETHER_ASIX -#define CONFIG_USB_ETHER_MCS7830 -#define CONFIG_USB_ETHER_SMSC95XX #define CONFIG_MXC_USB_PORT 1 #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 diff --git a/include/configs/stih410-b2260.h b/include/configs/stih410-b2260.h index 33b34ee0cd3..f35d26aa2e0 100644 --- a/include/configs/stih410-b2260.h +++ b/include/configs/stih410-b2260.h @@ -65,11 +65,6 @@ #define CONFIG_USB_OHCI_NEW #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2 -#define CONFIG_USB_HOST_ETHER -#define CONFIG_USB_ETHER_ASIX -#define CONFIG_USB_ETHER_MCS7830 -#define CONFIG_USB_ETHER_SMSC95XX - /* NET Configs */ #endif /* __CONFIG_H */ -- cgit v1.2.3 From c7f85e1f61dd4862787f08a4e5ec4e47a58b05e6 Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Wed, 6 Oct 2021 17:16:23 +0200 Subject: stm32f429: move CONFIG_BOOTCOMMAND in defconfig Move CONFIG_BOOTCOMMAND defined in Kconfig in the board defconfig. Signed-off-by: Patrick Delaunay Reviewed-by: Patrice Chotard --- include/configs/stm32f429-discovery.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include') diff --git a/include/configs/stm32f429-discovery.h b/include/configs/stm32f429-discovery.h index 9b040a0ca35..d0ef18779fb 100644 --- a/include/configs/stm32f429-discovery.h +++ b/include/configs/stm32f429-discovery.h @@ -29,9 +29,6 @@ #define CONFIG_SYS_MALLOC_LEN (2 << 20) -#define CONFIG_BOOTCOMMAND \ - "run bootcmd_romfs" - #define CONFIG_EXTRA_ENV_SETTINGS \ "bootargs_romfs=uclinux.physaddr=0x08180000 root=/dev/mtdblock0\0" \ "bootcmd_romfs=setenv bootargs ${bootargs} ${bootargs_romfs};" \ -- cgit v1.2.3 From b0e763b7b880494e0b5e96ba2ea5accc9f178926 Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Wed, 6 Oct 2021 18:49:47 +0200 Subject: pm9263: Remove unused CONFIG_USER_LOWLEVEL_INIT Remove the latest reference of CONFIG_USER_LOWLEVEL_INIT in code Signed-off-by: Patrick Delaunay Reviewed-by: Patrice Chotard --- include/configs/pm9263.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/configs/pm9263.h b/include/configs/pm9263.h index e825270de8a..8d11759aa0f 100644 --- a/include/configs/pm9263.h +++ b/include/configs/pm9263.h @@ -145,7 +145,6 @@ #define CONFIG_INITRD_TAG 1 #undef CONFIG_SKIP_LOWLEVEL_INIT -#define CONFIG_USER_LOWLEVEL_INIT 1 /* * Hardware drivers -- cgit v1.2.3 From 1d7ad68559e2238d42730c7de0a3d5e159d72cdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pali=20Roh=C3=A1r?= Date: Sun, 26 Sep 2021 00:54:44 +0200 Subject: arm: a37xx: pci: Handle propagation of CRSSVE bit from PCIe Root Port MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now that PCI Bridge (PCIe Root Port) for Aardvark is emulated in U-Boot, add support for handling and propagation of CRSSVE bit. When CRSSVE bit is unset (default), driver has to reissue config read/write request on CRS response. CRSSVE bit is supported only when CRSVIS bit is provided in read-only Root Capabilities register. So manually inject this CRSVIS bit into read response for that register. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún Reviewed-by: Stefan Roese --- include/pci.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/pci.h b/include/pci.h index 11009a2f787..797f224e2fc 100644 --- a/include/pci.h +++ b/include/pci.h @@ -495,6 +495,10 @@ #define PCI_EXP_LNKSTA_DLLLA 0x2000 /* Data Link Layer Link Active */ #define PCI_EXP_SLTCAP 20 /* Slot Capabilities */ #define PCI_EXP_SLTCAP_PSN 0xfff80000 /* Physical Slot Number */ +#define PCI_EXP_RTCTL 28 /* Root Control */ +#define PCI_EXP_RTCTL_CRSSVE 0x0010 /* CRS Software Visibility Enable */ +#define PCI_EXP_RTCAP 30 /* Root Capabilities */ +#define PCI_EXP_RTCAP_CRSVIS 0x0001 /* CRS Software Visibility capability */ #define PCI_EXP_DEVCAP2 36 /* Device Capabilities 2 */ #define PCI_EXP_DEVCAP2_ARI 0x00000020 /* ARI Forwarding Supported */ #define PCI_EXP_DEVCTL2 40 /* Device Control 2 */ -- cgit v1.2.3 From 930c887e0fb88dcf1907f268960330c17999b5a3 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 25 Sep 2021 07:03:06 -0600 Subject: lib: Add memdup() Add a function to duplicate a memory region, a little like strdup(). Signed-off-by: Simon Glass --- include/linux/string.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include') diff --git a/include/linux/string.h b/include/linux/string.h index dd255f21633..3169c93796e 100644 --- a/include/linux/string.h +++ b/include/linux/string.h @@ -129,6 +129,19 @@ extern void * memchr(const void *,int,__kernel_size_t); void *memchr_inv(const void *, int, size_t); #endif +/** + * memdup() - allocate a buffer and copy in the contents + * + * Note that this returns a valid pointer even if @len is 0 + * + * @src: data to copy in + * @len: number of bytes to copy + * @return allocated buffer with the copied contents, or NULL if not enough + * memory is available + * + */ +char *memdup(const void *src, size_t len); + unsigned long ustrtoul(const char *cp, char **endp, unsigned int base); unsigned long long ustrtoull(const char *cp, char **endp, unsigned int base); -- cgit v1.2.3 From 67bc59df05331eaac56cd0a00219d1386130aee2 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 25 Sep 2021 07:03:07 -0600 Subject: Add support for an owned buffer When passing a data buffer back from a function, it is not always clear who owns the buffer, i.e. who is responsible for freeing the memory used. An example of this is where multiple files are decompressed from the firmware image, using a temporary buffer for reading (since the compressed data has to live somewhere) and producing a temporary or permanent buffer with the resuilts. Where the firmware image can be memory-mapped, as on x86, the compressed data does not need to be buffered, but the complexity of having a buffer which is either allocated or not, makes the code hard to understand. Introduce a new 'abuf' which supports simple buffer operations: - encapsulating a buffer and its size - either allocated with malloc() or not - able to be reliably freed if necessary - able to be converted to an allocated buffer if needed This simple API makes it easier to deal with allocated and memory-mapped buffers. Signed-off-by: Simon Glass --- include/abuf.h | 159 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 include/abuf.h (limited to 'include') diff --git a/include/abuf.h b/include/abuf.h new file mode 100644 index 00000000000..d230f72806d --- /dev/null +++ b/include/abuf.h @@ -0,0 +1,159 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Handles a buffer that can be allocated and freed + * + * Copyright 2021 Google LLC + * Written by Simon Glass + */ + +#ifndef __ABUF_H +#define __ABUF_H + +#include + +/** + * struct abuf - buffer that can be allocated and freed + * + * This is useful for a block of data which may be allocated with malloc(), or + * not, so that it needs to be freed correctly when finished with. + * + * For now it has a very simple purpose. + * + * Using memset() to zero all fields is guaranteed to be equivalent to + * abuf_init(). + * + * @data: Pointer to data + * @size: Size of data in bytes + * @alloced: true if allocated with malloc(), so must be freed after use + */ +struct abuf { + void *data; + size_t size; + bool alloced; +}; + +static inline void *abuf_data(const struct abuf *abuf) +{ + return abuf->data; +} + +static inline size_t abuf_size(const struct abuf *abuf) +{ + return abuf->size; +} + +/** + * abuf_set() - set the (unallocated) data in a buffer + * + * This simply makes the abuf point to the supplied data, which must be live + * for the lifetime of the abuf. It is not alloced. + * + * Any existing data in the abuf is freed and the alloced member is set to + * false. + * + * @abuf: abuf to adjust + * @data: New contents of abuf + * @size: New size of abuf + */ +void abuf_set(struct abuf *abuf, void *data, size_t size); + +/** + * abuf_map_sysmem() - calls map_sysmem() to set up an abuf + * + * This is equivalent to abuf_set(abuf, map_sysmem(addr, size), size) + * + * Any existing data in the abuf is freed and the alloced member is set to + * false. + * + * @abuf: abuf to adjust + * @addr: Address to set the abuf to + * @size: New size of abuf + */ +void abuf_map_sysmem(struct abuf *abuf, ulong addr, size_t size); + +/** + * abuf_realloc() - Change the size of a buffer + * + * This uses realloc() to change the size of the buffer, with the same semantics + * as that function. If the abuf is not currently alloced, then it will alloc + * it if the size needs to increase (i.e. set the alloced member to true) + * + * @abuf: abuf to adjust + * @new_size: new size in bytes. + * if 0, the abuf is freed + * if greater than the current size, the abuf is extended and the new + * space is not inited. The alloced member is set to true + * if less than the current size, the abuf is contracted and the data at + * the end is lost. If @new_size is 0, this sets the alloced member to + * false + * @return true if OK, false if out of memory + */ +bool abuf_realloc(struct abuf *abuf, size_t new_size); + +/** + * abuf_uninit_move() - Return the allocated contents and uninit the abuf + * + * This returns the abuf data to the caller, allocating it if necessary, so that + * the caller receives data that it can be sure will hang around. The caller is + * responsible for freeing the data. + * + * If the abuf has allocated data, it is returned. If the abuf has data but it + * is not allocated, then it is first allocated, then returned. + * + * If the abuf size is 0, this returns NULL + * + * The abuf is uninited as part of this, except if the allocation fails, in + * which NULL is returned and the abuf remains untouched. + * + * The abuf must be inited before this can be called. + * + * @abuf: abuf to uninit + * @sizep: if non-NULL, returns the size of the returned data + * @return data contents, allocated with malloc(), or NULL if the data could not + * be allocated, or the data size is 0 + */ +void *abuf_uninit_move(struct abuf *abuf, size_t *sizep); + +/** + * abuf_init_move() - Make abuf take over the management of an allocated region + * + * After this, @data must not be used. All access must be via the abuf. + * + * @abuf: abuf to init + * @data: Existing allocated buffer to place in the abuf + * @size: Size of allocated buffer + */ +void abuf_init_move(struct abuf *abuf, void *data, size_t size); + +/** + * abuf_init_set() - Set up a new abuf + * + * Inits a new abuf and sets up its (unallocated) data + * + * @abuf: abuf to set up + * @data: New contents of abuf + * @size: New size of abuf + */ +void abuf_init_set(struct abuf *abuf, void *data, size_t size); + +/** + * abuf_uninit() - Free any memory used by an abuf + * + * The buffer must be inited before this can be called. + * + * @abuf: abuf to uninit + */ +void abuf_uninit(struct abuf *abuf); + +/** + * abuf_init() - Set up a new abuf + * + * This initially has no data and alloced is set to false. This is equivalent to + * setting all fields to 0, e.g. with memset(), so callers can do that instead + * if desired. + * + * @abuf: abuf to set up + */ +void abuf_init(struct abuf *abuf); + +#endif -- cgit v1.2.3 From c45b7920db21c8e0be89b15ea034ff3e9edb8e1d Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 25 Sep 2021 07:03:08 -0600 Subject: compiler: Add a comment to host_build() This function should have a comment explaining what it does. Add one. Signed-off-by: Simon Glass --- include/compiler.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/compiler.h b/include/compiler.h index 27b9843497a..67e52050b12 100644 --- a/include/compiler.h +++ b/include/compiler.h @@ -151,6 +151,11 @@ typedef unsigned long int uintptr_t; #define MEM_SUPPORT_64BIT_DATA 0 #endif +/** + * host_build() - check if we are building for the host + * + * @return true if building for the host, false if for a target + */ static inline bool host_build(void) { #ifdef USE_HOSTCC return true; -- cgit v1.2.3 From 94d0a2efc0315e2c5e3b62a7420292f0ce058079 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 25 Sep 2021 07:03:09 -0600 Subject: zstd: Create a function for use from U-Boot The existing zstd API requires the same sequence of calls to perform its task. Create a helper for U-Boot, to avoid code duplication, as is done with other compression algorithms. Make use of of this from the image code. Note that the zstd code lacks a test in test/compression.c and this should be added by the maintainer. Signed-off-by: Simon Glass --- include/linux/zstd.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include') diff --git a/include/linux/zstd.h b/include/linux/zstd.h index 724f69350e0..35ba4c90aa4 100644 --- a/include/linux/zstd.h +++ b/include/linux/zstd.h @@ -1144,4 +1144,15 @@ size_t ZSTD_decompressBlock(ZSTD_DCtx *dctx, void *dst, size_t dstCapacity, size_t ZSTD_insertBlock(ZSTD_DCtx *dctx, const void *blockStart, size_t blockSize); +struct abuf; + +/** + * zstd_decompress() - Decompress Zstandard data + * + * @in: Input buffer to decompress + * @out: Output buffer to hold the results (must be large enough) + * @return size of the decompressed data, or -ve on error + */ +int zstd_decompress(struct abuf *in, struct abuf *out); + #endif /* ZSTD_H */ -- cgit v1.2.3 From 5a4f10d71bfe2b7a5646cf1f96b298805b36df7a Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 25 Sep 2021 07:03:13 -0600 Subject: gzip: Avoid use of u64 The gzip API uses the u64 type in it, which is not available in the host build. This makes it impossible to include the header file. We could make this type available, but it seems unnecessary. Limiting the compression size to that of the 'unsigned long' type seems good enough. On 32-bit machines the limit then becomes 4GB, which likely exceeds available RAM anyway, therefore it should be sufficient. On 64-bit machines this is effectively u64 anyway. Update the header file and implementation to use 'ulong' instead of 'u64'. Add a definition of u32 for the cases that seem to need exactly that length. This should be safe enough. Signed-off-by: Simon Glass --- include/compiler.h | 3 +++ include/gzip.h | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/compiler.h b/include/compiler.h index 67e52050b12..6b0d3bf5374 100644 --- a/include/compiler.h +++ b/include/compiler.h @@ -68,6 +68,9 @@ typedef uint32_t __u32; typedef unsigned int uint; typedef unsigned long ulong; +/* Define these on the host so we can build some target code */ +typedef __u32 u32; + #define uswap_16(x) \ ((((x) & 0xff00) >> 8) | \ (((x) & 0x00ff) << 8)) diff --git a/include/gzip.h b/include/gzip.h index 783acbb60d2..cb4db3d70fe 100644 --- a/include/gzip.h +++ b/include/gzip.h @@ -54,11 +54,11 @@ int zunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp, * gzwrite_progress_finish called at end of loop to * indicate success (retcode=0) or failure */ -void gzwrite_progress_init(u64 expected_size); +void gzwrite_progress_init(ulong expected_size); -void gzwrite_progress(int iteration, u64 bytes_written, u64 total_bytes); +void gzwrite_progress(int iteration, ulong bytes_written, ulong total_bytes); -void gzwrite_progress_finish(int retcode, u64 totalwritten, u64 totalsize, +void gzwrite_progress_finish(int retcode, ulong totalwritten, ulong totalsize, u32 expected_crc, u32 calculated_crc); /** @@ -74,7 +74,7 @@ void gzwrite_progress_finish(int retcode, u64 totalwritten, u64 totalsize, * @return 0 if OK, -1 on error */ int gzwrite(unsigned char *src, int len, struct blk_desc *dev, ulong szwritebuf, - u64 startoffs, u64 szexpected); + ulong startoffs, ulong szexpected); /** * gzip()- Compress data into a buffer using the gzip algorithm -- cgit v1.2.3 From 2ac00c050582389e667374bccc5cc19b4fce80f5 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 25 Sep 2021 07:03:18 -0600 Subject: image: Create a function to do manual relocation Rather than adding an #ifdef and open-coding this calculation, add a helper function to handle it. Use this in the image code. Signed-off-by: Simon Glass --- include/relocate.h | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/relocate.h b/include/relocate.h index 9ceeecdbe71..c4fad336128 100644 --- a/include/relocate.h +++ b/include/relocate.h @@ -7,7 +7,11 @@ #ifndef _RELOCATE_H_ #define _RELOCATE_H_ -#include +#ifndef USE_HOSTCC +#include + +DECLARE_GLOBAL_DATA_PTR; +#endif /** * copy_uboot_to_ram() - Copy U-Boot to its new relocated position @@ -35,4 +39,22 @@ int clear_bss(void); */ int do_elf_reloc_fixups(void); +/** + * manual_reloc() - Manually relocate a pointer if needed + * + * This is a nop in almost all cases, except for the systems with a broken gcc + * which need to manually relocate some things. + * + * @ptr: Pointer to relocate + * @return new pointer value + */ +static inline void *manual_reloc(void *ptr) +{ +#ifndef USE_HOSTCC + if (IS_ENABLED(CONFIG_NEEDS_MANUAL_RELOC)) + return ptr + gd->reloc_off; +#endif + return ptr; +} + #endif /* _RELOCATE_H_ */ -- cgit v1.2.3 From c5a68d29e38ce25646ee42eb49a29364aab84531 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 25 Sep 2021 07:03:19 -0600 Subject: image: Avoid #ifdefs for manual relocation Add a macro to handle manually relocating a pointer. Update the iamge code to use this to avoid needing #ifdefs. This also fixes a bug where the 'done' flag was not set. Signed-off-by: Simon Glass --- include/relocate.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/relocate.h b/include/relocate.h index c4fad336128..26682da955f 100644 --- a/include/relocate.h +++ b/include/relocate.h @@ -57,4 +57,10 @@ static inline void *manual_reloc(void *ptr) return ptr; } +#if !defined(USE_HOSTCC) && defined(CONFIG_NEEDS_MANUAL_RELOC) +#define MANUAL_RELOC(ptr) (ptr) = manual_reloc(ptr) +#else +#define MANUAL_RELOC(ptr) (void)(ptr) +#endif + #endif /* _RELOCATE_H_ */ -- cgit v1.2.3 From c9d6b5b5dcce6820ea794af5f046803cdd43b37b Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 25 Sep 2021 19:43:14 -0600 Subject: compiler: Rename host_build() to tools_build() With the new TOOLS_LIBCRYPTO and some other changes, it seems that we are heading towards calling this a tools build rather than a host build, although of course it does happen on the host. I cannot think of anything built by the host which cannot be described as a tool, so rename this function. Signed-off-by: Simon Glass Reviewed-by: Alexandru Gagniuc --- include/compiler.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/compiler.h b/include/compiler.h index 6b0d3bf5374..8cf11792e24 100644 --- a/include/compiler.h +++ b/include/compiler.h @@ -155,11 +155,12 @@ typedef unsigned long int uintptr_t; #endif /** - * host_build() - check if we are building for the host + * tools_build() - check if we are building host tools * * @return true if building for the host, false if for a target */ -static inline bool host_build(void) { +static inline bool tools_build(void) +{ #ifdef USE_HOSTCC return true; #else -- cgit v1.2.3 From 5500a408dd81d5e5718a0fcd98ce55586d125853 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 25 Sep 2021 19:43:15 -0600 Subject: kconfig: Add tools support to CONFIG_IS_ENABLED() At present we must separately test for the host build for many options, since we force them to be enabled. For example, CONFIG_FIT is always enabled in the host tools, even if CONFIG_FIT is not enabled by the board itself. It would be more convenient if we could use, for example, CONFIG_IS_ENABLED(FIT) and get CONFIG_HOST_FIT, when building for the host. Add support for this. With this and the tools_build() function, we should be able to remove all the #ifdefs currently needed in code that is build by tools and targets. This will be even nicer when we move to using CONFIG(xxx) everywhere, since all the #ifdef and IS_ENABLED/CONFIG_IS_ENABLED stuff will go away. Signed-off-by: Simon Glass Suggested-by: Rasmus Villemoes # b4f73886 Reviewed-by: Alexandru Gagniuc --- include/linux/kconfig.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/linux/kconfig.h b/include/linux/kconfig.h index d109ed3119e..a1d1a298426 100644 --- a/include/linux/kconfig.h +++ b/include/linux/kconfig.h @@ -31,11 +31,14 @@ (config_enabled(option)) /* - * U-Boot add-on: Helper macros to reference to different macros - * (CONFIG_ or CONFIG_SPL_ prefixed), depending on the build context. + * U-Boot add-on: Helper macros to reference to different macros (prefixed by + * CONFIG_, CONFIG_SPL_, CONFIG_TPL_ or CONFIG_TOOLS_), depending on the build + * context. */ -#if defined(CONFIG_TPL_BUILD) +#ifdef USE_HOSTCC +#define _CONFIG_PREFIX TOOLS_ +#elif defined(CONFIG_TPL_BUILD) #define _CONFIG_PREFIX TPL_ #elif defined(CONFIG_SPL_BUILD) #define _CONFIG_PREFIX SPL_ @@ -49,6 +52,7 @@ /* * CONFIG_VAL(FOO) evaluates to the value of + * CONFIG_TOOLS_FOO if USE_HOSTCC is defined, * CONFIG_FOO if CONFIG_SPL_BUILD is undefined, * CONFIG_SPL_FOO if CONFIG_SPL_BUILD is defined. * CONFIG_TPL_FOO if CONFIG_TPL_BUILD is defined. @@ -76,18 +80,21 @@ /* * CONFIG_IS_ENABLED(FOO) expands to + * 1 if USE_HOSTCC is defined and CONFIG_TOOLS_FOO is set to 'y', * 1 if CONFIG_SPL_BUILD is undefined and CONFIG_FOO is set to 'y', * 1 if CONFIG_SPL_BUILD is defined and CONFIG_SPL_FOO is set to 'y', * 1 if CONFIG_TPL_BUILD is defined and CONFIG_TPL_FOO is set to 'y', * 0 otherwise. * * CONFIG_IS_ENABLED(FOO, (abc)) expands to + * abc if USE_HOSTCC is defined and CONFIG_TOOLS_FOO is set to 'y', * abc if CONFIG_SPL_BUILD is undefined and CONFIG_FOO is set to 'y', * abc if CONFIG_SPL_BUILD is defined and CONFIG_SPL_FOO is set to 'y', * abc if CONFIG_TPL_BUILD is defined and CONFIG_TPL_FOO is set to 'y', * nothing otherwise. * * CONFIG_IS_ENABLED(FOO, (abc), (def)) expands to + * abc if USE_HOSTCC is defined and CONFIG_TOOLS_FOO is set to 'y', * abc if CONFIG_SPL_BUILD is undefined and CONFIG_FOO is set to 'y', * abc if CONFIG_SPL_BUILD is defined and CONFIG_SPL_FOO is set to 'y', * abc if CONFIG_TPL_BUILD is defined and CONFIG_TPL_FOO is set to 'y', -- cgit v1.2.3 From 2c21256b27d70b5950bd059330cdab027fb6ab7e Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 25 Sep 2021 19:43:18 -0600 Subject: hash: Use Kconfig to enable hashing in host tools and SPL At present when building host tools, we force CONFIG_SHAxxx to be enabled regardless of the board Kconfig setting. This is done in the image.h header file. For SPL we currently just assume the algorithm is desired if U-Boot proper enables it. Clean this up by adding new Kconfig options to enable hashing on the host, relying on CONFIG_IS_ENABLED() to deal with the different builds. Add new SPL Kconfigs for hardware-accelerated hashing, to maintain the current settings. This allows us to drop the image.h code and the I_WANT_MD5 hack. Signed-off-by: Simon Glass Reviewed-by: Alexandru Gagniuc --- include/fdt_support.h | 2 +- include/hash.h | 6 +++++- include/image.h | 5 ----- 3 files changed, 6 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/fdt_support.h b/include/fdt_support.h index 72a5b90c97c..88d129c8038 100644 --- a/include/fdt_support.h +++ b/include/fdt_support.h @@ -7,7 +7,7 @@ #ifndef __FDT_SUPPORT_H #define __FDT_SUPPORT_H -#ifdef CONFIG_OF_LIBFDT +#if defined(CONFIG_OF_LIBFDT) && !defined(USE_HOSTCC) #include #include diff --git a/include/hash.h b/include/hash.h index 97bb3ed5d9a..cfafbe70064 100644 --- a/include/hash.h +++ b/include/hash.h @@ -6,13 +6,17 @@ #ifndef _HASH_H #define _HASH_H +#ifdef USE_HOSTCC +#include +#endif + struct cmd_tbl; /* * Maximum digest size for all algorithms we support. Having this value * avoids a malloc() or C99 local declaration in common/cmd_hash.c. */ -#if defined(CONFIG_SHA384) || defined(CONFIG_SHA512) +#if CONFIG_IS_ENABLED(SHA384) || CONFIG_IS_ENABLED(SHA512) #define HASH_MAX_DIGEST_SIZE 64 #else #define HASH_MAX_DIGEST_SIZE 32 diff --git a/include/image.h b/include/image.h index 73a763a6936..03857f4b500 100644 --- a/include/image.h +++ b/include/image.h @@ -31,11 +31,6 @@ struct fdt_region; #define IMAGE_ENABLE_OF_LIBFDT 1 #define CONFIG_FIT_VERBOSE 1 /* enable fit_format_{error,warning}() */ #define CONFIG_FIT_RSASSA_PSS 1 -#define CONFIG_MD5 -#define CONFIG_SHA1 -#define CONFIG_SHA256 -#define CONFIG_SHA384 -#define CONFIG_SHA512 #define IMAGE_ENABLE_IGNORE 0 #define IMAGE_INDENT_STRING "" -- cgit v1.2.3 From bf371b4cf599ad1a448577daaba997a0b0ba6c9c Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 25 Sep 2021 19:43:20 -0600 Subject: image: Drop IMAGE_ENABLE_FIT Make use of the host Kconfig for FIT. With this we can use CONFIG_IS_ENABLED(FIT) directly in the host build, so drop the unnecessary indirection. Signed-off-by: Simon Glass Reviewed-by: Alexandru Gagniuc --- include/image.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/include/image.h b/include/image.h index 03857f4b500..6c229212cb1 100644 --- a/include/image.h +++ b/include/image.h @@ -25,9 +25,9 @@ struct fdt_region; #ifdef USE_HOSTCC #include +#include /* new uImage format support enabled on host */ -#define IMAGE_ENABLE_FIT 1 #define IMAGE_ENABLE_OF_LIBFDT 1 #define CONFIG_FIT_VERBOSE 1 /* enable fit_format_{error,warning}() */ #define CONFIG_FIT_RSASSA_PSS 1 @@ -46,16 +46,15 @@ struct fdt_region; #define IMAGE_ENABLE_IGNORE 1 #define IMAGE_INDENT_STRING " " -#define IMAGE_ENABLE_FIT CONFIG_IS_ENABLED(FIT) #define IMAGE_ENABLE_OF_LIBFDT CONFIG_IS_ENABLED(OF_LIBFDT) #endif /* USE_HOSTCC */ -#if IMAGE_ENABLE_FIT +#if CONFIG_IS_ENABLED(FIT) #include #include #include -#endif /* IMAGE_ENABLE_FIT */ +#endif /* FIT */ #ifdef CONFIG_SYS_BOOT_GET_CMDLINE # define IMAGE_BOOT_GET_CMDLINE 1 @@ -328,7 +327,7 @@ typedef struct bootm_headers { image_header_t legacy_hdr_os_copy; /* header copy */ ulong legacy_hdr_valid; -#if IMAGE_ENABLE_FIT +#if CONFIG_IS_ENABLED(FIT) const char *fit_uname_cfg; /* configuration node unit name */ void *fit_hdr_os; /* os FIT image header */ @@ -983,7 +982,7 @@ int booti_setup(ulong image, ulong *relocated_addr, ulong *size, #define FIT_MAX_HASH_LEN HASH_MAX_DIGEST_SIZE -#if IMAGE_ENABLE_FIT +#if CONFIG_IS_ENABLED(FIT) /* cmdline argument format parsing */ int fit_parse_conf(const char *spec, ulong addr_curr, ulong *addr, const char **conf_name); @@ -1157,7 +1156,7 @@ int fit_conf_get_prop_node(const void *fit, int noffset, int fit_check_ramdisk(const void *fit, int os_noffset, uint8_t arch, int verify); -#endif /* IMAGE_ENABLE_FIT */ +#endif /* FIT */ int calculate_hash(const void *data, int data_len, const char *algo, uint8_t *value, int *value_len); @@ -1180,7 +1179,7 @@ int calculate_hash(const void *data, int data_len, const char *algo, # define FIT_IMAGE_ENABLE_VERIFY CONFIG_IS_ENABLED(FIT_SIGNATURE) #endif -#if IMAGE_ENABLE_FIT +#if CONFIG_IS_ENABLED(FIT) #ifdef USE_HOSTCC void *image_get_host_blob(void); void image_set_host_blob(void *host_blob); @@ -1335,7 +1334,7 @@ struct crypto_algo *image_get_crypto_algo(const char *full_name); */ struct padding_algo *image_get_padding_algo(const char *name); -#if IMAGE_ENABLE_FIT +#if CONFIG_IS_ENABLED(FIT) /** * fit_image_verify_required_sigs() - Verify signatures marked as 'required' -- cgit v1.2.3 From 0c303f9a6628de9664b4f9140464a6f9d8224c36 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 25 Sep 2021 19:43:21 -0600 Subject: image: Drop IMAGE_ENABLE_OF_LIBFDT Add a host Kconfig for OF_LIBFDT. With this we can use CONFIG_IS_ENABLED(OF_LIBFDT) directly in the tools build, so drop the unnecessary indirection. Signed-off-by: Simon Glass Reviewed-by: Alexandru Gagniuc --- include/image.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include') diff --git a/include/image.h b/include/image.h index 6c229212cb1..f09eb9de516 100644 --- a/include/image.h +++ b/include/image.h @@ -28,7 +28,6 @@ struct fdt_region; #include /* new uImage format support enabled on host */ -#define IMAGE_ENABLE_OF_LIBFDT 1 #define CONFIG_FIT_VERBOSE 1 /* enable fit_format_{error,warning}() */ #define CONFIG_FIT_RSASSA_PSS 1 @@ -46,8 +45,6 @@ struct fdt_region; #define IMAGE_ENABLE_IGNORE 1 #define IMAGE_INDENT_STRING " " -#define IMAGE_ENABLE_OF_LIBFDT CONFIG_IS_ENABLED(OF_LIBFDT) - #endif /* USE_HOSTCC */ #if CONFIG_IS_ENABLED(FIT) -- cgit v1.2.3 From e059157f0d5737b63fe2f1fec145509d82508109 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 25 Sep 2021 19:43:22 -0600 Subject: image: Use Kconfig to enable CONFIG_FIT_VERBOSE on host Add a host Kconfig for FIT_VERBOSE. With this we can use CONFIG_IS_ENABLED(FIT_VERBOSE) directly in the tools build, so drop the forcing of this in the image.h header. Signed-off-by: Simon Glass Reviewed-by: Alexandru Gagniuc --- include/image.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/image.h b/include/image.h index f09eb9de516..6efbef06e64 100644 --- a/include/image.h +++ b/include/image.h @@ -28,7 +28,6 @@ struct fdt_region; #include /* new uImage format support enabled on host */ -#define CONFIG_FIT_VERBOSE 1 /* enable fit_format_{error,warning}() */ #define CONFIG_FIT_RSASSA_PSS 1 #define IMAGE_ENABLE_IGNORE 0 @@ -1458,7 +1457,7 @@ int fit_image_cipher_get_algo(const void *fit, int noffset, char **algo); struct cipher_algo *image_get_cipher_algo(const char *full_name); -#ifdef CONFIG_FIT_VERBOSE +#if CONFIG_IS_ENABLED(FIT_VERBOSE) #define fit_unsupported(msg) printf("! %s:%d " \ "FIT images not supported for '%s'\n", \ __FILE__, __LINE__, (msg)) @@ -1470,7 +1469,7 @@ struct cipher_algo *image_get_cipher_algo(const char *full_name); #else #define fit_unsupported(msg) #define fit_unsupported_reset(msg) -#endif /* CONFIG_FIT_VERBOSE */ +#endif /* FIT_VERBOSE */ #endif /* CONFIG_FIT */ #if !defined(USE_HOSTCC) -- cgit v1.2.3 From 2bbed3ff8c7fa0c0fa3fd28a9497bf7a99e3388b Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 25 Sep 2021 19:43:23 -0600 Subject: image: Use Kconfig to enable FIT_RSASSA_PSS on host Add a host Kconfig for FIT_RSASSA_PSS. With this we can use CONFIG_IS_ENABLED(FIT_RSASSA_PSS) directly in the host build, so drop the forcing of this in the image.h header. Drop the #ifdef around padding_pss_verify() too since it is not needed. Use the compiler to check the config where possible, instead of the preprocessor. Signed-off-by: Simon Glass Reviewed-by: Alexandru Gagniuc --- include/image.h | 3 --- include/u-boot/rsa.h | 2 -- 2 files changed, 5 deletions(-) (limited to 'include') diff --git a/include/image.h b/include/image.h index 6efbef06e64..dc872ef5b24 100644 --- a/include/image.h +++ b/include/image.h @@ -27,9 +27,6 @@ struct fdt_region; #include #include -/* new uImage format support enabled on host */ -#define CONFIG_FIT_RSASSA_PSS 1 - #define IMAGE_ENABLE_IGNORE 0 #define IMAGE_INDENT_STRING "" diff --git a/include/u-boot/rsa.h b/include/u-boot/rsa.h index 89a9c4caa0a..7556aa5b4b7 100644 --- a/include/u-boot/rsa.h +++ b/include/u-boot/rsa.h @@ -103,11 +103,9 @@ int padding_pkcs_15_verify(struct image_sign_info *info, uint8_t *msg, int msg_len, const uint8_t *hash, int hash_len); -#ifdef CONFIG_FIT_RSASSA_PSS int padding_pss_verify(struct image_sign_info *info, uint8_t *msg, int msg_len, const uint8_t *hash, int hash_len); -#endif /* CONFIG_FIT_RSASSA_PSS */ #define RSA_DEFAULT_PADDING_NAME "pkcs-1.5" -- cgit v1.2.3 From 806d1ff37b0afe8cbf5658dc01876f6321aed235 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 25 Sep 2021 19:43:25 -0600 Subject: image: Drop IMAGE_BOOT_GET_CMDLINE This is not needed with Kconfig, since we can use IS_ENABLED() easily enough and the board code is now in a separate file. Update the only place where this is used and drop it. Signed-off-by: Simon Glass Reviewed-by: Alexandru Gagniuc --- include/image.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'include') diff --git a/include/image.h b/include/image.h index dc872ef5b24..00a80999584 100644 --- a/include/image.h +++ b/include/image.h @@ -49,12 +49,6 @@ struct fdt_region; #include #endif /* FIT */ -#ifdef CONFIG_SYS_BOOT_GET_CMDLINE -# define IMAGE_BOOT_GET_CMDLINE 1 -#else -# define IMAGE_BOOT_GET_CMDLINE 0 -#endif - #ifdef CONFIG_OF_BOARD_SETUP # define IMAGE_OF_BOARD_SETUP 1 #else -- cgit v1.2.3 From 30ba2828652915d29892146022ed92b2bd524ad6 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 25 Sep 2021 19:43:26 -0600 Subject: image: Drop IMAGE_OF_BOARD_SETUP This is not needed with Kconfig, since we can use IS_ENABLED() easily enough. Drop it. Signed-off-by: Simon Glass Reviewed-by: Alexandru Gagniuc --- include/image.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'include') diff --git a/include/image.h b/include/image.h index 00a80999584..e1e4148e4c8 100644 --- a/include/image.h +++ b/include/image.h @@ -49,12 +49,6 @@ struct fdt_region; #include #endif /* FIT */ -#ifdef CONFIG_OF_BOARD_SETUP -# define IMAGE_OF_BOARD_SETUP 1 -#else -# define IMAGE_OF_BOARD_SETUP 0 -#endif - #ifdef CONFIG_OF_SYSTEM_SETUP # define IMAGE_OF_SYSTEM_SETUP 1 #else -- cgit v1.2.3 From 3ac0f504125e2f97364ba8cc6bc95c1e350bd35a Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 25 Sep 2021 19:43:27 -0600 Subject: image: Drop IMAGE_OF_SYSTEM_SETUP This is not needed with Kconfig, since we can use IS_ENABLED() easily enough. Drop it. Signed-off-by: Simon Glass Reviewed-by: Alexandru Gagniuc --- include/image.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'include') diff --git a/include/image.h b/include/image.h index e1e4148e4c8..e190f59232d 100644 --- a/include/image.h +++ b/include/image.h @@ -49,12 +49,6 @@ struct fdt_region; #include #endif /* FIT */ -#ifdef CONFIG_OF_SYSTEM_SETUP -# define IMAGE_OF_SYSTEM_SETUP 1 -#else -# define IMAGE_OF_SYSTEM_SETUP 0 -#endif - extern ulong image_load_addr; /* Default Load Address */ extern ulong image_save_addr; /* Default Save Address */ extern ulong image_save_size; /* Default Save Size */ -- cgit v1.2.3 From fa13940740e5ce1822611205bb8ac329c91306fd Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 25 Sep 2021 19:43:28 -0600 Subject: image: Drop IMAGE_ENABLE_IGNORE We can use the new host_build() function for this, so drop it. Signed-off-by: Simon Glass Reviewed-by: Alexandru Gagniuc --- include/image.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include') diff --git a/include/image.h b/include/image.h index e190f59232d..a236180ccdd 100644 --- a/include/image.h +++ b/include/image.h @@ -27,7 +27,6 @@ struct fdt_region; #include #include -#define IMAGE_ENABLE_IGNORE 0 #define IMAGE_INDENT_STRING "" #else @@ -37,8 +36,6 @@ struct fdt_region; #include #include -/* Take notice of the 'ignore' property for hashes */ -#define IMAGE_ENABLE_IGNORE 1 #define IMAGE_INDENT_STRING " " #endif /* USE_HOSTCC */ -- cgit v1.2.3 From 0ab5e027045f78973b7b7d52a71a89a707398f9f Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 25 Sep 2021 19:43:32 -0600 Subject: image: Tidy up fit_unsupported_reset() This function is only used in one place and does not need to use the preprocessor. Move it to the C file and convert it to a normal function. Drop fit_unsupported() since it is not used. Signed-off-by: Simon Glass --- include/image.h | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'include') diff --git a/include/image.h b/include/image.h index a236180ccdd..e397da80a55 100644 --- a/include/image.h +++ b/include/image.h @@ -1433,19 +1433,6 @@ int fit_image_cipher_get_algo(const void *fit, int noffset, char **algo); struct cipher_algo *image_get_cipher_algo(const char *full_name); -#if CONFIG_IS_ENABLED(FIT_VERBOSE) -#define fit_unsupported(msg) printf("! %s:%d " \ - "FIT images not supported for '%s'\n", \ - __FILE__, __LINE__, (msg)) - -#define fit_unsupported_reset(msg) printf("! %s:%d " \ - "FIT images not supported for '%s' " \ - "- must reset board to recover!\n", \ - __FILE__, __LINE__, (msg)) -#else -#define fit_unsupported(msg) -#define fit_unsupported_reset(msg) -#endif /* FIT_VERBOSE */ #endif /* CONFIG_FIT */ #if !defined(USE_HOSTCC) -- cgit v1.2.3 From 13c133b995decefdc64160f1df2c58e5bf342e28 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 25 Sep 2021 19:43:33 -0600 Subject: image: Drop unnecessary #ifdefs from image.h This file has a lot of conditional code and much of it is unnecessary. Clean this up to reduce the number of build combinations. Signed-off-by: Simon Glass --- include/image.h | 39 ++++----------------------------------- include/u-boot/hash-checksum.h | 5 +++-- 2 files changed, 7 insertions(+), 37 deletions(-) (limited to 'include') diff --git a/include/image.h b/include/image.h index e397da80a55..04eccb12a92 100644 --- a/include/image.h +++ b/include/image.h @@ -40,11 +40,10 @@ struct fdt_region; #endif /* USE_HOSTCC */ -#if CONFIG_IS_ENABLED(FIT) #include #include #include -#endif /* FIT */ +#include extern ulong image_load_addr; /* Default Load Address */ extern ulong image_save_addr; /* Default Save Address */ @@ -504,8 +503,7 @@ int genimg_get_type_id(const char *name); int genimg_get_comp_id(const char *name); void genimg_print_size(uint32_t size); -#if defined(CONFIG_TIMESTAMP) || defined(CONFIG_CMD_DATE) || \ - defined(USE_HOSTCC) +#if defined(CONFIG_TIMESTAMP) || defined(CONFIG_CMD_DATE) || defined(USE_HOSTCC) #define IMAGE_ENABLE_TIMESTAMP 1 #else #define IMAGE_ENABLE_TIMESTAMP 0 @@ -523,12 +521,9 @@ enum fit_load_op { int boot_get_setup(bootm_headers_t *images, uint8_t arch, ulong *setup_start, ulong *setup_len); -#ifndef USE_HOSTCC /* Image format types, returned by _get_format() routine */ #define IMAGE_FORMAT_INVALID 0x00 -#if defined(CONFIG_LEGACY_IMAGE_FORMAT) #define IMAGE_FORMAT_LEGACY 0x01 /* legacy image_header based format */ -#endif #define IMAGE_FORMAT_FIT 0x02 /* new, libfdt based format */ #define IMAGE_FORMAT_ANDROID 0x03 /* Android boot image */ @@ -567,7 +562,6 @@ int boot_get_ramdisk(int argc, char *const argv[], bootm_headers_t *images, */ int boot_get_loadable(int argc, char *const argv[], bootm_headers_t *images, uint8_t arch, const ulong *ld_start, ulong *const ld_len); -#endif /* !USE_HOSTCC */ int boot_get_setup_fit(bootm_headers_t *images, uint8_t arch, ulong *setup_start, ulong *setup_len); @@ -644,7 +638,6 @@ int fit_image_load(bootm_headers_t *images, ulong addr, */ int image_source_script(ulong addr, const char *fit_uname); -#ifndef USE_HOSTCC /** * fit_get_node_from_config() - Look up an image a FIT by type * @@ -684,10 +677,7 @@ int boot_relocate_fdt(struct lmb *lmb, char **of_flat_tree, ulong *of_size); int boot_ramdisk_high(struct lmb *lmb, ulong rd_data, ulong rd_len, ulong *initrd_start, ulong *initrd_end); int boot_get_cmdline(struct lmb *lmb, ulong *cmd_start, ulong *cmd_end); -#ifdef CONFIG_SYS_BOOT_GET_KBD int boot_get_kbd(struct lmb *lmb, struct bd_info **kbd); -#endif /* CONFIG_SYS_BOOT_GET_KBD */ -#endif /* !USE_HOSTCC */ /*******************************************************************/ /* Legacy format specific code (prefixed with image_) */ @@ -802,11 +792,9 @@ static inline int image_check_type(const image_header_t *hdr, uint8_t type) } static inline int image_check_arch(const image_header_t *hdr, uint8_t arch) { -#ifndef USE_HOSTCC /* Let's assume that sandbox can load any architecture */ - if (IS_ENABLED(CONFIG_SANDBOX)) + if (!tools_build() && IS_ENABLED(CONFIG_SANDBOX)) return true; -#endif return (image_get_arch(hdr) == arch) || (image_get_arch(hdr) == IH_ARCH_ARM && arch == IH_ARCH_ARM64); } @@ -954,7 +942,6 @@ int booti_setup(ulong image, ulong *relocated_addr, ulong *size, #define FIT_MAX_HASH_LEN HASH_MAX_DIGEST_SIZE -#if CONFIG_IS_ENABLED(FIT) /* cmdline argument format parsing */ int fit_parse_conf(const char *spec, ulong addr_curr, ulong *addr, const char **conf_name); @@ -1128,7 +1115,6 @@ int fit_conf_get_prop_node(const void *fit, int noffset, int fit_check_ramdisk(const void *fit, int os_noffset, uint8_t arch, int verify); -#endif /* FIT */ int calculate_hash(const void *data, int data_len, const char *algo, uint8_t *value, int *value_len); @@ -1151,7 +1137,6 @@ int calculate_hash(const void *data, int data_len, const char *algo, # define FIT_IMAGE_ENABLE_VERIFY CONFIG_IS_ENABLED(FIT_SIGNATURE) #endif -#if CONFIG_IS_ENABLED(FIT) #ifdef USE_HOSTCC void *image_get_host_blob(void); void image_set_host_blob(void *host_blob); @@ -1160,8 +1145,6 @@ void image_set_host_blob(void *host_blob); # define gd_fdt_blob() (gd->fdt_blob) #endif -#endif /* IMAGE_ENABLE_FIT */ - /* * Information passed to the signing routines * @@ -1198,9 +1181,6 @@ struct image_region { int size; }; -#if FIT_IMAGE_ENABLE_VERIFY -# include -#endif struct checksum_algo { const char *name; const int checksum_len; @@ -1210,7 +1190,7 @@ struct checksum_algo { const EVP_MD *(*calculate_sign)(void); #endif int (*calculate)(const char *name, - const struct image_region region[], + const struct image_region *region, int region_count, uint8_t *checksum); }; @@ -1306,8 +1286,6 @@ struct crypto_algo *image_get_crypto_algo(const char *full_name); */ struct padding_algo *image_get_padding_algo(const char *name); -#if CONFIG_IS_ENABLED(FIT) - /** * fit_image_verify_required_sigs() - Verify signatures marked as 'required' * @@ -1433,10 +1411,6 @@ int fit_image_cipher_get_algo(const void *fit, int noffset, char **algo); struct cipher_algo *image_get_cipher_algo(const char *full_name); -#endif /* CONFIG_FIT */ - -#if !defined(USE_HOSTCC) -#if defined(CONFIG_ANDROID_BOOT_IMAGE) struct andr_img_hdr; int android_image_check_header(const struct andr_img_hdr *hdr); int android_image_get_kernel(const struct andr_img_hdr *hdr, int verify, @@ -1452,12 +1426,7 @@ ulong android_image_get_end(const struct andr_img_hdr *hdr); ulong android_image_get_kload(const struct andr_img_hdr *hdr); ulong android_image_get_kcomp(const struct andr_img_hdr *hdr); void android_print_contents(const struct andr_img_hdr *hdr); -#if !defined(CONFIG_SPL_BUILD) bool android_image_print_dtb_contents(ulong hdr_addr); -#endif - -#endif /* CONFIG_ANDROID_BOOT_IMAGE */ -#endif /* !USE_HOSTCC */ /** * board_fit_config_name_match() - Check for a matching board name diff --git a/include/u-boot/hash-checksum.h b/include/u-boot/hash-checksum.h index 54e6a73744e..7f16b37a9ab 100644 --- a/include/u-boot/hash-checksum.h +++ b/include/u-boot/hash-checksum.h @@ -7,11 +7,12 @@ #define _RSA_CHECKSUM_H #include -#include #include #include #include +struct image_region; + /** * hash_calculate() - Calculate hash over the data * @@ -23,7 +24,7 @@ * @return 0 if OK, < 0 if error */ int hash_calculate(const char *name, - const struct image_region region[], int region_count, + const struct image_region *region, int region_count, uint8_t *checksum); #endif -- cgit v1.2.3 From 1df654a6af5b14731383039f868f12db7069a476 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 25 Sep 2021 19:43:35 -0600 Subject: image: Drop most #ifdefs in image-board.c Remove ifdefs in this file, so far as possible without too much refactoring. Signed-off-by: Simon Glass --- include/image.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/image.h b/include/image.h index 04eccb12a92..34d13ada84b 100644 --- a/include/image.h +++ b/include/image.h @@ -298,7 +298,11 @@ typedef struct bootm_headers { image_header_t legacy_hdr_os_copy; /* header copy */ ulong legacy_hdr_valid; -#if CONFIG_IS_ENABLED(FIT) + /* + * The fit_ members are only used with FIT, but it involves a lot of + * #ifdefs to avoid compiling that code. Since FIT is the standard + * format, even for SPL, this extra data size seems worth it. + */ const char *fit_uname_cfg; /* configuration node unit name */ void *fit_hdr_os; /* os FIT image header */ @@ -316,7 +320,6 @@ typedef struct bootm_headers { void *fit_hdr_setup; /* x86 setup FIT image header */ const char *fit_uname_setup; /* x86 setup subimage node name */ int fit_noffset_setup;/* x86 setup subimage node offset */ -#endif #ifndef USE_HOSTCC image_info_t os; /* os image info */ -- cgit v1.2.3 From 0efe41ca158ef5b0e4457b4265f48860f382f3f8 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sat, 25 Sep 2021 22:47:36 +0200 Subject: video: Add 30bpp support Add support for 30bpp mode where pixels are picked in 32-bit integers but use 10 bits instead of 8 bits for each component. Signed-off-by: Mark Kettenis --- include/video.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include') diff --git a/include/video.h b/include/video.h index 827733305e8..f14fb15f84f 100644 --- a/include/video.h +++ b/include/video.h @@ -64,6 +64,13 @@ enum video_log2_bpp { #define VNBITS(bpix) (1 << (bpix)) +enum video_format { + VIDEO_UNKNOWN, + VIDEO_X8B8G8R8, + VIDEO_X8R8G8B8, + VIDEO_X2R10G10B10, +}; + /** * struct video_priv - Device information used by the video uclass * @@ -71,6 +78,7 @@ enum video_log2_bpp { * @ysize: Number of pixels rows (e.g.. 768) * @rot: Display rotation (0=none, 1=90 degrees clockwise, etc.) * @bpix: Encoded bits per pixel (enum video_log2_bpp) + * @format: Pixel format (enum video_format) * @vidconsole_drv_name: Driver to use for the text console, NULL to * select automatically * @font_size: Font size in pixels (0 to use a default value) @@ -95,6 +103,7 @@ struct video_priv { ushort ysize; ushort rot; enum video_log2_bpp bpix; + enum video_format format; const char *vidconsole_drv_name; int font_size; -- cgit v1.2.3 From 2a2d8e94ddc75c2c8d456e9163aa5dac510badcf Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 9 Oct 2021 09:28:21 -0600 Subject: lz4: Use a private header for U-Boot At present U-Boot has a header file called lz4.h for its own use. If the host has its own lz4 header file installed (e.g. from the 'liblz4-dev' package) then host builds will use that instead. Move the U-Boot file into its own directory, as is done with various other headers with the same problem. Signed-off-by: Simon Glass --- include/lz4.h | 24 ------------------------ include/u-boot/lz4.h | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+), 24 deletions(-) delete mode 100644 include/lz4.h create mode 100644 include/u-boot/lz4.h (limited to 'include') diff --git a/include/lz4.h b/include/lz4.h deleted file mode 100644 index 1276fb98a34..00000000000 --- a/include/lz4.h +++ /dev/null @@ -1,24 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright 2019 Google LLC - */ - -#ifndef __LZ4_H -#define __LZ4_H - -/** - * ulz4fn() - Decompress LZ4 data - * - * @src: Source data to decompress - * @srcn: Length of source data - * @dst: Destination for uncompressed data - * @dstn: Returns length of uncompressed data - * @return 0 if OK, -EPROTONOSUPPORT if the magic number or version number are - * not recognised or independent blocks are used, -EINVAL if the reserved - * fields are non-zero, or input is overrun, -EENOBUFS if the destination - * buffer is overrun, -EEPROTO if the compressed data causes an error in - * the decompression algorithm - */ -int ulz4fn(const void *src, size_t srcn, void *dst, size_t *dstn); - -#endif diff --git a/include/u-boot/lz4.h b/include/u-boot/lz4.h new file mode 100644 index 00000000000..1276fb98a34 --- /dev/null +++ b/include/u-boot/lz4.h @@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2019 Google LLC + */ + +#ifndef __LZ4_H +#define __LZ4_H + +/** + * ulz4fn() - Decompress LZ4 data + * + * @src: Source data to decompress + * @srcn: Length of source data + * @dst: Destination for uncompressed data + * @dstn: Returns length of uncompressed data + * @return 0 if OK, -EPROTONOSUPPORT if the magic number or version number are + * not recognised or independent blocks are used, -EINVAL if the reserved + * fields are non-zero, or input is overrun, -EENOBUFS if the destination + * buffer is overrun, -EEPROTO if the compressed data causes an error in + * the decompression algorithm + */ +int ulz4fn(const void *src, size_t srcn, void *dst, size_t *dstn); + +#endif -- cgit v1.2.3 From 79c05335a9c101f0b54f2f378d0b08c9b765e1a3 Mon Sep 17 00:00:00 2001 From: Anatolij Gustschin Date: Mon, 4 Oct 2021 17:33:12 +0200 Subject: video: move MXS to Kconfig Move CONFIG_VIDEO_MXS from board headers to Kconfig and drop it from obsolete cfb_console driver. Signed-off-by: Anatolij Gustschin Reviewed-by: Fabio Estevam --- include/configs/colibri-imx6ull.h | 3 +-- include/configs/colibri_imx7.h | 3 +-- include/configs/imxrt1050-evk.h | 1 - include/configs/mx23evk.h | 2 +- include/configs/mx28evk.h | 2 +- include/configs/mx6sxsabresd.h | 3 +-- include/configs/mx6ul_14x14_evk.h | 1 - include/configs/mx7dsabresd.h | 3 +-- include/configs/mxs.h | 5 ----- include/configs/opos6uldev.h | 1 - include/configs/pico-imx6ul.h | 3 +-- include/configs/pico-imx7d.h | 1 - 12 files changed, 7 insertions(+), 21 deletions(-) (limited to 'include') diff --git a/include/configs/colibri-imx6ull.h b/include/configs/colibri-imx6ull.h index a2f2de7ea1c..741c3fedec9 100644 --- a/include/configs/colibri-imx6ull.h +++ b/include/configs/colibri-imx6ull.h @@ -134,8 +134,7 @@ /* USB Device Firmware Update support */ #define DFU_DEFAULT_POLL_TIMEOUT 300 -#if defined(CONFIG_VIDEO) || defined(CONFIG_DM_VIDEO) -#define CONFIG_VIDEO_MXS +#if defined(CONFIG_DM_VIDEO) #define MXS_LCDIF_BASE MX6UL_LCDIF1_BASE_ADDR #define CONFIG_VIDEO_LOGO #define CONFIG_VIDEO_BMP_LOGO diff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h index 07c26e3d0ba..344b266db9e 100644 --- a/include/configs/colibri_imx7.h +++ b/include/configs/colibri_imx7.h @@ -200,8 +200,7 @@ #define CONFIG_USBD_HS -#if defined(CONFIG_VIDEO) || defined(CONFIG_DM_VIDEO) -#define CONFIG_VIDEO_MXS +#if defined(CONFIG_DM_VIDEO) #define CONFIG_VIDEO_LOGO #define CONFIG_VIDEO_BMP_LOGO #endif diff --git a/include/configs/imxrt1050-evk.h b/include/configs/imxrt1050-evk.h index 1b6754299e7..99d25c1e6ef 100644 --- a/include/configs/imxrt1050-evk.h +++ b/include/configs/imxrt1050-evk.h @@ -22,7 +22,6 @@ DMAMEM_SZ_ALL) #ifdef CONFIG_DM_VIDEO -#define CONFIG_VIDEO_MXS #define CONFIG_VIDEO_LOGO #define CONFIG_VIDEO_BMP_LOGO diff --git a/include/configs/mx23evk.h b/include/configs/mx23evk.h index 1f40d98be00..bccba5cbb17 100644 --- a/include/configs/mx23evk.h +++ b/include/configs/mx23evk.h @@ -26,7 +26,7 @@ #endif /* Framebuffer support */ -#ifdef CONFIG_VIDEO +#ifdef CONFIG_DM_VIDEO #define CONFIG_VIDEO_LOGO #define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (512 << 10) #endif diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h index 10292c86fac..fe4ea8997d4 100644 --- a/include/configs/mx28evk.h +++ b/include/configs/mx28evk.h @@ -40,7 +40,7 @@ #endif /* Framebuffer support */ -#ifdef CONFIG_VIDEO +#ifdef CONFIG_DM_VIDEO #define CONFIG_VIDEO_LOGO #define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (512 << 10) #endif diff --git a/include/configs/mx6sxsabresd.h b/include/configs/mx6sxsabresd.h index 1237ddef8e3..df2bd97438a 100644 --- a/include/configs/mx6sxsabresd.h +++ b/include/configs/mx6sxsabresd.h @@ -161,8 +161,7 @@ #endif #ifndef CONFIG_SPL_BUILD -#ifdef CONFIG_VIDEO -#define CONFIG_VIDEO_MXS +#ifdef CONFIG_DM_VIDEO #define CONFIG_VIDEO_LOGO #define CONFIG_VIDEO_BMP_LOGO #define MXS_LCDIF_BASE MX6SX_LCDIF1_BASE_ADDR diff --git a/include/configs/mx6ul_14x14_evk.h b/include/configs/mx6ul_14x14_evk.h index ff2ad094a7d..9ddb47910f3 100644 --- a/include/configs/mx6ul_14x14_evk.h +++ b/include/configs/mx6ul_14x14_evk.h @@ -167,7 +167,6 @@ #ifndef CONFIG_SPL_BUILD #if defined(CONFIG_DM_VIDEO) -#define CONFIG_VIDEO_MXS #define CONFIG_VIDEO_LOGO #define CONFIG_VIDEO_BMP_LOGO #define MXS_LCDIF_BASE MX6UL_LCDIF1_BASE_ADDR diff --git a/include/configs/mx7dsabresd.h b/include/configs/mx7dsabresd.h index 397af53bec3..92ce741768d 100644 --- a/include/configs/mx7dsabresd.h +++ b/include/configs/mx7dsabresd.h @@ -126,8 +126,7 @@ #define CONFIG_USBD_HS -#ifdef CONFIG_VIDEO -#define CONFIG_VIDEO_MXS +#ifdef CONFIG_DM_VIDEO #define CONFIG_VIDEO_LOGO #define CONFIG_VIDEO_BMP_LOGO #endif diff --git a/include/configs/mxs.h b/include/configs/mxs.h index b5c525dc786..45d17664821 100644 --- a/include/configs/mxs.h +++ b/include/configs/mxs.h @@ -105,11 +105,6 @@ #endif #endif -/* LCD */ -#ifdef CONFIG_VIDEO -#define CONFIG_VIDEO_MXS -#endif - /* NAND */ #ifdef CONFIG_CMD_NAND #define CONFIG_SYS_MAX_NAND_DEVICE 1 diff --git a/include/configs/opos6uldev.h b/include/configs/opos6uldev.h index f9db8efd2fd..d9311a49350 100644 --- a/include/configs/opos6uldev.h +++ b/include/configs/opos6uldev.h @@ -43,7 +43,6 @@ #ifdef CONFIG_DM_VIDEO #define CONFIG_VIDEO_LOGO #define CONFIG_VIDEO_BMP_LOGO -#define CONFIG_VIDEO_MXS #define MXS_LCDIF_BASE MX6UL_LCDIF1_BASE_ADDR #endif #endif diff --git a/include/configs/pico-imx6ul.h b/include/configs/pico-imx6ul.h index 7e36ceed3fe..6fed7522bdd 100644 --- a/include/configs/pico-imx6ul.h +++ b/include/configs/pico-imx6ul.h @@ -135,8 +135,7 @@ */ #define CONFIG_BOARD_SIZE_LIMIT 715776 -#ifdef CONFIG_VIDEO -#define CONFIG_VIDEO_MXS +#ifdef CONFIG_DM_VIDEO #define CONFIG_VIDEO_LOGO #define CONFIG_VIDEO_BMP_LOGO #define MXS_LCDIF_BASE MX6UL_LCDIF1_BASE_ADDR diff --git a/include/configs/pico-imx7d.h b/include/configs/pico-imx7d.h index 36c57923dec..c0464278b98 100644 --- a/include/configs/pico-imx7d.h +++ b/include/configs/pico-imx7d.h @@ -126,7 +126,6 @@ #define CONFIG_POWER_PFUZE3000_I2C_ADDR 0x08 #ifdef CONFIG_DM_VIDEO -#define CONFIG_VIDEO_MXS #define CONFIG_VIDEO_LOGO #define CONFIG_VIDEO_BMP_LOGO #endif -- cgit v1.2.3 From 21d314a6612564ee202d8a8189ed37d5c6abf0dd Mon Sep 17 00:00:00 2001 From: Samuel Holland Date: Sun, 12 Sep 2021 11:48:43 -0500 Subject: clk: sunxi: Move header out of arch directory The CCU header is only used by the DM drivers, not any platform code. Its current location adds an artificial dependency on CONFIG_ARM and ARCH_SUNXI, which will be problematic when adding the CCU driver for a RISC-V sunxi platform. Signed-off-by: Samuel Holland Reviewed-by: Bin Meng Signed-off-by: Andre Przywara --- include/clk/sunxi.h | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 include/clk/sunxi.h (limited to 'include') diff --git a/include/clk/sunxi.h b/include/clk/sunxi.h new file mode 100644 index 00000000000..d4ad5fd0ba3 --- /dev/null +++ b/include/clk/sunxi.h @@ -0,0 +1,98 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2018 Amarula Solutions. + * Author: Jagan Teki + */ + +#ifndef _CLK_SUNXI_H +#define _CLK_SUNXI_H + +#include + +/** + * enum ccu_flags - ccu clock/reset flags + * + * @CCU_CLK_F_IS_VALID: is given clock gate is valid? + * @CCU_RST_F_IS_VALID: is given reset control is valid? + */ +enum ccu_flags { + CCU_CLK_F_IS_VALID = BIT(0), + CCU_RST_F_IS_VALID = BIT(1), +}; + +/** + * struct ccu_clk_gate - ccu clock gate + * @off: gate offset + * @bit: gate bit + * @flags: ccu clock gate flags + */ +struct ccu_clk_gate { + u16 off; + u32 bit; + enum ccu_flags flags; +}; + +#define GATE(_off, _bit) { \ + .off = _off, \ + .bit = _bit, \ + .flags = CCU_CLK_F_IS_VALID, \ +} + +/** + * struct ccu_reset - ccu reset + * @off: reset offset + * @bit: reset bit + * @flags: ccu reset control flags + */ +struct ccu_reset { + u16 off; + u32 bit; + enum ccu_flags flags; +}; + +#define RESET(_off, _bit) { \ + .off = _off, \ + .bit = _bit, \ + .flags = CCU_RST_F_IS_VALID, \ +} + +/** + * struct ccu_desc - clock control unit descriptor + * + * @gates: clock gates + * @resets: reset unit + */ +struct ccu_desc { + const struct ccu_clk_gate *gates; + const struct ccu_reset *resets; +}; + +/** + * struct ccu_priv - sunxi clock control unit + * + * @base: base address + * @desc: ccu descriptor + */ +struct ccu_priv { + void *base; + const struct ccu_desc *desc; +}; + +/** + * sunxi_clk_probe - common sunxi clock probe + * @dev: clock device + */ +int sunxi_clk_probe(struct udevice *dev); + +extern struct clk_ops sunxi_clk_ops; + +/** + * sunxi_reset_bind() - reset binding + * + * @dev: reset device + * @count: reset count + * @return 0 success, or error value + */ +int sunxi_reset_bind(struct udevice *dev, ulong count); + +#endif /* _CLK_SUNXI_H */ -- cgit v1.2.3 From ce543d0d4ea39dae5828e59d21897a1a00b89ac4 Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Tue, 5 Oct 2021 12:04:49 +0200 Subject: board: siemens: iot2050: Adjust to changes in DT and configuration Account for the changes done between merge proposal and the final merge. Signed-off-by: Jan Kiszka Reviewed-by: Tom Rini --- include/configs/iot2050.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include') diff --git a/include/configs/iot2050.h b/include/configs/iot2050.h index ddb4cfcc8e2..91ed76bb40b 100644 --- a/include/configs/iot2050.h +++ b/include/configs/iot2050.h @@ -17,8 +17,6 @@ #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SPL_TEXT_BASE + \ CONFIG_SYS_K3_NON_SECURE_MSRAM_SIZE) -#define CONFIG_SKIP_LOWLEVEL_INIT - #define CONFIG_SPL_MAX_SIZE CONFIG_SYS_K3_MAX_DOWNLODABLE_IMAGE_SIZE #define CONFIG_SYS_BOOTM_LEN SZ_64M -- cgit v1.2.3 From 104950a7feae7926e40676f27cfbd279a43b4bc3 Mon Sep 17 00:00:00 2001 From: Samuel Holland Date: Fri, 8 Oct 2021 00:17:20 -0500 Subject: i2c: Add a DM_I2C driver for the sun6i P2WI controller This bus controller is used to communicate with an X-Powers AXP PMIC. Currently, various drivers access PMIC registers through a platform- specific non-DM "pmic_bus" interface, which depends on the legacy I2C framework. In order to convert those drivers to use DM_PMIC, this bus needs a DM_I2C driver. Refactor the p2wi functions to take the base address as a parameter, and implement both the existing interface (which is still needed in SPL) and the DM_I2C interface on top of them. The register for switching between I2C/P2WI/RSB mode is the same across all PMIC variants. Move that to the common header, so it can be used by both interface implementations. Signed-off-by: Samuel Holland Reviewed-by: Andre Przywara Signed-off-by: Andre Przywara --- include/axp_pmic.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/axp_pmic.h b/include/axp_pmic.h index 405044c3a32..0db3e143eda 100644 --- a/include/axp_pmic.h +++ b/include/axp_pmic.h @@ -6,6 +6,8 @@ */ #ifndef _AXP_PMIC_H_ +#include + #ifdef CONFIG_AXP152_POWER #include #endif @@ -25,6 +27,10 @@ #include #endif +#define AXP_PMIC_MODE_REG 0x3e +#define AXP_PMIC_MODE_I2C 0x00 +#define AXP_PMIC_MODE_P2WI 0x3e + int axp_set_dcdc1(unsigned int mvolt); int axp_set_dcdc2(unsigned int mvolt); int axp_set_dcdc3(unsigned int mvolt); -- cgit v1.2.3 From 3227c85fe76312290c3ec15a02dcba3f9c6bc399 Mon Sep 17 00:00:00 2001 From: Samuel Holland Date: Fri, 8 Oct 2021 00:17:21 -0500 Subject: i2c: Add a DM_I2C driver for the sun8i RSB controller This bus controller is used to communicate with an X-Powers AXP PMIC. Currently, various drivers access PMIC registers through a platform- specific non-DM "pmic_bus" interface, which depends on the legacy I2C framework. In order to convert those drivers to use DM_PMIC, this bus needs a DM_I2C driver. Refactor the rsb functions to take the base address as a parameter, and implement both the existing interface (which is still needed in SPL) and the DM_I2C interface on top of them. The register for switching between I2C/P2WI/RSB mode is the same across all PMIC variants, so move that to the common header. There are only a couple of pairs of hardware/runtime addresses used across all PMIC variants. So far the code expected only the "primary" pair, but some PMICs like the AXP305 and AXP805 use the secondary pair, so add support for that to the DM driver as well. Signed-off-by: Samuel Holland Reviewed-by: Andre Przywara Signed-off-by: Andre Przywara --- include/axp_pmic.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/axp_pmic.h b/include/axp_pmic.h index 0db3e143eda..46a017d2efa 100644 --- a/include/axp_pmic.h +++ b/include/axp_pmic.h @@ -30,6 +30,12 @@ #define AXP_PMIC_MODE_REG 0x3e #define AXP_PMIC_MODE_I2C 0x00 #define AXP_PMIC_MODE_P2WI 0x3e +#define AXP_PMIC_MODE_RSB 0x7c + +#define AXP_PMIC_PRI_DEVICE_ADDR 0x3a3 +#define AXP_PMIC_PRI_RUNTIME_ADDR 0x2d +#define AXP_PMIC_SEC_DEVICE_ADDR 0x745 +#define AXP_PMIC_SEC_RUNTIME_ADDR 0x3a int axp_set_dcdc1(unsigned int mvolt); int axp_set_dcdc2(unsigned int mvolt); -- cgit v1.2.3 From 2421497cb78b7647ff7592acda3d444caa120f01 Mon Sep 17 00:00:00 2001 From: Samuel Holland Date: Fri, 8 Oct 2021 00:17:24 -0500 Subject: sunxi: video: Convert panel I2C to use DM_I2C Two displays supported by the sunxi display driver (each one used by a single board) require initialization over I2C. Both previously used i2c_soft; replace this with the i2c-gpio instance that already exists in those boards' device trees (sun5i-a13-utoo-p66 and sun6i-a31-colombus). Since the i2c-gpio nodes are not referenced by any other node in the device trees (the device trees have no panel node), the I2C bus is selected by its node name. This panel initialization code was the only i2c_soft user, so the i2c_soft GPIO setup code can be removed now as well. Reviewed-by: Heiko Schocher Signed-off-by: Samuel Holland Signed-off-by: Andre Przywara --- include/configs/sunxi-common.h | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'include') diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index 5d8b6052e4f..c576d65efaf 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -160,23 +160,6 @@ #define CONFIG_SPL_PAD_TO 32768 /* decimal for 'dd' */ #endif - -/* I2C */ -#if defined(CONFIG_VIDEO_LCD_PANEL_I2C) -/* We use pin names in Kconfig and sunxi_name_to_gpio() */ -#define CONFIG_SOFT_I2C_GPIO_SDA soft_i2c_gpio_sda -#define CONFIG_SOFT_I2C_GPIO_SCL soft_i2c_gpio_scl -#ifndef __ASSEMBLY__ -extern int soft_i2c_gpio_sda; -extern int soft_i2c_gpio_scl; -#endif -#define CONFIG_VIDEO_LCD_I2C_BUS 0 /* The lcd panel soft i2c is bus 0 */ -#define CONFIG_SYS_SPD_BUS_NUM 1 /* And the axp209 i2c bus is bus 1 */ -#else -#define CONFIG_SYS_SPD_BUS_NUM 0 /* The axp209 i2c bus is bus 0 */ -#define CONFIG_VIDEO_LCD_I2C_BUS -1 /* NA, but necessary to compile */ -#endif - /* Ethernet support */ #ifdef CONFIG_USB_EHCI_HCD -- cgit v1.2.3 From 38f7d3b6530edae4c4d506d6b9dbd0ae8b8ee5e6 Mon Sep 17 00:00:00 2001 From: Patrice Chotard Date: Fri, 10 Sep 2021 16:16:20 +0200 Subject: cmd: bind: Fix driver binding on a device Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data") As example, the following bind command doesn't work: bind /soc/usb-otg@49000000 usb_ether As usb_ether driver has no compatible string, it can't be find by lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(), the driver entry is known, pass it to lists_bind_fdt() to force the driver entry selection. For this, add a new parameter struct *driver to lists_bind_fdt(). Fix also all lists_bind_fdt() callers. Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data") Signed-off-by: Patrice Chotard Reported-by: Herbert Poetzl Cc: Marek Vasut Cc: Herbert Poetzl Reviewed-by: Andy Shevchenko Reviewed-by: Simon Glass --- include/dm/lists.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/dm/lists.h b/include/dm/lists.h index 1a865525461..5896ae36583 100644 --- a/include/dm/lists.h +++ b/include/dm/lists.h @@ -53,13 +53,14 @@ int lists_bind_drivers(struct udevice *parent, bool pre_reloc_only); * @parent: parent device (root) * @node: device tree node to bind * @devp: if non-NULL, returns a pointer to the bound device + * @drv: if non-NULL, force this driver to be bound * @pre_reloc_only: If true, bind only nodes with special devicetree properties, * or drivers with the DM_FLAG_PRE_RELOC flag. If false bind all drivers. * @return 0 if device was bound, -EINVAL if the device tree is invalid, * other -ve value on error */ int lists_bind_fdt(struct udevice *parent, ofnode node, struct udevice **devp, - bool pre_reloc_only); + struct driver *drv, bool pre_reloc_only); /** * device_bind_driver() - bind a device to a driver -- cgit v1.2.3 From 4bf88ba76abb224b3ca258a2f502384ec6c86bd6 Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Fri, 3 Sep 2021 15:16:18 +0200 Subject: fdtdec: Support retrieving the name of a carveout When retrieving a given carveout for a device, allow callers to query the name. This helps differentiating between carveouts when there are more than one. This is also useful when copying carveouts to help assign a meaningful name that cannot always be guessed. Signed-off-by: Thierry Reding Reviewed-by: Simon Glass Signed-off-by: Tom Warren --- include/fdtdec.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/fdtdec.h b/include/fdtdec.h index 23efbe710cb..f961f030124 100644 --- a/include/fdtdec.h +++ b/include/fdtdec.h @@ -1038,14 +1038,16 @@ int fdtdec_add_reserved_memory(void *blob, const char *basename, * * @param blob FDT blob * @param node name of a node - * @param name name of the property in the given node that contains + * @param prop_name name of the property in the given node that contains * the phandle for the carveout * @param index index of the phandle for which to read the carveout * @param carveout return location for the carveout information + * @param name return location for the carveout name * @return 0 on success or a negative error code on failure */ -int fdtdec_get_carveout(const void *blob, const char *node, const char *name, - unsigned int index, struct fdt_memory *carveout); +int fdtdec_get_carveout(const void *blob, const char *node, + const char *prop_name, unsigned int index, + struct fdt_memory *carveout, const char **name); /** * fdtdec_set_carveout() - sets a carveout region for a given node -- cgit v1.2.3 From 46cb067803bef50cb8a1334a56897d05b5f85e02 Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Fri, 3 Sep 2021 15:16:19 +0200 Subject: fdtdec: Support compatible string list for reserved memory Reserved memory nodes can have a compatible string list to identify the type of reserved memory that they represent. Support specifying an optional compatible string list when creating these nodes. Signed-off-by: Thierry Reding Reviewed-by: Simon Glass Signed-off-by: Tom Warren --- include/fdtdec.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/fdtdec.h b/include/fdtdec.h index f961f030124..5a6a7cbd995 100644 --- a/include/fdtdec.h +++ b/include/fdtdec.h @@ -995,7 +995,8 @@ static inline int fdtdec_set_phandle(void *blob, int node, uint32_t phandle) * }; * uint32_t phandle; * - * fdtdec_add_reserved_memory(fdt, "framebuffer", &fb, &phandle, false); + * fdtdec_add_reserved_memory(fdt, "framebuffer", &fb, NULL, 0, &phandle, + * false); * * This results in the following subnode being added to the top-level * /reserved-memory node: @@ -1020,6 +1021,8 @@ static inline int fdtdec_set_phandle(void *blob, int node, uint32_t phandle) * @param blob FDT blob * @param basename base name of the node to create * @param carveout information about the carveout region + * @param compatibles list of compatible strings for the carveout region + * @param count number of compatible strings for the carveout region * @param phandlep return location for the phandle of the carveout region * can be NULL if no phandle should be added * @param no_map add "no-map" property if true @@ -1027,6 +1030,7 @@ static inline int fdtdec_set_phandle(void *blob, int node, uint32_t phandle) */ int fdtdec_add_reserved_memory(void *blob, const char *basename, const struct fdt_memory *carveout, + const char **compatibles, unsigned int count, uint32_t *phandlep, bool no_map); /** @@ -1043,11 +1047,14 @@ int fdtdec_add_reserved_memory(void *blob, const char *basename, * @param index index of the phandle for which to read the carveout * @param carveout return location for the carveout information * @param name return location for the carveout name + * @param compatiblesp return location for compatible strings + * @param countp return location for the number of compatible strings * @return 0 on success or a negative error code on failure */ int fdtdec_get_carveout(const void *blob, const char *node, const char *prop_name, unsigned int index, - struct fdt_memory *carveout, const char **name); + struct fdt_memory *carveout, const char **name, + const char ***compatiblesp, unsigned int *countp); /** * fdtdec_set_carveout() - sets a carveout region for a given node @@ -1065,7 +1072,8 @@ int fdtdec_get_carveout(const void *blob, const char *node, * .end = 0x934b2fff, * }; * - * fdtdec_set_carveout(fdt, node, "memory-region", 0, "framebuffer", &fb); + * fdtdec_set_carveout(fdt, node, "memory-region", 0, "framebuffer", NULL, + * 0, &fb); * * dc@54200000 is a display controller and was set up by the bootloader to * scan out the framebuffer specified by "fb". This would cause the following @@ -1104,10 +1112,13 @@ int fdtdec_get_carveout(const void *blob, const char *node, * @param index index of the phandle to store * @param name base name of the reserved-memory node to create * @param carveout information about the carveout to add + * @param compatibles compatible strings to set for the carveout + * @param count number of compatible strings * @return 0 on success or a negative error code on failure */ int fdtdec_set_carveout(void *blob, const char *node, const char *prop_name, unsigned int index, const char *name, + const char **compatibles, unsigned int count, const struct fdt_memory *carveout); /** -- cgit v1.2.3 From 9019487608c8afe7d3fc34cb5192df064b60cdb7 Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Fri, 3 Sep 2021 15:16:20 +0200 Subject: fdtdec: Reorder fdtdec_set_carveout() parameters for consistency The fdtdec_set_carveout() function's parameters are inconsistent with the parameters passed to fdtdec_add_reserved_memory(). Fix up the order to make it more consistent. Signed-off-by: Thierry Reding Reviewed-by: Simon Glass Signed-off-by: Tom Warren --- include/fdtdec.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/fdtdec.h b/include/fdtdec.h index 5a6a7cbd995..d360d7bce4e 100644 --- a/include/fdtdec.h +++ b/include/fdtdec.h @@ -1110,16 +1110,16 @@ int fdtdec_get_carveout(const void *blob, const char *node, * @param prop_name name of the property in which to store the phandle of * the carveout * @param index index of the phandle to store - * @param name base name of the reserved-memory node to create * @param carveout information about the carveout to add + * @param name base name of the reserved-memory node to create * @param compatibles compatible strings to set for the carveout * @param count number of compatible strings * @return 0 on success or a negative error code on failure */ int fdtdec_set_carveout(void *blob, const char *node, const char *prop_name, - unsigned int index, const char *name, - const char **compatibles, unsigned int count, - const struct fdt_memory *carveout); + unsigned int index, const struct fdt_memory *carveout, + const char *name, const char **compatibles, + unsigned int count); /** * Set up the device tree ready for use -- cgit v1.2.3 From b9aad375917d4ae0dec5aedcdfa79929e1dbb730 Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Fri, 3 Sep 2021 15:16:21 +0200 Subject: fdtdec: Support reserved-memory flags Reserved memory nodes can have additional flags. Support reading and writing these flags to ensure that reserved memory nodes can be properly parsed and emitted. This converts support for the existing "no-map" flag to avoid extending the argument list for fdtdec_add_reserved_memory() to excessive length. Signed-off-by: Thierry Reding Reviewed-by: Simon Glass Signed-off-by: Tom Warren --- include/fdtdec.h | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/fdtdec.h b/include/fdtdec.h index d360d7bce4e..f94d1f4f3ab 100644 --- a/include/fdtdec.h +++ b/include/fdtdec.h @@ -977,6 +977,9 @@ static inline int fdtdec_set_phandle(void *blob, int node, uint32_t phandle) return fdt_setprop_u32(blob, node, "phandle", phandle); } +/* add "no-map" property */ +#define FDTDEC_RESERVED_MEMORY_NO_MAP (1 << 0) + /** * fdtdec_add_reserved_memory() - add or find a reserved-memory node * @@ -996,7 +999,7 @@ static inline int fdtdec_set_phandle(void *blob, int node, uint32_t phandle) * uint32_t phandle; * * fdtdec_add_reserved_memory(fdt, "framebuffer", &fb, NULL, 0, &phandle, - * false); + * 0); * * This results in the following subnode being added to the top-level * /reserved-memory node: @@ -1025,13 +1028,13 @@ static inline int fdtdec_set_phandle(void *blob, int node, uint32_t phandle) * @param count number of compatible strings for the carveout region * @param phandlep return location for the phandle of the carveout region * can be NULL if no phandle should be added - * @param no_map add "no-map" property if true + * @param flags bitmask of flags to set for the carveout region * @return 0 on success or a negative error code on failure */ int fdtdec_add_reserved_memory(void *blob, const char *basename, const struct fdt_memory *carveout, const char **compatibles, unsigned int count, - uint32_t *phandlep, bool no_map); + uint32_t *phandlep, unsigned long flags); /** * fdtdec_get_carveout() - reads a carveout from an FDT @@ -1048,13 +1051,15 @@ int fdtdec_add_reserved_memory(void *blob, const char *basename, * @param carveout return location for the carveout information * @param name return location for the carveout name * @param compatiblesp return location for compatible strings - * @param countp return location for the number of compatible strings + * @param countp return location for the number of compatible strings + * @param flags return location for the flags of the carveout * @return 0 on success or a negative error code on failure */ int fdtdec_get_carveout(const void *blob, const char *node, const char *prop_name, unsigned int index, struct fdt_memory *carveout, const char **name, - const char ***compatiblesp, unsigned int *countp); + const char ***compatiblesp, unsigned int *countp, + unsigned long *flags); /** * fdtdec_set_carveout() - sets a carveout region for a given node @@ -1073,7 +1078,7 @@ int fdtdec_get_carveout(const void *blob, const char *node, * }; * * fdtdec_set_carveout(fdt, node, "memory-region", 0, "framebuffer", NULL, - * 0, &fb); + * 0, &fb, 0); * * dc@54200000 is a display controller and was set up by the bootloader to * scan out the framebuffer specified by "fb". This would cause the following @@ -1114,12 +1119,13 @@ int fdtdec_get_carveout(const void *blob, const char *node, * @param name base name of the reserved-memory node to create * @param compatibles compatible strings to set for the carveout * @param count number of compatible strings + * @param flags bitmask of flags to set for the carveout * @return 0 on success or a negative error code on failure */ int fdtdec_set_carveout(void *blob, const char *node, const char *prop_name, unsigned int index, const struct fdt_memory *carveout, const char *name, const char **compatibles, - unsigned int count); + unsigned int count, unsigned long flags); /** * Set up the device tree ready for use -- cgit v1.2.3 From f814ff5e0b10a0b6a1b303a849e68f302f0d8627 Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Wed, 13 Oct 2021 13:06:02 -0700 Subject: ARM: tegra: Support EMC frequency tables on Tegra210 The EMC frequency tables are created from a training sequence performed during early boot and passed in via a reserved memory region by nvtboot. Copy this table to the kernel DTB so that the kernel can use it to scale the EMC frequency at runtime. Note that early bootloaders store the EMC table at an address that currently intersects with the load address of the initial ramdisk. In order to avoid copying the table to a different address, simply change the load address for the initial ramdisk in U-Boot. Signed-off-by: Thierry Reding Signed-off-by: Tom Warren --- include/configs/tegra210-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/tegra210-common.h b/include/configs/tegra210-common.h index b9e04147be3..e1b91f62505 100644 --- a/include/configs/tegra210-common.h +++ b/include/configs/tegra210-common.h @@ -44,7 +44,7 @@ "kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ "fdtfile=" FDTFILE "\0" \ "fdt_addr_r=0x83000000\0" \ - "ramdisk_addr_r=0x83200000\0" + "ramdisk_addr_r=0x83420000\0" /* For USB EHCI controller */ #define CONFIG_EHCI_IS_TDI -- cgit v1.2.3 From ff07cc9ed106982727935ff0d6369e4da0fec6a9 Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Mon, 4 Oct 2021 11:59:50 +0200 Subject: scripts: remove some configs in config_whitelist.txt Remove some config finishing by _ badly added by scripts/build-whitelist.sh when joker is used in comments. for example: doc/uImage.FIT/command_syntax_extensions.txt: ... #ifdef CONFIG_OF_* | ... cmd/nvedit.c:# error Define one of CONFIG_ENV_IS_IN_{EEPROM| \ FLASH|MMC|FAT|EXT4|\ Remove also configs only used in comments: - CONFIG_BOOGER in include/linux/kconfig.h - CONFIG_COMMANDS - CONFIG_INIT_IGNORE_ERROR - CONFIG_REG_* - CONFIG_HOTPLUG : drivers/watchdog/omap_wdt.c:18 Signed-off-by: Patrick Delaunay Reviewed-by: Simon Glass Tested-by: Simon Glass --- include/configs/M5235EVB.h | 2 +- include/configs/dra7xx_evm.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'include') diff --git a/include/configs/M5235EVB.h b/include/configs/M5235EVB.h index f983281cc1f..b37c915538c 100644 --- a/include/configs/M5235EVB.h +++ b/include/configs/M5235EVB.h @@ -54,7 +54,7 @@ #define CONFIG_SYS_I2C_PINMUX_CLR ~(GPIO_PAR_FECI2C_SCL_MASK | GPIO_PAR_FECI2C_SDA_MASK) #define CONFIG_SYS_I2C_PINMUX_SET (GPIO_PAR_FECI2C_SCL_I2CSCL | GPIO_PAR_FECI2C_SDA_I2CSDA) -/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */ +/* this must be included AFTER the definition of CONFIG COMMANDS (if any) */ #define CONFIG_BOOTFILE "u-boot.bin" #ifdef CONFIG_MCFFEC # define CONFIG_IPADDR 192.162.1.2 diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h index c54f375689f..900c5fd2333 100644 --- a/include/configs/dra7xx_evm.h +++ b/include/configs/dra7xx_evm.h @@ -103,7 +103,6 @@ #define CONFIG_SYS_MAX_FLASH_SECT 512 #define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT #define CONFIG_SYS_FLASH_SIZE (64 * 1024 * 1024) /* 64 MB */ -/* #define CONFIG_INIT_IGNORE_ERROR */ #define CONFIG_SYS_MAX_FLASH_BANKS 1 #define CONFIG_SYS_FLASH_BASE (0x08000000) #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE -- cgit v1.2.3 From e7421b0e4135009f5ffd30670ed8f4b3e880040d Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Mon, 4 Oct 2021 11:59:51 +0200 Subject: am33x: Remove unused define CONFIG_MUSB_HOST This define was left over from a previous revision, and was never used. Signed-off-by: Patrick Delaunay Reviewed-by: Simon Glass --- include/configs/am335x_sl50.h | 7 ------- 1 file changed, 7 deletions(-) (limited to 'include') diff --git a/include/configs/am335x_sl50.h b/include/configs/am335x_sl50.h index dff946801c6..7fbf421149d 100644 --- a/include/configs/am335x_sl50.h +++ b/include/configs/am335x_sl50.h @@ -62,13 +62,6 @@ /* Bootcount using the RTC block */ #define CONFIG_SYS_BOOTCOUNT_BE -#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_USB_ETHER) -/* Remove other SPL modes. */ -/* disable host part of MUSB in SPL */ -#undef CONFIG_MUSB_HOST -/* disable EFI partitions and partition UUID support */ -#endif - /* Network. */ #endif /* ! __CONFIG_AM335X_SL50_H */ -- cgit v1.2.3 From 155fb86e2c1435aa3887a1b2000573a4ceea9975 Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Mon, 4 Oct 2021 11:59:52 +0200 Subject: Remove unused CONFIG_NO_RELOCATION Remove the latest reference of CONFIG_NO_RELOCATION in code Signed-off-by: Patrick Delaunay Reviewed-by: Simon Glass --- include/configs/thunderx_88xx.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/configs/thunderx_88xx.h b/include/configs/thunderx_88xx.h index 1ce03473002..600689843bb 100644 --- a/include/configs/thunderx_88xx.h +++ b/include/configs/thunderx_88xx.h @@ -58,7 +58,6 @@ /* Monitor Command Prompt */ #define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */ #define CONFIG_SYS_MAXARGS 64 /* max command args */ -#define CONFIG_NO_RELOCATION 1 #define PLL_REF_CLK 50000000 /* 50 MHz */ #define NS_PER_REF_CLK_TICK (1000000000/PLL_REF_CLK) -- cgit v1.2.3 From 0d76e4ec8dc121471127f68a9795443a02251116 Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Mon, 4 Oct 2021 11:59:53 +0200 Subject: Remove unused CONFIG_SYS_FLASH_AMD_CHECK_DQ7 Remove the latest reference of CONFIG_SYS_FLASH_AMD_CHECK_DQ7 in code Signed-off-by: Patrick Delaunay Reviewed-by: Simon Glass --- include/configs/P2041RDB.h | 1 - include/configs/corenet_ds.h | 1 - 2 files changed, 2 deletions(-) (limited to 'include') diff --git a/include/configs/P2041RDB.h b/include/configs/P2041RDB.h index 21e56d68f5d..198b698f21f 100644 --- a/include/configs/P2041RDB.h +++ b/include/configs/P2041RDB.h @@ -203,7 +203,6 @@ unsigned long get_board_sys_clk(unsigned long dummy); #endif /* CONFIG_NAND_FSL_ELBC */ #define CONFIG_SYS_FLASH_EMPTY_INFO -#define CONFIG_SYS_FLASH_AMD_CHECK_DQ7 #define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE_PHYS + 0x8000000} #define CONFIG_HWCONFIG diff --git a/include/configs/corenet_ds.h b/include/configs/corenet_ds.h index 7fd1ad14b54..8819935de10 100644 --- a/include/configs/corenet_ds.h +++ b/include/configs/corenet_ds.h @@ -205,7 +205,6 @@ #endif /* CONFIG_NAND_FSL_ELBC */ #define CONFIG_SYS_FLASH_EMPTY_INFO -#define CONFIG_SYS_FLASH_AMD_CHECK_DQ7 #define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE_PHYS + 0x8000000, CONFIG_SYS_FLASH_BASE_PHYS} #define CONFIG_HWCONFIG -- cgit v1.2.3 From 42d32c35524b79c8cfd8f5dd568bd8d55417c84e Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Mon, 4 Oct 2021 11:59:54 +0200 Subject: Remove unused CONFIG_CONS_NONE Remove the latest reference of CONFIG_CONS_NONE in code Signed-off-by: Patrick Delaunay Reviewed-by: Simon Glass --- include/configs/MPC8560ADS.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/configs/MPC8560ADS.h b/include/configs/MPC8560ADS.h index 3a9ea032921..dcd538fdf1a 100644 --- a/include/configs/MPC8560ADS.h +++ b/include/configs/MPC8560ADS.h @@ -191,7 +191,6 @@ /* Serial Port */ #define CONFIG_CONS_ON_SCC /* define if console on SCC */ -#undef CONFIG_CONS_NONE /* define if console on something else */ #define CONFIG_SYS_BAUDRATE_TABLE \ {300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200} -- cgit v1.2.3 From 92832045c54586e9dffa082ff8cd8c2ef6040757 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Beh=C3=BAn?= Date: Sat, 9 Oct 2021 15:27:32 +0200 Subject: Rename CONFIG_EHCI_IS_TDI to CONFIG_USB_EHCI_IS_TDI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In preparation for moving this option to Kconfig, rename it to be consistent with other USB EHCI Kconfig options. Signed-off-by: Marek Behún --- include/configs/clearfog.h | 2 +- include/configs/controlcenterdc.h | 2 +- include/configs/crs3xx-98dx3236.h | 2 +- include/configs/db-88f6720.h | 2 +- include/configs/db-88f6820-amc.h | 2 +- include/configs/db-88f6820-gp.h | 2 +- include/configs/db-mv784mp-gp.h | 2 +- include/configs/db-xc3-24g4xg.h | 2 +- include/configs/ds414.h | 2 +- include/configs/helios4.h | 2 +- include/configs/mxs.h | 2 +- include/configs/nas220.h | 2 +- include/configs/tegra114-common.h | 2 +- include/configs/tegra124-common.h | 2 +- include/configs/tegra20-common.h | 2 +- include/configs/tegra210-common.h | 2 +- include/configs/tegra30-common.h | 2 +- include/configs/theadorable.h | 2 +- include/configs/tplink_wdr4300.h | 2 +- include/configs/turris_omnia.h | 2 +- include/configs/x530.h | 2 +- include/configs/zynq-common.h | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) (limited to 'include') diff --git a/include/configs/clearfog.h b/include/configs/clearfog.h index 705217067b3..a12e1582d67 100644 --- a/include/configs/clearfog.h +++ b/include/configs/clearfog.h @@ -19,7 +19,7 @@ */ /* USB/EHCI configuration */ -#define CONFIG_EHCI_IS_TDI +#define CONFIG_USB_EHCI_IS_TDI #define CONFIG_ENV_MIN_ENTRIES 128 diff --git a/include/configs/controlcenterdc.h b/include/configs/controlcenterdc.h index efd04c6fb8a..12e9b8d06d6 100644 --- a/include/configs/controlcenterdc.h +++ b/include/configs/controlcenterdc.h @@ -28,7 +28,7 @@ CONFIG_SYS_SCSI_MAX_LUN) /* USB/EHCI configuration */ -#define CONFIG_EHCI_IS_TDI +#define CONFIG_USB_EHCI_IS_TDI /* Environment in SPI NOR flash */ diff --git a/include/configs/crs3xx-98dx3236.h b/include/configs/crs3xx-98dx3236.h index 3feaa60edad..5300467a766 100644 --- a/include/configs/crs3xx-98dx3236.h +++ b/include/configs/crs3xx-98dx3236.h @@ -14,7 +14,7 @@ #define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage.cfg /* USB/EHCI configuration */ -#define CONFIG_EHCI_IS_TDI +#define CONFIG_USB_EHCI_IS_TDI /* Environment in SPI NOR flash */ diff --git a/include/configs/db-88f6720.h b/include/configs/db-88f6720.h index 95f5cf00568..76c02f6656d 100644 --- a/include/configs/db-88f6720.h +++ b/include/configs/db-88f6720.h @@ -20,7 +20,7 @@ #define CONFIG_I2C_MVTWSI_BASE0 MVEBU_TWSI_BASE /* USB/EHCI configuration */ -#define CONFIG_EHCI_IS_TDI +#define CONFIG_USB_EHCI_IS_TDI #define CONFIG_USB_MAX_CONTROLLER_COUNT 3 /* Environment in SPI NOR flash */ diff --git a/include/configs/db-88f6820-amc.h b/include/configs/db-88f6820-amc.h index 41216b8b4fc..c5f0a1d2e08 100644 --- a/include/configs/db-88f6820-amc.h +++ b/include/configs/db-88f6820-amc.h @@ -11,7 +11,7 @@ */ /* USB/EHCI configuration */ -#define CONFIG_EHCI_IS_TDI +#define CONFIG_USB_EHCI_IS_TDI /* Environment in SPI NOR flash */ diff --git a/include/configs/db-88f6820-gp.h b/include/configs/db-88f6820-gp.h index 6bae063ae48..ecda30bab50 100644 --- a/include/configs/db-88f6820-gp.h +++ b/include/configs/db-88f6820-gp.h @@ -23,7 +23,7 @@ CONFIG_SYS_SCSI_MAX_LUN) /* USB/EHCI configuration */ -#define CONFIG_EHCI_IS_TDI +#define CONFIG_USB_EHCI_IS_TDI /* Environment in SPI NOR flash */ diff --git a/include/configs/db-mv784mp-gp.h b/include/configs/db-mv784mp-gp.h index 48471993b88..defe4806136 100644 --- a/include/configs/db-mv784mp-gp.h +++ b/include/configs/db-mv784mp-gp.h @@ -21,7 +21,7 @@ #define CONFIG_I2C_MVTWSI_BASE0 MVEBU_TWSI_BASE /* USB/EHCI configuration */ -#define CONFIG_EHCI_IS_TDI +#define CONFIG_USB_EHCI_IS_TDI #define CONFIG_USB_MAX_CONTROLLER_COUNT 3 /* Environment in SPI NOR flash */ diff --git a/include/configs/db-xc3-24g4xg.h b/include/configs/db-xc3-24g4xg.h index 2c543fe12a8..206afae5901 100644 --- a/include/configs/db-xc3-24g4xg.h +++ b/include/configs/db-xc3-24g4xg.h @@ -13,7 +13,7 @@ #define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage.cfg /* USB/EHCI configuration */ -#define CONFIG_EHCI_IS_TDI +#define CONFIG_USB_EHCI_IS_TDI /* Environment in SPI NOR flash */ diff --git a/include/configs/ds414.h b/include/configs/ds414.h index 58ecc5f699d..85abed5d3b5 100644 --- a/include/configs/ds414.h +++ b/include/configs/ds414.h @@ -25,7 +25,7 @@ #endif /* USB/EHCI/XHCI configuration */ -#define CONFIG_EHCI_IS_TDI +#define CONFIG_USB_EHCI_IS_TDI /* * mv-common.h should be defined after CMD configs since it used them diff --git a/include/configs/helios4.h b/include/configs/helios4.h index b5814ed55cf..7ed70602d17 100644 --- a/include/configs/helios4.h +++ b/include/configs/helios4.h @@ -19,7 +19,7 @@ */ /* USB/EHCI configuration */ -#define CONFIG_EHCI_IS_TDI +#define CONFIG_USB_EHCI_IS_TDI #define CONFIG_ENV_MIN_ENTRIES 128 diff --git a/include/configs/mxs.h b/include/configs/mxs.h index 45d17664821..d7d3e9d57f1 100644 --- a/include/configs/mxs.h +++ b/include/configs/mxs.h @@ -124,7 +124,7 @@ /* USB */ #ifdef CONFIG_CMD_USB #define CONFIG_USB_EHCI_MXS -#define CONFIG_EHCI_IS_TDI +#define CONFIG_USB_EHCI_IS_TDI #endif #endif /* __CONFIGS_MXS_H__ */ diff --git a/include/configs/nas220.h b/include/configs/nas220.h index 16bbc9b049f..f071ee6e1c2 100644 --- a/include/configs/nas220.h +++ b/include/configs/nas220.h @@ -65,7 +65,7 @@ */ #ifdef CONFIG_CMD_USB #define CONFIG_USB_EHCI_KIRKWOOD /* on Kirkwood platform */ -#define CONFIG_EHCI_IS_TDI +#define CONFIG_USB_EHCI_IS_TDI #endif /* CONFIG_CMD_USB */ /* diff --git a/include/configs/tegra114-common.h b/include/configs/tegra114-common.h index f714c52bb53..06b687d5563 100644 --- a/include/configs/tegra114-common.h +++ b/include/configs/tegra114-common.h @@ -58,7 +58,7 @@ #define CONFIG_SPL_STACK 0x800ffffc /* For USB EHCI controller */ -#define CONFIG_EHCI_IS_TDI +#define CONFIG_USB_EHCI_IS_TDI #define CONFIG_USB_EHCI_TXFIFO_THRESH 0x10 #endif /* _TEGRA114_COMMON_H_ */ diff --git a/include/configs/tegra124-common.h b/include/configs/tegra124-common.h index 4a92954c9be..de78ac99241 100644 --- a/include/configs/tegra124-common.h +++ b/include/configs/tegra124-common.h @@ -60,7 +60,7 @@ #define CONFIG_SPL_STACK 0x800ffffc /* For USB EHCI controller */ -#define CONFIG_EHCI_IS_TDI +#define CONFIG_USB_EHCI_IS_TDI #define CONFIG_USB_EHCI_TXFIFO_THRESH 0x10 /* GPU needs setup */ diff --git a/include/configs/tegra20-common.h b/include/configs/tegra20-common.h index 19934a4cf0b..d2bed64ccdc 100644 --- a/include/configs/tegra20-common.h +++ b/include/configs/tegra20-common.h @@ -78,7 +78,7 @@ * packets depending on the buffer address and size. */ #define CONFIG_USB_EHCI_TXFIFO_THRESH 0x10 -#define CONFIG_EHCI_IS_TDI +#define CONFIG_USB_EHCI_IS_TDI #define CONFIG_SYS_NAND_SELF_INIT diff --git a/include/configs/tegra210-common.h b/include/configs/tegra210-common.h index b9e04147be3..6c58ccc3d5a 100644 --- a/include/configs/tegra210-common.h +++ b/include/configs/tegra210-common.h @@ -47,7 +47,7 @@ "ramdisk_addr_r=0x83200000\0" /* For USB EHCI controller */ -#define CONFIG_EHCI_IS_TDI +#define CONFIG_USB_EHCI_IS_TDI #define CONFIG_USB_EHCI_TXFIFO_THRESH 0x10 /* GPU needs setup */ diff --git a/include/configs/tegra30-common.h b/include/configs/tegra30-common.h index 0ee13a226d9..56b2671e43a 100644 --- a/include/configs/tegra30-common.h +++ b/include/configs/tegra30-common.h @@ -55,7 +55,7 @@ #define CONFIG_SPL_STACK 0x800ffffc /* For USB EHCI controller */ -#define CONFIG_EHCI_IS_TDI +#define CONFIG_USB_EHCI_IS_TDI #define CONFIG_USB_EHCI_TXFIFO_THRESH 0x10 #endif /* _TEGRA30_COMMON_H_ */ diff --git a/include/configs/theadorable.h b/include/configs/theadorable.h index 64b7f250920..073855592b1 100644 --- a/include/configs/theadorable.h +++ b/include/configs/theadorable.h @@ -29,7 +29,7 @@ #define CONFIG_I2C_MVTWSI_BASE1 MVEBU_TWSI1_BASE /* USB/EHCI configuration */ -#define CONFIG_EHCI_IS_TDI +#define CONFIG_USB_EHCI_IS_TDI #define CONFIG_USB_MAX_CONTROLLER_COUNT 3 /* Environment in SPI NOR flash */ diff --git a/include/configs/tplink_wdr4300.h b/include/configs/tplink_wdr4300.h index f9a0b7d1aaa..ede94e95f76 100644 --- a/include/configs/tplink_wdr4300.h +++ b/include/configs/tplink_wdr4300.h @@ -41,7 +41,7 @@ /* USB, USB storage, USB ethernet */ #define CONFIG_EHCI_MMIO_BIG_ENDIAN #define CONFIG_EHCI_DESC_BIG_ENDIAN -#define CONFIG_EHCI_IS_TDI +#define CONFIG_USB_EHCI_IS_TDI /* * Diagnostics diff --git a/include/configs/turris_omnia.h b/include/configs/turris_omnia.h index 8646633ea4c..4d8a7c37dec 100644 --- a/include/configs/turris_omnia.h +++ b/include/configs/turris_omnia.h @@ -18,7 +18,7 @@ */ /* USB/EHCI configuration */ -#define CONFIG_EHCI_IS_TDI +#define CONFIG_USB_EHCI_IS_TDI /* Environment in SPI NOR flash */ diff --git a/include/configs/x530.h b/include/configs/x530.h index d6aec6d7f25..23b1121460e 100644 --- a/include/configs/x530.h +++ b/include/configs/x530.h @@ -46,7 +46,7 @@ /* Additional FS support/configuration */ /* USB/EHCI configuration */ -#define CONFIG_EHCI_IS_TDI +#define CONFIG_USB_EHCI_IS_TDI /* Environment in SPI NOR flash */ diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h index 0c87f19ac36..f3c85126416 100644 --- a/include/configs/zynq-common.h +++ b/include/configs/zynq-common.h @@ -55,7 +55,7 @@ #endif #ifdef CONFIG_USB_EHCI_ZYNQ -# define CONFIG_EHCI_IS_TDI +# define CONFIG_USB_EHCI_IS_TDI # define DFU_DEFAULT_POLL_TIMEOUT 300 # define CONFIG_THOR_RESET_OFF -- cgit v1.2.3 From 7b805009fab3fae923ccc17db11de64769a3947c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Beh=C3=BAn?= Date: Sat, 9 Oct 2021 15:27:33 +0200 Subject: Convert CONFIG_USB_EHCI_MXS to Kconfig MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This option is only used for mx23evk_defconfig mx23_olinuxino_defconfig which are the only i.MX23 boards. Add depend on ARCH_MX23 and default to y. Signed-off-by: Marek Behún --- include/configs/mxs.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/configs/mxs.h b/include/configs/mxs.h index d7d3e9d57f1..ee2d7fa1b77 100644 --- a/include/configs/mxs.h +++ b/include/configs/mxs.h @@ -123,7 +123,6 @@ /* USB */ #ifdef CONFIG_CMD_USB -#define CONFIG_USB_EHCI_MXS #define CONFIG_USB_EHCI_IS_TDI #endif -- cgit v1.2.3 From 645a0afb328725afa817eb15d86aca2644c33579 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Beh=C3=BAn?= Date: Sat, 9 Oct 2021 15:27:34 +0200 Subject: Drop CONFIG_USB_EHCI_KIRKWOOD MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This config option doesn't do anything. nas220 uses USB_EHCI_MARVELL. Signed-off-by: Marek Behún --- include/configs/nas220.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/configs/nas220.h b/include/configs/nas220.h index f071ee6e1c2..52c55be061d 100644 --- a/include/configs/nas220.h +++ b/include/configs/nas220.h @@ -64,7 +64,6 @@ * USB/EHCI */ #ifdef CONFIG_CMD_USB -#define CONFIG_USB_EHCI_KIRKWOOD /* on Kirkwood platform */ #define CONFIG_USB_EHCI_IS_TDI #endif /* CONFIG_CMD_USB */ -- cgit v1.2.3 From 56882dc4cbc7f70a9984c33eb9bf609e1dd60763 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Beh=C3=BAn?= Date: Sat, 9 Oct 2021 15:27:35 +0200 Subject: Convert CONFIG_USB_EHCI_IS_TDI to Kconfig MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On mvebu this is defined if and only if !ARM64. Otherwise it is defined for boards with ARCH_MX23, ARCH_TEGRA and ARCH_ZYNQ, and also for SOC_AR934X (tplink_wdr4300). Signed-off-by: Marek Behún --- include/configs/clearfog.h | 3 --- include/configs/controlcenterdc.h | 3 --- include/configs/crs3xx-98dx3236.h | 3 --- include/configs/db-88f6720.h | 1 - include/configs/db-88f6820-amc.h | 3 --- include/configs/db-88f6820-gp.h | 3 --- include/configs/db-mv784mp-gp.h | 1 - include/configs/db-xc3-24g4xg.h | 3 --- include/configs/ds414.h | 3 --- include/configs/helios4.h | 3 --- include/configs/mxs.h | 5 ----- include/configs/nas220.h | 7 ------- include/configs/tegra114-common.h | 1 - include/configs/tegra124-common.h | 1 - include/configs/tegra20-common.h | 1 - include/configs/tegra210-common.h | 1 - include/configs/tegra30-common.h | 1 - include/configs/theadorable.h | 1 - include/configs/tplink_wdr4300.h | 1 - include/configs/turris_omnia.h | 3 --- include/configs/x530.h | 3 --- include/configs/zynq-common.h | 2 -- 22 files changed, 53 deletions(-) (limited to 'include') diff --git a/include/configs/clearfog.h b/include/configs/clearfog.h index a12e1582d67..a30bca5147a 100644 --- a/include/configs/clearfog.h +++ b/include/configs/clearfog.h @@ -18,9 +18,6 @@ * U-Boot into it. */ -/* USB/EHCI configuration */ -#define CONFIG_USB_EHCI_IS_TDI - #define CONFIG_ENV_MIN_ENTRIES 128 /* Environment in MMC */ diff --git a/include/configs/controlcenterdc.h b/include/configs/controlcenterdc.h index 12e9b8d06d6..21e61e5e8f5 100644 --- a/include/configs/controlcenterdc.h +++ b/include/configs/controlcenterdc.h @@ -27,9 +27,6 @@ #define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \ CONFIG_SYS_SCSI_MAX_LUN) -/* USB/EHCI configuration */ -#define CONFIG_USB_EHCI_IS_TDI - /* Environment in SPI NOR flash */ #define PHY_ANEG_TIMEOUT 8000 /* PHY needs a longer aneg time */ diff --git a/include/configs/crs3xx-98dx3236.h b/include/configs/crs3xx-98dx3236.h index 5300467a766..27b45a7605d 100644 --- a/include/configs/crs3xx-98dx3236.h +++ b/include/configs/crs3xx-98dx3236.h @@ -13,9 +13,6 @@ #define CONFIG_SYS_BOOTM_LEN (64 * 1024 * 1024) /* 64 MB */ #define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage.cfg -/* USB/EHCI configuration */ -#define CONFIG_USB_EHCI_IS_TDI - /* Environment in SPI NOR flash */ /* Keep device tree and initrd in lower memory so the kernel can access them */ diff --git a/include/configs/db-88f6720.h b/include/configs/db-88f6720.h index 76c02f6656d..19fc669f89d 100644 --- a/include/configs/db-88f6720.h +++ b/include/configs/db-88f6720.h @@ -20,7 +20,6 @@ #define CONFIG_I2C_MVTWSI_BASE0 MVEBU_TWSI_BASE /* USB/EHCI configuration */ -#define CONFIG_USB_EHCI_IS_TDI #define CONFIG_USB_MAX_CONTROLLER_COUNT 3 /* Environment in SPI NOR flash */ diff --git a/include/configs/db-88f6820-amc.h b/include/configs/db-88f6820-amc.h index c5f0a1d2e08..1f70c609d23 100644 --- a/include/configs/db-88f6820-amc.h +++ b/include/configs/db-88f6820-amc.h @@ -10,9 +10,6 @@ * High Level Configuration Options (easy to change) */ -/* USB/EHCI configuration */ -#define CONFIG_USB_EHCI_IS_TDI - /* Environment in SPI NOR flash */ #define PHY_ANEG_TIMEOUT 8000 /* PHY needs a longer aneg time */ diff --git a/include/configs/db-88f6820-gp.h b/include/configs/db-88f6820-gp.h index ecda30bab50..41dadfebb94 100644 --- a/include/configs/db-88f6820-gp.h +++ b/include/configs/db-88f6820-gp.h @@ -22,9 +22,6 @@ #define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \ CONFIG_SYS_SCSI_MAX_LUN) -/* USB/EHCI configuration */ -#define CONFIG_USB_EHCI_IS_TDI - /* Environment in SPI NOR flash */ #define PHY_ANEG_TIMEOUT 8000 /* PHY needs a longer aneg time */ diff --git a/include/configs/db-mv784mp-gp.h b/include/configs/db-mv784mp-gp.h index defe4806136..dbbc33ebf9c 100644 --- a/include/configs/db-mv784mp-gp.h +++ b/include/configs/db-mv784mp-gp.h @@ -21,7 +21,6 @@ #define CONFIG_I2C_MVTWSI_BASE0 MVEBU_TWSI_BASE /* USB/EHCI configuration */ -#define CONFIG_USB_EHCI_IS_TDI #define CONFIG_USB_MAX_CONTROLLER_COUNT 3 /* Environment in SPI NOR flash */ diff --git a/include/configs/db-xc3-24g4xg.h b/include/configs/db-xc3-24g4xg.h index 206afae5901..6a4c5a7ab55 100644 --- a/include/configs/db-xc3-24g4xg.h +++ b/include/configs/db-xc3-24g4xg.h @@ -12,9 +12,6 @@ #define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage.cfg -/* USB/EHCI configuration */ -#define CONFIG_USB_EHCI_IS_TDI - /* Environment in SPI NOR flash */ /* NAND */ diff --git a/include/configs/ds414.h b/include/configs/ds414.h index 85abed5d3b5..1f2d2c5e446 100644 --- a/include/configs/ds414.h +++ b/include/configs/ds414.h @@ -24,9 +24,6 @@ #define CONFIG_PCI_SCAN_SHOW #endif -/* USB/EHCI/XHCI configuration */ -#define CONFIG_USB_EHCI_IS_TDI - /* * mv-common.h should be defined after CMD configs since it used them * to enable certain macros diff --git a/include/configs/helios4.h b/include/configs/helios4.h index 7ed70602d17..56d35d6fdbc 100644 --- a/include/configs/helios4.h +++ b/include/configs/helios4.h @@ -18,9 +18,6 @@ * U-Boot into it. */ -/* USB/EHCI configuration */ -#define CONFIG_USB_EHCI_IS_TDI - #define CONFIG_ENV_MIN_ENTRIES 128 /* Environment in MMC */ diff --git a/include/configs/mxs.h b/include/configs/mxs.h index ee2d7fa1b77..51624a27c46 100644 --- a/include/configs/mxs.h +++ b/include/configs/mxs.h @@ -121,9 +121,4 @@ #define CONFIG_SPI_HALF_DUPLEX #endif -/* USB */ -#ifdef CONFIG_CMD_USB -#define CONFIG_USB_EHCI_IS_TDI -#endif - #endif /* __CONFIGS_MXS_H__ */ diff --git a/include/configs/nas220.h b/include/configs/nas220.h index 52c55be061d..99b14ba6218 100644 --- a/include/configs/nas220.h +++ b/include/configs/nas220.h @@ -60,13 +60,6 @@ #define CONFIG_PHY_BASE_ADR 8 #endif /* CONFIG_CMD_NET */ -/* - * USB/EHCI - */ -#ifdef CONFIG_CMD_USB -#define CONFIG_USB_EHCI_IS_TDI -#endif /* CONFIG_CMD_USB */ - /* * File system */ diff --git a/include/configs/tegra114-common.h b/include/configs/tegra114-common.h index 06b687d5563..09737211803 100644 --- a/include/configs/tegra114-common.h +++ b/include/configs/tegra114-common.h @@ -58,7 +58,6 @@ #define CONFIG_SPL_STACK 0x800ffffc /* For USB EHCI controller */ -#define CONFIG_USB_EHCI_IS_TDI #define CONFIG_USB_EHCI_TXFIFO_THRESH 0x10 #endif /* _TEGRA114_COMMON_H_ */ diff --git a/include/configs/tegra124-common.h b/include/configs/tegra124-common.h index de78ac99241..df688dabd1a 100644 --- a/include/configs/tegra124-common.h +++ b/include/configs/tegra124-common.h @@ -60,7 +60,6 @@ #define CONFIG_SPL_STACK 0x800ffffc /* For USB EHCI controller */ -#define CONFIG_USB_EHCI_IS_TDI #define CONFIG_USB_EHCI_TXFIFO_THRESH 0x10 /* GPU needs setup */ diff --git a/include/configs/tegra20-common.h b/include/configs/tegra20-common.h index d2bed64ccdc..063213cbfeb 100644 --- a/include/configs/tegra20-common.h +++ b/include/configs/tegra20-common.h @@ -78,7 +78,6 @@ * packets depending on the buffer address and size. */ #define CONFIG_USB_EHCI_TXFIFO_THRESH 0x10 -#define CONFIG_USB_EHCI_IS_TDI #define CONFIG_SYS_NAND_SELF_INIT diff --git a/include/configs/tegra210-common.h b/include/configs/tegra210-common.h index 6c58ccc3d5a..c36bdb0bb96 100644 --- a/include/configs/tegra210-common.h +++ b/include/configs/tegra210-common.h @@ -47,7 +47,6 @@ "ramdisk_addr_r=0x83200000\0" /* For USB EHCI controller */ -#define CONFIG_USB_EHCI_IS_TDI #define CONFIG_USB_EHCI_TXFIFO_THRESH 0x10 /* GPU needs setup */ diff --git a/include/configs/tegra30-common.h b/include/configs/tegra30-common.h index 56b2671e43a..b878b1a9e69 100644 --- a/include/configs/tegra30-common.h +++ b/include/configs/tegra30-common.h @@ -55,7 +55,6 @@ #define CONFIG_SPL_STACK 0x800ffffc /* For USB EHCI controller */ -#define CONFIG_USB_EHCI_IS_TDI #define CONFIG_USB_EHCI_TXFIFO_THRESH 0x10 #endif /* _TEGRA30_COMMON_H_ */ diff --git a/include/configs/theadorable.h b/include/configs/theadorable.h index 073855592b1..b43c03d3e8a 100644 --- a/include/configs/theadorable.h +++ b/include/configs/theadorable.h @@ -29,7 +29,6 @@ #define CONFIG_I2C_MVTWSI_BASE1 MVEBU_TWSI1_BASE /* USB/EHCI configuration */ -#define CONFIG_USB_EHCI_IS_TDI #define CONFIG_USB_MAX_CONTROLLER_COUNT 3 /* Environment in SPI NOR flash */ diff --git a/include/configs/tplink_wdr4300.h b/include/configs/tplink_wdr4300.h index ede94e95f76..3e76d638c99 100644 --- a/include/configs/tplink_wdr4300.h +++ b/include/configs/tplink_wdr4300.h @@ -41,7 +41,6 @@ /* USB, USB storage, USB ethernet */ #define CONFIG_EHCI_MMIO_BIG_ENDIAN #define CONFIG_EHCI_DESC_BIG_ENDIAN -#define CONFIG_USB_EHCI_IS_TDI /* * Diagnostics diff --git a/include/configs/turris_omnia.h b/include/configs/turris_omnia.h index 4d8a7c37dec..8d7d5c2bfc3 100644 --- a/include/configs/turris_omnia.h +++ b/include/configs/turris_omnia.h @@ -17,9 +17,6 @@ * U-Boot into it. */ -/* USB/EHCI configuration */ -#define CONFIG_USB_EHCI_IS_TDI - /* Environment in SPI NOR flash */ #define PHY_ANEG_TIMEOUT 8000 /* PHY needs a longer aneg time */ diff --git a/include/configs/x530.h b/include/configs/x530.h index 23b1121460e..f8b808ec7cd 100644 --- a/include/configs/x530.h +++ b/include/configs/x530.h @@ -45,9 +45,6 @@ /* Additional FS support/configuration */ -/* USB/EHCI configuration */ -#define CONFIG_USB_EHCI_IS_TDI - /* Environment in SPI NOR flash */ #define PHY_ANEG_TIMEOUT 8000 /* PHY needs a longer aneg time */ diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h index f3c85126416..4de2f94b040 100644 --- a/include/configs/zynq-common.h +++ b/include/configs/zynq-common.h @@ -55,8 +55,6 @@ #endif #ifdef CONFIG_USB_EHCI_ZYNQ -# define CONFIG_USB_EHCI_IS_TDI - # define DFU_DEFAULT_POLL_TIMEOUT 300 # define CONFIG_THOR_RESET_OFF #endif -- cgit v1.2.3 From d6f8ab30a2af4666732c2077df8f731076827b2e Mon Sep 17 00:00:00 2001 From: Ilias Apalodimas Date: Tue, 12 Oct 2021 00:00:15 +0300 Subject: treewide: Remove OF_PRIOR_STAGE The previous patches removed OF_PRIOR_STAGE from the last consumers of the Kconfig option. Cleanup any references to it in documentation, code and configuration options. Signed-off-by: Ilias Apalodimas Reviewed-by: Simon Glass --- include/fdtdec.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'include') diff --git a/include/fdtdec.h b/include/fdtdec.h index f94d1f4f3ab..239814228d7 100644 --- a/include/fdtdec.h +++ b/include/fdtdec.h @@ -55,10 +55,6 @@ struct bd_info; #define SPL_BUILD 0 #endif -#ifdef CONFIG_OF_PRIOR_STAGE -extern phys_addr_t prior_stage_fdt_address; -#endif - /* * Information about a resource. start is the first address of the resource * and end is the last address (inclusive). The length of the resource will -- cgit v1.2.3 From b20b16a794b073807ef8d6840772a92788b3e226 Mon Sep 17 00:00:00 2001 From: Usama Arif Date: Tue, 12 Oct 2021 13:43:16 +0100 Subject: arm: total_compute: increase DRAM to 8GB The extra 6GB start at 0x8080000000. Signed-off-by: Usama Arif --- include/configs/total_compute.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/configs/total_compute.h b/include/configs/total_compute.h index bbeedaf841d..933a145f993 100644 --- a/include/configs/total_compute.h +++ b/include/configs/total_compute.h @@ -30,6 +30,9 @@ #define PHYS_SDRAM_1_SIZE 0x80000000 - DRAM_SEC_SIZE #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 +#define PHYS_SDRAM_2 0x8080000000 +#define PHYS_SDRAM_2_SIZE 0x180000000 + #define CONFIG_SYS_MMC_MAX_BLK_COUNT 127 #define CONFIG_EXTRA_ENV_SETTINGS \ -- cgit v1.2.3 From fb9bec8e8a7378d921478d5fbcc941e0fa80c01e Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Sun, 12 Sep 2021 11:15:12 +0800 Subject: dm: core: Add a new API devfdt_get_addr_index_ptr() At present there is only devfdt_get_addr_ptr() which only returns the first pair in the 'reg' property. Add a new API devfdt_get_addr_index_ptr() to return the indexed pointer. Signed-off-by: Bin Meng Reviewed-by: Leo Yu-Chi Liang --- include/dm/fdtaddr.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include') diff --git a/include/dm/fdtaddr.h b/include/dm/fdtaddr.h index a4fda581a77..d2c19942916 100644 --- a/include/dm/fdtaddr.h +++ b/include/dm/fdtaddr.h @@ -92,6 +92,18 @@ void *devfdt_map_physmem(const struct udevice *dev, unsigned long size); */ fdt_addr_t devfdt_get_addr_index(const struct udevice *dev, int index); +/** + * devfdt_get_addr_index_ptr() - Return indexed pointer to the address of the + * reg property of a device + * + * @dev: Pointer to a device + * @index: the 'reg' property can hold a list of pairs + * and @index is used to select which one is required + * + * @return Pointer to addr, or NULL if there is no such property + */ +void *devfdt_get_addr_index_ptr(const struct udevice *dev, int index); + /** * devfdt_get_addr_size_index() - Get the indexed reg property of a device * -- cgit v1.2.3 From bdce903106397add4283b713132e24972a6ac0ee Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Sun, 12 Sep 2021 11:15:13 +0800 Subject: dm: Provide dev_read_addr_index_ptr() wrapper Like dev_read_addr_ptr(), provide a wrapper for the indexed version. Signed-off-by: Bin Meng Reviewed-by: Leo Yu-Chi Liang Reviewed-by: Simon Glass --- include/dm/read.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'include') diff --git a/include/dm/read.h b/include/dm/read.h index 5bf34056147..890bf3d8472 100644 --- a/include/dm/read.h +++ b/include/dm/read.h @@ -180,6 +180,18 @@ int dev_read_size(const struct udevice *dev, const char *propname); */ fdt_addr_t dev_read_addr_index(const struct udevice *dev, int index); +/** + * dev_read_addr_index_ptr() - Get the indexed reg property of a device + * as a pointer + * + * @dev: Device to read from + * @index: the 'reg' property can hold a list of pairs + * and @index is used to select which one is required + * + * @return pointer or NULL if not found + */ +void *dev_read_addr_index_ptr(const struct udevice *dev, int index); + /** * dev_read_addr_size_index() - Get the indexed reg property of a device * @@ -805,6 +817,12 @@ static inline fdt_addr_t dev_read_addr_index(const struct udevice *dev, return devfdt_get_addr_index(dev, index); } +static inline void *dev_read_addr_index_ptr(const struct udevice *dev, + int index) +{ + return devfdt_get_addr_index_ptr(dev, index); +} + static inline fdt_addr_t dev_read_addr_size_index(const struct udevice *dev, int index, fdt_size_t *size) -- cgit v1.2.3