From ac458dc823de95e05e433d7645b960f8c6088f55 Mon Sep 17 00:00:00 2001 From: Jason Wessel Date: Fri, 17 Jul 2020 06:31:59 -0700 Subject: bcmgenet: fix DMA buffer management MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit fixes a serious issue occurring when several network commands are run on a raspberry pi 4 board: for instance a "dhcp" command and then one or several "tftp" commands. In this case, packet recv callbacks were called several times on the same packets, and send function was failing most of the time. note: if the boot procedure is made of a single network command, the issue is not visible. The issue is related to management of the packet ring buffers (producer / consumer) and DMA. Each time a packet is received, the ethernet device stores it in the buffer and increments an index called RDMA_PROD_INDEX. Each time the driver outputs a received packet, it increments another index called RDMA_CONS_INDEX. Between each pair of network commands, as part of the driver 'start' function, previous code tried to reset both RDMA_CONS_INDEX and RDMA_PROD_INDEX to 0. But RDMA_PROD_INDEX cannot be written from driver side, thus its value was actually not updated, and only RDMA_CONS_INDEX was reset to 0. This was resulting in a major synchronization issue between the driver and the device. Most visible behavior was that the driver seemed to receive again the packets from the previous commands (e.g. DHCP response packets "received" again when performing the first TFTP command). This fix consists in setting RDMA_CONS_INDEX to the same value as RDMA_PROD_INDEX, when resetting the driver. The same kind of fix was needed on the TX side, and a few variables had to be reset accordingly (c_index, tx_index, rx_index). The rx_index and tx_index have only 256 entries so the bottom 8 bits must be masked off. Originated-by: Etienne Dublé Signed-off-by: Jason Wessel Tested-by: Petr Tesarik Signed-off-by: Matthias Brugger --- drivers/net/bcmgenet.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/net/bcmgenet.c b/drivers/net/bcmgenet.c index 11b6148ab6..1b7e7ba2bf 100644 --- a/drivers/net/bcmgenet.c +++ b/drivers/net/bcmgenet.c @@ -378,8 +378,6 @@ static void rx_descs_init(struct bcmgenet_eth_priv *priv) u32 len_stat, i; void *desc_base = priv->rx_desc_base; - priv->c_index = 0; - len_stat = (RX_BUF_LENGTH << DMA_BUFLENGTH_SHIFT) | DMA_OWN; for (i = 0; i < RX_DESCS; i++) { @@ -403,8 +401,11 @@ static void rx_ring_init(struct bcmgenet_eth_priv *priv) writel(RX_DESCS * DMA_DESC_SIZE / 4 - 1, priv->mac_reg + RDMA_RING_REG_BASE + DMA_END_ADDR); - writel(0x0, priv->mac_reg + RDMA_PROD_INDEX); - writel(0x0, priv->mac_reg + RDMA_CONS_INDEX); + /* cannot init RDMA_PROD_INDEX to 0, so align RDMA_CONS_INDEX on it instead */ + priv->c_index = readl(priv->mac_reg + RDMA_PROD_INDEX); + writel(priv->c_index, priv->mac_reg + RDMA_CONS_INDEX); + priv->rx_index = priv->c_index; + priv->rx_index &= 0xFF; writel((RX_DESCS << DMA_RING_SIZE_SHIFT) | RX_BUF_LENGTH, priv->mac_reg + RDMA_RING_REG_BASE + DMA_RING_BUF_SIZE); writel(DMA_FC_THRESH_VALUE, priv->mac_reg + RDMA_XON_XOFF_THRESH); @@ -421,8 +422,10 @@ static void tx_ring_init(struct bcmgenet_eth_priv *priv) writel(0x0, priv->mac_reg + TDMA_WRITE_PTR); writel(TX_DESCS * DMA_DESC_SIZE / 4 - 1, priv->mac_reg + TDMA_RING_REG_BASE + DMA_END_ADDR); - writel(0x0, priv->mac_reg + TDMA_PROD_INDEX); - writel(0x0, priv->mac_reg + TDMA_CONS_INDEX); + /* cannot init TDMA_CONS_INDEX to 0, so align TDMA_PROD_INDEX on it instead */ + priv->tx_index = readl(priv->mac_reg + TDMA_CONS_INDEX); + writel(priv->tx_index, priv->mac_reg + TDMA_PROD_INDEX); + priv->tx_index &= 0xFF; writel(0x1, priv->mac_reg + TDMA_RING_REG_BASE + DMA_MBUF_DONE_THRESH); writel(0x0, priv->mac_reg + TDMA_FLOW_PERIOD); writel((TX_DESCS << DMA_RING_SIZE_SHIFT) | RX_BUF_LENGTH, @@ -469,8 +472,6 @@ static int bcmgenet_gmac_eth_start(struct udevice *dev) priv->tx_desc_base = priv->mac_reg + GENET_TX_OFF; priv->rx_desc_base = priv->mac_reg + GENET_RX_OFF; - priv->tx_index = 0x0; - priv->rx_index = 0x0; bcmgenet_umac_reset(priv); -- cgit From 34873f46bacb039a1f7f8d8147664150bfec2a2d Mon Sep 17 00:00:00 2001 From: Jason Wessel Date: Fri, 17 Jul 2020 06:32:00 -0700 Subject: bcmgenet: Add support for rgmii-rxid The commit 57805f2270c4 ("net: bcmgenet: Don't set ID_MODE_DIS when not using RGMII") needed to be extended for the case of using the rgmii-rxid. The latest version of the Rasbperry Pi4 dtb files for the 5.4 now specify the rgmii-rxid. Signed-off-by: Jason Wessel Tested-by: Petr Tesarik Signed-off-by: Matthias Brugger --- drivers/net/bcmgenet.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/bcmgenet.c b/drivers/net/bcmgenet.c index 1b7e7ba2bf..ace1331362 100644 --- a/drivers/net/bcmgenet.c +++ b/drivers/net/bcmgenet.c @@ -457,7 +457,8 @@ static int bcmgenet_adjust_link(struct bcmgenet_eth_priv *priv) clrsetbits_32(priv->mac_reg + EXT_RGMII_OOB_CTRL, OOB_DISABLE, RGMII_LINK | RGMII_MODE_EN); - if (phy_dev->interface == PHY_INTERFACE_MODE_RGMII) + if (phy_dev->interface == PHY_INTERFACE_MODE_RGMII || + phy_dev->interface == PHY_INTERFACE_MODE_RGMII_RXID) setbits_32(priv->mac_reg + EXT_RGMII_OOB_CTRL, ID_MODE_DIS); writel(speed << CMD_SPEED_SHIFT, (priv->mac_reg + UMAC_CMD)); -- cgit From 40877a1a949edf7066b3e4ed16101153624bb314 Mon Sep 17 00:00:00 2001 From: Matthias Brugger Date: Sun, 12 Jul 2020 19:40:28 +0200 Subject: config: Enable USB Keyboard suuport on RPi4 32 bit Supporting USB keyboards out of the box is both handy for development and production. Notably if u-boot is used to boot into GRUB. This patch adds USB keyboard support for 32 bit RPi4 config. Signed-off-by: Matthias Brugger --- configs/rpi_4_32b_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/rpi_4_32b_defconfig b/configs/rpi_4_32b_defconfig index db7b781976..4a88448e9d 100644 --- a/configs/rpi_4_32b_defconfig +++ b/configs/rpi_4_32b_defconfig @@ -42,6 +42,7 @@ CONFIG_DM_USB=y CONFIG_DM_USB_GADGET=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_PCI=y +CONFIG_USB_KEYBOARD=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_MANUFACTURER="FSL" CONFIG_USB_GADGET_VENDOR_NUM=0x0525 -- cgit From cf8df34015fcbd6b85a8ebadd22382d68c57f4e5 Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Tue, 7 Apr 2020 16:07:46 +0200 Subject: arm: stm32mp: cleanup test on eth_env_set_enetaddr result Remove the unnecessary inversion on the eth_env_set_enetaddr() result which only make complex the code of setup_mac_address() and display an invalid value in the associated pr_err. Signed-off-by: Patrick Delaunay Reviewed-by: Marek Vasut --- arch/arm/mach-stm32mp/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c index b7fcee2b36..f19e5c3f33 100644 --- a/arch/arm/mach-stm32mp/cpu.c +++ b/arch/arm/mach-stm32mp/cpu.c @@ -580,8 +580,8 @@ __weak int setup_mac_address(void) return -EINVAL; } pr_debug("OTP MAC address = %pM\n", enetaddr); - ret = !eth_env_set_enetaddr("ethaddr", enetaddr); - if (!ret) + ret = eth_env_set_enetaddr("ethaddr", enetaddr); + if (ret) pr_err("Failed to set mac address %pM from OTP: %d\n", enetaddr, ret); #endif -- cgit From 43e2d1dd47a7e9b126659dc17a10f351e49bc53b Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sat, 22 Aug 2020 22:45:36 +0200 Subject: ARM: dts: stm32: Pull UART4 RX high on AV96 There is no dedicated pull resistor on the AV96 UART4 (console UART) pin. In case there is no UART adapter installed on the AV96, the line is floating and can trigger reception of garbage characters, which in turn can abort U-Boot autoboot. Add default pull up to mitigate this problem. Signed-off-by: Marek Vasut Cc: Patrick Delaunay Cc: Patrice Chotard Reviewed-by: Patrick Delaunay --- arch/arm/dts/stm32mp15xx-dhcor-avenger96-u-boot.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/dts/stm32mp15xx-dhcor-avenger96-u-boot.dtsi b/arch/arm/dts/stm32mp15xx-dhcor-avenger96-u-boot.dtsi index cb92fc9c14..1ae57e1854 100644 --- a/arch/arm/dts/stm32mp15xx-dhcor-avenger96-u-boot.dtsi +++ b/arch/arm/dts/stm32mp15xx-dhcor-avenger96-u-boot.dtsi @@ -75,6 +75,8 @@ }; pins2 { u-boot,dm-pre-reloc; + /delete-property/ bias-disable; + bias-pull-up; }; }; -- cgit From b6055945d66d0f4e3b1ecb82af476232067a4ee4 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sat, 22 Aug 2020 22:45:25 +0200 Subject: ARM: dts: stm32: Adjust PLL4 settings on AV96 again PLL4Q is supplying both FDCAN and LTDC. In case HDMI is in use, the 50 MHz generated from PLL4Q cannot be divided well enough to produce accurate clock for HDMI pixel clock. Adjust it to generate 74.25 MHz instead. The PLL4P/PLL4R are generating 99 MHz instead of 100 MHz, which is in tolerance for the SDMMC. Signed-off-by: Marek Vasut Cc: Gerald Baeza Cc: Patrick Delaunay Cc: Patrice Chotard Reviewed-by: Patrick Delaunay --- arch/arm/dts/stm32mp15xx-dhcor-u-boot.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/dts/stm32mp15xx-dhcor-u-boot.dtsi b/arch/arm/dts/stm32mp15xx-dhcor-u-boot.dtsi index 7529068c51..c73318488d 100644 --- a/arch/arm/dts/stm32mp15xx-dhcor-u-boot.dtsi +++ b/arch/arm/dts/stm32mp15xx-dhcor-u-boot.dtsi @@ -132,11 +132,11 @@ u-boot,dm-pre-reloc; }; - /* VCO = 600.0 MHz => P = 100, Q = 50, R = 100 */ + /* VCO = 600.0 MHz => P = 99, Q = 74, R = 99 */ pll4: st,pll@3 { compatible = "st,stm32mp1-pll"; reg = <3>; - cfg = < 1 49 5 11 5 PQR(1,1,1) >; + cfg = < 3 98 5 7 5 PQR(1,1,1) >; u-boot,dm-pre-reloc; }; }; -- cgit From 3b3c04869774af3e9664c2f7959027b1c7b87abc Mon Sep 17 00:00:00 2001 From: Anand Moon Date: Fri, 14 Aug 2020 06:25:14 +0000 Subject: configs: odroid-n2: update for HDMI output & USB keyboard Enable options to permit HDMI output on Odroid-N2 G12B boards. Enable VPU Power Domain. Enable USB_KEYBOARD. Signed-off-by: Anand Moon Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong --- configs/odroid-n2_defconfig | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/configs/odroid-n2_defconfig b/configs/odroid-n2_defconfig index 358d1fc630..e8b8da9084 100644 --- a/configs/odroid-n2_defconfig +++ b/configs/odroid-n2_defconfig @@ -34,6 +34,8 @@ CONFIG_ETH_DESIGNWARE=y CONFIG_MESON_G12A_USB_PHY=y CONFIG_PINCTRL=y CONFIG_PINCTRL_MESON_G12A=y +CONFIG_POWER_DOMAIN=y +CONFIG_MESON_EE_POWER_DOMAIN=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_RESET=y @@ -47,10 +49,17 @@ CONFIG_USB_XHCI_DWC3=y CONFIG_USB_DWC3=y # CONFIG_USB_DWC3_GADGET is not set CONFIG_USB_DWC3_MESON_G12A=y +CONFIG_USB_KEYBOARD=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_VENDOR_NUM=0x1b8e CONFIG_USB_GADGET_PRODUCT_NUM=0xfada CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8=y CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_DM_VIDEO=y +# CONFIG_VIDEO_BPP8 is not set +# CONFIG_VIDEO_BPP16 is not set +CONFIG_SYS_WHITE_ON_BLACK=y +CONFIG_VIDEO_MESON=y +CONFIG_VIDEO_DT_SIMPLEFB=y CONFIG_OF_LIBFDT_OVERLAY=y -- cgit From 92f10e61351ddddd730c49c00cdbbd195c838140 Mon Sep 17 00:00:00 2001 From: Anand Moon Date: Fri, 14 Aug 2020 06:25:15 +0000 Subject: configs: odroid-c4: update for HDMI output background & USB keyboard Enable options SYS_WHITE_ON_BLACK to permit HDMI background screen from white to back, also enable USB_KEYBOARD. Signed-off-by: Anand Moon Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong --- configs/odroid-c4_defconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configs/odroid-c4_defconfig b/configs/odroid-c4_defconfig index bf79d7424a..ffaaaab2b4 100644 --- a/configs/odroid-c4_defconfig +++ b/configs/odroid-c4_defconfig @@ -49,6 +49,7 @@ CONFIG_USB_XHCI_DWC3=y CONFIG_USB_DWC3=y # CONFIG_USB_DWC3_GADGET is not set CONFIG_USB_DWC3_MESON_G12A=y +CONFIG_USB_KEYBOARD=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_VENDOR_NUM=0x1b8e CONFIG_USB_GADGET_PRODUCT_NUM=0xfada @@ -56,6 +57,9 @@ CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8=y CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_DM_VIDEO=y +# CONFIG_VIDEO_BPP8 is not set +# CONFIG_VIDEO_BPP16 is not set +CONFIG_SYS_WHITE_ON_BLACK=y CONFIG_VIDEO_MESON=y CONFIG_VIDEO_DT_SIMPLEFB=y CONFIG_SPLASH_SCREEN=y -- cgit From 9250d0bad5637233a24a0c4b583100ad1be63316 Mon Sep 17 00:00:00 2001 From: Chuanjia Liu Date: Mon, 31 Aug 2020 15:53:12 +0800 Subject: PCI: mediatek: Release the resource when PCIe enable port fail On the mt7623 platform, if one port enable fail and other port enable succeed. It will hang on when using pci enum because the resource was not released correctly. Signed-off-by: Chuanjia Liu Tested-by: Frank Wunderlich --- drivers/pci/pcie_mediatek.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/pci/pcie_mediatek.c b/drivers/pci/pcie_mediatek.c index ad34f7c597..55b6a40f25 100644 --- a/drivers/pci/pcie_mediatek.c +++ b/drivers/pci/pcie_mediatek.c @@ -443,29 +443,36 @@ static void mtk_pcie_enable_port(struct mtk_pcie_port *port) err = clk_enable(&port->sys_ck); if (err) - goto exit; + goto err_sys_clk; err = reset_assert(&port->reset); if (err) - goto exit; + goto err_reset; err = reset_deassert(&port->reset); if (err) - goto exit; + goto err_reset; err = generic_phy_init(&port->phy); if (err) - goto exit; + goto err_phy_init; err = generic_phy_power_on(&port->phy); if (err) - goto exit; + goto err_phy_on; if (!mtk_pcie_startup_port(port)) return; pr_err("Port%d link down\n", port->slot); -exit: + + generic_phy_power_off(&port->phy); +err_phy_on: + generic_phy_exit(&port->phy); +err_phy_init: +err_reset: + clk_disable(&port->sys_ck); +err_sys_clk: mtk_pcie_port_free(port); } -- cgit From 91b735d11f95ecf608a95a255281c36dcc7e37a4 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Thu, 27 Aug 2020 18:01:28 +0200 Subject: common: Kconfig: Add dependency for default variables strings Kconfig provides several config options for setting up default variables but these are unused when variables are passed to U-Boot via file. That's why cover this dependency in Kconfig. Signed-off-by: Michal Simek --- common/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/Kconfig b/common/Kconfig index c58f08ba91..b1934b3a9c 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -378,7 +378,7 @@ config USE_BOOTARGS config BOOTARGS string "Boot arguments" - depends on USE_BOOTARGS + depends on USE_BOOTARGS && !USE_DEFAULT_ENV_FILE help This can be used to pass arguments to the bootm command. The value of CONFIG_BOOTARGS goes into the environment value "bootargs". Note that @@ -395,7 +395,7 @@ config USE_BOOTCOMMAND config BOOTCOMMAND string "bootcmd value" - depends on USE_BOOTCOMMAND + depends on USE_BOOTCOMMAND && !USE_DEFAULT_ENV_FILE default "run distro_bootcmd" if DISTRO_DEFAULTS help This is the string of commands that will be used as bootcmd and if @@ -416,7 +416,7 @@ config USE_PREBOOT config PREBOOT string "preboot default value" - depends on USE_PREBOOT + depends on USE_PREBOOT && !USE_DEFAULT_ENV_FILE default "" help This is the default of "preboot" environment variable. -- cgit From 21d3946840fd62dc09e93986743915bcbac100b7 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Sun, 30 Aug 2020 11:34:12 +0200 Subject: bootm: update image OS image size when decompressing In bootm_load_os() the OS image is decompressed. In later stages of the boot process we need the decompressed size of the image. Update images->os.image_len after decompression. Passing the correct size is necessary if we want to check loaded EFI binararies for file truncation by comparing the loaded size to the header field SizeOfImage. Signed-off-by: Heinrich Schuchardt Reviewed-by: Simon Glass --- common/bootm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/bootm.c b/common/bootm.c index 247b600d9c..b3377490b3 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -390,6 +390,8 @@ static int bootm_load_os(bootm_headers_t *images, int boot_progress) bootstage_error(BOOTSTAGE_ID_DECOMP_IMAGE); return err; } + /* We need the decompressed image size in the next steps */ + images->os.image_len = load_end - load; flush_cache(flush_start, ALIGN(load_end, ARCH_DMA_MINALIGN) - flush_start); -- cgit From 142775a52bc97d5273922970b8a9cc9f95091359 Mon Sep 17 00:00:00 2001 From: Pedro Aguilar Date: Mon, 31 Aug 2020 11:01:41 +0200 Subject: env: Crash in 'env import' when using checksum and a specific size This patch adds a sanity check that avoids 'size' to overflow and crash when importing an environment that contains a checksum. Example with the wrong size that causes the crash: => env import -c 0x4100000 3 v1 This assumes that v1 has already been successfully exported with 'env export -c -s 0x100 0x4100000 v1' Signed-off-by: Pedro Aguilar --- cmd/nvedit.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/nvedit.c b/cmd/nvedit.c index d188c6aa6b..9f145dd284 100644 --- a/cmd/nvedit.c +++ b/cmd/nvedit.c @@ -1171,6 +1171,11 @@ static int do_env_import(struct cmd_tbl *cmdtp, int flag, uint32_t crc; env_t *ep = (env_t *)ptr; + if (size <= offsetof(env_t, data)) { + printf("## Error: Invalid size 0x%zX\n", size); + return 1; + } + size -= offsetof(env_t, data); memcpy(&crc, &ep->crc, sizeof(crc)); -- cgit From 1e2c5bb9e7f9fdad05a5b1f36c44da5cc430b8a9 Mon Sep 17 00:00:00 2001 From: T Karthik Reddy Date: Mon, 31 Aug 2020 14:27:37 +0200 Subject: mtd: nand: Fix nand write error with bad block addresses above 32-bit Nand writes should skip the bad blocks with "nand write" command. In case of bad blocks with above 32-bit address, nand_block_isbad() returns false due to truncated bad block address. In below code segment, if (nand_block_isbad(mtd, offset & ~(mtd->erasesize - 1))) offset is 64-bit and mtd->erasesize is 32-bit, hence the truncation is happening. Cast 'mtd->erasesize' with loff_t to fix this issue. Signed-off-by: T Karthik Reddy Signed-off-by: Michal Simek --- drivers/mtd/nand/raw/nand_util.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/nand/raw/nand_util.c b/drivers/mtd/nand/raw/nand_util.c index 5b74ef0dfd..00c3c6c412 100644 --- a/drivers/mtd/nand/raw/nand_util.c +++ b/drivers/mtd/nand/raw/nand_util.c @@ -635,14 +635,14 @@ int nand_write_skip_bad(struct mtd_info *mtd, loff_t offset, size_t *length, } while (left_to_write > 0) { + loff_t block_start = offset & ~(loff_t)(mtd->erasesize - 1); size_t block_offset = offset & (mtd->erasesize - 1); size_t write_size, truncated_write_size; WATCHDOG_RESET(); - if (nand_block_isbad(mtd, offset & ~(mtd->erasesize - 1))) { - printf("Skip bad block 0x%08llx\n", - offset & ~(mtd->erasesize - 1)); + if (nand_block_isbad(mtd, block_start)) { + printf("Skip bad block 0x%08llx\n", block_start); offset += mtd->erasesize - block_offset; continue; } -- cgit From eb39d8ba5f0d1468b01b89a2a464d18612d3ea76 Mon Sep 17 00:00:00 2001 From: Reuben Dowle Date: Tue, 1 Sep 2020 21:32:01 +0000 Subject: Fix data abort caused by mis-aligning FIT data Attempting to place device tree immediately after an image in memory can lead to mis-aligned data accesses if that image size is not divisible by the alignment requirements of the architecture. Data aborts caused by this were observed on a custom Marvel A388 based system, where the image was a uboot FIT file. The total size varies depending on the uboot device tree size, which does not always lead to correct alignment. The minimum alignment specified for ARM [1] and ARM64 [2] linux booting has been used [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/arm/booting.rst#n126 [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/arm64/booting.rst#n45 Signed-off-by: Reuben Dowle --- common/spl/spl_fit.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index 365104fe02..a8bfd388b1 100644 --- a/common/spl/spl_fit.c +++ b/common/spl/spl_fit.c @@ -349,9 +349,12 @@ static int spl_fit_append_fdt(struct spl_image_info *spl_image, /* * Use the address following the image as target address for the - * device tree. + * device tree. Load address is aligned to 8 bytes to match the required + * alignment specified for linux arm [1] and arm 64 [2] booting + * [1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/arm/booting.rst#n126 + * [2]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/arm64/booting.rst#n45 */ - image_info.load_addr = spl_image->load_addr + spl_image->size; + image_info.load_addr = ALIGN(spl_image->load_addr + spl_image->size, 8); /* Figure out which device tree the board wants to use */ node = spl_fit_get_image_node(fit, images, FIT_FDT_PROP, index++); -- cgit From 75fb7b9163b9dc01828a3a519d2de0b19a6f23f2 Mon Sep 17 00:00:00 2001 From: Mingming Lee Date: Fri, 4 Sep 2020 13:35:22 +0800 Subject: ARM: MediaTek: amend IC description for MediaTek MT8512 The description for MT8512 has some mistake, so correct it. Signed-off-by: Mingming Lee --- arch/arm/mach-mediatek/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-mediatek/Kconfig b/arch/arm/mach-mediatek/Kconfig index 0042e57017..7f40ba9319 100644 --- a/arch/arm/mach-mediatek/Kconfig +++ b/arch/arm/mach-mediatek/Kconfig @@ -47,10 +47,10 @@ config TARGET_MT8512 select ARM64 select MT8512 help - The MediaTek MT8512 is a ARM64-based SoC with a quad-core Cortex-A53. + The MediaTek MT8512 is a ARM64-based SoC with a dual-core Cortex-A53. including UART, SPI, USB2.0 and OTG, SD and MMC cards, NAND, PWM, - Ethernet, IR TX/RX, I2C, I2S, S/PDIF, and built-in Wi-Fi / Bluetooth combo - chip and several DDR3 and DDR4 options. + IR RX, I2C, I2S, S/PDIF, and built-in Wi-Fi / Bluetooth digital + and several LPDDR3 and LPDDR4 options. config TARGET_MT8516 bool "MediaTek MT8516 SoC" -- cgit From 2974ba4f65f839bee9ba202c0b61e24071f55721 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Sat, 5 Sep 2020 10:58:52 +0200 Subject: doc: describe source repository Add a chapter to the HTML documentation describing how to retrieve the U-Boot sources. Signed-off-by: Heinrich Schuchardt --- doc/build/index.rst | 1 + doc/build/source.rst | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 doc/build/source.rst diff --git a/doc/build/index.rst b/doc/build/index.rst index e0072afb5e..5051a97e70 100644 --- a/doc/build/index.rst +++ b/doc/build/index.rst @@ -6,5 +6,6 @@ Build U-Boot .. toctree:: :maxdepth: 2 + source clang tools diff --git a/doc/build/source.rst b/doc/build/source.rst new file mode 100644 index 0000000000..75720e2027 --- /dev/null +++ b/doc/build/source.rst @@ -0,0 +1,30 @@ +Obtaining the source +===================== + +The source of the U-Boot project is maintained in a Git repository. + +You can download the source via + +.. code-block:: bash + + git clone https://gitlab.denx.de/u-boot/u-boot.git + +A mirror of the source is maintained on Github + +.. code-block:: bash + + git clone https://github.com/u-boot/u-boot + +The released versions are available as tags which use the naming scheme:: + + v. + +Release candidates are named:: + + v.-rc + +To checkout the October 2020 release you would use: + +.. code-block:: bash + + git checkout v2020.10 -- cgit From 70e38eea3ada86874934ae5746f93dc793f75447 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Sat, 5 Sep 2020 10:58:53 +0200 Subject: doc: describe building with GCC Provide a description of the U-Boot build process with GCC in the HTML documentation. Signed-off-by: Heinrich Schuchardt --- doc/build/gcc.rst | 119 ++++++++++++++++++++++++++++++++++++++++++++++++++++ doc/build/index.rst | 1 + 2 files changed, 120 insertions(+) create mode 100644 doc/build/gcc.rst diff --git a/doc/build/gcc.rst b/doc/build/gcc.rst new file mode 100644 index 0000000000..fcb0b1ffb3 --- /dev/null +++ b/doc/build/gcc.rst @@ -0,0 +1,119 @@ +Building with GCC +================= + +Dependencies +------------ + +For building U-Boot you need a GCC compiler for your host platform. If you +are not building on the target platform you further need a GCC cross compiler. + +Debian based +~~~~~~~~~~~~ + +On Debian based systems the cross compiler packages are named +gcc--linux-gnu. + +You could install GCC and the GCC cross compiler for the ARMv8 architecture with + +.. code-block:: bash + + sudo apt-get gcc gcc-aarch64-linux-gnu + +Depending on the build targets further packages maybe needed + +.. code-block:: bash + + sudo apt-get install bc bison build-essential coccinelle \ + device-tree-compiler dfu-util efitools flex gdisk liblz4-tool \ + libguestfs-tools libncurses-dev libpython3-dev libsdl2-dev libssl-dev \ + lzma-alone openssl python3 python3-coverage python3-pyelftools \ + python3-pytest python3-sphinxcontrib.apidoc python3-sphinx-rtd-theme swig + +Prerequisites +------------- + +For some boards you have to build prerequisite files before you can build +U-Boot, e.g. for the some boards you will need to build the ARM Trusted Firmware +beforehand. Please, refer to the board specific documentation +:doc:`../board/index`. + +Configuration +------------- + +Directory configs/ contains the template configuration files for the maintained +boards following the naming scheme:: + + _defconfig + +These files have been stripped of default settings. So you cannot use them +directly. Instead their name serves as a make target to generate the actual +configuration file .config. For instance the configuration template for the +Odroid C2 board is called odroid-c2_defconfig. The corresponding .config file +is generated by + +.. code-block:: bash + + make odroid-c2_defconfig + +You can adjust the configuration using + +.. code-block:: bash + + make menuconfig + +Building +-------- + +When cross compiling you will have to specify the prefix of the cross-compiler. +You can either specify the value of the CROSS_COMPILE variable on the make +command line or export it beforehand. + +.. code-block:: bash + + CROSS_COMPILE= make + +Assuming cross compiling on Debian for ARMv8 this would be + +.. code-block:: bash + + CROSS_COMPILE=aarch64-linux-gnu- make + +Build parameters +~~~~~~~~~~~~~~~~ + +A list of available parameters for the make command can be obtained via + +.. code-block:: bash + + make help + +You can speed up compilation by parallelization using the -j parameter, e.g. + +.. code-block:: bash + + CROSS_COMPILE=aarch64-linux-gnu- make -j$(nproc) + +Further important build parameters are + +* O= - generate all output files in directory , including .config +* V=1 - verbose build + +Other build targets +~~~~~~~~~~~~~~~~~~~ + +A list of all make targets can be obtained via + +.. code-block:: bash + + make help + +Important ones are + +* clean - remove most generated files but keep the configuration +* mrproper - remove all generated files + config + various backup files + +Installation +------------ + +The process for installing U-Boot on the target device is device specific. +Please, refer to the board specific documentation :doc:`../board/index`. diff --git a/doc/build/index.rst b/doc/build/index.rst index 5051a97e70..5f90f95aca 100644 --- a/doc/build/index.rst +++ b/doc/build/index.rst @@ -7,5 +7,6 @@ Build U-Boot :maxdepth: 2 source + gcc clang tools -- cgit From 9a97314b5bb815151b48b867455ee428fa394902 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Sat, 5 Sep 2020 11:08:06 +0200 Subject: Makefile: mrproper shall delete doc/output/ HTML documentation is generated in doc/output/. This directory shall be deleted by 'make mrproper' Signed-off-by: Heinrich Schuchardt Reviewed-by: Simon Glass --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3a18fb3c58..6665cd6960 100644 --- a/Makefile +++ b/Makefile @@ -2025,7 +2025,7 @@ CLEAN_FILES += include/bmp_logo.h include/bmp_logo_data.h tools/version.h \ # Directories & files removed with 'make mrproper' MRPROPER_DIRS += include/config include/generated spl tpl \ - .tmp_objdiff + .tmp_objdiff doc/output MRPROPER_FILES += .config .config.old include/autoconf.mk* include/config.h \ ctags etags tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \ drivers/video/fonts/*.S -- cgit From 185440ffc46f310b0f300c10804ba3cb0a7bf15a Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Thu, 10 Sep 2020 12:09:03 +0200 Subject: test: do no assume hush parser in validate_empty() The environment variable test uses function validate_empty() to check that a variable is not defined. If the hush parser is not enabled, we cannot refer to a variable by $var_name but only by ${var_name}. Signed-off-by: Heinrich Schuchardt Acked-by: Stephen Warren --- test/py/tests/test_env.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/py/tests/test_env.py b/test/py/tests/test_env.py index 2ae8f25381..940279651d 100644 --- a/test/py/tests/test_env.py +++ b/test/py/tests/test_env.py @@ -151,7 +151,7 @@ def validate_empty(state_test_env, var): Nothing. """ - response = state_test_env.u_boot_console.run_command('echo $%s' % var) + response = state_test_env.u_boot_console.run_command('echo ${%s}' % var) assert response == '' def validate_set(state_test_env, var, value): -- cgit From 8479333ce7f44ff8cd9f00fbcb8ffa2a5b5763f9 Mon Sep 17 00:00:00 2001 From: Robert Reither Date: Mon, 14 Sep 2020 13:12:02 +0200 Subject: rsa: crash in br_i32_decode() called from rsa_gen_key_prop() Fixes problem for unaligned 32bit big-endian access in lib/rsa/rsa-keyprop.c. Exchanges br_i32_decode() with get_unaligned_be32(). This will keep the unaligned access for architectures capable and will do some byte-shift magic for the not so capable ones. Reported-by: Heinrich Schuchardt Signed-by: Robert Reither Remove unused include. Reviewed-by: Heinrich Schuchardt --- lib/rsa/rsa-keyprop.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rsa/rsa-keyprop.c b/lib/rsa/rsa-keyprop.c index 1e83eedc82..98855f67b8 100644 --- a/lib/rsa/rsa-keyprop.c +++ b/lib/rsa/rsa-keyprop.c @@ -12,9 +12,9 @@ #include #include #include -#include #include #include +#include /** * br_dec16be() - Convert 16-bit big-endian integer to native @@ -23,7 +23,7 @@ */ static unsigned br_dec16be(const void *src) { - return be16_to_cpup(src); + return get_unaligned_be16(src); } /** @@ -33,7 +33,7 @@ static unsigned br_dec16be(const void *src) */ static uint32_t br_dec32be(const void *src) { - return be32_to_cpup(src); + return get_unaligned_be32(src); } /** -- cgit From e5a31376acdd3f07a08be4433d9113ba61319204 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Tue, 8 Sep 2020 10:51:27 +0000 Subject: efi_loader: efi_var_mem_notify_exit_boot_services efi_var_mem_notify_exit_boot_services() is invoked when ExitBootServices() is called by the UEFI payload. efi_var_mem_notify_exit_boot_services() should not be defined as __efi_runtime as it is invoking EFI_ENTRY() and EFI_EXIT() which themselves are not __efi_runtime. Fixes: f1f990a8c958 ("efi_loader: memory buffer for variables") Fixes: e01aed47d6a0 ("efi_loader: Enable run-time variable support for tee based variables") Signed-off-by: Heinrich Schuchardt Acked-by: Ilias Apalodimas --- lib/efi_loader/efi_var_mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/efi_loader/efi_var_mem.c b/lib/efi_loader/efi_var_mem.c index 8f4a5a5e47..1d2b44580f 100644 --- a/lib/efi_loader/efi_var_mem.c +++ b/lib/efi_loader/efi_var_mem.c @@ -211,7 +211,7 @@ static void efi_var_mem_bs_del(void) * @event: callback event * @context: callback context */ -static void EFIAPI __efi_runtime +static void EFIAPI efi_var_mem_notify_exit_boot_services(struct efi_event *event, void *context) { EFI_ENTRY("%p, %p", event, context); -- cgit From 6b9966e1aa362e97e9b33b7b82ff713f2ddea2c1 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Thu, 10 Sep 2020 07:47:39 +0200 Subject: riscv: define function set_gd() Function set_gd() is needed in the UEFI sub-system if the global data pointer is stored in a register. Signed-off-by: Heinrich Schuchardt --- arch/riscv/include/asm/global_data.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/riscv/include/asm/global_data.h b/arch/riscv/include/asm/global_data.h index 2eb14815bc..b711fcc44d 100644 --- a/arch/riscv/include/asm/global_data.h +++ b/arch/riscv/include/asm/global_data.h @@ -39,4 +39,13 @@ struct arch_global_data { #define DECLARE_GLOBAL_DATA_PTR register gd_t *gd asm ("gp") +static inline void set_gd(volatile gd_t *gd_ptr) +{ +#ifdef CONFIG_64BIT + asm volatile("ld gp, %0\n" : : "m"(gd_ptr)); +#else + asm volatile("lw gp, %0\n" : : "m"(gd_ptr)); +#endif +} + #endif /* __ASM_GBL_DATA_H */ -- cgit From d68d7f47a9f1942ee64e0b119f0e1e2ebf660ed1 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Thu, 10 Sep 2020 12:22:54 +0200 Subject: efi_loader: save global data pointer on RISC-V On RISC-V the global data pointer is stored in register gp. When a UEFI binary calls the EFI API we have to restore it. Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_boottime.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index dcd3eec894..bf78176217 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -42,9 +42,9 @@ LIST_HEAD(efi_register_notify_events); /* Handle of the currently executing image */ static efi_handle_t current_image; -#ifdef CONFIG_ARM +#if defined(CONFIG_ARM) || defined(CONFIG_RISCV) /* - * The "gd" pointer lives in a register on ARM and AArch64 that we declare + * The "gd" pointer lives in a register on ARM and RISC-V that we declare * fixed when compiling U-Boot. However, the payload does not know about that * restriction so we need to manually swap its and our view of that register on * EFI callback entry/exit. @@ -86,7 +86,7 @@ static efi_status_t EFIAPI efi_disconnect_controller( int __efi_entry_check(void) { int ret = entry_count++ == 0; -#ifdef CONFIG_ARM +#if defined(CONFIG_ARM) || defined(CONFIG_RISCV) assert(efi_gd); app_gd = gd; set_gd(efi_gd); @@ -98,7 +98,7 @@ int __efi_entry_check(void) int __efi_exit_check(void) { int ret = --entry_count == 0; -#ifdef CONFIG_ARM +#if defined(CONFIG_ARM) || defined(CONFIG_RISCV) set_gd(app_gd); #endif return ret; @@ -107,7 +107,7 @@ int __efi_exit_check(void) /** * efi_save_gd() - save global data register * - * On the ARM architecture gd is mapped to a fixed register (r9 or x18). + * On the ARM and RISC-V architectures gd is mapped to a fixed register. * As this register may be overwritten by an EFI payload we save it here * and restore it on every callback entered. * @@ -115,7 +115,7 @@ int __efi_exit_check(void) */ void efi_save_gd(void) { -#ifdef CONFIG_ARM +#if defined(CONFIG_ARM) || defined(CONFIG_RISCV) efi_gd = gd; #endif } @@ -123,13 +123,13 @@ void efi_save_gd(void) /** * efi_restore_gd() - restore global data register * - * On the ARM architecture gd is mapped to a fixed register (r9 or x18). + * On the ARM and RISC-V architectures gd is mapped to a fixed register. * Restore it after returning from the UEFI world to the value saved via * efi_save_gd(). */ void efi_restore_gd(void) { -#ifdef CONFIG_ARM +#if defined(CONFIG_ARM) || defined(CONFIG_RISCV) /* Only restore if we're already in EFI context */ if (!efi_gd) return; @@ -2920,7 +2920,7 @@ efi_status_t EFIAPI efi_start_image(efi_handle_t image_handle, * us to the current line. This implies that the second half * of the EFI_CALL macro has not been executed. */ -#ifdef CONFIG_ARM +#if defined(CONFIG_ARM) || defined(CONFIG_RISCV) /* * efi_exit() called efi_restore_gd(). We have to undo this * otherwise __efi_entry_check() will put the wrong value into -- cgit From 5bf12a78599d4a311265c174496233aa15ed4252 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Thu, 10 Sep 2020 07:47:58 +0200 Subject: efi_selftest: restore gd before do_reset() Before calling do_reset() in the EFI selftest we must restore the global data pointer. Fixes: fa63753f86cc ("efi_selftest: substitute ResetSystem() by do_reset()") Signed-off-by: Heinrich Schuchardt --- lib/efi_selftest/efi_selftest.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/efi_selftest/efi_selftest.c b/lib/efi_selftest/efi_selftest.c index 6eec8ae2a7..165fa265f2 100644 --- a/lib/efi_selftest/efi_selftest.c +++ b/lib/efi_selftest/efi_selftest.c @@ -311,11 +311,13 @@ efi_status_t EFIAPI efi_selftest(efi_handle_t image_handle, efi_st_printf("Preparing for reset. Press any key...\n"); efi_st_get_key(); - if (IS_ENABLED(CONFIG_EFI_HAVE_RUNTIME_RESET)) + if (IS_ENABLED(CONFIG_EFI_HAVE_RUNTIME_RESET)) { runtime->reset_system(EFI_RESET_WARM, EFI_NOT_READY, sizeof(reset_message), reset_message); - else + } else { + efi_restore_gd(); do_reset(NULL, 0, 0, NULL); + } efi_st_printf("\n"); efi_st_error("Reset failed\n"); -- cgit From 8505147403584f322bf1cb66b1c796bc11f29ad4 Mon Sep 17 00:00:00 2001 From: Manivannan Sadhasivam Date: Thu, 16 Jul 2020 14:37:26 +0530 Subject: mmc: msm_sdhci: Use mmc_of_parse for setting host_caps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since the introduction of 'get_cd' callback in sdhci core, dragonboard410c's MMC interface is broken. It turns out that 'get_cd' callback checks for the host_caps for validating the chip select. And since the msm_sdhci driver is not parsing the host_caps from DT, not all of the cababilities are parsed properly. This results in the MMC interfaces to be broken. Hence, fix this by adding a call to 'mmc_of_parse' during driver probe. Signed-off-by: Manivannan Sadhasivam Tested-by: Aníbal Limón Reviewed-By: Ramon Fried Reviewed-by: Jaehoon Chung --- drivers/mmc/msm_sdhci.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/mmc/msm_sdhci.c b/drivers/mmc/msm_sdhci.c index 56c3e35c9e..2a1f412278 100644 --- a/drivers/mmc/msm_sdhci.c +++ b/drivers/mmc/msm_sdhci.c @@ -142,6 +142,10 @@ static int msm_sdc_probe(struct udevice *dev) writel(caps, host->ioaddr + SDHCI_VENDOR_SPEC_CAPABILITIES0); } + ret = mmc_of_parse(dev, &plat->cfg); + if (ret) + return ret; + host->mmc = &plat->mmc; host->mmc->dev = dev; ret = sdhci_setup_cfg(&plat->cfg, host, 0, 0); -- cgit From e79c59c0e293c49d52704fdc5ca1b6896eced2d9 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Thu, 10 Sep 2020 19:53:40 +0200 Subject: mmc: xenon_sdhci: Add missing common host capabilities MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use mmc_of_parse() to set the common host properties. That includes "bus-width", so parsing it can be removed from the driver. But more importantly, "non-removable" is now respected, which fixes the usage of eMMC. Signed-off-by: Andre Heider Reviewed-by: Konstantin Porotchkin Tested-by: Marek Behún --- drivers/mmc/xenon_sdhci.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/drivers/mmc/xenon_sdhci.c b/drivers/mmc/xenon_sdhci.c index 7f9a579c83..6ce9d00d0a 100644 --- a/drivers/mmc/xenon_sdhci.c +++ b/drivers/mmc/xenon_sdhci.c @@ -485,20 +485,10 @@ static int xenon_sdhci_probe(struct udevice *dev) armada_3700_soc_pad_voltage_set(host); host->host_caps = MMC_MODE_HS | MMC_MODE_HS_52MHz | MMC_MODE_DDR_52MHz; - switch (fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev), "bus-width", - 1)) { - case 8: - host->host_caps |= MMC_MODE_8BIT; - break; - case 4: - host->host_caps |= MMC_MODE_4BIT; - break; - case 1: - break; - default: - printf("Invalid \"bus-width\" value\n"); - return -EINVAL; - } + + ret = mmc_of_parse(dev, &plat->cfg); + if (ret) + return ret; host->ops = &xenon_sdhci_ops; -- cgit From 0e12575645785c6bc72473ae31cb31a626ce2bc7 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Mon, 14 Sep 2020 21:55:58 +0200 Subject: Azure/GitLab/Travis: Add SH4 r2dplus machine with various PCI ethernet options Add SH4 R2Dplus machine configured to test various U-Boot PCI ethernet options -- RTL8139, EEPRO100, AMD PCnet, DEC Tulip. Signed-off-by: Marek Vasut Reviewed-by: Bin Meng --- .azure-pipelines.yml | 12 ++++++++++++ .gitlab-ci.yml | 28 ++++++++++++++++++++++++++++ .travis.yml | 28 ++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+) diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 1c74876cb4..473ddee383 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -253,6 +253,18 @@ jobs: qemu_x86_64: TEST_PY_BD: "qemu-x86_64" TEST_PY_TEST_SPEC: "not sleep" + r2dplus_i82557c: + TEST_PY_BD: "r2dplus" + TEST_PY_ID: "--id i82557c_qemu" + r2dplus_pcnet: + TEST_PY_BD: "r2dplus" + TEST_PY_ID: "--id pcnet_qemu" + r2dplus_rtl8139: + TEST_PY_BD: "r2dplus" + TEST_PY_ID: "--id rtl8139_qemu" + r2dplus_tulip: + TEST_PY_BD: "r2dplus" + TEST_PY_ID: "--id tulip_qemu" xilinx_zynq_virt: TEST_PY_BD: "xilinx_zynq_virt" TEST_PY_ID: "--id qemu" diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 08696693f1..9ac2b336a1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -359,6 +359,34 @@ qemu-x86_64 test.py: TEST_PY_TEST_SPEC: "not sleep" <<: *buildman_and_testpy_dfn +r2dplus_i82557c test.py: + tags: [ 'all' ] + variables: + TEST_PY_BD: "r2dplus" + TEST_PY_ID: "--id i82557c_qemu" + <<: *buildman_and_testpy_dfn + +r2dplus_pcnet test.py: + tags: [ 'all' ] + variables: + TEST_PY_BD: "r2dplus" + TEST_PY_ID: "--id pcnet_qemu" + <<: *buildman_and_testpy_dfn + +r2dplus_rtl8139 test.py: + tags: [ 'all' ] + variables: + TEST_PY_BD: "r2dplus" + TEST_PY_ID: "--id rtl8139_qemu" + <<: *buildman_and_testpy_dfn + +r2dplus_tulip test.py: + tags: [ 'all' ] + variables: + TEST_PY_BD: "r2dplus" + TEST_PY_ID: "--id tulip_qemu" + <<: *buildman_and_testpy_dfn + xilinx_zynq_virt test.py: tags: [ 'all' ] variables: diff --git a/.travis.yml b/.travis.yml index 7e9e65f04f..fb8f73157d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -646,6 +646,34 @@ matrix: QEMU_TARGET="x86_64-softmmu" TOOLCHAIN="i386" BUILD_ROM="yes" + - name: "test/py r2dplus_i82557c" + env: + - TEST_PY_BD="r2dplus" + TEST_PY_ID="--id i82557c_qemu" + QEMU_TARGET="sh4-softmmu" + BUILDMAN="sh -x arm" + TOOLCHAIN="sh" + - name: "test/py r2dplus_pcnet" + env: + - TEST_PY_BD="r2dplus" + TEST_PY_ID="--id pcnet_qemu" + QEMU_TARGET="sh4-softmmu" + BUILDMAN="sh -x arm" + TOOLCHAIN="sh" + - name: "test/py r2dplus_rtl8139" + env: + - TEST_PY_BD="r2dplus" + TEST_PY_ID="--id rtl8139_qemu" + QEMU_TARGET="sh4-softmmu" + BUILDMAN="sh -x arm" + TOOLCHAIN="sh" + - name: "test/py r2dplus_tulip" + env: + - TEST_PY_BD="r2dplus" + TEST_PY_ID="--id tulip_qemu" + QEMU_TARGET="sh4-softmmu" + BUILDMAN="sh -x arm" + TOOLCHAIN="sh" - name: "test/py xilinx_zynq_virt" env: - TEST_PY_BD="xilinx_zynq_virt" -- cgit From f11f138ebfeac8271ad5e6faed2265a9585b97fc Mon Sep 17 00:00:00 2001 From: Kever Yang Date: Mon, 13 Apr 2020 09:38:30 +0800 Subject: rockchip: rv1108: use correct API for board callback Use board_early_init_f() instead of mach_cpu_init() for board, the board_early_init_f() is used for board init and after dm_initf, while the mach_cpu_init() is used for CPU/SOC and before dm_initf()(not able to use syscon API). Fixes: 9cec336708 ("rockchip: evb-rv1108: Use syscon API to get grf base") Fixes: 4aa33690fc {"rockchip: elgin-rv1108: Use syscon API to get grf base") Signed-off-by: Kever Yang --- board/elgin/elgin_rv1108/elgin_rv1108.c | 2 +- board/rockchip/evb_rv1108/evb_rv1108.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/board/elgin/elgin_rv1108/elgin_rv1108.c b/board/elgin/elgin_rv1108/elgin_rv1108.c index 5d8f62244b..245e5abcae 100644 --- a/board/elgin/elgin_rv1108/elgin_rv1108.c +++ b/board/elgin/elgin_rv1108/elgin_rv1108.c @@ -15,7 +15,7 @@ DECLARE_GLOBAL_DATA_PTR; -int mach_cpu_init(void) +int board_early_init_f(void) { struct rv1108_grf *grf; enum { diff --git a/board/rockchip/evb_rv1108/evb_rv1108.c b/board/rockchip/evb_rv1108/evb_rv1108.c index c57913828d..fc31c49311 100644 --- a/board/rockchip/evb_rv1108/evb_rv1108.c +++ b/board/rockchip/evb_rv1108/evb_rv1108.c @@ -14,7 +14,7 @@ DECLARE_GLOBAL_DATA_PTR; -int mach_cpu_init(void) +int board_early_init_f(void) { struct rv1108_grf *grf; enum { -- cgit From fe4931c09ac77c775786c12148e8fd47ce4bb833 Mon Sep 17 00:00:00 2001 From: Kever Yang Date: Mon, 13 Apr 2020 09:38:31 +0800 Subject: rockchip: rv1108: Enable grf as pre-reloc node The grf node will be used before relocate, enable it in dts. Signed-off-by: Kever Yang --- arch/arm/dts/rv1108-u-boot.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/dts/rv1108-u-boot.dtsi b/arch/arm/dts/rv1108-u-boot.dtsi index 41ac054b81..6a2098b8d4 100644 --- a/arch/arm/dts/rv1108-u-boot.dtsi +++ b/arch/arm/dts/rv1108-u-boot.dtsi @@ -4,3 +4,7 @@ */ #include "rockchip-u-boot.dtsi" + +&grf { + u-boot,dm-pre-reloc; +}; -- cgit From 454b792afeeca1294a780590199e9250b5c9aa64 Mon Sep 17 00:00:00 2001 From: Kever Yang Date: Mon, 13 Apr 2020 09:38:32 +0800 Subject: rockchip: rv1108: enable board early init Enable board early init callback to init board specific hardware. Signed-off-by: Kever Yang --- configs/elgin-rv1108_defconfig | 1 + configs/evb-rv1108_defconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/configs/elgin-rv1108_defconfig b/configs/elgin-rv1108_defconfig index 54d1c29072..5d98f1913f 100644 --- a/configs/elgin-rv1108_defconfig +++ b/configs/elgin-rv1108_defconfig @@ -15,6 +15,7 @@ CONFIG_DEFAULT_FDT_FILE="rv1108-elgin-r1.dtb" CONFIG_BOARD_LATE_INIT=y # CONFIG_DISPLAY_CPUINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y +CONFIG_BOARD_EARLY_INIT_F=y CONFIG_CMD_GPIO=y CONFIG_RANDOM_UUID=y CONFIG_CMD_MMC=y diff --git a/configs/evb-rv1108_defconfig b/configs/evb-rv1108_defconfig index ba6396af3a..c9cbf04686 100644 --- a/configs/evb-rv1108_defconfig +++ b/configs/evb-rv1108_defconfig @@ -11,6 +11,7 @@ CONFIG_DEBUG_UART=y CONFIG_DEFAULT_FDT_FILE="rv1108-evb.dtb" # CONFIG_DISPLAY_CPUINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y +CONFIG_BOARD_EARLY_INIT_F=y CONFIG_RANDOM_UUID=y CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set -- cgit From 5b861eea7927da63f016b75265e454a19ab19d0b Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Tue, 15 Sep 2020 03:43:29 +0200 Subject: rockchip: make_fit_atf: ignore empty PT_LOAD segment The linker sometimes creates PT_LOAD segments with length (p_filesz) zero as described in https://man7.org/linux/man-pages/man5/elf.5.html. This leads to build failures. We should ignore empty segments. Signed-off-by: Heinrich Schuchardt Tested-by: Tom Rini Reviewed-by: Kever Yang --- arch/arm/mach-rockchip/make_fit_atf.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-rockchip/make_fit_atf.py b/arch/arm/mach-rockchip/make_fit_atf.py index d15c32b303..f3224d2555 100755 --- a/arch/arm/mach-rockchip/make_fit_atf.py +++ b/arch/arm/mach-rockchip/make_fit_atf.py @@ -189,8 +189,9 @@ def unpack_elf(filename): p_type, p_flags, p_offset = struct.unpack_from(' 0: + p_data = elf[p_offset:p_offset + p_filesz] + segments.append((index, e_entry, p_paddr, p_data)) return segments def main(): -- cgit From a8a71c948836688d323fd3efe2afb07865f8b393 Mon Sep 17 00:00:00 2001 From: Baruch Siach Date: Tue, 25 Aug 2020 09:01:41 +0300 Subject: MAINTAINERS: update clk entry git tree Signed-off-by: Baruch Siach --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 101f4e185d..87603d474f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -619,7 +619,7 @@ F: drivers/mtd/jedec_flash.c CLOCK M: Lukasz Majewski S: Maintained -T: git git://git.denx.de/u-boot-dfu.git +T: git https://gitlab.denx.de/u-boot/custodians/u-boot-clk.git F: drivers/clk/ F: drivers/clk/imx/ -- cgit From 7def4e621b7c65b4a3740a554dcbc807e23b1c19 Mon Sep 17 00:00:00 2001 From: Thirupathaiah Annapureddy Date: Mon, 17 Aug 2020 17:31:08 -0700 Subject: include: phy: fix NULL pointer check in phy_write() phy_write() uses bus->write() instead of bus->read(). This means NULL pointer pre-check needs to happen on bus->write instead of bus->read. Signed-off-by: Thirupathaiah Annapureddy Reviewed-by: Michal Simek --- include/phy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/phy.h b/include/phy.h index 1dbbf65111..cbdb10d6fc 100644 --- a/include/phy.h +++ b/include/phy.h @@ -205,7 +205,7 @@ static inline int phy_write(struct phy_device *phydev, int devad, int regnum, { struct mii_dev *bus = phydev->bus; - if (!bus || !bus->read) { + if (!bus || !bus->write) { debug("%s: No bus configured\n", __func__); return -1; } -- cgit From 81d0cef3b268ccc4f1061a3e29850fbd23166d20 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sat, 12 Sep 2020 12:42:52 +0200 Subject: lib: fdt: Fix fdtdec_setup_mem..() conversion to livetree API Repair incorrectly negated condition in the original patch which broke DT memory node parsing on everything which has more than one DT memory node, e.g. R-Car3. In case multiple valid memory nodes are present in the DT, the original patch would complete parsing cycle for the first memory node, then move on to the next one, identify it as a valid, and end the parsing. The fix is to invert the condition, to make the code behave as it did before the livetree conversion, so it would continue parsing the subsequent memory nodes as well. Fixes: c2f0950c33 ("lib: fdt: Convert fdtdes_setup_mem..() to livetree API") Signed-off-by: Marek Vasut Cc: Michal Simek Cc: Simon Glass Cc: Tom Rini Tested-by: Biju Das Reviewed-by: Michal Simek --- lib/fdtdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/fdtdec.c b/lib/fdtdec.c index d3b22ec323..5f41f58a63 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -1101,7 +1101,7 @@ int fdtdec_setup_memory_banksize(void) if (ret < 0) { reg = 0; mem = get_next_memory_node(mem); - if (ofnode_valid(mem)) + if (!ofnode_valid(mem)) break; ret = ofnode_read_resource(mem, reg++, &res); @@ -1146,7 +1146,7 @@ int fdtdec_setup_mem_size_base_lowest(void) if (ret < 0) { reg = 0; mem = get_next_memory_node(mem); - if (ofnode_valid(mem)) + if (!ofnode_valid(mem)) break; ret = ofnode_read_resource(mem, reg++, &res); -- cgit From 42ef2edc85d04ef7ffd70606a024182380b7da0e Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Mon, 14 Sep 2020 13:52:39 +0200 Subject: MAINTAINERS: add myself as reviewer for SquashFS As I have followed the development of the SquashFS support in U-Boot as part of Joao Marcos work, it makes sense to get Cc'ed on contributions/bug reports related to the squashfs support. Signed-off-by: Thomas Petazzoni --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 87603d474f..fdbfd2bcf7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -983,6 +983,7 @@ F: include/spmi/ SQUASHFS M: Joao Marcos Costa +R: Thomas Petazzoni S: Maintained F: fs/squashfs/ F: include/sqfs.h -- cgit From c4d0384a4ac492969e36b60813fec8bf25ddd725 Mon Sep 17 00:00:00 2001 From: Miquel Raynal Date: Mon, 14 Sep 2020 17:44:36 +0200 Subject: MAINTAINERS: add myself as reviewer for SquashFS I also followed the development of the SquashFS support in U-Boot as part of Joao Marcos internship, so I would also appreciate receiving new contributions and bug reports related to this topic. Signed-off-by: Miquel Raynal --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index fdbfd2bcf7..7e46470c70 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -984,6 +984,7 @@ F: include/spmi/ SQUASHFS M: Joao Marcos Costa R: Thomas Petazzoni +R: Miquel Raynal S: Maintained F: fs/squashfs/ F: include/sqfs.h -- cgit From c6963fb88ffb60e42137dc60100ee1a7c6f91beb Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Wed, 16 Sep 2020 00:17:55 +0200 Subject: doc: qemu: debug UART settings for QEMU ARM virt Provide the settings for the debug UART on the QEMU ARM virt board. Signed-off-by: Heinrich Schuchardt --- doc/board/emulation/qemu-arm.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/board/emulation/qemu-arm.rst b/doc/board/emulation/qemu-arm.rst index ca751d4af4..8d7fda10f1 100644 --- a/doc/board/emulation/qemu-arm.rst +++ b/doc/board/emulation/qemu-arm.rst @@ -80,3 +80,13 @@ can be enabled with the following command line parameters: -drive if=none,file=disk.img,id=mydisk -device nvme,drive=mydisk,serial=foo These have been tested in QEMU 2.9.0 but should work in at least 2.5.0 as well. + +Debug UART +---------- + +The debug UART on the ARM virt board uses these settings:: + + CONFIG_DEBUG_UART=y + CONFIG_DEBUG_UART_PL010=y + CONFIG_DEBUG_UART_BASE=0x9000000 + CONFIG_DEBUG_UART_CLOCK=0 -- cgit From f37aab99f2159ed9de7caa58ac09ad8a32589257 Mon Sep 17 00:00:00 2001 From: Igor Opaniuk Date: Mon, 14 Sep 2020 11:01:04 +0300 Subject: colibri-imx6ull: use splashcreen value instead of legacy function Set proper splashscreen env value instead of calling legacy function to show embed boot logo. Fixes: 391c712dde("colibri-imx6ull: show boot logo") Signed-off-by: Igor Opaniuk --- board/toradex/colibri-imx6ull/colibri-imx6ull.c | 2 -- include/configs/colibri-imx6ull.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/board/toradex/colibri-imx6ull/colibri-imx6ull.c b/board/toradex/colibri-imx6ull/colibri-imx6ull.c index 89b99a0b74..45f8da3c42 100644 --- a/board/toradex/colibri-imx6ull/colibri-imx6ull.c +++ b/board/toradex/colibri-imx6ull/colibri-imx6ull.c @@ -173,8 +173,6 @@ int board_late_init(void) #if defined(CONFIG_DM_VIDEO) setup_lcd(); - - show_boot_logo(); #endif return 0; diff --git a/include/configs/colibri-imx6ull.h b/include/configs/colibri-imx6ull.h index 2fdcdefa32..530240f069 100644 --- a/include/configs/colibri-imx6ull.h +++ b/include/configs/colibri-imx6ull.h @@ -111,6 +111,7 @@ "fatload ${interface} 0:1 ${loadaddr} " \ "${board}/flash_blk.img && source ${loadaddr}\0" \ "splashpos=m,m\0" \ + "splashimage=" __stringify(CONFIG_LOADADDR) "\0" \ "videomode=video=ctfb:x:640,y:480,depth:18,pclk:39722,le:48,ri:16,up:33,lo:10,hs:96,vs:2,sync:0,vmode:0\0" \ "vidargs=video=mxsfb:640x480M-16@60" -- cgit From 1310660f5cd28a0a65223b8bb87d4ddf1a07089c Mon Sep 17 00:00:00 2001 From: Igor Opaniuk Date: Mon, 14 Sep 2020 11:01:05 +0300 Subject: colibri_imx7: use splashcreen value instead of legacy function Set proper splashscreen env value instead of calling legacy function to show embed boot logo. Fixes: 195011b24d("colibri-imx7: fix splash logo drawing") Signed-off-by: Igor Opaniuk --- board/toradex/colibri_imx7/colibri_imx7.c | 2 -- include/configs/colibri_imx7.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c index 14df3fc42c..b087cb0dc7 100644 --- a/board/toradex/colibri_imx7/colibri_imx7.c +++ b/board/toradex/colibri_imx7/colibri_imx7.c @@ -356,8 +356,6 @@ int board_late_init(void) { #if defined(CONFIG_DM_VIDEO) setup_lcd(); - - show_boot_logo(); #endif return 0; } diff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h index 79aa735ccb..8cc5a36996 100644 --- a/include/configs/colibri_imx7.h +++ b/include/configs/colibri_imx7.h @@ -173,6 +173,7 @@ "fatload ${interface} 0:1 ${loadaddr} " \ "${board}/flash_blk.img && source ${loadaddr}\0" \ "splashpos=m,m\0" \ + "splashimage=" __stringify(CONFIG_LOADADDR) "\0" \ "videomode=video=ctfb:x:640,y:480,depth:18,pclk:39722,le:48,ri:16,up:33,lo:10,hs:96,vs:2,sync:0,vmode:0\0" \ "updlevel=2\0" -- cgit From e6fd30dd9eef8bdfec2625c1cb8f73d5a6b3e0a1 Mon Sep 17 00:00:00 2001 From: Igor Opaniuk Date: Mon, 14 Sep 2020 11:01:06 +0300 Subject: toradex: drop legacy show_boot_logo function and use splashscreen Drop show_boot_logo legacy function, as splashscreen functionality can be used instead. Fixes: d324189772("toradex: common: show boot logo") Signed-off-by: Igor Opaniuk --- board/toradex/common/tdx-common.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/board/toradex/common/tdx-common.c b/board/toradex/common/tdx-common.c index fe5295f94b..a3d287ed5e 100644 --- a/board/toradex/common/tdx-common.c +++ b/board/toradex/common/tdx-common.c @@ -203,22 +203,3 @@ int ft_common_board_setup(void *blob, struct bd_info *bd) } #endif /* CONFIG_TDX_CFG_BLOCK */ - -#if defined(CONFIG_DM_VIDEO) -int show_boot_logo(void) -{ - struct udevice *dev; - int ret; - int xpos, ypos; - - splash_get_pos(&xpos, &ypos); - - ret = uclass_get_device(UCLASS_VIDEO, 0, &dev); - if (ret) - return ret; - - ret = video_bmp_display(dev, (ulong)bmp_logo_bitmap, xpos, ypos, true); - - return ret; -} -#endif /* CONFIG_DM_VIDEO */ -- cgit From b4c9cd687586d84933943d7466d1130af3d2c058 Mon Sep 17 00:00:00 2001 From: Igor Opaniuk Date: Mon, 14 Sep 2020 11:01:07 +0300 Subject: colibri_imx7: wrap video specific funcs with ifdefs Wrap video specific functionality with ifdefs. Fixes: 195011b24d("colibri-imx7: fix splash logo drawing") Signed-off-by: Igor Opaniuk --- board/toradex/colibri_imx7/colibri_imx7.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c index b087cb0dc7..8afe1bfd5e 100644 --- a/board/toradex/colibri_imx7/colibri_imx7.c +++ b/board/toradex/colibri_imx7/colibri_imx7.c @@ -133,8 +133,10 @@ static int setup_lcd(void) */ void board_preboot_os(void) { +#ifdef CONFIG_DM_VIDEO gpio_direction_output(GPIO_PWM_A, 1); gpio_direction_output(GPIO_BL_ON, 0); +#endif } static void setup_iomux_uart(void) -- cgit From 2f310b7f480f4b7f805b148b78582e4900bd6e15 Mon Sep 17 00:00:00 2001 From: Igor Opaniuk Date: Mon, 14 Sep 2020 11:01:08 +0300 Subject: colibri-imx6ull: use preboot for fdtfile evaluation Enable and set preboot var with fdtfile evaluation. preboot will be checked and run immediately before starting the CONFIG_BOOTDELAY countdown and/or running the auto-boot command resp. entering interactive mode. This provides possibility to use different boot cmds in interactive mode without manual setting fdtfile value, as it it's already evaluated before entering interactive mode. Fixes: board: 31b1e17f44("toradex: add Colibri iMX6ULL support") Signed-off-by: Igor Opaniuk --- configs/colibri-imx6ull_defconfig | 2 ++ include/configs/colibri-imx6ull.h | 8 +++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/configs/colibri-imx6ull_defconfig b/configs/colibri-imx6ull_defconfig index 3defaf0ccc..6ef5dff2db 100644 --- a/configs/colibri-imx6ull_defconfig +++ b/configs/colibri-imx6ull_defconfig @@ -14,6 +14,8 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/toradex/colibri-imx6ull/imximage.cfg, CONFIG_BOOTDELAY=1 # CONFIG_USE_BOOTCOMMAND is not set # CONFIG_CONSOLE_MUX is not set +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="setenv fdtfile imx6ull-colibri${variant}-${fdt_board}.dtb" CONFIG_SYS_CONSOLE_IS_IN_ENV=y CONFIG_VERSION_VARIABLE=y # CONFIG_DISPLAY_BOARDINFO is not set diff --git a/include/configs/colibri-imx6ull.h b/include/configs/colibri-imx6ull.h index 530240f069..63b3fef34c 100644 --- a/include/configs/colibri-imx6ull.h +++ b/include/configs/colibri-imx6ull.h @@ -35,8 +35,6 @@ #define CONFIG_NETMASK 255.255.255.0 #define CONFIG_SERVERIP 192.168.10.1 -#define FDT_FILE "imx6ull-colibri${variant}-${fdt_board}.dtb" - #define MEM_LAYOUT_ENV_SETTINGS \ "bootm_size=0x10000000\0" \ "fdt_addr_r=0x82100000\0" \ @@ -57,7 +55,7 @@ "setenv bootargs ${defargs} ${nfsargs} " \ "${setupargs} ${vidargs}; echo Booting from NFS...;" \ "dhcp ${kernel_addr_r} && " \ - "tftp ${fdt_addr_r} " FDT_FILE " && " \ + "tftp ${fdt_addr_r} ${fdtfile} && " \ "run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \ #define UBI_BOOTCMD \ @@ -71,8 +69,8 @@ "ubi read ${fdt_addr_r} dtb && " \ "run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \ -#define CONFIG_BOOTCOMMAND "run ubiboot; " \ - "setenv fdtfile " FDT_FILE " && run distro_bootcmd;" +/* Run Distro Boot script if ubiboot fails */ +#define CONFIG_BOOTCOMMAND "run ubiboot || run distro_bootcmd;" #define BOOT_TARGET_DEVICES(func) \ func(MMC, mmc, 0) \ -- cgit From 3ab2316a99cdf17d13102058f420edd990f6c7be Mon Sep 17 00:00:00 2001 From: Igor Opaniuk Date: Mon, 14 Sep 2020 11:01:09 +0300 Subject: colibri_vf: use preboot for fdtfile evaluation Enable and set preboot var with fdtfile evaluation. preboot will be checked and run immediately before starting the CONFIG_BOOTDELAY countdown and/or running the auto-boot command resp. entering interactive mode. This provides possibility to use different boot cmds in interactive mode without manual setting fdtfile value, as it it's already evaluated before entering interactive mode. Fixes: 304042c1f3("colibri_vf: set fdtfile for distroboot") Signed-off-by: Igor Opaniuk --- configs/colibri_vf_defconfig | 2 ++ include/configs/colibri_vf.h | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/configs/colibri_vf_defconfig b/configs/colibri_vf_defconfig index b145b9f699..def64b1043 100644 --- a/configs/colibri_vf_defconfig +++ b/configs/colibri_vf_defconfig @@ -11,6 +11,8 @@ CONFIG_TARGET_COLIBRI_VF=y CONFIG_DEFAULT_DEVICE_TREE="vf610-colibri" CONFIG_ENV_VARS_UBOOT_CONFIG=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/toradex/colibri_vf/imximage.cfg,IMX_NAND" +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="setenv fdtfile ${soc}-colibri-${fdt_board}.dtb" CONFIG_BOOTDELAY=1 CONFIG_LOGLEVEL=3 CONFIG_VERSION_VARIABLE=y diff --git a/include/configs/colibri_vf.h b/include/configs/colibri_vf.h index 86d4621f85..cae7c14bfb 100644 --- a/include/configs/colibri_vf.h +++ b/include/configs/colibri_vf.h @@ -76,8 +76,7 @@ "ubi read ${fdt_addr_r} dtb && " \ "run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \ -#define CONFIG_BOOTCOMMAND "run ubiboot; " \ - "setenv fdtfile ${soc}-colibri-${fdt_board}.dtb && run distro_bootcmd;" +#define CONFIG_BOOTCOMMAND "run ubiboot || run distro_bootcmd;" #define BOOT_TARGET_DEVICES(func) \ func(MMC, mmc, 0) \ -- cgit From 327381e8b57c47d1803bce7686688f10ac56b1e9 Mon Sep 17 00:00:00 2001 From: Igor Opaniuk Date: Mon, 14 Sep 2020 11:01:10 +0300 Subject: colibri_imx7: use preboot for fdtfile evaluation Enable and set preboot var with fdtfile evaluation. preboot will be checked and run immediately before starting the CONFIG_BOOTDELAY countdown and/or running the auto-boot command resp. entering interactive mode. This provides possibility to use different boot cmds in interactive mode without manual setting fdtfile value, as it it's already evaluated before entering interactive mode. Fixes: a62c60610f("colibri_imx7_emmc: add Colibri iMX7D 1GB (eMMC) module support") Signed-off-by: Igor Opaniuk --- configs/colibri_imx7_defconfig | 2 ++ configs/colibri_imx7_emmc_defconfig | 2 ++ include/configs/colibri_imx7.h | 4 +--- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/configs/colibri_imx7_defconfig b/configs/colibri_imx7_defconfig index f33ca11a4a..a13a4bcda5 100644 --- a/configs/colibri_imx7_defconfig +++ b/configs/colibri_imx7_defconfig @@ -12,6 +12,8 @@ CONFIG_IMX_HAB=y CONFIG_DEFAULT_DEVICE_TREE="imx7-colibri-rawnand" CONFIG_DISTRO_DEFAULTS=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/toradex/colibri_imx7/imximage.cfg,MX7D" +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="setenv fdtfile ${soc}-colibri-${fdt_board}.dtb " CONFIG_BOOTDELAY=1 # CONFIG_USE_BOOTCOMMAND is not set # CONFIG_CONSOLE_MUX is not set diff --git a/configs/colibri_imx7_emmc_defconfig b/configs/colibri_imx7_emmc_defconfig index e4b0c99d4f..c8b6ce79b0 100644 --- a/configs/colibri_imx7_emmc_defconfig +++ b/configs/colibri_imx7_emmc_defconfig @@ -14,6 +14,8 @@ CONFIG_DEFAULT_DEVICE_TREE="imx7-colibri-emmc" CONFIG_DISTRO_DEFAULTS=y CONFIG_FIT=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/toradex/colibri_imx7/imximage.cfg,MX7D" +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="setenv fdtfile ${soc}-colibri-emmc-${fdt_board}.dtb" CONFIG_BOOTDELAY=1 # CONFIG_USE_BOOTCOMMAND is not set # CONFIG_CONSOLE_MUX is not set diff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h index 8cc5a36996..76088d53a3 100644 --- a/include/configs/colibri_imx7.h +++ b/include/configs/colibri_imx7.h @@ -118,13 +118,11 @@ #if defined(CONFIG_TARGET_COLIBRI_IMX7_NAND) #define CONFIG_BOOTCOMMAND "run ubiboot ; echo ; echo ubiboot failed ; " \ - "setenv fdtfile ${soc}-colibri-${fdt_board}.dtb && run distro_bootcmd;" + "run distro_bootcmd;" #define MODULE_EXTRA_ENV_SETTINGS \ "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ UBI_BOOTCMD #elif defined(CONFIG_TARGET_COLIBRI_IMX7_EMMC) -#define CONFIG_BOOTCOMMAND \ - "setenv fdtfile ${soc}-colibri-emmc-${fdt_board}.dtb && run distro_bootcmd;" #define MODULE_EXTRA_ENV_SETTINGS \ "variant=-emmc\0" \ EMMC_ANDROID_BOOTCMD -- cgit From 5d54d7eeb10f8439632a40deeaa91af286b9df2f Mon Sep 17 00:00:00 2001 From: Igor Opaniuk Date: Mon, 14 Sep 2020 11:01:11 +0300 Subject: colibri_imx6: provide fdtfile in env instead of setting it in runtime Provide fdtfile value in default env instead of setting it dynamically in runtime. Fixes: 85cb2bc686("apalis/colibri imx6: provide proper fdtfile value") Signed-off-by: Igor Opaniuk --- include/configs/colibri_imx6.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/configs/colibri_imx6.h b/include/configs/colibri_imx6.h index 13b03a594e..097e620de4 100644 --- a/include/configs/colibri_imx6.h +++ b/include/configs/colibri_imx6.h @@ -118,7 +118,7 @@ #define FDT_FILE "imx6dl-colibri-eval-v3.dtb" #define CONFIG_EXTRA_ENV_SETTINGS \ BOOTENV \ - "bootcmd=setenv fdtfile ${fdt_file}; run distro_bootcmd; " \ + "bootcmd=run distro_bootcmd; " \ "usb start ; " \ "setenv stdout serial,vidconsole; " \ "setenv stdin serial,usbkbd\0" \ @@ -126,6 +126,7 @@ "console=ttymxc0\0" \ "defargs=enable_wait_mode=off galcore.contiguousSize=50331648\0" \ "fdt_file=" FDT_FILE "\0" \ + "fdtfile=" FDT_FILE "\0" \ "fdt_fixup=;\0" \ MEM_LAYOUT_ENV_SETTINGS \ NFS_BOOTCMD \ -- cgit From 763a4aef092ff39d69d80244cc3fd9afe0dc63f7 Mon Sep 17 00:00:00 2001 From: Igor Opaniuk Date: Mon, 14 Sep 2020 11:01:12 +0300 Subject: apalis_imx6: provide fdtfile in env instead of setting it in runtime Provide fdtfile value in default env instead of setting it dynamically in runtime. Fixes: 85cb2bc686("apalis/colibri imx6: provide proper fdtfile value") Signed-off-by: Igor Opaniuk --- include/configs/apalis_imx6.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/configs/apalis_imx6.h b/include/configs/apalis_imx6.h index 9bc70f979a..4cffc7f887 100644 --- a/include/configs/apalis_imx6.h +++ b/include/configs/apalis_imx6.h @@ -135,7 +135,7 @@ #endif #define CONFIG_EXTRA_ENV_SETTINGS \ BOOTENV \ - "bootcmd=setenv fdtfile ${fdt_file}; run distro_bootcmd ; " \ + "bootcmd=run distro_bootcmd ; " \ "usb start ; " \ "setenv stdout serial,vidconsole; " \ "setenv stdin serial,usbkbd\0" \ @@ -143,6 +143,7 @@ "console=ttymxc0\0" \ "defargs=enable_wait_mode=off vmalloc=400M\0" \ "fdt_file=" FDT_FILE "\0" \ + "fdtfile=" FDT_FILE "\0" \ "fdt_fixup=;\0" \ MEM_LAYOUT_ENV_SETTINGS \ NFS_BOOTCMD \ -- cgit From 95bae9ff920b6120bd2c21437517ed99a2d54b61 Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Wed, 16 Sep 2020 15:17:18 +0800 Subject: imx7: ccm: correct target interface num According to i.MX 7Dual Applications Processor Reference Manual, Rev. 1 The target interface CCM root index ranges [0,124], so the number should be 125. Reported-by: Coverity 18045 Signed-off-by: Peng Fan Reviewed-by: Ye Li --- arch/arm/include/asm/arch-mx7/crm_regs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/include/asm/arch-mx7/crm_regs.h b/arch/arm/include/asm/arch-mx7/crm_regs.h index f3515fab03..bfa68a9d2a 100644 --- a/arch/arm/include/asm/arch-mx7/crm_regs.h +++ b/arch/arm/include/asm/arch-mx7/crm_regs.h @@ -57,7 +57,7 @@ struct mxc_ccm_reg { uint32_t reserved_0[4092]; struct mxc_ccm_ccgr ccgr_array[191]; /* offset 0x4000 */ uint32_t reserved_1[3332]; - struct mxc_ccm_root_slice root[121]; /* offset 0x8000 */ + struct mxc_ccm_root_slice root[125]; /* offset 0x8000 */ }; -- cgit From d81e8cf6eaebbb0a67857224781f6f7470785422 Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Wed, 16 Sep 2020 15:17:19 +0800 Subject: imx8mq: fix FRAC_PLL_REFCLK_SEL_MASK Coverity reported dead code, however it is FRAC_PLL_REFCLK_SEL_MASK was wrongly set. Reported-by: Coverity 10045172 Signed-off-by: Peng Fan Reviewed-by: Ye Li --- arch/arm/include/asm/arch-imx8m/clock_imx8mq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/include/asm/arch-imx8m/clock_imx8mq.h b/arch/arm/include/asm/arch-imx8m/clock_imx8mq.h index 742cbf3bf8..7109d334fa 100644 --- a/arch/arm/include/asm/arch-imx8m/clock_imx8mq.h +++ b/arch/arm/include/asm/arch-imx8m/clock_imx8mq.h @@ -316,7 +316,7 @@ enum clk_src_index { #define FRAC_PLL_LOCK_MASK BIT(31) #define FRAC_PLL_CLKE_MASK BIT(21) #define FRAC_PLL_PD_MASK BIT(19) -#define FRAC_PLL_REFCLK_SEL_MASK BIT(16) +#define FRAC_PLL_REFCLK_SEL_MASK (0x3 << 16) #define FRAC_PLL_LOCK_SEL_MASK BIT(15) #define FRAC_PLL_BYPASS_MASK BIT(14) #define FRAC_PLL_COUNTCLK_SEL_MASK BIT(13) -- cgit From ece7844d8fbd67d078e1cb2d6807b913a2025a0c Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Wed, 16 Sep 2020 15:17:20 +0800 Subject: imx8mq: fix SSCG_PLL_REFCLK_SEL_x Fix SSCG_PLL_REFCLK_SEL_x, the offset starts from 0, not 16 Reported-by: Coverity 3448860 Signed-off-by: Peng Fan Reviewed-by: Ye Li --- arch/arm/include/asm/arch-imx8m/clock_imx8mq.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/include/asm/arch-imx8m/clock_imx8mq.h b/arch/arm/include/asm/arch-imx8m/clock_imx8mq.h index 7109d334fa..340a61e55b 100644 --- a/arch/arm/include/asm/arch-imx8m/clock_imx8mq.h +++ b/arch/arm/include/asm/arch-imx8m/clock_imx8mq.h @@ -358,10 +358,10 @@ enum clk_src_index { #define SSCG_PLL_LOCK_SEL_MASK BIT(3) #define SSCG_PLL_COUNTCLK_SEL_MASK BIT(2) #define SSCG_PLL_REFCLK_SEL_MASK 0x3 -#define SSCG_PLL_REFCLK_SEL_OSC_25M (0 << 16) -#define SSCG_PLL_REFCLK_SEL_OSC_27M BIT(16) -#define SSCG_PLL_REFCLK_SEL_HDMI_PHY_27M (2 << 16) -#define SSCG_PLL_REFCLK_SEL_CLK_PN (3 << 16) +#define SSCG_PLL_REFCLK_SEL_OSC_25M (0) +#define SSCG_PLL_REFCLK_SEL_OSC_27M (1) +#define SSCG_PLL_REFCLK_SEL_HDMI_PHY_27M (2) +#define SSCG_PLL_REFCLK_SEL_CLK_PN (3) #define SSCG_PLL_SSDS_MASK BIT(8) #define SSCG_PLL_SSMD_MASK (0x7 << 5) -- cgit From a3e7d51fd554dd5ad18a94e32ba674b451d7e0d1 Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Wed, 16 Sep 2020 15:17:21 +0800 Subject: imx8m: clock_imx8mm: add missed return Add missed return Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx8m/clock_imx8mm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-imx/imx8m/clock_imx8mm.c b/arch/arm/mach-imx/imx8m/clock_imx8mm.c index 3610f5b2fc..9dde11cded 100644 --- a/arch/arm/mach-imx/imx8m/clock_imx8mm.c +++ b/arch/arm/mach-imx/imx8m/clock_imx8mm.c @@ -360,6 +360,7 @@ void init_clk_ecspi(u32 index) clock_enable(CCGR_ECSPI2, 0); clock_set_target_val(ECSPI2_CLK_ROOT, CLK_ROOT_ON | CLK_ROOT_SOURCE_SEL(0)); clock_enable(CCGR_ECSPI2, 1); + return; case 2: clock_enable(CCGR_ECSPI3, 0); clock_set_target_val(ECSPI3_CLK_ROOT, CLK_ROOT_ON | CLK_ROOT_SOURCE_SEL(0)); -- cgit From 0098222dacd6fd2bdc6f99adc366397a7ed8bb6a Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Wed, 16 Sep 2020 15:17:22 +0800 Subject: imx8mp: Remove parts MIMX8ML7 and MIMX8ML5 support Latest datasheet revE has removed MIMX8ML7D/5D/7C/5C parts, so update u-boot to remove decoding and support for those parts. Signed-off-by: Ye Li Signed-off-by: Peng Fan --- arch/arm/include/asm/arch-imx/cpu.h | 2 -- arch/arm/include/asm/mach-imx/sys_proto.h | 5 +---- arch/arm/mach-imx/cpu.c | 4 ---- arch/arm/mach-imx/imx8m/soc.c | 12 ++++-------- 4 files changed, 5 insertions(+), 18 deletions(-) diff --git a/arch/arm/include/asm/arch-imx/cpu.h b/arch/arm/include/asm/arch-imx/cpu.h index 75ff991248..f37fe21446 100644 --- a/arch/arm/include/asm/arch-imx/cpu.h +++ b/arch/arm/include/asm/arch-imx/cpu.h @@ -41,9 +41,7 @@ #define MXC_CPU_IMX8MNDL 0x8f /* dummy ID */ #define MXC_CPU_IMX8MNSL 0x181 /* dummy ID */ #define MXC_CPU_IMX8MP 0x182/* dummy ID */ -#define MXC_CPU_IMX8MP7 0x183 /* dummy ID */ #define MXC_CPU_IMX8MP6 0x184 /* dummy ID */ -#define MXC_CPU_IMX8MP5 0x185 /* dummy ID */ #define MXC_CPU_IMX8MPL 0x186 /* dummy ID */ #define MXC_CPU_IMX8MPD 0x187 /* dummy ID */ #define MXC_CPU_IMX8QXP_A0 0x90 /* dummy ID */ diff --git a/arch/arm/include/asm/mach-imx/sys_proto.h b/arch/arm/include/asm/mach-imx/sys_proto.h index 15d1cba8e7..5f0c1ae218 100644 --- a/arch/arm/include/asm/mach-imx/sys_proto.h +++ b/arch/arm/include/asm/mach-imx/sys_proto.h @@ -67,13 +67,10 @@ struct bd_info; #define is_imx8mndl() (is_cpu_type(MXC_CPU_IMX8MNDL)) #define is_imx8mnsl() (is_cpu_type(MXC_CPU_IMX8MNSL)) #define is_imx8mp() (is_cpu_type(MXC_CPU_IMX8MP) || is_cpu_type(MXC_CPU_IMX8MPD) || \ - is_cpu_type(MXC_CPU_IMX8MPL) || is_cpu_type(MXC_CPU_IMX8MP7) || \ - is_cpu_type(MXC_CPU_IMX8MP6) || is_cpu_type(MXC_CPU_IMX8MP5)) + is_cpu_type(MXC_CPU_IMX8MPL) || is_cpu_type(MXC_CPU_IMX8MP6)) #define is_imx8mpd() (is_cpu_type(MXC_CPU_IMX8MPD)) #define is_imx8mpl() (is_cpu_type(MXC_CPU_IMX8MPL)) -#define is_imx8mp7() (is_cpu_type(MXC_CPU_IMX8MP7)) #define is_imx8mp6() (is_cpu_type(MXC_CPU_IMX8MP6)) -#define is_imx8mp5() (is_cpu_type(MXC_CPU_IMX8MP5)) #define is_imx8qxp() (is_cpu_type(MXC_CPU_IMX8QXP)) diff --git a/arch/arm/mach-imx/cpu.c b/arch/arm/mach-imx/cpu.c index fe8d5947cc..4a175cb86f 100644 --- a/arch/arm/mach-imx/cpu.c +++ b/arch/arm/mach-imx/cpu.c @@ -102,12 +102,8 @@ const char *get_imx_type(u32 imxtype) return "8MP Dual[3]"; /* Dual-core version of the imx8mp */ case MXC_CPU_IMX8MPL: return "8MP Lite[4]"; /* Quad-core Lite version of the imx8mp */ - case MXC_CPU_IMX8MP7: - return "8MP[7]"; /* Quad-core version of the imx8mp, VPU fused */ case MXC_CPU_IMX8MP6: return "8MP[6]"; /* Quad-core version of the imx8mp, NPU fused */ - case MXC_CPU_IMX8MP5: - return "8MP[5]"; /* Quad-core version of the imx8mp, ISP fused */ case MXC_CPU_IMX8MN: return "8MNano Quad"; /* Quad-core version */ case MXC_CPU_IMX8MND: diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c index 8dfc8645fc..9bca5bf972 100644 --- a/arch/arm/mach-imx/imx8m/soc.c +++ b/arch/arm/mach-imx/imx8m/soc.c @@ -343,12 +343,8 @@ static u32 get_cpu_variant_type(u32 type) switch (flag) { case 7: return MXC_CPU_IMX8MPL; - case 6: - return MXC_CPU_IMX8MP5; case 2: return MXC_CPU_IMX8MP6; - case 1: - return MXC_CPU_IMX8MP7; default: break; } @@ -889,16 +885,16 @@ usb_modify_speed: disable_cpu_nodes(blob, 3); #elif defined(CONFIG_IMX8MP) - if (is_imx8mpl() || is_imx8mp7()) + if (is_imx8mpl()) disable_vpu_nodes(blob); - if (is_imx8mpl() || is_imx8mp6() || is_imx8mp5()) + if (is_imx8mpl() || is_imx8mp6()) disable_npu_nodes(blob); - if (is_imx8mpl() || is_imx8mp5()) + if (is_imx8mpl()) disable_isp_nodes(blob); - if (is_imx8mpl() || is_imx8mp7() || is_imx8mp6() || is_imx8mp5()) + if (is_imx8mpl() || is_imx8mp6()) disable_dsp_nodes(blob); if (is_imx8mpd()) -- cgit From 1189bd513ca376a0f1b357bb0ffec7ae22ace717 Mon Sep 17 00:00:00 2001 From: Denis Pynkin Date: Tue, 15 Sep 2020 14:37:14 +0300 Subject: mx6qsabrelite: increase the environment offset The size of the binary created with the default U-boot config is much greater than the default offset for environment `0x60000`. In case if that binary is used for booting via MMC it is overlapped with the environment stored on MMC. This leads to U-Boot corruption while saving environment with `saveenv` command and non-bootable SabreLite board. The offset for environment `CONFIG_ENV_OFFSET=0x60000` was added in commit a09fea1 but did not count in the change to `0xC0000` if option `CONFIG_ENV_IS_IN_MMC` is used. The offset is also used for variant with environment saving onto SPI NOR flash (with enabled option `CONFIG_ENV_IS_IN_SPI_FLASH`). In that case the U-Boot binary flashed on SPI NOR is also corrupted after environment saving with the original 0x60000 offset. Signed-off-by: Denis Pynkin Reviewed-by: Tom Rini --- configs/mx6qsabrelite_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/mx6qsabrelite_defconfig b/configs/mx6qsabrelite_defconfig index 008fcfe04c..6e7193e411 100644 --- a/configs/mx6qsabrelite_defconfig +++ b/configs/mx6qsabrelite_defconfig @@ -4,7 +4,7 @@ CONFIG_SYS_TEXT_BASE=0x17800000 CONFIG_SYS_MALLOC_F_LEN=0x4000 CONFIG_NR_DRAM_BANKS=1 CONFIG_ENV_SIZE=0x2000 -CONFIG_ENV_OFFSET=0x60000 +CONFIG_ENV_OFFSET=0xC0000 CONFIG_MX6Q=y CONFIG_TARGET_NITROGEN6X=y CONFIG_DM_GPIO=y -- cgit From d1a7205532a34bad2b83451258ca4ccacb9085e4 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sun, 13 Sep 2020 01:35:08 +0200 Subject: ARM: mx6: ddr: Add support for iMX6UL/ULL/SL/SDL This patch adds support for iMX6UL/ULL/SL/SDL MMDC into the DDR calibration code. The difference between MX6DQ and MX6UL/ULL/SL is that the later SoCs have 2 SDQS registers, just like MX6SX, while the MX6DQ/MX6SDL has 8. Fixes: 4f4c128c65 ("ARM: mx6: ddr: Add support for iMX6SX") Signed-off-by: Marek Vasut Cc: Eric Nelson Cc: Fabio Estevam Cc: Stefano Babic Reviewed-by: Fabio Estevam --- arch/arm/mach-imx/mx6/ddr.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm/mach-imx/mx6/ddr.c b/arch/arm/mach-imx/mx6/ddr.c index 16df71083d..f872bfdab3 100644 --- a/arch/arm/mach-imx/mx6/ddr.c +++ b/arch/arm/mach-imx/mx6/ddr.c @@ -250,16 +250,31 @@ int mmdc_do_write_level_calibration(struct mx6_ddr_sysinfo const *sysinfo) static void mmdc_set_sdqs(bool set) { + struct mx6sdl_iomux_ddr_regs *mx6sdl_ddr_iomux = + (struct mx6sdl_iomux_ddr_regs *)MX6SDL_IOM_DDR_BASE; struct mx6dq_iomux_ddr_regs *mx6dq_ddr_iomux = (struct mx6dq_iomux_ddr_regs *)MX6DQ_IOM_DDR_BASE; struct mx6sx_iomux_ddr_regs *mx6sx_ddr_iomux = (struct mx6sx_iomux_ddr_regs *)MX6SX_IOM_DDR_BASE; + struct mx6sl_iomux_ddr_regs *mx6sl_ddr_iomux = + (struct mx6sl_iomux_ddr_regs *)MX6SL_IOM_DDR_BASE; + struct mx6ul_iomux_ddr_regs *mx6ul_ddr_iomux = + (struct mx6ul_iomux_ddr_regs *)MX6UL_IOM_DDR_BASE; int i, sdqs_cnt; u32 sdqs; if (is_mx6sx()) { sdqs = (u32)(&mx6sx_ddr_iomux->dram_sdqs0); sdqs_cnt = 2; + } else if (is_mx6sl()) { + sdqs = (u32)(&mx6sl_ddr_iomux->dram_sdqs0); + sdqs_cnt = 2; + } else if (is_mx6ul() || is_mx6ull()) { + sdqs = (u32)(&mx6ul_ddr_iomux->dram_sdqs0); + sdqs_cnt = 2; + } else if (is_mx6sdl()) { + sdqs = (u32)(&mx6sdl_ddr_iomux->dram_sdqs0); + sdqs_cnt = 8; } else { /* MX6DQ */ sdqs = (u32)(&mx6dq_ddr_iomux->dram_sdqs0); sdqs_cnt = 8; -- cgit From f9c3a816c0de61565a0afd1608de20ecb54e9243 Mon Sep 17 00:00:00 2001 From: Haibo Chen Date: Tue, 1 Sep 2020 15:34:06 +0800 Subject: mmc: fsl_esdhc_imx: check the clock stable status after config the clock rate. Currently, after config the clock rate, delay 10ms, this is quite a rough method. Check the clock stable status in the present status register is enough. Tested-by: Ji Luo Signed-off-by: Haibo Chen --- drivers/mmc/fsl_esdhc_imx.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c index 788677984b..0c866b168f 100644 --- a/drivers/mmc/fsl_esdhc_imx.c +++ b/drivers/mmc/fsl_esdhc_imx.c @@ -36,6 +36,7 @@ #include #include #include +#include #if !CONFIG_IS_ENABLED(BLK) #include "mmc_private.h" @@ -631,6 +632,8 @@ static void set_sysctl(struct fsl_esdhc_priv *priv, struct mmc *mmc, uint clock) { struct fsl_esdhc *regs = priv->esdhc_regs; int div = 1; + u32 tmp; + int ret; #ifdef ARCH_MXC #ifdef CONFIG_MX53 /* For i.MX53 eSDHCv3, SYSCTL.SDCLKFS may not be set to 0. */ @@ -664,7 +667,9 @@ static void set_sysctl(struct fsl_esdhc_priv *priv, struct mmc *mmc, uint clock) esdhc_clrsetbits32(®s->sysctl, SYSCTL_CLOCK_MASK, clk); - udelay(10000); + ret = readx_poll_timeout(esdhc_read32, ®s->prsstat, tmp, tmp & PRSSTAT_SDSTB, 100); + if (ret) + pr_warn("fsl_esdhc_imx: Internal clock never stabilised.\n"); #ifdef CONFIG_FSL_USDHC esdhc_setbits32(®s->vendorspec, VENDORSPEC_PEREN | VENDORSPEC_CKEN); -- cgit From 08b6a60ee8aaf0856aef86173e5b8b617f35a24a Mon Sep 17 00:00:00 2001 From: Philippe Schenker Date: Fri, 28 Aug 2020 21:08:05 +0300 Subject: colibri-imx8qxp: rename all occurences to colibri-imx8x The Toradex product is called colibri-imx8x consisting of SoM with i.MX8QXP and i.MX8DX SoCs. Signed-off-by: Philippe Schenker Reviewed-by: Igor Opaniuk --- arch/arm/dts/fsl-imx8qxp-colibri.dts | 6 +- board/toradex/colibri-imx8x/MAINTAINERS | 2 +- .../colibri-imx8x/colibri-imx8qxp-imximage.cfg | 24 -------- .../colibri-imx8x/colibri-imx8x-imximage.cfg | 24 ++++++++ configs/colibri-imx8qxp_defconfig | 65 ---------------------- configs/colibri-imx8x_defconfig | 65 ++++++++++++++++++++++ doc/board/toradex/colibri-imx8x.rst | 2 +- 7 files changed, 94 insertions(+), 94 deletions(-) delete mode 100644 board/toradex/colibri-imx8x/colibri-imx8qxp-imximage.cfg create mode 100644 board/toradex/colibri-imx8x/colibri-imx8x-imximage.cfg delete mode 100644 configs/colibri-imx8qxp_defconfig create mode 100644 configs/colibri-imx8x_defconfig diff --git a/arch/arm/dts/fsl-imx8qxp-colibri.dts b/arch/arm/dts/fsl-imx8qxp-colibri.dts index 0c20edf2cf..11ece34c02 100644 --- a/arch/arm/dts/fsl-imx8qxp-colibri.dts +++ b/arch/arm/dts/fsl-imx8qxp-colibri.dts @@ -9,8 +9,8 @@ #include "fsl-imx8qxp-colibri-u-boot.dtsi" / { - model = "Toradex Colibri iMX8QXP"; - compatible = "toradex,colibri-imx8qxp", "fsl,imx8qxp"; + model = "Toradex Colibri iMX8X"; + compatible = "toradex,colibri-imx8x", "fsl,imx8qxp"; chosen { bootargs = "console=ttyLP3,115200 earlycon=lpuart32,0x5a090000,115200"; @@ -32,7 +32,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_hog0>, <&pinctrl_hog1>, <&pinctrl_hog2>; - colibri-imx8qxp { + colibri-imx8x { pinctrl_lpuart0: lpuart0grp { fsl,pins = < SC_P_UART0_RX_ADMA_UART0_RX 0x06000020 diff --git a/board/toradex/colibri-imx8x/MAINTAINERS b/board/toradex/colibri-imx8x/MAINTAINERS index f6853586c8..de62f87a56 100644 --- a/board/toradex/colibri-imx8x/MAINTAINERS +++ b/board/toradex/colibri-imx8x/MAINTAINERS @@ -5,6 +5,6 @@ S: Maintained F: arch/arm/dts/fsl-imx8x-colibri.dts F: arch/arm/dts/fsl-imx8x-colibri-u-boot.dtsi F: board/toradex/colibri-imx8x/ -F: configs/colibri-imx8qxp_defconfig +F: configs/colibri-imx8x_defconfig F: doc/board/toradex/colibri-imx8x.rst F: include/configs/colibri-imx8x.h diff --git a/board/toradex/colibri-imx8x/colibri-imx8qxp-imximage.cfg b/board/toradex/colibri-imx8x/colibri-imx8qxp-imximage.cfg deleted file mode 100644 index 44f6c0c455..0000000000 --- a/board/toradex/colibri-imx8x/colibri-imx8qxp-imximage.cfg +++ /dev/null @@ -1,24 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright 2019 Toradex - * - * Refer doc/imx/mkimage/imx8image.txt for more details about how-to configure - * and create imx8image boot image - */ - -#define __ASSEMBLY__ - -/* Boot from SD, sector size 0x400 */ -BOOT_FROM EMMC_FASTBOOT 0x400 -/* SoC type IMX8QX */ -SOC_TYPE IMX8QX -/* Append seco container image */ -APPEND mx8qx-ahab-container.img -/* Create the 2nd container */ -CONTAINER -/* Add scfw image with exec attribute */ -IMAGE SCU mx8qx-colibri-scfw-tcm.bin -/* Add ATF image with exec attribute */ -IMAGE A35 bl31.bin 0x80000000 -/* Add U-Boot image with load attribute */ -DATA A35 u-boot-dtb.bin 0x80020000 diff --git a/board/toradex/colibri-imx8x/colibri-imx8x-imximage.cfg b/board/toradex/colibri-imx8x/colibri-imx8x-imximage.cfg new file mode 100644 index 0000000000..44f6c0c455 --- /dev/null +++ b/board/toradex/colibri-imx8x/colibri-imx8x-imximage.cfg @@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2019 Toradex + * + * Refer doc/imx/mkimage/imx8image.txt for more details about how-to configure + * and create imx8image boot image + */ + +#define __ASSEMBLY__ + +/* Boot from SD, sector size 0x400 */ +BOOT_FROM EMMC_FASTBOOT 0x400 +/* SoC type IMX8QX */ +SOC_TYPE IMX8QX +/* Append seco container image */ +APPEND mx8qx-ahab-container.img +/* Create the 2nd container */ +CONTAINER +/* Add scfw image with exec attribute */ +IMAGE SCU mx8qx-colibri-scfw-tcm.bin +/* Add ATF image with exec attribute */ +IMAGE A35 bl31.bin 0x80000000 +/* Add U-Boot image with load attribute */ +DATA A35 u-boot-dtb.bin 0x80020000 diff --git a/configs/colibri-imx8qxp_defconfig b/configs/colibri-imx8qxp_defconfig deleted file mode 100644 index 719e7473e1..0000000000 --- a/configs/colibri-imx8qxp_defconfig +++ /dev/null @@ -1,65 +0,0 @@ -CONFIG_ARM=y -CONFIG_ARCH_IMX8=y -CONFIG_SYS_TEXT_BASE=0x80020000 -CONFIG_SYS_MALLOC_F_LEN=0x4000 -CONFIG_NR_DRAM_BANKS=3 -CONFIG_ENV_SIZE=0x2000 -CONFIG_ENV_OFFSET=0xFFFFDE00 -CONFIG_DM_GPIO=y -CONFIG_TARGET_COLIBRI_IMX8X=y -CONFIG_DEFAULT_DEVICE_TREE="fsl-imx8qxp-colibri" -CONFIG_DISTRO_DEFAULTS=y -CONFIG_FIT=y -CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/toradex/colibri-imx8x/colibri-imx8qxp-imximage.cfg" -CONFIG_LOG=y -CONFIG_VERSION_VARIABLE=y -# CONFIG_DISPLAY_BOARDINFO is not set -CONFIG_BOARD_EARLY_INIT_F=y -CONFIG_CMD_CPU=y -# CONFIG_BOOTM_NETBSD is not set -CONFIG_CMD_ASKENV=y -CONFIG_CMD_MEMTEST=y -CONFIG_SYS_MEMTEST_START=0x88000000 -CONFIG_SYS_MEMTEST_END=0x89000000 -CONFIG_CMD_CLK=y -CONFIG_CMD_DM=y -CONFIG_CMD_GPIO=y -CONFIG_CMD_I2C=y -CONFIG_CMD_MMC=y -CONFIG_CMD_CACHE=y -CONFIG_CMD_UUID=y -CONFIG_CMD_EXT4_WRITE=y -CONFIG_ENV_OVERWRITE=y -CONFIG_ENV_IS_IN_MMC=y -CONFIG_SYS_RELOC_GD_ENV_ADDR=y -CONFIG_SYS_MMC_ENV_PART=1 -CONFIG_IP_DEFRAG=y -CONFIG_TFTP_BLOCKSIZE=4096 -CONFIG_CLK_IMX8=y -CONFIG_CPU=y -CONFIG_MXC_GPIO=y -CONFIG_DM_I2C=y -CONFIG_SYS_I2C_IMX_LPI2C=y -CONFIG_MISC=y -CONFIG_DM_MMC=y -CONFIG_FSL_USDHC=y -CONFIG_PHYLIB=y -CONFIG_PHY_ADDR_ENABLE=y -CONFIG_PHY_MICREL=y -CONFIG_DM_ETH=y -CONFIG_FEC_MXC_SHARE_MDIO=y -CONFIG_FEC_MXC_MDIO_BASE=0x5B040000 -CONFIG_FEC_MXC=y -CONFIG_MII=y -CONFIG_PINCTRL=y -CONFIG_PINCTRL_IMX8=y -CONFIG_POWER_DOMAIN=y -CONFIG_IMX8_POWER_DOMAIN=y -CONFIG_DM_REGULATOR=y -CONFIG_DM_REGULATOR_FIXED=y -CONFIG_DM_REGULATOR_GPIO=y -CONFIG_DM_SERIAL=y -CONFIG_FSL_LPUART=y -CONFIG_DM_THERMAL=y -CONFIG_IMX_SCU_THERMAL=y -# CONFIG_EFI_LOADER is not set diff --git a/configs/colibri-imx8x_defconfig b/configs/colibri-imx8x_defconfig new file mode 100644 index 0000000000..92dc103ce3 --- /dev/null +++ b/configs/colibri-imx8x_defconfig @@ -0,0 +1,65 @@ +CONFIG_ARM=y +CONFIG_ARCH_IMX8=y +CONFIG_SYS_TEXT_BASE=0x80020000 +CONFIG_SYS_MALLOC_F_LEN=0x4000 +CONFIG_NR_DRAM_BANKS=3 +CONFIG_ENV_SIZE=0x2000 +CONFIG_ENV_OFFSET=0xFFFFDE00 +CONFIG_DM_GPIO=y +CONFIG_TARGET_COLIBRI_IMX8X=y +CONFIG_DEFAULT_DEVICE_TREE="fsl-imx8qxp-colibri" +CONFIG_DISTRO_DEFAULTS=y +CONFIG_FIT=y +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/toradex/colibri-imx8x/colibri-imx8x-imximage.cfg" +CONFIG_LOG=y +CONFIG_VERSION_VARIABLE=y +# CONFIG_DISPLAY_BOARDINFO is not set +CONFIG_BOARD_EARLY_INIT_F=y +CONFIG_CMD_CPU=y +# CONFIG_BOOTM_NETBSD is not set +CONFIG_CMD_ASKENV=y +CONFIG_CMD_MEMTEST=y +CONFIG_SYS_MEMTEST_START=0x88000000 +CONFIG_SYS_MEMTEST_END=0x89000000 +CONFIG_CMD_CLK=y +CONFIG_CMD_DM=y +CONFIG_CMD_GPIO=y +CONFIG_CMD_I2C=y +CONFIG_CMD_MMC=y +CONFIG_CMD_CACHE=y +CONFIG_CMD_UUID=y +CONFIG_CMD_EXT4_WRITE=y +CONFIG_ENV_OVERWRITE=y +CONFIG_ENV_IS_IN_MMC=y +CONFIG_SYS_RELOC_GD_ENV_ADDR=y +CONFIG_SYS_MMC_ENV_PART=1 +CONFIG_IP_DEFRAG=y +CONFIG_TFTP_BLOCKSIZE=4096 +CONFIG_CLK_IMX8=y +CONFIG_CPU=y +CONFIG_MXC_GPIO=y +CONFIG_DM_I2C=y +CONFIG_SYS_I2C_IMX_LPI2C=y +CONFIG_MISC=y +CONFIG_DM_MMC=y +CONFIG_FSL_USDHC=y +CONFIG_PHYLIB=y +CONFIG_PHY_ADDR_ENABLE=y +CONFIG_PHY_MICREL=y +CONFIG_DM_ETH=y +CONFIG_FEC_MXC_SHARE_MDIO=y +CONFIG_FEC_MXC_MDIO_BASE=0x5B040000 +CONFIG_FEC_MXC=y +CONFIG_MII=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_IMX8=y +CONFIG_POWER_DOMAIN=y +CONFIG_IMX8_POWER_DOMAIN=y +CONFIG_DM_REGULATOR=y +CONFIG_DM_REGULATOR_FIXED=y +CONFIG_DM_REGULATOR_GPIO=y +CONFIG_DM_SERIAL=y +CONFIG_FSL_LPUART=y +CONFIG_DM_THERMAL=y +CONFIG_IMX_SCU_THERMAL=y +# CONFIG_EFI_LOADER is not set diff --git a/doc/board/toradex/colibri-imx8x.rst b/doc/board/toradex/colibri-imx8x.rst index 244e5a4c04..616f40ae0f 100644 --- a/doc/board/toradex/colibri-imx8x.rst +++ b/doc/board/toradex/colibri-imx8x.rst @@ -52,7 +52,7 @@ Build U-Boot .. code-block:: bash - $ make colibri-imx8qxp_defconfig + $ make colibri-imx8x_defconfig $ make u-boot-dtb.imx Load the U-Boot Binary Using UUU -- cgit From bf46474e21ed353574610ea6db0375ff69965a0f Mon Sep 17 00:00:00 2001 From: Philippe Schenker Date: Fri, 28 Aug 2020 21:08:06 +0300 Subject: apalis-imx8qm: rename all occurences to apalis-imx8 The Toradex product is called apalis-imx8 consisting of SoM with i.MX8QM and i.MX8QP SoCs. Signed-off-by: Philippe Schenker Reviewed-by: Igor Opaniuk --- arch/arm/dts/fsl-imx8qm-apalis.dts | 6 +- board/toradex/apalis-imx8/MAINTAINERS | 2 +- board/toradex/apalis-imx8/apalis-imx8-imximage.cfg | 24 ++++++++ .../toradex/apalis-imx8/apalis-imx8qm-imximage.cfg | 24 -------- configs/apalis-imx8_defconfig | 68 ++++++++++++++++++++++ configs/apalis-imx8qm_defconfig | 68 ---------------------- doc/board/toradex/apalix-imx8.rst | 2 +- 7 files changed, 97 insertions(+), 97 deletions(-) create mode 100644 board/toradex/apalis-imx8/apalis-imx8-imximage.cfg delete mode 100644 board/toradex/apalis-imx8/apalis-imx8qm-imximage.cfg create mode 100644 configs/apalis-imx8_defconfig delete mode 100644 configs/apalis-imx8qm_defconfig diff --git a/arch/arm/dts/fsl-imx8qm-apalis.dts b/arch/arm/dts/fsl-imx8qm-apalis.dts index 9b1f8aa32d..5187b79452 100644 --- a/arch/arm/dts/fsl-imx8qm-apalis.dts +++ b/arch/arm/dts/fsl-imx8qm-apalis.dts @@ -12,8 +12,8 @@ #include "fsl-imx8qm-apalis-u-boot.dtsi" / { - model = "Toradex Apalis iMX8QM"; - compatible = "toradex,apalis-imx8qm", "fsl,imx8qm"; + model = "Toradex Apalis iMX8"; + compatible = "toradex,apalis-imx8", "fsl,imx8qm"; chosen { bootargs = "console=ttyLP1,115200 earlycon=lpuart32,0x5a070000,115200"; @@ -38,7 +38,7 @@ <&pinctrl_qspi1a_gpios>, <&pinctrl_sata1_act>, <&pinctrl_sim0_gpios>, <&pinctrl_usdhc1_gpios>; - apalis-imx8qm { + apalis-imx8 { pinctrl_gpio12: gpio12grp { fsl,pins = < /* Apalis GPIO1 */ diff --git a/board/toradex/apalis-imx8/MAINTAINERS b/board/toradex/apalis-imx8/MAINTAINERS index feacf7eded..7fbd1be10f 100644 --- a/board/toradex/apalis-imx8/MAINTAINERS +++ b/board/toradex/apalis-imx8/MAINTAINERS @@ -5,6 +5,6 @@ S: Maintained F: arch/arm/dts/fsl-imx8-apalis.dts F: arch/arm/dts/fsl-imx8-apalis-u-boot.dtsi F: board/toradex/apalis-imx8/ -F: configs/apalis-imx8qm_defconfig +F: configs/apalis-imx8_defconfig F: doc/board/toradex/apalix-imx8.rst F: include/configs/apalis-imx8.h diff --git a/board/toradex/apalis-imx8/apalis-imx8-imximage.cfg b/board/toradex/apalis-imx8/apalis-imx8-imximage.cfg new file mode 100644 index 0000000000..b8f0f3dc10 --- /dev/null +++ b/board/toradex/apalis-imx8/apalis-imx8-imximage.cfg @@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2019 Toradex + * + * Refer doc/imx/mkimage/imx8image.txt for more details about how-to configure + * and create imx8image boot image + */ + +#define __ASSEMBLY__ + +/* Boot from SD, sector size 0x400 */ +BOOT_FROM EMMC_FASTBOOT 0x400 +/* SoC type IMX8QM */ +SOC_TYPE IMX8QM +/* Append seco container image */ +APPEND mx8qm-ahab-container.img +/* Create the 2nd container */ +CONTAINER +/* Add scfw image with exec attribute */ +IMAGE SCU mx8qm-apalis-scfw-tcm.bin +/* Add ATF image with exec attribute */ +IMAGE A35 bl31.bin 0x80000000 +/* Add U-Boot image with load attribute */ +DATA A35 u-boot-dtb.bin 0x80020000 diff --git a/board/toradex/apalis-imx8/apalis-imx8qm-imximage.cfg b/board/toradex/apalis-imx8/apalis-imx8qm-imximage.cfg deleted file mode 100644 index b8f0f3dc10..0000000000 --- a/board/toradex/apalis-imx8/apalis-imx8qm-imximage.cfg +++ /dev/null @@ -1,24 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright 2019 Toradex - * - * Refer doc/imx/mkimage/imx8image.txt for more details about how-to configure - * and create imx8image boot image - */ - -#define __ASSEMBLY__ - -/* Boot from SD, sector size 0x400 */ -BOOT_FROM EMMC_FASTBOOT 0x400 -/* SoC type IMX8QM */ -SOC_TYPE IMX8QM -/* Append seco container image */ -APPEND mx8qm-ahab-container.img -/* Create the 2nd container */ -CONTAINER -/* Add scfw image with exec attribute */ -IMAGE SCU mx8qm-apalis-scfw-tcm.bin -/* Add ATF image with exec attribute */ -IMAGE A35 bl31.bin 0x80000000 -/* Add U-Boot image with load attribute */ -DATA A35 u-boot-dtb.bin 0x80020000 diff --git a/configs/apalis-imx8_defconfig b/configs/apalis-imx8_defconfig new file mode 100644 index 0000000000..72e58216bd --- /dev/null +++ b/configs/apalis-imx8_defconfig @@ -0,0 +1,68 @@ +CONFIG_ARM=y +CONFIG_ARCH_IMX8=y +CONFIG_SYS_TEXT_BASE=0x80020000 +CONFIG_SYS_MALLOC_F_LEN=0x4000 +CONFIG_NR_DRAM_BANKS=3 +CONFIG_ENV_SIZE=0x2000 +CONFIG_ENV_OFFSET=0xFFFFDE00 +CONFIG_DM_GPIO=y +CONFIG_TARGET_APALIS_IMX8=y +CONFIG_DEFAULT_DEVICE_TREE="fsl-imx8qm-apalis" +CONFIG_DISTRO_DEFAULTS=y +CONFIG_FIT=y +CONFIG_OF_SYSTEM_SETUP=y +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/toradex/apalis-imx8/apalis-imx8-imximage.cfg" +CONFIG_LOG=y +CONFIG_VERSION_VARIABLE=y +# CONFIG_DISPLAY_BOARDINFO is not set +CONFIG_BOARD_EARLY_INIT_F=y +CONFIG_CMD_CPU=y +# CONFIG_BOOTM_NETBSD is not set +CONFIG_CMD_ASKENV=y +CONFIG_CMD_MEMTEST=y +CONFIG_SYS_MEMTEST_START=0x88000000 +CONFIG_SYS_MEMTEST_END=0x89000000 +CONFIG_CMD_CLK=y +CONFIG_CMD_DM=y +CONFIG_CMD_FUSE=y +CONFIG_CMD_GPIO=y +CONFIG_CMD_I2C=y +CONFIG_CMD_MMC=y +CONFIG_CMD_CACHE=y +CONFIG_CMD_UUID=y +CONFIG_CMD_EXT4_WRITE=y +CONFIG_ENV_OVERWRITE=y +CONFIG_ENV_IS_IN_MMC=y +CONFIG_SYS_RELOC_GD_ENV_ADDR=y +CONFIG_SYS_MMC_ENV_PART=1 +CONFIG_IP_DEFRAG=y +CONFIG_TFTP_BLOCKSIZE=4096 +CONFIG_CLK_IMX8=y +CONFIG_CPU=y +CONFIG_MXC_GPIO=y +CONFIG_DM_I2C=y +CONFIG_SYS_I2C_IMX_LPI2C=y +CONFIG_MISC=y +CONFIG_DM_MMC=y +CONFIG_FSL_USDHC=y +CONFIG_PHYLIB=y +CONFIG_PHY_ADDR_ENABLE=y +CONFIG_PHY_MICREL=y +CONFIG_PHY_MICREL_KSZ90X1=y +CONFIG_DM_ETH=y +CONFIG_FEC_MXC_SHARE_MDIO=y +CONFIG_FEC_MXC_MDIO_BASE=0x5B040000 +CONFIG_FEC_MXC=y +CONFIG_MII=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_IMX8=y +CONFIG_POWER_DOMAIN=y +CONFIG_IMX8_POWER_DOMAIN=y +CONFIG_DM_REGULATOR=y +CONFIG_DM_REGULATOR_FIXED=y +CONFIG_DM_REGULATOR_GPIO=y +CONFIG_DM_SERIAL=y +CONFIG_FSL_LPUART=y +CONFIG_DM_THERMAL=y +CONFIG_IMX_SCU_THERMAL=y +# CONFIG_EFI_LOADER is not set diff --git a/configs/apalis-imx8qm_defconfig b/configs/apalis-imx8qm_defconfig deleted file mode 100644 index 5cf0e2b017..0000000000 --- a/configs/apalis-imx8qm_defconfig +++ /dev/null @@ -1,68 +0,0 @@ -CONFIG_ARM=y -CONFIG_ARCH_IMX8=y -CONFIG_SYS_TEXT_BASE=0x80020000 -CONFIG_SYS_MALLOC_F_LEN=0x4000 -CONFIG_NR_DRAM_BANKS=3 -CONFIG_ENV_SIZE=0x2000 -CONFIG_ENV_OFFSET=0xFFFFDE00 -CONFIG_DM_GPIO=y -CONFIG_TARGET_APALIS_IMX8=y -CONFIG_DEFAULT_DEVICE_TREE="fsl-imx8qm-apalis" -CONFIG_DISTRO_DEFAULTS=y -CONFIG_FIT=y -CONFIG_OF_SYSTEM_SETUP=y -CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/toradex/apalis-imx8/apalis-imx8qm-imximage.cfg" -CONFIG_LOG=y -CONFIG_VERSION_VARIABLE=y -# CONFIG_DISPLAY_BOARDINFO is not set -CONFIG_BOARD_EARLY_INIT_F=y -CONFIG_CMD_CPU=y -# CONFIG_BOOTM_NETBSD is not set -CONFIG_CMD_ASKENV=y -CONFIG_CMD_MEMTEST=y -CONFIG_SYS_MEMTEST_START=0x88000000 -CONFIG_SYS_MEMTEST_END=0x89000000 -CONFIG_CMD_CLK=y -CONFIG_CMD_DM=y -CONFIG_CMD_FUSE=y -CONFIG_CMD_GPIO=y -CONFIG_CMD_I2C=y -CONFIG_CMD_MMC=y -CONFIG_CMD_CACHE=y -CONFIG_CMD_UUID=y -CONFIG_CMD_EXT4_WRITE=y -CONFIG_ENV_OVERWRITE=y -CONFIG_ENV_IS_IN_MMC=y -CONFIG_SYS_RELOC_GD_ENV_ADDR=y -CONFIG_SYS_MMC_ENV_PART=1 -CONFIG_IP_DEFRAG=y -CONFIG_TFTP_BLOCKSIZE=4096 -CONFIG_CLK_IMX8=y -CONFIG_CPU=y -CONFIG_MXC_GPIO=y -CONFIG_DM_I2C=y -CONFIG_SYS_I2C_IMX_LPI2C=y -CONFIG_MISC=y -CONFIG_DM_MMC=y -CONFIG_FSL_USDHC=y -CONFIG_PHYLIB=y -CONFIG_PHY_ADDR_ENABLE=y -CONFIG_PHY_MICREL=y -CONFIG_PHY_MICREL_KSZ90X1=y -CONFIG_DM_ETH=y -CONFIG_FEC_MXC_SHARE_MDIO=y -CONFIG_FEC_MXC_MDIO_BASE=0x5B040000 -CONFIG_FEC_MXC=y -CONFIG_MII=y -CONFIG_PINCTRL=y -CONFIG_PINCTRL_IMX8=y -CONFIG_POWER_DOMAIN=y -CONFIG_IMX8_POWER_DOMAIN=y -CONFIG_DM_REGULATOR=y -CONFIG_DM_REGULATOR_FIXED=y -CONFIG_DM_REGULATOR_GPIO=y -CONFIG_DM_SERIAL=y -CONFIG_FSL_LPUART=y -CONFIG_DM_THERMAL=y -CONFIG_IMX_SCU_THERMAL=y -# CONFIG_EFI_LOADER is not set diff --git a/doc/board/toradex/apalix-imx8.rst b/doc/board/toradex/apalix-imx8.rst index 4b7ea65d31..29593faf1a 100644 --- a/doc/board/toradex/apalix-imx8.rst +++ b/doc/board/toradex/apalix-imx8.rst @@ -51,7 +51,7 @@ Build U-Boot ------------ .. code-block:: bash - $ make apalis-imx8qm_defconfig + $ make apalis-imx8_defconfig $ make u-boot-dtb.imx Load the U-Boot Binary Using UUU -- cgit From 4516b535bf16db4231ea27bb95197d869f86893b Mon Sep 17 00:00:00 2001 From: Soeren Moch Date: Thu, 27 Aug 2020 21:52:47 +0200 Subject: board: tbs2910: Disable CONFIG_ENV_VARS_UBOOT_CONFIG in defconfig This is not required for sysboot (we defined fdtfile), let's save a few bytes in the binary image without these variables. Signed-off-by: Soeren Moch Reviewed-by: Fabio Estevam --- configs/tbs2910_defconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/configs/tbs2910_defconfig b/configs/tbs2910_defconfig index 34d240565e..070aea59b5 100644 --- a/configs/tbs2910_defconfig +++ b/configs/tbs2910_defconfig @@ -11,7 +11,6 @@ CONFIG_PRE_CON_BUF_ADDR=0x7c000000 CONFIG_CMD_HDMIDETECT=y CONFIG_DEFAULT_DEVICE_TREE="imx6q-tbs2910" CONFIG_AHCI=y -CONFIG_ENV_VARS_UBOOT_CONFIG=y CONFIG_BOOTDELAY=3 CONFIG_USE_BOOTCOMMAND=y CONFIG_BOOTCOMMAND="mmc rescan; if run bootcmd_up1; then run bootcmd_up2; else run bootcmd_mmc || run distro_bootcmd; fi" -- cgit From a7dc37d38c8eddcd14008b115e254279bb88bbc1 Mon Sep 17 00:00:00 2001 From: Joao Marcos Costa Date: Fri, 11 Sep 2020 12:21:06 +0200 Subject: fs/squashfs: Fix Coverity Scan defects Fix control flow issues and null pointer dereferences. Signed-off-by: Joao Marcos Costa --- fs/squashfs/sqfs.c | 20 +++++++++++++------- fs/squashfs/sqfs_dir.c | 3 +-- fs/squashfs/sqfs_inode.c | 5 ++++- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/fs/squashfs/sqfs.c b/fs/squashfs/sqfs.c index f67f7c4a40..15208b4dab 100644 --- a/fs/squashfs/sqfs.c +++ b/fs/squashfs/sqfs.c @@ -154,7 +154,7 @@ static int sqfs_frag_lookup(u32 inode_fragment_index, header = get_unaligned_le16(metadata_buffer + table_offset); metadata = metadata_buffer + table_offset + SQFS_HEADER_SIZE; - if (!metadata) { + if (!metadata || !header) { ret = -ENOMEM; goto free_buffer; } @@ -434,9 +434,9 @@ static int sqfs_search_dir(struct squashfs_dir_stream *dirs, char **token_list, { struct squashfs_super_block *sblk = ctxt.sblk; char *path, *target, **sym_tokens, *res, *rem; - struct squashfs_ldir_inode *ldir = NULL; int j, ret, new_inode_number, offset; struct squashfs_symlink_inode *sym; + struct squashfs_ldir_inode *ldir; struct squashfs_dir_inode *dir; struct fs_dir_stream *dirsp; struct fs_dirent *dent; @@ -448,8 +448,8 @@ static int sqfs_search_dir(struct squashfs_dir_stream *dirs, char **token_list, table = sqfs_find_inode(dirs->inode_table, le32_to_cpu(sblk->inodes), sblk->inodes, sblk->block_size); - /* root is a regular directory, not an extended one */ dir = (struct squashfs_dir_inode *)table; + ldir = (struct squashfs_ldir_inode *)table; /* get directory offset in directory table */ offset = sqfs_dir_offset(table, m_list, m_count); @@ -1146,7 +1146,10 @@ static int sqfs_get_regfile_info(struct squashfs_reg_inode *reg, finfo->start = get_unaligned_le32(®->start_block); finfo->frag = SQFS_IS_FRAGMENTED(get_unaligned_le32(®->fragment)); - if (finfo->size < 1 || finfo->offset < 0 || finfo->start < 0) + if (finfo->frag && finfo->offset == 0xFFFFFFFF) + return -EINVAL; + + if (finfo->size < 1 || finfo->start == 0xFFFFFFFF) return -EINVAL; if (finfo->frag) { @@ -1156,7 +1159,7 @@ static int sqfs_get_regfile_info(struct squashfs_reg_inode *reg, if (ret < 0) return -EINVAL; finfo->comp = true; - if (fentry->size < 1 || fentry->start < 0) + if (fentry->size < 1 || fentry->start == 0x7FFFFFFF) return -EINVAL; } else { datablk_count = DIV_ROUND_UP(finfo->size, le32_to_cpu(blksz)); @@ -1181,7 +1184,10 @@ static int sqfs_get_lregfile_info(struct squashfs_lreg_inode *lreg, finfo->start = get_unaligned_le64(&lreg->start_block); finfo->frag = SQFS_IS_FRAGMENTED(get_unaligned_le32(&lreg->fragment)); - if (finfo->size < 1 || finfo->offset < 0 || finfo->start < 0) + if (finfo->frag && finfo->offset == 0xFFFFFFFF) + return -EINVAL; + + if (finfo->size < 1 || finfo->start == 0x7FFFFFFF) return -EINVAL; if (finfo->frag) { @@ -1191,7 +1197,7 @@ static int sqfs_get_lregfile_info(struct squashfs_lreg_inode *lreg, if (ret < 0) return -EINVAL; finfo->comp = true; - if (fentry->size < 1 || fentry->start < 0) + if (fentry->size < 1 || fentry->start == 0x7FFFFFFF) return -EINVAL; } else { datablk_count = DIV_ROUND_UP(finfo->size, le32_to_cpu(blksz)); diff --git a/fs/squashfs/sqfs_dir.c b/fs/squashfs/sqfs_dir.c index 00d2891e7d..a265b98fe6 100644 --- a/fs/squashfs/sqfs_dir.c +++ b/fs/squashfs/sqfs_dir.c @@ -34,8 +34,7 @@ int sqfs_dir_offset(void *dir_i, u32 *m_list, int m_count) struct squashfs_ldir_inode *ldir; struct squashfs_dir_inode *dir; u32 start_block; - u16 offset; - int j; + int j, offset; switch (get_unaligned_le16(&base->inode_type)) { case SQFS_DIR_TYPE: diff --git a/fs/squashfs/sqfs_inode.c b/fs/squashfs/sqfs_inode.c index 1387779a85..1368f3063c 100644 --- a/fs/squashfs/sqfs_inode.c +++ b/fs/squashfs/sqfs_inode.c @@ -142,8 +142,11 @@ int sqfs_read_metablock(unsigned char *file_mapping, int offset, u16 header; data = file_mapping + offset; + if (!data) + return -EFAULT; + header = get_unaligned((u16 *)data); - if (!header || !data) + if (!header) return -EINVAL; *compressed = SQFS_COMPRESSED_METADATA(header); -- cgit From e03dd8a05f5f0fc3d99289e84debe0ae99e805bb Mon Sep 17 00:00:00 2001 From: Thomas Fitzsimmons Date: Fri, 11 Sep 2020 14:41:44 -0400 Subject: configs: bcmstb: Disable networking support Silence the "Driver Model for Ethernet drivers" migration warning for the bcm7445 and bcm7260 ports, neither of which supports networking yet. Signed-off-by: Thomas Fitzsimmons Reviewed-by: Tom Rini --- configs/bcm7260_defconfig | 1 + configs/bcm7445_defconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/configs/bcm7260_defconfig b/configs/bcm7260_defconfig index f25659db48..d1b05309e1 100644 --- a/configs/bcm7260_defconfig +++ b/configs/bcm7260_defconfig @@ -27,6 +27,7 @@ CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_REDUNDAND_ENVIRONMENT=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y +# CONFIG_NET is not set CONFIG_DM_MMC=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_BCMSTB=y diff --git a/configs/bcm7445_defconfig b/configs/bcm7445_defconfig index 18d31048ff..1f9ab482a2 100644 --- a/configs/bcm7445_defconfig +++ b/configs/bcm7445_defconfig @@ -28,6 +28,7 @@ CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_SYS_REDUNDAND_ENVIRONMENT=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y +# CONFIG_NET is not set CONFIG_DM_MMC=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_BCMSTB=y -- cgit From 9989fb18bd5b6e2afe5f296b4c414f8d1c73d527 Mon Sep 17 00:00:00 2001 From: Ralph Siemsen Date: Wed, 9 Sep 2020 12:10:00 -0400 Subject: cmd: mem: fix range of bitflip test The bitflip test uses two equal sized memory buffers. This is achieved by splitting the range of memory into two pieces. The address of the second buffer, as well as the length of each buffer, were not correctly calculated. This caused bitflip test to access beyond the end of range. This patch fixes the pointer arithmetic problem. A second problem arises because u-boot "mtest" command expects the ending address to be inclusive. When computing (end - start) this results in missing 1 byte of the requested length. The bitflip test expects a count rather than an "ending" address. Thus it fails to test the last word of the requested range. Fixed by using (end - start + 1). Added Kconfig option to optionally disable the bitflip test, since it does add significantly to the time taken for "mtest". Fixes: 8e434cb705d463bc8cff935160e4fb4c77cb99ab ("cmd: mem: Add bitflip memory test to alternate mtest") Signed-off-by: Ralph Siemsen Reviewed-by: Stefan Roese --- cmd/Kconfig | 12 ++++++++++++ cmd/mem.c | 21 ++++++++++++++++----- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/cmd/Kconfig b/cmd/Kconfig index 0761dbb746..0c984d735d 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -777,6 +777,18 @@ config SYS_ALT_MEMTEST help Use a more complete alternative memory test. +if SYS_ALT_MEMTEST + +config SYS_ALT_MEMTEST_BITFLIP + bool "Bitflip test" + default y + help + The alternative memory test includes bitflip test since 2020.07. + The bitflip test significantly increases the overall test time. + Bitflip test can optionally be disabled here. + +endif + config SYS_MEMTEST_START hex "default start address for mtest" default 0 diff --git a/cmd/mem.c b/cmd/mem.c index 9df5eb068a..56e1d0755b 100644 --- a/cmd/mem.c +++ b/cmd/mem.c @@ -985,6 +985,18 @@ static ulong test_bitflip_comparison(volatile unsigned long *bufa, return errs; } +static ulong mem_test_bitflip(vu_long *buf, ulong start, ulong end) +{ + /* + * Split the specified range into two halves. + * Note that mtest range is inclusive of start,end. + * Bitflip test instead uses a count (of 32-bit words). + */ + ulong half_size = (end - start + 1) / 2 / sizeof(unsigned long); + + return test_bitflip_comparison(buf, buf + half_size, half_size); +} + static ulong mem_test_quick(vu_long *buf, ulong start_addr, ulong end_addr, vu_long pattern, int iteration) { @@ -1104,11 +1116,10 @@ static int do_mem_mtest(struct cmd_tbl *cmdtp, int flag, int argc, errs = mem_test_alt(buf, start, end, dummy); if (errs == -1UL) break; - count += errs; - errs = test_bitflip_comparison(buf, - buf + (end - start) / 2, - (end - start) / - sizeof(unsigned long)); + if (IS_ENABLED(CONFIG_SYS_ALT_MEMTEST_BITFLIP)) { + count += errs; + errs = mem_test_bitflip(buf, start, end); + } } else { errs = mem_test_quick(buf, start, end, pattern, iteration); -- cgit From cf0bf89227594cf3fdcae8242f023685cdd11cb7 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Thu, 17 Sep 2020 16:49:02 +0200 Subject: rng: stm32mp1: use log() instead of printf() The logging system provides flexible filtering and enhanced output. Signed-off-by: Heinrich Schuchardt Reviewed-by: Sughosh Ganu --- drivers/rng/stm32mp1_rng.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/rng/stm32mp1_rng.c b/drivers/rng/stm32mp1_rng.c index 7ef7ff9756..c1bae180f7 100644 --- a/drivers/rng/stm32mp1_rng.c +++ b/drivers/rng/stm32mp1_rng.c @@ -3,6 +3,8 @@ * Copyright (c) 2019, Linaro Limited */ +#define LOG_CATEGORY UCLASS_RNG + #include #include #include @@ -53,7 +55,7 @@ static int stm32_rng_read(struct udevice *dev, void *data, size_t len) for (i = 0; i < 12; i++) readl(pdata->base + RNG_DR); if (readl(pdata->base + RNG_SR) & RNG_SR_SEIS) { - printf("RNG Noise"); + log_err("RNG Noise"); return -EIO; } /* start again */ -- cgit From ffbeafe7e29fe179e2168b82f9c19b8e57293040 Mon Sep 17 00:00:00 2001 From: Maxim Uvarov Date: Fri, 28 Aug 2020 22:47:41 +0300 Subject: efi_memory: refine overlap_only_ram description Refine text for overlap_only_ram description to match to what exactly flag does and aling description with other functions. Signed-off-by: Maxim Uvarov Reviewed-by: Heinrich Schuchardt --- lib/efi_loader/efi_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c index 7be756e370..11e755363e 100644 --- a/lib/efi_loader/efi_memory.c +++ b/lib/efi_loader/efi_memory.c @@ -235,7 +235,7 @@ static s64 efi_mem_carve_out(struct efi_mem_list *map, * @start: start address, must be a multiple of EFI_PAGE_SIZE * @pages: number of pages to add * @memory_type: type of memory added - * @overlap_only_ram: the memory area must overlap existing + * @overlap_only_ram: region may only overlap RAM * Return: status code */ static efi_status_t efi_add_memory_map_pg(u64 start, u64 pages, -- cgit From 18161a8a4eb622eae367f688058007d6a565b210 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Thu, 17 Sep 2020 07:33:29 +0200 Subject: efi_selftest: rework device tree test Allow specifying the node on which a property is searched. Test the device tree consistency more rigorously. Some efi_st_printf() calls have been converted to efi_st_error(). Signed-off-by: Heinrich Schuchardt --- lib/efi_selftest/efi_selftest_fdt.c | 53 +++++++++++++++++++++++++++---------- 1 file changed, 39 insertions(+), 14 deletions(-) diff --git a/lib/efi_selftest/efi_selftest_fdt.c b/lib/efi_selftest/efi_selftest_fdt.c index 94d72d3f6d..52a963084e 100644 --- a/lib/efi_selftest/efi_selftest_fdt.c +++ b/lib/efi_selftest/efi_selftest_fdt.c @@ -42,35 +42,48 @@ static uint32_t f2h(fdt32_t val) return *(uint32_t *)buf; } -/* - * Return the value of a property of the FDT root node. +/** + * get_property() - return value of a property of an FDT node * - * @name name of the property + * A property of the root node or one of its direct children can be + * retrieved. + * + * @property name of the property + * @node name of the node or NULL for root node * @return value of the property */ -static char *get_property(const u16 *property) +static char *get_property(const u16 *property, const u16 *node) { struct fdt_header *header = (struct fdt_header *)fdt; + const fdt32_t *end; const fdt32_t *pos; const char *strings; + size_t level = 0; + const char *nodelabel = NULL; - if (!header) + if (!header) { + efi_st_error("Missing device tree\n"); return NULL; + } if (f2h(header->magic) != FDT_MAGIC) { - printf("Wrong magic\n"); + efi_st_error("Wrong device tree magic\n"); return NULL; } pos = (fdt32_t *)(fdt + f2h(header->off_dt_struct)); + end = &pos[f2h(header->totalsize) >> 2]; strings = fdt + f2h(header->off_dt_strings); - for (;;) { + for (; pos < end;) { switch (f2h(pos[0])) { case FDT_BEGIN_NODE: { - char *c = (char *)&pos[1]; + const char *c = (char *)&pos[1]; size_t i; + if (level == 1) + nodelabel = c; + ++level; for (i = 0; c[i]; ++i) ; pos = &pos[2 + (i >> 2)]; @@ -82,7 +95,10 @@ static char *get_property(const u16 *property) efi_status_t ret; /* Check if this is the property to be returned */ - if (!efi_st_strcmp_16_8(property, label)) { + if (!efi_st_strcmp_16_8(property, label) && + ((level == 1 && !node) || + (level == 2 && node && + !efi_st_strcmp_16_8(node, nodelabel)))) { char *str; efi_uintn_t len = f2h(prop->len); @@ -96,7 +112,7 @@ static char *get_property(const u16 *property) EFI_LOADER_DATA, len + 1, (void **)&str); if (ret != EFI_SUCCESS) { - efi_st_printf("AllocatePool failed\n"); + efi_st_error("AllocatePool failed\n"); return NULL; } boottime->copy_mem(str, &pos[3], len); @@ -109,12 +125,21 @@ static char *get_property(const u16 *property) break; } case FDT_NOP: - pos = &pos[1]; + ++pos; + break; + case FDT_END_NODE: + --level; + ++pos; break; + case FDT_END: + return NULL; default: + efi_st_error("Invalid device tree token\n"); return NULL; } } + efi_st_error("Missing FDT_END token\n"); + return NULL; } /** @@ -173,7 +198,7 @@ static int execute(void) char *str; efi_status_t ret; - str = get_property(L"compatible"); + str = get_property(L"compatible", NULL); if (str) { efi_st_printf("compatible: %s\n", str); ret = boottime->free_pool(str); @@ -182,10 +207,10 @@ static int execute(void) return EFI_ST_FAILURE; } } else { - efi_st_printf("Missing property 'compatible'\n"); + efi_st_error("Missing property 'compatible'\n"); return EFI_ST_FAILURE; } - str = get_property(L"serial-number"); + str = get_property(L"serial-number", NULL); if (str) { efi_st_printf("serial-number: %s\n", str); ret = boottime->free_pool(str); -- cgit From 52a8481827511a0837b4944d1184214ac924a123 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Thu, 17 Sep 2020 07:33:29 +0200 Subject: efi_selftest: check for RISC-V boot-hartid in FDT On RISC-V check that the /chosen node has a boot-hartid property. To run the test configure with CONFIG_CMD_BOOTEFI_SELFTEST=y and issue setenv efi_selftest device tree setenv serial# myserial bootefi selftest If the test succeeds, it reports the boot-hartid, e.g. boot-hartid: 1 Signed-off-by: Heinrich Schuchardt --- lib/efi_selftest/efi_selftest_fdt.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/efi_selftest/efi_selftest_fdt.c b/lib/efi_selftest/efi_selftest_fdt.c index 52a963084e..eae98208f6 100644 --- a/lib/efi_selftest/efi_selftest_fdt.c +++ b/lib/efi_selftest/efi_selftest_fdt.c @@ -219,6 +219,21 @@ static int execute(void) return EFI_ST_FAILURE; } } + str = get_property(L"boot-hartid", L"chosen"); + if (IS_ENABLED(CONFIG_RISCV)) { + if (str) { + efi_st_printf("boot-hartid: %u\n", + f2h(*(fdt32_t *)str)); + ret = boottime->free_pool(str); + if (ret != EFI_SUCCESS) { + efi_st_error("FreePool failed\n"); + return EFI_ST_FAILURE; + } + } else { + efi_st_error("boot-hartid not found\n"); + return EFI_ST_FAILURE; + } + } return EFI_ST_SUCCESS; } -- cgit From 8f0ac536d4937d07a95fcc56756c14ef7a94e397 Mon Sep 17 00:00:00 2001 From: Maxim Uvarov Date: Fri, 28 Aug 2020 22:20:10 +0300 Subject: efi: change 'env -e -i' usage syntax 'env -e -i' syntax was changed from "," to ":". Account for this also in the documentation. Fixes: 2b3fbcb59f41 ("efi_loader: use ':' as separator for setenv -i") Signed-off-by: Maxim Uvarov Correct the usage description for setenv -e too. Reviewed-by: Heinrich Schuchardt --- cmd/nvedit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/nvedit.c b/cmd/nvedit.c index 9f145dd284..7fce723800 100644 --- a/cmd/nvedit.c +++ b/cmd/nvedit.c @@ -1477,7 +1477,7 @@ static char env_help_text[] = "env select [target] - select environment target\n" #endif #if defined(CONFIG_CMD_NVEDIT_EFI) - "env set -e [-nv][-bs][-rt][-at][-a][-i addr,size][-v] name [arg ...]\n" + "env set -e [-nv][-bs][-rt][-at][-a][-i addr:size][-v] name [arg ...]\n" " - set UEFI variable; unset if '-i' or 'arg' not specified\n" #endif "env set [-f] name [arg ...]\n"; @@ -1541,7 +1541,7 @@ U_BOOT_CMD_COMPLETE( "set environment variables", #if defined(CONFIG_CMD_NVEDIT_EFI) "-e [-guid guid][-nv][-bs][-rt][-at][-a][-v]\n" - " [-i addr,size name], or [name [value ...]]\n" + " [-i addr:size name], or [name [value ...]]\n" " - set UEFI variable 'name' to 'value' ...'\n" " \"-guid\": GUID xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\n" " \"-nv\": set non-volatile attribute\n" -- cgit From 5a53441a91e41cdcf720dfacbd2ac4e804cf8341 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Tue, 8 Sep 2020 16:57:22 +0300 Subject: x86: edison: Move config SYS_MALLOC_LEN to Kconfig This patch moves the the config SYS_MALLOC_LEN to Kconfig as it is already done for zynq arch in commit 01aa5b8f0503 ("Kconfig: Move config SYS_MALLOC_LEN to Kconfig for zynq"). Signed-off-by: Andy Shevchenko Reviewed-by: Simon Glass Reviewed-by: Bin Meng --- board/intel/edison/Kconfig | 3 +++ include/configs/edison.h | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/board/intel/edison/Kconfig b/board/intel/edison/Kconfig index ef9b14aa2b..05d65445e4 100644 --- a/board/intel/edison/Kconfig +++ b/board/intel/edison/Kconfig @@ -12,6 +12,9 @@ config SYS_SOC config SYS_CONFIG_NAME default "edison" +config SYS_MALLOC_LEN + default 0x08000000 + config SYS_TEXT_BASE default 0x01101000 diff --git a/include/configs/edison.h b/include/configs/edison.h index 606c656a72..0e1205bdb5 100644 --- a/include/configs/edison.h +++ b/include/configs/edison.h @@ -23,10 +23,6 @@ #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE #define CONFIG_SYS_MONITOR_LEN (256 * 1024) -#define CONFIG_SYS_MALLOC_LEN (128 * 1024 * 1024) - -/* Environment */ - /* RTC */ #define CONFIG_SYS_ISA_IO_BASE_ADDRESS 0 -- cgit From 4364a3f852afe6f45f25a44f089adb9e98c338e1 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Mon, 21 Sep 2020 11:34:21 +0300 Subject: cmd: acpi: Print revisions in hex format The revisions are usually dates in hex-decimal format representing YYYYmmdd. Print them in hex to see this clearly. Before: ... FACP 000e5420 0000f4 (v06 U-BOOT U-BOOTBL 538970376 INTL 0) DSDT 000e4780 000ba0 (v02 U-BOOT U-BOOTBL 65536 INTL 538968870) ... After: ... FACP 000e5420 0000f4 (v06 U-BOOT U-BOOTBL 20200908 INTL 0) DSDT 000e4780 000ba0 (v02 U-BOOT U-BOOTBL 10000 INTL 20200326) ... Fixes: 0b885bcfd9b0 ("acpi: Add an acpi command") Cc: Wolfgang Wallner Signed-off-by: Andy Shevchenko Reviewed-by: Bin Meng --- cmd/acpi.c | 2 +- test/dm/acpi.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/acpi.c b/cmd/acpi.c index 085a3a650d..a3419b42b5 100644 --- a/cmd/acpi.c +++ b/cmd/acpi.c @@ -26,7 +26,7 @@ static void dump_hdr(struct acpi_table_header *hdr) printf("%.*s %08lx %06x", ACPI_NAME_LEN, hdr->signature, (ulong)map_to_sysmem(hdr), hdr->length); if (has_hdr) { - printf(" (v%02d %.6s %.8s %u %.4s %d)\n", hdr->revision, + printf(" (v%02d %.6s %.8s %x %.4s %x)\n", hdr->revision, hdr->oem_id, hdr->oem_table_id, hdr->oem_revision, hdr->aslc_id, hdr->aslc_revision); } else { diff --git a/test/dm/acpi.c b/test/dm/acpi.c index 16aa1616c9..1f252a8d45 100644 --- a/test/dm/acpi.c +++ b/test/dm/acpi.c @@ -366,21 +366,21 @@ static int dm_test_acpi_cmd_list(struct unit_test_state *uts) ut_assert_nextline("RSDP %08lx %06lx (v02 U-BOOT)", addr, sizeof(struct acpi_rsdp)); addr = ALIGN(addr + sizeof(struct acpi_rsdp), 16); - ut_assert_nextline("RSDT %08lx %06lx (v01 U-BOOT U-BOOTBL %u INTL 0)", + ut_assert_nextline("RSDT %08lx %06lx (v01 U-BOOT U-BOOTBL %x INTL 0)", addr, sizeof(struct acpi_table_header) + 3 * sizeof(u32), U_BOOT_BUILD_DATE); addr = ALIGN(addr + sizeof(struct acpi_rsdt), 16); - ut_assert_nextline("XSDT %08lx %06lx (v01 U-BOOT U-BOOTBL %u INTL 0)", + ut_assert_nextline("XSDT %08lx %06lx (v01 U-BOOT U-BOOTBL %x INTL 0)", addr, sizeof(struct acpi_table_header) + 3 * sizeof(u64), U_BOOT_BUILD_DATE); addr = ALIGN(addr + sizeof(struct acpi_xsdt), 64); - ut_assert_nextline("DMAR %08lx %06lx (v01 U-BOOT U-BOOTBL %u INTL 0)", + ut_assert_nextline("DMAR %08lx %06lx (v01 U-BOOT U-BOOTBL %x INTL 0)", addr, sizeof(struct acpi_dmar), U_BOOT_BUILD_DATE); addr = ALIGN(addr + sizeof(struct acpi_dmar), 16); - ut_assert_nextline("DMAR %08lx %06lx (v01 U-BOOT U-BOOTBL %u INTL 0)", + ut_assert_nextline("DMAR %08lx %06lx (v01 U-BOOT U-BOOTBL %x INTL 0)", addr, sizeof(struct acpi_dmar), U_BOOT_BUILD_DATE); addr = ALIGN(addr + sizeof(struct acpi_dmar), 16); - ut_assert_nextline("DMAR %08lx %06lx (v01 U-BOOT U-BOOTBL %u INTL 0)", + ut_assert_nextline("DMAR %08lx %06lx (v01 U-BOOT U-BOOTBL %x INTL 0)", addr, sizeof(struct acpi_dmar), U_BOOT_BUILD_DATE); ut_assert_console_end(); -- cgit From 674c58c7b73db3a1e1297b87397c61e09915e7d7 Mon Sep 17 00:00:00 2001 From: Wolfgang Wallner Date: Fri, 11 Sep 2020 16:52:28 +0200 Subject: x86: fsp: Replace e-mmc with emmc in devicetree bindings The term eMMC is used inconsistently within the FSP devicetree bindings (e-mmc and emmc), especially for "emmc-host-max-speed" documentation and code disagree. Change all eMMC instances within the FSP bindings to consistently use "emmc". The term "emmc" is already used a lot within U-Boot, while "e-mmc" is only used in the FSP bindings. Signed-off-by: Wolfgang Wallner Reviewed-by: Simon Glass Reviewed-by: Bin Meng [bmeng: correct one typo in the commit message] Signed-off-by: Bin Meng --- arch/x86/cpu/apollolake/fsp_bindings.c | 6 +++--- doc/device-tree-bindings/fsp/fsp2/apollolake/fsp-m.txt | 2 +- doc/device-tree-bindings/fsp/fsp2/apollolake/fsp-s.txt | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/x86/cpu/apollolake/fsp_bindings.c b/arch/x86/cpu/apollolake/fsp_bindings.c index bbf04b5009..319c78b95a 100644 --- a/arch/x86/cpu/apollolake/fsp_bindings.c +++ b/arch/x86/cpu/apollolake/fsp_bindings.c @@ -555,7 +555,7 @@ const struct fsp_binding fsp_m_bindings[] = { }, { .type = FSP_UINT8, .offset = offsetof(struct fsp_m_config, e_mmc_trace_len), - .propname = "fspm,e-mmc-trace-len", + .propname = "fspm,emmc-trace-len", }, { .type = FSP_UINT8, .offset = offsetof(struct fsp_m_config, skip_cse_rbp), @@ -1465,11 +1465,11 @@ const struct fsp_binding fsp_s_bindings[] = { }, { .type = FSP_UINT8, .offset = offsetof(struct fsp_s_config, e_mmc_enabled), - .propname = "fsps,e-mmc-enabled", + .propname = "fsps,emmc-enabled", }, { .type = FSP_UINT8, .offset = offsetof(struct fsp_s_config, e_mmc_host_max_speed), - .propname = "fsps,e-mmc-host-max-speed", + .propname = "fsps,emmc-host-max-speed", }, { .type = FSP_UINT8, .offset = offsetof(struct fsp_s_config, ufs_enabled), diff --git a/doc/device-tree-bindings/fsp/fsp2/apollolake/fsp-m.txt b/doc/device-tree-bindings/fsp/fsp2/apollolake/fsp-m.txt index 666400e085..36936f2eb6 100644 --- a/doc/device-tree-bindings/fsp/fsp2/apollolake/fsp-m.txt +++ b/doc/device-tree-bindings/fsp/fsp2/apollolake/fsp-m.txt @@ -174,7 +174,7 @@ Optional properties: - fspm,oem-loading-base: OEM File Loading Address - fspm,oem-file-name: OEM File Name to Load - fspm,mrc-boot-data-ptr: -- fspm,e-mmc-trace-len: eMMC Trace Length +- fspm,emmc-trace-len: eMMC Trace Length 0x0: Long 0x1: Short - fspm,skip-cse-rbp: Skip CSE RBP to support zero sized IBB diff --git a/doc/device-tree-bindings/fsp/fsp2/apollolake/fsp-s.txt b/doc/device-tree-bindings/fsp/fsp2/apollolake/fsp-s.txt index 731a310cf8..b605ed0056 100644 --- a/doc/device-tree-bindings/fsp/fsp2/apollolake/fsp-s.txt +++ b/doc/device-tree-bindings/fsp/fsp2/apollolake/fsp-s.txt @@ -318,7 +318,7 @@ Optional properties: 0x6: warm reset (default) 0xE: cold reset - fsps,sdcard-enabled: SD Card Support (D27:F0) -- fsps,e-mmc-enabled: SeMMC Support (D28:F0) +- fsps,emmc-enabled: SeMMC Support (D28:F0) - fsps,emmc-host-max-speed: eMMC Max Speed 0: HS400(default) 1: HS200 -- cgit From 3f6966ab2b9a2264c05d699353e61b276b1a85bd Mon Sep 17 00:00:00 2001 From: Wolfgang Wallner Date: Wed, 16 Sep 2020 16:57:52 +0200 Subject: x86: acpi: Fix calculation of DSDT length Currently, the calculation for the length of the DSDT table includes any bytes that are added for alignment, but those bytes are not initialized. This is because the DSDT length is calculated after a call to acpi_inc_align(). Split this up into the following sequence: * acpi_inc() * Calculate DSDT length * acpi_align() Signed-off-by: Wolfgang Wallner Reviewed-by: Andy Shevchenko Reviewed-by: Simon Glass Reviewed-by: Bin Meng --- arch/x86/lib/acpi_table.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c index 3a93fedfc3..6b827bfa3f 100644 --- a/arch/x86/lib/acpi_table.c +++ b/arch/x86/lib/acpi_table.c @@ -427,7 +427,7 @@ ulong write_acpi_tables(ulong start_addr) (char *)&AmlCode + sizeof(struct acpi_table_header), dsdt->length - sizeof(struct acpi_table_header)); - acpi_inc_align(ctx, dsdt->length - sizeof(struct acpi_table_header)); + acpi_inc(ctx, dsdt->length - sizeof(struct acpi_table_header)); /* Pack GNVS into the ACPI table area */ for (i = 0; i < dsdt->length; i++) { @@ -450,6 +450,8 @@ ulong write_acpi_tables(ulong start_addr) dsdt->checksum = 0; dsdt->checksum = table_compute_checksum((void *)dsdt, dsdt->length); + acpi_align(ctx); + /* * Fill in platform-specific global NVS variables. If this fails we * cannot return the error but this should only happen while debugging. -- cgit From 40edea3a07ebb89e86c9bde8c94000c8f6613be7 Mon Sep 17 00:00:00 2001 From: Wolfgang Wallner Date: Wed, 16 Sep 2020 16:57:53 +0200 Subject: x86: acpi: Add memset to initialize SPCR table Add a missing memset to acpi_create_spcr(). The other acpi_create_xxxx() functions perform a memset on their structures, acpi_create_spcr() does not and as a result the contents of this table are partly uninitialized (and thus random after every reset). Fixes: b288cd960072 ("x86: acpi: Generate SPCR table") Signed-off-by: Wolfgang Wallner Reviewed-by: Andy Shevchenko Reviewed-by: Simon Glass Reviewed-by: Bin Meng [bmeng: fix the tags format in the commit message] Signed-off-by: Bin Meng --- arch/x86/lib/acpi_table.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c index 6b827bfa3f..c445aa6870 100644 --- a/arch/x86/lib/acpi_table.c +++ b/arch/x86/lib/acpi_table.c @@ -252,6 +252,8 @@ static void acpi_create_spcr(struct acpi_spcr *spcr) int space_id; int ret = -ENODEV; + memset((void *)spcr, 0, sizeof(struct acpi_spcr)); + /* Fill out header fields */ acpi_fill_header(header, "SPCR"); header->length = sizeof(struct acpi_spcr); -- cgit From d6b241bcd76f99fcc2233e7224eca1231ed2561a Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Mon, 21 Sep 2020 13:45:07 -0400 Subject: configs: Resync with savedefconfig Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini --- configs/colibri-imx6ull_defconfig | 2 +- configs/colibri_imx7_defconfig | 4 ++-- configs/colibri_imx7_emmc_defconfig | 4 ++-- configs/colibri_vf_defconfig | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/configs/colibri-imx6ull_defconfig b/configs/colibri-imx6ull_defconfig index 6ef5dff2db..9bdd8a1c50 100644 --- a/configs/colibri-imx6ull_defconfig +++ b/configs/colibri-imx6ull_defconfig @@ -13,9 +13,9 @@ CONFIG_FIT=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/toradex/colibri-imx6ull/imximage.cfg,IMX_NAND" CONFIG_BOOTDELAY=1 # CONFIG_USE_BOOTCOMMAND is not set -# CONFIG_CONSOLE_MUX is not set CONFIG_USE_PREBOOT=y CONFIG_PREBOOT="setenv fdtfile imx6ull-colibri${variant}-${fdt_board}.dtb" +# CONFIG_CONSOLE_MUX is not set CONFIG_SYS_CONSOLE_IS_IN_ENV=y CONFIG_VERSION_VARIABLE=y # CONFIG_DISPLAY_BOARDINFO is not set diff --git a/configs/colibri_imx7_defconfig b/configs/colibri_imx7_defconfig index a13a4bcda5..7a4eed2082 100644 --- a/configs/colibri_imx7_defconfig +++ b/configs/colibri_imx7_defconfig @@ -12,10 +12,10 @@ CONFIG_IMX_HAB=y CONFIG_DEFAULT_DEVICE_TREE="imx7-colibri-rawnand" CONFIG_DISTRO_DEFAULTS=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/toradex/colibri_imx7/imximage.cfg,MX7D" -CONFIG_USE_PREBOOT=y -CONFIG_PREBOOT="setenv fdtfile ${soc}-colibri-${fdt_board}.dtb " CONFIG_BOOTDELAY=1 # CONFIG_USE_BOOTCOMMAND is not set +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="setenv fdtfile ${soc}-colibri-${fdt_board}.dtb " # CONFIG_CONSOLE_MUX is not set CONFIG_SYS_CONSOLE_IS_IN_ENV=y CONFIG_BOARD_LATE_INIT=y diff --git a/configs/colibri_imx7_emmc_defconfig b/configs/colibri_imx7_emmc_defconfig index c8b6ce79b0..81ad8233b3 100644 --- a/configs/colibri_imx7_emmc_defconfig +++ b/configs/colibri_imx7_emmc_defconfig @@ -14,10 +14,10 @@ CONFIG_DEFAULT_DEVICE_TREE="imx7-colibri-emmc" CONFIG_DISTRO_DEFAULTS=y CONFIG_FIT=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/toradex/colibri_imx7/imximage.cfg,MX7D" -CONFIG_USE_PREBOOT=y -CONFIG_PREBOOT="setenv fdtfile ${soc}-colibri-emmc-${fdt_board}.dtb" CONFIG_BOOTDELAY=1 # CONFIG_USE_BOOTCOMMAND is not set +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="setenv fdtfile ${soc}-colibri-emmc-${fdt_board}.dtb" # CONFIG_CONSOLE_MUX is not set CONFIG_SYS_CONSOLE_IS_IN_ENV=y CONFIG_BOARD_LATE_INIT=y diff --git a/configs/colibri_vf_defconfig b/configs/colibri_vf_defconfig index def64b1043..e8e62f8436 100644 --- a/configs/colibri_vf_defconfig +++ b/configs/colibri_vf_defconfig @@ -11,9 +11,9 @@ CONFIG_TARGET_COLIBRI_VF=y CONFIG_DEFAULT_DEVICE_TREE="vf610-colibri" CONFIG_ENV_VARS_UBOOT_CONFIG=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/toradex/colibri_vf/imximage.cfg,IMX_NAND" +CONFIG_BOOTDELAY=1 CONFIG_USE_PREBOOT=y CONFIG_PREBOOT="setenv fdtfile ${soc}-colibri-${fdt_board}.dtb" -CONFIG_BOOTDELAY=1 CONFIG_LOGLEVEL=3 CONFIG_VERSION_VARIABLE=y # CONFIG_DISPLAY_BOARDINFO is not set -- cgit From ba2a0cbb053951ed6d36161989d38da724696b4d Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Mon, 21 Sep 2020 13:45:23 -0400 Subject: Prepare v2020.10-rc5 Signed-off-by: Tom Rini --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6665cd6960..dd98b43031 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ VERSION = 2020 PATCHLEVEL = 10 SUBLEVEL = -EXTRAVERSION = -rc4 +EXTRAVERSION = -rc5 NAME = # *DOCUMENTATION* -- cgit