Merge tag 'u-boot-imx-next-20240925' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx into next
CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/22406
- i.MX93 FEC fixes.
- Always name the generated fitImage u-boot.itb to keep compatibility
with pr-buildman behavior.
-----------------------
diff --git a/arch/arm/mach-at91/include/mach/at91_common.h b/arch/arm/mach-at91/include/mach/at91_common.h
index 683e539..8fec346 100644
--- a/arch/arm/mach-at91/include/mach/at91_common.h
+++ b/arch/arm/mach-at91/include/mach/at91_common.h
@@ -28,7 +28,7 @@
void at91_mck_init(u32 mckr);
void at91_mck_init_down(u32 mckr);
void at91_pmc_init(void);
-void mem_init(void);
+void at91_mem_init(void);
void at91_phy_reset(void);
void at91_sdram_hw_init(void);
void at91_mck_init(u32 mckr);
diff --git a/arch/arm/mach-at91/spl_at91.c b/arch/arm/mach-at91/spl_at91.c
index cde1700..0d1233c 100644
--- a/arch/arm/mach-at91/spl_at91.c
+++ b/arch/arm/mach-at91/spl_at91.c
@@ -142,7 +142,7 @@
preloader_console_init();
#endif
- mem_init();
+ at91_mem_init();
at91_spl_board_init();
}
diff --git a/arch/arm/mach-at91/spl_atmel.c b/arch/arm/mach-at91/spl_atmel.c
index 62a7df8..7bfbadf 100644
--- a/arch/arm/mach-at91/spl_atmel.c
+++ b/arch/arm/mach-at91/spl_atmel.c
@@ -134,7 +134,7 @@
board_early_init_f();
- mem_init();
+ at91_mem_init();
ret = spl_init();
if (ret) {
diff --git a/arch/arm/mach-omap2/omap3/emac.c b/arch/arm/mach-omap2/omap3/emac.c
index 7348e92..1e30a06 100644
--- a/arch/arm/mach-omap2/omap3/emac.c
+++ b/arch/arm/mach-omap2/omap3/emac.c
@@ -9,6 +9,7 @@
#include <net.h>
#include <asm/io.h>
#include <asm/arch/am35x_def.h>
+#include <netdev.h>
/*
* Initializes on-chip ethernet controllers.
diff --git a/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c b/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c
index 3bd94d0..af486e9 100644
--- a/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c
+++ b/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c
@@ -125,7 +125,7 @@
2 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET);
}
-void mem_init(void)
+void at91_mem_init(void)
{
struct atmel_mpddrc_config ddr2;
diff --git a/board/atmel/at91sam9n12ek/at91sam9n12ek.c b/board/atmel/at91sam9n12ek/at91sam9n12ek.c
index afc0c05..6f9abcb 100644
--- a/board/atmel/at91sam9n12ek/at91sam9n12ek.c
+++ b/board/atmel/at91sam9n12ek/at91sam9n12ek.c
@@ -167,7 +167,7 @@
2 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET);
}
-void mem_init(void)
+void at91_mem_init(void)
{
struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
struct at91_matrix *matrix = (struct at91_matrix *)ATMEL_BASE_MATRIX;
diff --git a/board/atmel/at91sam9x5ek/at91sam9x5ek.c b/board/atmel/at91sam9x5ek/at91sam9x5ek.c
index e5688c6..f52b9a9 100644
--- a/board/atmel/at91sam9x5ek/at91sam9x5ek.c
+++ b/board/atmel/at91sam9x5ek/at91sam9x5ek.c
@@ -181,7 +181,7 @@
2 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET);
}
-void mem_init(void)
+void at91_mem_init(void)
{
struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
struct at91_matrix *matrix = (struct at91_matrix *)ATMEL_BASE_MATRIX;
diff --git a/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c b/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c
index 36995a9..cb3cd7a 100644
--- a/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c
+++ b/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c
@@ -146,7 +146,7 @@
(8 << ATMEL_MPDDRC_TPR2_TFAW_OFFSET));
}
-void mem_init(void)
+void at91_mem_init(void)
{
struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
struct atmel_mpddr *mpddrc = (struct atmel_mpddr *)ATMEL_BASE_MPDDRC;
diff --git a/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c b/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c
index c775d59..15cbd0d 100644
--- a/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c
+++ b/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c
@@ -208,7 +208,7 @@
ddrc->cal_mr4 |= ATMEL_MPDDRC_CAL_MR4_MR4R(0xFFFE);
}
-void mem_init(void)
+void at91_mem_init(void)
{
struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
struct atmel_mpddr *mpddrc = (struct atmel_mpddr *)ATMEL_BASE_MPDDRC;
diff --git a/board/atmel/sama5d2_icp/sama5d2_icp.c b/board/atmel/sama5d2_icp/sama5d2_icp.c
index 986da01..6f0d578 100644
--- a/board/atmel/sama5d2_icp/sama5d2_icp.c
+++ b/board/atmel/sama5d2_icp/sama5d2_icp.c
@@ -180,7 +180,7 @@
(7 << ATMEL_MPDDRC_TPR2_TFAW_OFFSET));
}
-void mem_init(void)
+void at91_mem_init(void)
{
struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
struct atmel_mpddr *mpddrc = (struct atmel_mpddr *)ATMEL_BASE_MPDDRC;
diff --git a/board/atmel/sama5d2_xplained/sama5d2_xplained.c b/board/atmel/sama5d2_xplained/sama5d2_xplained.c
index c8a8eb4..d104736 100644
--- a/board/atmel/sama5d2_xplained/sama5d2_xplained.c
+++ b/board/atmel/sama5d2_xplained/sama5d2_xplained.c
@@ -146,7 +146,7 @@
7 << ATMEL_MPDDRC_TPR2_TFAW_OFFSET);
}
-void mem_init(void)
+void at91_mem_init(void)
{
struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
struct atmel_mpddr *mpddrc = (struct atmel_mpddr *)ATMEL_BASE_MPDDRC;
diff --git a/board/atmel/sama5d3_xplained/sama5d3_xplained.c b/board/atmel/sama5d3_xplained/sama5d3_xplained.c
index 54cc3c4..f98322f 100644
--- a/board/atmel/sama5d3_xplained/sama5d3_xplained.c
+++ b/board/atmel/sama5d3_xplained/sama5d3_xplained.c
@@ -175,7 +175,7 @@
8 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET);
}
-void mem_init(void)
+void at91_mem_init(void)
{
struct atmel_mpddrc_config ddr2;
diff --git a/board/atmel/sama5d3xek/sama5d3xek.c b/board/atmel/sama5d3xek/sama5d3xek.c
index f2e1242..28079a8 100644
--- a/board/atmel/sama5d3xek/sama5d3xek.c
+++ b/board/atmel/sama5d3xek/sama5d3xek.c
@@ -241,7 +241,7 @@
8 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET);
}
-void mem_init(void)
+void at91_mem_init(void)
{
struct atmel_mpddrc_config ddr2;
diff --git a/board/atmel/sama5d4_xplained/sama5d4_xplained.c b/board/atmel/sama5d4_xplained/sama5d4_xplained.c
index 09ca16c..f9112fc 100644
--- a/board/atmel/sama5d4_xplained/sama5d4_xplained.c
+++ b/board/atmel/sama5d4_xplained/sama5d4_xplained.c
@@ -184,7 +184,7 @@
8 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET);
}
-void mem_init(void)
+void at91_mem_init(void)
{
struct atmel_mpddrc_config ddr2;
diff --git a/board/atmel/sama5d4ek/sama5d4ek.c b/board/atmel/sama5d4ek/sama5d4ek.c
index 1f8b85f..0bdc6ad 100644
--- a/board/atmel/sama5d4ek/sama5d4ek.c
+++ b/board/atmel/sama5d4ek/sama5d4ek.c
@@ -169,7 +169,7 @@
8 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET);
}
-void mem_init(void)
+void at91_mem_init(void)
{
struct atmel_mpddrc_config ddr2;
const struct atmel_mpddr *mpddr = (struct atmel_mpddr *)ATMEL_BASE_MPDDRC;
diff --git a/board/cobra5272/flash.c b/board/cobra5272/flash.c
index f16f2f1..7d81036 100644
--- a/board/cobra5272/flash.c
+++ b/board/cobra5272/flash.c
@@ -135,22 +135,22 @@
{
ulong result;
int iflag, cflag, prot, sect;
- int rc = ERR_OK;
+ int rc = FL_ERR_OK;
int chip1;
ulong start;
/* first look for protection bits */
if (info->flash_id == FLASH_UNKNOWN)
- return ERR_UNKNOWN_FLASH_TYPE;
+ return FL_ERR_UNKNOWN_FLASH_TYPE;
if ((s_first < 0) || (s_first > s_last)) {
- return ERR_INVAL;
+ return FL_ERR_INVAL;
}
if ((info->flash_id & FLASH_VENDMASK) !=
(AMD_MANUFACT & FLASH_VENDMASK)) {
- return ERR_UNKNOWN_FLASH_VENDOR;
+ return FL_ERR_UNKNOWN_FLASH_VENDOR;
}
prot = 0;
@@ -160,7 +160,7 @@
}
}
if (prot)
- return ERR_PROTECTED;
+ return FL_ERR_PROTECTED;
/*
* Disable interrupts which might cause a timeout
@@ -217,11 +217,11 @@
MEM_FLASH_ADDR1 = CMD_READ_ARRAY;
if (chip1 == ERR) {
- rc = ERR_PROG_ERROR;
+ rc = FL_ERR_PROG_ERROR;
goto outahere;
}
if (chip1 == TMO) {
- rc = ERR_TIMEOUT;
+ rc = FL_ERR_TIMEOUT;
goto outahere;
}
@@ -252,7 +252,7 @@
{
volatile u16 *addr = (volatile u16 *) dest;
ulong result;
- int rc = ERR_OK;
+ int rc = FL_ERR_OK;
int cflag, iflag;
int chip1;
ulong start;
@@ -262,7 +262,7 @@
*/
result = *addr;
if ((result & data) != data)
- return ERR_NOT_ERASED;
+ return FL_ERR_NOT_ERASED;
/*
* Disable interrupts which might cause a timeout
@@ -302,7 +302,7 @@
*addr = CMD_READ_ARRAY;
if (chip1 == ERR || *addr != data)
- rc = ERR_PROG_ERROR;
+ rc = FL_ERR_PROG_ERROR;
if (iflag)
enable_interrupts();
@@ -320,13 +320,13 @@
if (addr & 1) {
printf ("unaligned destination not supported\n");
- return ERR_ALIGN;
+ return FL_ERR_ALIGN;
}
#if 0
if (cnt & 1) {
printf ("odd transfer sizes not supported\n");
- return ERR_ALIGN;
+ return FL_ERR_ALIGN;
}
#endif
@@ -364,5 +364,5 @@
cnt -= 1;
}
- return ERR_OK;
+ return FL_ERR_OK;
}
diff --git a/board/conclusive/kstr-sama5d27/kstr-sama5d27.c b/board/conclusive/kstr-sama5d27/kstr-sama5d27.c
index 64282ae..3775013 100644
--- a/board/conclusive/kstr-sama5d27/kstr-sama5d27.c
+++ b/board/conclusive/kstr-sama5d27/kstr-sama5d27.c
@@ -182,7 +182,7 @@
(8 << ATMEL_MPDDRC_TPR2_TFAW_OFFSET));
}
-void mem_init(void)
+void at91_mem_init(void)
{
struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
struct atmel_mpddr *mpddrc = (struct atmel_mpddr *)ATMEL_BASE_MPDDRC;
diff --git a/board/freescale/m5253demo/flash.c b/board/freescale/m5253demo/flash.c
index 334518a..ab5d2eb 100644
--- a/board/freescale/m5253demo/flash.c
+++ b/board/freescale/m5253demo/flash.c
@@ -72,7 +72,7 @@
}
}
- return ERR_OK;
+ return FL_ERR_OK;
}
void flash_print_info(flash_info_t * info)
@@ -369,9 +369,9 @@
}
if (cnt == 0)
- return ERR_OK;
+ return FL_ERR_OK;
- return ERR_OK;
+ return FL_ERR_OK;
}
/*-----------------------------------------------------------------------
diff --git a/board/gardena/smart-gateway-at91sam/spl.c b/board/gardena/smart-gateway-at91sam/spl.c
index fb3ec48..db9ba88 100644
--- a/board/gardena/smart-gateway-at91sam/spl.c
+++ b/board/gardena/smart-gateway-at91sam/spl.c
@@ -110,7 +110,7 @@
2 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET);
}
-void mem_init(void)
+void at91_mem_init(void)
{
struct at91_matrix *matrix = (struct at91_matrix *)ATMEL_BASE_MATRIX;
struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
diff --git a/board/siemens/corvus/board.c b/board/siemens/corvus/board.c
index 7d73d1f..cd27fc1 100644
--- a/board/siemens/corvus/board.c
+++ b/board/siemens/corvus/board.c
@@ -187,7 +187,7 @@
2 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET);
}
-void mem_init(void)
+void at91_mem_init(void)
{
struct atmel_mpddrc_config ddr2;
diff --git a/board/siemens/smartweb/smartweb.c b/board/siemens/smartweb/smartweb.c
index 946fbc3..e9e4bc3 100644
--- a/board/siemens/smartweb/smartweb.c
+++ b/board/siemens/smartweb/smartweb.c
@@ -238,7 +238,7 @@
| AT91_SDRAMC_TRP_VAL(2) | AT91_SDRAMC_TRCD_VAL(2) \
| AT91_SDRAMC_TRAS_VAL(5) | AT91_SDRAMC_TXSR_VAL(8))
-void mem_init(void)
+void at91_mem_init(void)
{
struct at91_matrix *ma = (struct at91_matrix *)ATMEL_BASE_MATRIX;
struct at91_port *port = (struct at91_port *)ATMEL_BASE_PIOC;
diff --git a/board/siemens/taurus/taurus.c b/board/siemens/taurus/taurus.c
index bda12a9..3764ab4 100644
--- a/board/siemens/taurus/taurus.c
+++ b/board/siemens/taurus/taurus.c
@@ -177,7 +177,7 @@
sdramc_initialize(ATMEL_BASE_CS1, &setting);
}
-void mem_init(void)
+void at91_mem_init(void)
{
unsigned int ram_size = 0;
diff --git a/cmd/Kconfig b/cmd/Kconfig
index 4ccb0ce..5ef3c8a 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -2109,6 +2109,7 @@
config CMD_PXE
bool "pxe"
select PXE_UTILS
+ imply CMD_TFTPBOOT
help
Boot image via network using PXE protocol
diff --git a/common/Kconfig b/common/Kconfig
index e1b8557..957de0c 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -934,6 +934,7 @@
config UPDATE_COMMON
bool
select DFU_WRITE_ALT
+ imply CMD_TFTPBOOT
config UPDATE_TFTP
bool "Auto-update using fitImage via TFTP"
diff --git a/common/flash.c b/common/flash.c
index 226646c..fd1b4dd 100644
--- a/common/flash.c
+++ b/common/flash.c
@@ -110,13 +110,13 @@
* Make sure all target addresses are within Flash bounds,
* and no protected sectors are hit.
* Returns:
- * ERR_OK 0 - OK
- * ERR_TIMEOUT 1 - write timeout
- * ERR_NOT_ERASED 2 - Flash not erased
- * ERR_PROTECTED 4 - target range includes protected sectors
- * ERR_INVAL 8 - target address not in Flash memory
- * ERR_ALIGN 16 - target address not aligned on boundary
- * (only some targets require alignment)
+ * FL_ERR_OK 0 - OK
+ * FL_ERR_TIMEOUT 1 - write timeout
+ * FL_ERR_NOT_ERASED 2 - Flash not erased
+ * FL_ERR_PROTECTED 4 - target range includes protected sectors
+ * FL_ERR_INVAL 8 - target address not in Flash memory
+ * FL_ERR_ALIGN 16 - target address not aligned on boundary
+ * (only some targets require alignment)
*/
int
flash_write(char *src, ulong addr, ulong cnt)
@@ -131,11 +131,11 @@
__maybe_unused ulong cnt_orig = cnt;
if (cnt == 0) {
- return (ERR_OK);
+ return (FL_ERR_OK);
}
if (!info_first || !info_last) {
- return (ERR_INVAL);
+ return (FL_ERR_INVAL);
}
for (info = info_first; info <= info_last; ++info) {
@@ -146,7 +146,7 @@
if ((end >= info->start[i]) && (addr < e_addr) &&
(info->protect[i] != 0) ) {
- return (ERR_PROTECTED);
+ return (FL_ERR_PROTECTED);
}
}
}
@@ -169,11 +169,11 @@
#if defined(CONFIG_FLASH_VERIFY)
if (memcmp(src_orig, addr_orig, cnt_orig)) {
printf("\nVerify failed!\n");
- return ERR_PROG_ERROR;
+ return FL_ERR_PROG_ERROR;
}
#endif /* CONFIG_SYS_FLASH_VERIFY_AFTER_WRITE */
- return (ERR_OK);
+ return (FL_ERR_OK);
}
/*-----------------------------------------------------------------------
@@ -182,33 +182,33 @@
void flash_perror(int err)
{
switch (err) {
- case ERR_OK:
+ case FL_ERR_OK:
break;
- case ERR_TIMEOUT:
+ case FL_ERR_TIMEOUT:
puts ("Timeout writing to Flash\n");
break;
- case ERR_NOT_ERASED:
+ case FL_ERR_NOT_ERASED:
puts ("Flash not Erased\n");
break;
- case ERR_PROTECTED:
+ case FL_ERR_PROTECTED:
puts ("Can't write to protected Flash sectors\n");
break;
- case ERR_INVAL:
+ case FL_ERR_INVAL:
puts ("Outside available Flash\n");
break;
- case ERR_ALIGN:
+ case FL_ERR_ALIGN:
puts ("Start and/or end address not on sector boundary\n");
break;
- case ERR_UNKNOWN_FLASH_VENDOR:
+ case FL_ERR_UNKNOWN_FLASH_VENDOR:
puts ("Unknown Vendor of Flash\n");
break;
- case ERR_UNKNOWN_FLASH_TYPE:
+ case FL_ERR_UNKNOWN_FLASH_TYPE:
puts ("Unknown Type of Flash\n");
break;
- case ERR_PROG_ERROR:
+ case FL_ERR_PROG_ERROR:
puts ("General Flash Programming Error\n");
break;
- case ERR_ABORTED:
+ case FL_ERR_ABORTED:
puts("Flash Programming Aborted\n");
break;
default:
diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index 3c44e32..137f94a 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -1248,15 +1248,11 @@
the drivers in drivers/power/domain as part of a SPL build.
config SPL_RAM_SUPPORT
- bool "Support booting from RAM"
- default y if MICROBLAZE || ARCH_SOCFPGA || ARCH_TEGRA || ARCH_ZYNQ
- help
- Enable booting of an image in RAM. The image can be preloaded or
- it can be loaded by SPL directly into RAM (e.g. using USB).
+ bool
config SPL_RAM_DEVICE
bool "Support booting from preloaded image in RAM"
- depends on SPL_RAM_SUPPORT
+ select SPL_RAM_SUPPORT
default y if MICROBLAZE || ARCH_SOCFPGA || ARCH_TEGRA || ARCH_ZYNQ
help
Enable booting of an image already loaded in RAM. The image has to
diff --git a/drivers/mtd/altera_qspi.c b/drivers/mtd/altera_qspi.c
index c266158..e5c8df7 100644
--- a/drivers/mtd/altera_qspi.c
+++ b/drivers/mtd/altera_qspi.c
@@ -96,7 +96,7 @@
ret = mtd_erase(mtd, &instr);
flash_set_verbose(0);
if (ret)
- return ERR_PROTECTED;
+ return FL_ERR_PROTECTED;
puts(" done\n");
return 0;
@@ -114,7 +114,7 @@
ret = mtd_write(mtd, to, cnt, &retlen, src);
if (ret)
- return ERR_PROTECTED;
+ return FL_ERR_PROTECTED;
return 0;
}
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index a7826e8..e505028 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -593,11 +593,11 @@
flash_read_long(info, sector, 0));
flash_write_cmd(info, sector, 0, info->cmd_reset);
udelay(1);
- return ERR_TIMEOUT;
+ return FL_ERR_TIMEOUT;
}
udelay(1); /* also triggers watchdog */
}
- return ERR_OK;
+ return FL_ERR_OK;
}
/*-----------------------------------------------------------------------
@@ -616,9 +616,9 @@
case CFI_CMDSET_INTEL_PROG_REGIONS:
case CFI_CMDSET_INTEL_EXTENDED:
case CFI_CMDSET_INTEL_STANDARD:
- if (retcode == ERR_OK &&
+ if (retcode == FL_ERR_OK &&
!flash_isset(info, sector, 0, FLASH_STATUS_DONE)) {
- retcode = ERR_INVAL;
+ retcode = FL_ERR_INVAL;
printf("Flash %s error at address %lx\n", prompt,
info->start[sector]);
if (flash_isset(info, sector, 0, FLASH_STATUS_ECLBS |
@@ -627,14 +627,14 @@
} else if (flash_isset(info, sector, 0,
FLASH_STATUS_ECLBS)) {
puts("Block Erase Error.\n");
- retcode = ERR_NOT_ERASED;
+ retcode = FL_ERR_NOT_ERASED;
} else if (flash_isset(info, sector, 0,
FLASH_STATUS_PSLBS)) {
puts("Locking Error\n");
}
if (flash_isset(info, sector, 0, FLASH_STATUS_DPS)) {
puts("Block locked.\n");
- retcode = ERR_PROTECTED;
+ retcode = FL_ERR_PROTECTED;
}
if (flash_isset(info, sector, 0, FLASH_STATUS_VPENS))
puts("Vpp Low Error.\n");
@@ -702,12 +702,12 @@
if (get_timer(start) > tout) {
printf("Flash %s timeout at address %lx data %lx\n",
prompt, (ulong)dst, (ulong)flash_read8(dst));
- return ERR_TIMEOUT;
+ return FL_ERR_TIMEOUT;
}
udelay(1); /* also triggers watchdog */
}
#endif /* CONFIG_SYS_CFI_FLASH_STATUS_POLL */
- return ERR_OK;
+ return FL_ERR_OK;
}
/*-----------------------------------------------------------------------
@@ -810,7 +810,7 @@
break;
}
if (!flag)
- return ERR_NOT_ERASED;
+ return FL_ERR_NOT_ERASED;
/* Disable interrupts which might cause a timeout here */
flag = disable_interrupts();
@@ -899,7 +899,7 @@
shift = 3;
break;
default:
- retcode = ERR_INVAL;
+ retcode = FL_ERR_INVAL;
goto out_unmap;
}
@@ -930,7 +930,7 @@
}
}
if (!flag) {
- retcode = ERR_NOT_ERASED;
+ retcode = FL_ERR_NOT_ERASED;
goto out_unmap;
}
@@ -950,7 +950,7 @@
retcode = flash_status_check(info, sector,
info->buffer_write_tout,
"write to buffer");
- if (retcode == ERR_OK) {
+ if (retcode == FL_ERR_OK) {
/* reduce the number of loops by the width of
* the port
*/
@@ -975,7 +975,7 @@
src += 8, dst += 8;
break;
default:
- retcode = ERR_INVAL;
+ retcode = FL_ERR_INVAL;
goto out_unmap;
}
}
@@ -1025,7 +1025,7 @@
}
break;
default:
- retcode = ERR_INVAL;
+ retcode = FL_ERR_INVAL;
goto out_unmap;
}
@@ -1043,7 +1043,7 @@
default:
debug("Unknown Command Set\n");
- retcode = ERR_INVAL;
+ retcode = FL_ERR_INVAL;
break;
}
@@ -1389,7 +1389,7 @@
if (i > cnt)
i = cnt;
rc = flash_write_cfibuffer(info, wp, src, i);
- if (rc != ERR_OK)
+ if (rc != FL_ERR_OK)
return rc;
i -= i & (info->portwidth - 1);
wp += i;
@@ -1398,7 +1398,7 @@
FLASH_SHOW_PROGRESS(scale, dots, digit, i);
/* Only check every once in a while */
if ((cnt & 0xFFFF) < buffered_size && ctrlc())
- return ERR_ABORTED;
+ return FL_ERR_ABORTED;
}
#else
while (cnt >= info->portwidth) {
@@ -1413,7 +1413,7 @@
FLASH_SHOW_PROGRESS(scale, dots, digit, info->portwidth);
/* Only check every once in a while */
if ((cnt & 0xFFFF) < info->portwidth && ctrlc())
- return ERR_ABORTED;
+ return FL_ERR_ABORTED;
}
#endif /* CONFIG_SYS_FLASH_USE_BUFFER_WRITE */
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 6ed3255..e7d0ddf 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -468,6 +468,7 @@
config FTGMAC100
bool "Ftgmac100 Ethernet Support"
select PHYLIB
+ depends on NET
help
This driver supports the Faraday's FTGMAC100 Gigabit SoC
Ethernet controller that can be found on Aspeed SoCs (which
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 50edeb4..d6d5cb5 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -615,8 +615,7 @@
if (fec->xcv_type != SEVENWIRE)
miiphy_restart_aneg(dev);
#endif
- fec_open(dev);
- return 0;
+ return fec_open(dev);
}
/**
diff --git a/drivers/net/fm/eth.c b/drivers/net/fm/eth.c
index 19f3f0f..63fe4b2 100644
--- a/drivers/net/fm/eth.c
+++ b/drivers/net/fm/eth.c
@@ -26,7 +26,8 @@
#include "fm.h"
-#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) && !defined(BITBANGMII)
+#if ((defined(CONFIG_MII) || defined(CONFIG_CMD_MII)) && \
+ !defined(CONFIG_BITBANGMII))
#define TBIANA_SETTINGS (TBIANA_ASYMMETRIC_PAUSE | TBIANA_SYMMETRIC_PAUSE | \
TBIANA_FULL_DUPLEX)
@@ -701,8 +702,11 @@
supported |= SUPPORTED_2500baseX_Full;
#endif
+#if (CONFIG_IS_ENABLED(MII) || CONFIG_IS_ENABLED(CMD_MII)) && \
+ !CONFIG_IS_ENABLED(BITBANGMII)
if (fm_eth->type == FM_ETH_1G_E)
dtsec_init_phy(fm_eth);
+#endif
#ifdef CONFIG_PHYLIB
#ifdef CONFIG_DM_MDIO
diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index 73064b2..a9efc50 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -368,6 +368,7 @@
config PHY_NCSI
bool "NC-SI based PHY"
+ depends on NET
endif #PHYLIB
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index 4621a6f..b1247a9 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -323,7 +323,7 @@
bool "Support DFU (Device Firmware Upgrade) in SPL"
select SPL_HASH
select SPL_DFU_NO_RESET
- depends on SPL_RAM_SUPPORT
+ select SPL_RAM_SUPPORT
help
This feature enables the DFU (Device Firmware Upgrade) in SPL with
RAM memory device support. The ROM code will load and execute
diff --git a/include/flash.h b/include/flash.h
index 60babe8..32bc65e 100644
--- a/include/flash.h
+++ b/include/flash.h
@@ -127,16 +127,16 @@
/*-----------------------------------------------------------------------
* return codes from flash_write():
*/
-#define ERR_OK 0
-#define ERR_TIMEOUT 1
-#define ERR_NOT_ERASED 2
-#define ERR_PROTECTED 4
-#define ERR_INVAL 8
-#define ERR_ALIGN 16
-#define ERR_UNKNOWN_FLASH_VENDOR 32
-#define ERR_UNKNOWN_FLASH_TYPE 64
-#define ERR_PROG_ERROR 128
-#define ERR_ABORTED 256
+#define FL_ERR_OK 0
+#define FL_ERR_TIMEOUT 1
+#define FL_ERR_NOT_ERASED 2
+#define FL_ERR_PROTECTED 4
+#define FL_ERR_INVAL 8
+#define FL_ERR_ALIGN 16
+#define FL_ERR_UNKNOWN_FLASH_VENDOR 32
+#define FL_ERR_UNKNOWN_FLASH_TYPE 64
+#define FL_ERR_PROG_ERROR 128
+#define FL_ERR_ABORTED 256
/*-----------------------------------------------------------------------
* Protection Flags for flash_protect():
diff --git a/net/wget.c b/net/wget.c
index a88c31f..b4251e0 100644
--- a/net/wget.c
+++ b/net/wget.c
@@ -8,6 +8,7 @@
#include <command.h>
#include <display_options.h>
#include <env.h>
+#include <efi_loader.h>
#include <image.h>
#include <lmb.h>
#include <mapmem.h>
@@ -171,13 +172,6 @@
wget_send(action, tcp_seq_num, tcp_ack_num, 0);
}
-void wget_success(u8 action, unsigned int tcp_seq_num,
- unsigned int tcp_ack_num, int len, int packets)
-{
- printf("Packets received %d, Transfer Successful\n", packets);
- wget_send(action, tcp_seq_num, tcp_ack_num, len);
-}
-
/*
* Interfaces of U-BOOT
*/
@@ -407,6 +401,9 @@
case WGET_TRANSFERRED:
printf("Packets received %d, Transfer Successful\n", packets);
net_set_state(wget_loop_state);
+ efi_set_bootdev("Net", "", image_url,
+ map_sysmem(image_load_addr, 0),
+ net_boot_file_size);
break;
}
}
diff --git a/test/py/tests/test_bootstage.py b/test/py/tests/test_bootstage.py
index a9eb9f0..bd71a1a 100644
--- a/test/py/tests/test_bootstage.py
+++ b/test/py/tests/test_bootstage.py
@@ -33,7 +33,7 @@
@pytest.mark.buildconfigspec('bootstage')
@pytest.mark.buildconfigspec('cmd_bootstage')
@pytest.mark.buildconfigspec('bootstage_stash')
-def test_bootstage_stash(u_boot_console):
+def test_bootstage_stash_and_unstash(u_boot_console):
f = u_boot_console.config.env.get('env__bootstage_cmd_file', None)
if not f:
pytest.skip('No bootstage environment file is defined')
@@ -55,13 +55,8 @@
# Check expected string in last column of output
output_last_col = ''.join([i.split()[-1] for i in output.split('\n')])
assert expected_text in output_last_col
- return addr, size
-@pytest.mark.buildconfigspec('bootstage')
-@pytest.mark.buildconfigspec('cmd_bootstage')
-@pytest.mark.buildconfigspec('bootstage_stash')
-def test_bootstage_unstash(u_boot_console):
- addr, size = test_bootstage_stash(u_boot_console)
+ # Check that unstash works as expected
u_boot_console.run_command('bootstage unstash %x %x' % (addr, size))
output = u_boot_console.run_command('echo $?')
assert output.endswith('0')
diff --git a/test/py/tests/test_efi_loader.py b/test/py/tests/test_efi_loader.py
index 85473a9..5f3b448 100644
--- a/test/py/tests/test_efi_loader.py
+++ b/test/py/tests/test_efi_loader.py
@@ -45,11 +45,18 @@
'crc32': 'c2244b26', # CRC32 check sum
'addr': 0x40400000, # load address
}
+
+# False if the helloworld EFI over HTTP boot test should be performed.
+# If HTTP boot testing is not possible or desired, set this variable to True or
+# ommit it.
+env__efi_helloworld_net_http_test_skip = True
"""
import pytest
import u_boot_utils
+PROTO_TFTP, PROTO_HTTP = range(0, 2)
+
net_set_up = False
def test_efi_pre_commands(u_boot_console):
@@ -110,10 +117,10 @@
global net_set_up
net_set_up = True
-def fetch_tftp_file(u_boot_console, env_conf):
- """Grab an env described file via TFTP and return its address
+def fetch_file(u_boot_console, env_conf, proto):
+ """Grab an env described file via TFTP or HTTP and return its address
- A file as described by an env config <env_conf> is downloaded from the TFTP
+ A file as described by an env config <env_conf> is downloaded from the
server. The address to that file is returned.
"""
if not net_set_up:
@@ -128,7 +135,13 @@
addr = u_boot_utils.find_ram_base(u_boot_console)
fn = f['fn']
- output = u_boot_console.run_command('tftpboot %x %s' % (addr, fn))
+ if proto == PROTO_TFTP:
+ cmd = 'tftpboot'
+ elif proto == PROTO_HTTP:
+ cmd = 'wget'
+ else:
+ assert False
+ output = u_boot_console.run_command('%s %x %s' % (cmd, addr, fn))
expected_text = 'Bytes transferred = '
sz = f.get('size', None)
if sz:
@@ -147,22 +160,40 @@
return addr
+def do_test_efi_helloworld_net(u_boot_console, proto):
+ addr = fetch_file(u_boot_console, 'env__efi_loader_helloworld_file', proto)
+
+ output = u_boot_console.run_command('bootefi %x' % addr)
+ expected_text = 'Hello, world'
+ assert expected_text in output
+ expected_text = '## Application failed'
+ assert expected_text not in output
+
@pytest.mark.buildconfigspec('of_control')
@pytest.mark.buildconfigspec('cmd_bootefi_hello_compile')
-def test_efi_helloworld_net(u_boot_console):
+@pytest.mark.buildconfigspec('cmd_tftpboot')
+def test_efi_helloworld_net_tftp(u_boot_console):
"""Run the helloworld.efi binary via TFTP.
The helloworld.efi file is downloaded from the TFTP server and is executed
using the fallback device tree at $fdtcontroladdr.
"""
- addr = fetch_tftp_file(u_boot_console, 'env__efi_loader_helloworld_file')
+ do_test_efi_helloworld_net(u_boot_console, PROTO_TFTP);
- output = u_boot_console.run_command('bootefi %x' % addr)
- expected_text = 'Hello, world'
- assert expected_text in output
- expected_text = '## Application failed'
- assert expected_text not in output
+@pytest.mark.buildconfigspec('of_control')
+@pytest.mark.buildconfigspec('cmd_bootefi_hello_compile')
+@pytest.mark.buildconfigspec('cmd_wget')
+def test_efi_helloworld_net_http(u_boot_console):
+ """Run the helloworld.efi binary via HTTP.
+
+ The helloworld.efi file is downloaded from the HTTP server and is executed
+ using the fallback device tree at $fdtcontroladdr.
+ """
+ if u_boot_console.config.env.get('env__efi_helloworld_net_http_test_skip', True):
+ pytest.skip('helloworld.efi HTTP test is not enabled!')
+
+ do_test_efi_helloworld_net(u_boot_console, PROTO_HTTP);
@pytest.mark.buildconfigspec('cmd_bootefi_hello')
def test_efi_helloworld_builtin(u_boot_console):
@@ -178,6 +209,7 @@
@pytest.mark.buildconfigspec('of_control')
@pytest.mark.buildconfigspec('cmd_bootefi')
+@pytest.mark.buildconfigspec('cmd_tftpboot')
def test_efi_grub_net(u_boot_console):
"""Run the grub.efi binary via TFTP.
@@ -185,7 +217,7 @@
executed.
"""
- addr = fetch_tftp_file(u_boot_console, 'env__efi_loader_grub_file')
+ addr = fetch_file(u_boot_console, 'env__efi_loader_grub_file', PROTO_TFTP)
u_boot_console.run_command('bootefi %x' % addr, wait_for_prompt=False)
diff --git a/test/py/tests/test_net_boot.py b/test/py/tests/test_net_boot.py
index 63309fe..d7d7435 100644
--- a/test/py/tests/test_net_boot.py
+++ b/test/py/tests/test_net_boot.py
@@ -75,7 +75,7 @@
'check_pattern': 'ERROR',
}
-# False or omitted if a PXE boot test should be tested.
+# False if a PXE boot test should be tested.
# If PXE boot testing is not possible or desired, set this variable to True.
# For example: If pxe configuration file is not proper to boot
env__pxe_boot_test_skip = False
diff --git a/tools/buildman/test.py b/tools/buildman/test.py
index 5eed013..46aa2a1 100644
--- a/tools/buildman/test.py
+++ b/tools/buildman/test.py
@@ -36,6 +36,16 @@
x86: i386 x86_64
'''
+settings_data_wrapper = '''
+# Buildman settings file
+
+[toolchain]
+main: /usr/sbin
+
+[toolchain-wrapper]
+wrapper = ccache
+'''
+
migration = '''===================== WARNING ======================
This board does not use CONFIG_DM. CONFIG_DM will be
compulsory starting with the v2020.01 release.
@@ -606,6 +616,9 @@
tc.GetEnvArgs(toolchain.VAR_ARCH))
self.assertEqual('', tc.GetEnvArgs(toolchain.VAR_MAKE_ARGS))
+ tc = self.toolchains.Select('sandbox')
+ self.assertEqual('', tc.GetEnvArgs(toolchain.VAR_CROSS_COMPILE))
+
self.toolchains.Add('/path/to/x86_64-linux-gcc', test=False)
tc = self.toolchains.Select('x86')
self.assertEqual('/path/to',
@@ -614,6 +627,39 @@
self.assertEqual('HOSTCC=clang CC=clang',
tc.GetEnvArgs(toolchain.VAR_MAKE_ARGS))
+ # Test config with ccache wrapper
+ bsettings.setup(None)
+ bsettings.add_file(settings_data_wrapper)
+
+ tc = self.toolchains.Select('arm')
+ self.assertEqual('ccache arm-linux-',
+ tc.GetEnvArgs(toolchain.VAR_CROSS_COMPILE))
+
+ tc = self.toolchains.Select('sandbox')
+ self.assertEqual('', tc.GetEnvArgs(toolchain.VAR_CROSS_COMPILE))
+
+ def testMakeEnvironment(self):
+ """Test the MakeEnvironment function"""
+ tc = self.toolchains.Select('arm')
+ env = tc.MakeEnvironment(False)
+ self.assertEqual(env[b'CROSS_COMPILE'], b'arm-linux-')
+
+ tc = self.toolchains.Select('sandbox')
+ env = tc.MakeEnvironment(False)
+ self.assertTrue(b'CROSS_COMPILE' not in env)
+
+ # Test config with ccache wrapper
+ bsettings.setup(None)
+ bsettings.add_file(settings_data_wrapper)
+
+ tc = self.toolchains.Select('arm')
+ env = tc.MakeEnvironment(False)
+ self.assertEqual(env[b'CROSS_COMPILE'], b'ccache arm-linux-')
+
+ tc = self.toolchains.Select('sandbox')
+ env = tc.MakeEnvironment(False)
+ self.assertTrue(b'CROSS_COMPILE' not in env)
+
def testPrepareOutputSpace(self):
def _Touch(fname):
tools.write_file(os.path.join(base_dir, fname), b'')
diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py
index 6ca79c2..a7d7883 100644
--- a/tools/buildman/toolchain.py
+++ b/tools/buildman/toolchain.py
@@ -159,6 +159,8 @@
if which == VAR_CROSS_COMPILE:
wrapper = self.GetWrapper()
base = '' if self.arch == 'sandbox' else self.path
+ if (base == '' and self.cross == ''):
+ return ''
return wrapper + os.path.join(base, self.cross)
elif which == VAR_PATH:
return self.path
@@ -208,10 +210,10 @@
if self.override_toolchain:
# We'll use MakeArgs() to provide this
pass
- elif full_path:
+ elif full_path and self.cross:
env[b'CROSS_COMPILE'] = tools.to_bytes(
wrapper + os.path.join(self.path, self.cross))
- else:
+ elif self.cross:
env[b'CROSS_COMPILE'] = tools.to_bytes(wrapper + self.cross)
# Detect a Python virtualenv and avoid defeating it