aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-06-03 15:42:13 -0400
committerTom Rini <trini@konsulko.com>2022-06-03 15:42:13 -0400
commit90189ecd59cdf14afbe6014be5c068e599b65a72 (patch)
treea0b1987265474d5f4ceeaf03b4acfcca80962a28
parent3053b781465711fd05b88ab141b1f2b55a875516 (diff)
parentc30f6d62f07d788263e1f1ac4909f929feefba3f (diff)
downloadu-boot-90189ecd59cdf14afbe6014be5c068e599b65a72.zip
u-boot-90189ecd59cdf14afbe6014be5c068e599b65a72.tar.gz
u-boot-90189ecd59cdf14afbe6014be5c068e599b65a72.tar.bz2
Merge branch '2022-06-03-assorted-fixes'
- armv8 TCR write bugfix, ubifs bugfix, imx8mq clk bugfixes, two network fixes, Add U-Boot version to chosen node, update TI AM64x board maintainers
-rw-r--r--arch/arm/include/asm/armv8/mmu.h6
-rw-r--r--arch/arm/mach-imx/imx8m/Kconfig1
-rw-r--r--board/ti/am64x/MAINTAINERS2
-rw-r--r--common/fdt_support.c10
-rw-r--r--configs/imx8mq_evk_defconfig1
-rw-r--r--drivers/net/fsl_enetc.c3
-rw-r--r--fs/squashfs/sqfs.c3
-rw-r--r--fs/squashfs/sqfs_dir.c3
-rw-r--r--fs/ubifs/ubifs.c2
-rw-r--r--include/net.h2
-rw-r--r--net/net.c3
11 files changed, 28 insertions, 8 deletions
diff --git a/arch/arm/include/asm/armv8/mmu.h b/arch/arm/include/asm/armv8/mmu.h
index fc97c55..c36b2cf 100644
--- a/arch/arm/include/asm/armv8/mmu.h
+++ b/arch/arm/include/asm/armv8/mmu.h
@@ -99,9 +99,9 @@
#define TCR_TG0_16K (2 << 14)
#define TCR_EPD1_DISABLE (1 << 23)
-#define TCR_EL1_RSVD (1 << 31)
-#define TCR_EL2_RSVD (1 << 31 | 1 << 23)
-#define TCR_EL3_RSVD (1 << 31 | 1 << 23)
+#define TCR_EL1_RSVD (1U << 31)
+#define TCR_EL2_RSVD (1U << 31 | 1 << 23)
+#define TCR_EL3_RSVD (1U << 31 | 1 << 23)
#ifndef __ASSEMBLY__
static inline void set_ttbr_tcr_mair(int el, u64 table, u64 tcr, u64 attr)
diff --git a/arch/arm/mach-imx/imx8m/Kconfig b/arch/arm/mach-imx/imx8m/Kconfig
index 61397bf..ef8518c 100644
--- a/arch/arm/mach-imx/imx8m/Kconfig
+++ b/arch/arm/mach-imx/imx8m/Kconfig
@@ -8,6 +8,7 @@ config IMX8M
config IMX8MQ
bool
select IMX8M
+ select CLK_IMX8MQ
config IMX8MM
bool
diff --git a/board/ti/am64x/MAINTAINERS b/board/ti/am64x/MAINTAINERS
index eaca2b8..78a21d6 100644
--- a/board/ti/am64x/MAINTAINERS
+++ b/board/ti/am64x/MAINTAINERS
@@ -1,5 +1,5 @@
AM64x BOARD
-M: Dave Gerlach <d-gerlach@ti.com>
+M: Vignesh Raghavendra <vigneshr@ti.com>
M: Tom Rini <trini@konsulko.com>
S: Maintained
F: board/ti/am64x/
diff --git a/common/fdt_support.c b/common/fdt_support.c
index 7e9e654..8c18af2 100644
--- a/common/fdt_support.c
+++ b/common/fdt_support.c
@@ -19,6 +19,7 @@
#include <fdt_support.h>
#include <exports.h>
#include <fdtdec.h>
+#include <version.h>
/**
* fdt_getprop_u32_default_node - Return a node's property or a default
@@ -305,6 +306,15 @@ int fdt_chosen(void *fdt)
}
}
+ /* add u-boot version */
+ err = fdt_setprop(fdt, nodeoffset, "u-boot,version", PLAIN_VERSION,
+ strlen(PLAIN_VERSION) + 1);
+ if (err < 0) {
+ printf("WARNING: could not set u-boot,version %s.\n",
+ fdt_strerror(err));
+ return err;
+ }
+
return fdt_fixup_stdout(fdt, nodeoffset);
}
diff --git a/configs/imx8mq_evk_defconfig b/configs/imx8mq_evk_defconfig
index 780f931..9f54a28 100644
--- a/configs/imx8mq_evk_defconfig
+++ b/configs/imx8mq_evk_defconfig
@@ -40,6 +40,7 @@ CONFIG_SYS_PROMPT="u-boot=> "
# CONFIG_CMD_EXPORTENV is not set
# CONFIG_CMD_IMPORTENV is not set
# CONFIG_CMD_CRC32 is not set
+CONFIG_CMD_CLK=y
CONFIG_CMD_FUSE=y
CONFIG_CMD_GPIO=y
CONFIG_CMD_I2C=y
diff --git a/drivers/net/fsl_enetc.c b/drivers/net/fsl_enetc.c
index 9b97a03..cd4c2c2 100644
--- a/drivers/net/fsl_enetc.c
+++ b/drivers/net/fsl_enetc.c
@@ -361,6 +361,9 @@ static int enetc_remove(struct udevice *dev)
{
struct enetc_priv *priv = dev_get_priv(dev);
+ if (miiphy_get_dev_by_name(priv->imdio.name))
+ mdio_unregister(&priv->imdio);
+
free(priv->enetc_txbd);
free(priv->enetc_rxbd);
diff --git a/fs/squashfs/sqfs.c b/fs/squashfs/sqfs.c
index b4484fa..547d2fd 100644
--- a/fs/squashfs/sqfs.c
+++ b/fs/squashfs/sqfs.c
@@ -12,8 +12,7 @@
#include <errno.h>
#include <fs.h>
#include <linux/types.h>
-#include <linux/byteorder/little_endian.h>
-#include <linux/byteorder/generic.h>
+#include <asm/byteorder.h>
#include <memalign.h>
#include <stdlib.h>
#include <string.h>
diff --git a/fs/squashfs/sqfs_dir.c b/fs/squashfs/sqfs_dir.c
index a265b98..ed83c90 100644
--- a/fs/squashfs/sqfs_dir.c
+++ b/fs/squashfs/sqfs_dir.c
@@ -7,8 +7,7 @@
#include <errno.h>
#include <linux/types.h>
-#include <linux/byteorder/little_endian.h>
-#include <linux/byteorder/generic.h>
+#include <asm/byteorder.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c
index d6be5c9..d3026e3 100644
--- a/fs/ubifs/ubifs.c
+++ b/fs/ubifs/ubifs.c
@@ -788,6 +788,8 @@ static int do_readpage(struct ubifs_info *c, struct inode *inode,
if (last_block_size)
dlen = last_block_size;
+ else if (ret)
+ dlen = UBIFS_BLOCK_SIZE;
else
dlen = le32_to_cpu(dn->size);
diff --git a/include/net.h b/include/net.h
index 675bf41..e3889a0 100644
--- a/include/net.h
+++ b/include/net.h
@@ -391,6 +391,8 @@ struct ip_hdr {
#define IP_HDR_SIZE (sizeof(struct ip_hdr))
+#define IP_MIN_FRAG_DATAGRAM_SIZE (IP_HDR_SIZE + 8)
+
/*
* Internet Protocol (IP) + UDP header.
*/
diff --git a/net/net.c b/net/net.c
index 034a5d6..81905f6 100644
--- a/net/net.c
+++ b/net/net.c
@@ -907,6 +907,9 @@ static struct ip_udp_hdr *__net_defragment(struct ip_udp_hdr *ip, int *lenp)
int offset8, start, len, done = 0;
u16 ip_off = ntohs(ip->ip_off);
+ if (ip->ip_len < IP_MIN_FRAG_DATAGRAM_SIZE)
+ return NULL;
+
/* payload starts after IP header, this fragment is in there */
payload = (struct hole *)(pkt_buff + IP_HDR_SIZE);
offset8 = (ip_off & IP_OFFS);