Skip to content

Commit 367971d

Browse files
committed
Merge tag 'xilinx-for-v2025.04-rc4' of https://source.denx.de/u-boot/custodians/u-boot-microblaze
AMD/Xilinx changes for v2025.04-rc4 Zynq: - Guard code around SPL_FS_LOAD_PAYLOAD_NAME Versal*: - Remove tftp block size 4096 Versal: - Use clocks per DT binding - Store driver data in data section Versal Gen 2: - Fix major/minor version decoding
2 parents 409d37e + 8d2d615 commit 367971d

File tree

7 files changed

+22
-11
lines changed

7 files changed

+22
-11
lines changed

arch/arm/mach-versal2/include/mach/hardware.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ struct crp_regs {
5151
#define PMC_TAP_VERSION (PMC_TAP + 0x4)
5252
# define PMC_VERSION_MASK GENMASK(7, 0)
5353
# define PS_VERSION_MASK GENMASK(15, 8)
54-
# define PS_VERSION_PRODUCTION 0x20
54+
# define PS_VERSION_MAJOR GENMASK(7, 4)
55+
# define PS_VERSION_MINOR GENMASK(3, 0)
5556
# define RTL_VERSION_MASK GENMASK(23, 16)
5657
# define PLATFORM_MASK GENMASK(27, 24)
5758
# define PLATFORM_VERSION_MASK GENMASK(31, 28)

board/xilinx/zynq/board.c

+2
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ void set_dfu_alt_info(char *interface, char *devstr)
179179
memset(buf, 0, sizeof(buf));
180180

181181
switch ((zynq_slcr_get_boot_mode()) & ZYNQ_BM_MASK) {
182+
#if defined(CONFIG_SPL_FS_LOAD_PAYLOAD_NAME)
182183
case ZYNQ_BM_SD:
183184
snprintf(buf, DFU_ALT_BUF_LEN,
184185
"mmc 0=boot.bin fat 0 1;"
@@ -192,6 +193,7 @@ void set_dfu_alt_info(char *interface, char *devstr)
192193
CONFIG_SPL_FS_LOAD_PAYLOAD_NAME,
193194
CONFIG_SYS_SPI_U_BOOT_OFFS);
194195
break;
196+
#endif
195197
#endif
196198
default:
197199
return;

configs/amd_versal2_virt_defconfig

-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
7070
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
7171
CONFIG_NET_LWIP=y
7272
CONFIG_NET_RANDOM_ETHADDR=y
73-
CONFIG_TFTP_BLOCKSIZE=4096
7473
CONFIG_SIMPLE_PM_BUS=y
7574
CONFIG_CLK_CCF=y
7675
CONFIG_CLK_SCMI=y

configs/xilinx_versal_net_virt_defconfig

-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
7070
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
7171
CONFIG_NET_LWIP=y
7272
CONFIG_NET_RANDOM_ETHADDR=y
73-
CONFIG_TFTP_BLOCKSIZE=4096
7473
CONFIG_SIMPLE_PM_BUS=y
7574
CONFIG_CLK_VERSAL=y
7675
CONFIG_DFU_RAM=y

configs/xilinx_versal_virt_defconfig

-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
7474
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
7575
CONFIG_NET_LWIP=y
7676
CONFIG_NET_RANDOM_ETHADDR=y
77-
CONFIG_TFTP_BLOCKSIZE=4096
7877
CONFIG_SIMPLE_PM_BUS=y
7978
CONFIG_CLK_VERSAL=y
8079
CONFIG_DFU_TIMEOUT=y

drivers/clk/clk_versal.c

+15-6
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ struct versal_clk_priv {
106106
struct versal_clock *clk;
107107
};
108108

109-
static ulong pl_alt_ref_clk;
110-
static ulong ref_clk;
109+
static ulong pl_alt_ref_clk __section(".data");
110+
static ulong ref_clk __section(".data");
111111

112112
struct versal_pm_query_data {
113113
u32 qid;
@@ -116,8 +116,8 @@ struct versal_pm_query_data {
116116
u32 arg3;
117117
};
118118

119-
static struct versal_clock *clock;
120-
static unsigned int clock_max_idx;
119+
static struct versal_clock *clock __section(".data");
120+
static unsigned int clock_max_idx __section(".data");
121121

122122
#define PM_QUERY_DATA 35
123123

@@ -679,12 +679,21 @@ static int versal_clk_probe(struct udevice *dev)
679679

680680
debug("%s\n", __func__);
681681

682-
ret = versal_clock_get_freq_by_name("pl_alt_ref_clk",
682+
ret = versal_clock_get_freq_by_name("pl_alt_ref",
683683
dev, &pl_alt_ref_clk);
684+
if (ret == -ENODATA) {
685+
/* Fallback to old DT binding clk name "pl_alt_ref_clk" */
686+
ret = versal_clock_get_freq_by_name("pl_alt_ref_clk",
687+
dev, &pl_alt_ref_clk);
688+
}
684689
if (ret < 0)
685690
return -EINVAL;
686691

687-
ret = versal_clock_get_freq_by_name("ref_clk", dev, &ref_clk);
692+
ret = versal_clock_get_freq_by_name("ref", dev, &ref_clk);
693+
if (ret == -ENODATA) {
694+
/* Fallback to old DT binding clk name "ref_clk" */
695+
ret = versal_clock_get_freq_by_name("ref_clk", dev, &ref_clk);
696+
}
688697
if (ret < 0)
689698
return -EINVAL;
690699

drivers/soc/soc_amd_versal2.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ static int soc_amd_versal2_get_revision(struct udevice *dev, char *buf, int size
3535
{
3636
struct soc_amd_versal2_priv *priv = dev_get_priv(dev);
3737

38-
return snprintf(buf, size, "v%d", priv->revision);
38+
return snprintf(buf, size, "v%d.%d",
39+
(u32)FIELD_GET(PS_VERSION_MAJOR, priv->revision),
40+
(u32)FIELD_GET(PS_VERSION_MINOR, priv->revision));
3941
}
4042

4143
static const struct soc_ops soc_amd_versal2_ops = {

0 commit comments

Comments
 (0)