summaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2018-09-27 08:29:10 -0400
committerTom Rini <trini@konsulko.com>2018-09-27 08:29:10 -0400
commitbbef20d479441b01d62252cf127498c58078b2c3 (patch)
tree7818d7df29c6147d5270c0ee0a6ff1645917d1b6 /arch/arm
parent0ae8dcfef7c890330c62bb34c724126ffc169bef (diff)
parent3888c8d1979289efe685fe29276aed4d4b685975 (diff)
downloadu-boot-bbef20d479441b01d62252cf127498c58078b2c3.tar.gz
u-boot-bbef20d479441b01d62252cf127498c58078b2c3.tar.xz
u-boot-bbef20d479441b01d62252cf127498c58078b2c3.zip
Merge tag 'xilinx-for-v2018.11' of git://git.denx.de/u-boot-microblaze
Xilinx changes for v2018.11 - Handle BOARD_LATE_INIT via Kconfig SPL: - Enable GZIP for all partitions types(not only for kernel) ZynqMP: - Rearrange pmufw version handling - Support newer PMUFW with improved fpga load sequence Zynq: - Cleanup config file - Simplify zybo config by enabling option via Kconfig net: - Fix gems max-speed property reading - Enable support for fixed-link phys
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/Kconfig4
-rw-r--r--arch/arm/cpu/armv8/zynqmp/cpu.c40
-rw-r--r--arch/arm/include/asm/arch-zynqmp/sys_proto.h17
3 files changed, 33 insertions, 28 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index b39d08539a..ccf2a844be 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -863,7 +863,6 @@ config ARCH_VF610
config ARCH_ZYNQ
bool "Xilinx Zynq based platform"
select BOARD_EARLY_INIT_F if WDT
- select BOARD_LATE_INIT
select CLK
select CLK_ZYNQ
select CPU_V7A
@@ -883,6 +882,7 @@ config ARCH_ZYNQ
select SPL_SEPARATE_BSS if SPL
select SUPPORT_SPL
imply ARCH_EARLY_INIT_R
+ imply BOARD_LATE_INIT
imply CMD_CLK
imply CMD_DM
imply CMD_SPL
@@ -900,7 +900,6 @@ config ARCH_ZYNQMP_R5
config ARCH_ZYNQMP
bool "Xilinx ZynqMP based platform"
select ARM64
- select BOARD_LATE_INIT
select CLK
select DM
select DM_SERIAL
@@ -909,6 +908,7 @@ config ARCH_ZYNQMP
select SPL_BOARD_INIT if SPL
select SPL_CLK if SPL
select SUPPORT_SPL
+ imply BOARD_LATE_INIT
imply CMD_DM
imply FAT_WRITE
diff --git a/arch/arm/cpu/armv8/zynqmp/cpu.c b/arch/arm/cpu/armv8/zynqmp/cpu.c
index 1279dc8658..43ba739d2f 100644
--- a/arch/arm/cpu/armv8/zynqmp/cpu.c
+++ b/arch/arm/cpu/armv8/zynqmp/cpu.c
@@ -171,38 +171,28 @@ int __maybe_unused invoke_smc(u32 pm_api_id, u32 arg0, u32 arg1, u32 arg2,
return regs.regs[0];
}
-#define ZYNQMP_SIP_SVC_GET_API_VERSION 0xC2000001
-
-#define ZYNQMP_PM_VERSION_MAJOR 1
-#define ZYNQMP_PM_VERSION_MINOR 0
-#define ZYNQMP_PM_VERSION_MAJOR_SHIFT 16
-#define ZYNQMP_PM_VERSION_MINOR_MASK 0xFFFF
-
-#define ZYNQMP_PM_VERSION \
- ((ZYNQMP_PM_VERSION_MAJOR << ZYNQMP_PM_VERSION_MAJOR_SHIFT) | \
- ZYNQMP_PM_VERSION_MINOR)
-
#if defined(CONFIG_CLK_ZYNQMP)
-void zynqmp_pmufw_version(void)
+unsigned int zynqmp_pmufw_version(void)
{
int ret;
u32 ret_payload[PAYLOAD_ARG_CNT];
- u32 pm_api_version;
-
- ret = invoke_smc(ZYNQMP_SIP_SVC_GET_API_VERSION, 0, 0, 0, 0,
- ret_payload);
- pm_api_version = ret_payload[1];
+ static u32 pm_api_version = ZYNQMP_PM_VERSION_INVALID;
- if (ret)
- panic("PMUFW is not found - Please load it!\n");
+ /*
+ * Get PMU version only once and later
+ * just return stored values instead of
+ * asking PMUFW again.
+ */
+ if (pm_api_version == ZYNQMP_PM_VERSION_INVALID) {
+ ret = invoke_smc(ZYNQMP_SIP_SVC_GET_API_VERSION, 0, 0, 0, 0,
+ ret_payload);
+ pm_api_version = ret_payload[1];
- printf("PMUFW:\tv%d.%d\n",
- pm_api_version >> ZYNQMP_PM_VERSION_MAJOR_SHIFT,
- pm_api_version & ZYNQMP_PM_VERSION_MINOR_MASK);
+ if (ret)
+ panic("PMUFW is not found - Please load it!\n");
+ }
- if (pm_api_version < ZYNQMP_PM_VERSION)
- panic("PMUFW version error. Expected: v%d.%d\n",
- ZYNQMP_PM_VERSION_MAJOR, ZYNQMP_PM_VERSION_MINOR);
+ return pm_api_version;
}
#endif
diff --git a/arch/arm/include/asm/arch-zynqmp/sys_proto.h b/arch/arm/include/asm/arch-zynqmp/sys_proto.h
index 773b930512..9fa44d084c 100644
--- a/arch/arm/include/asm/arch-zynqmp/sys_proto.h
+++ b/arch/arm/include/asm/arch-zynqmp/sys_proto.h
@@ -21,6 +21,21 @@
#define ZYNQMP_FPGA_AUTH_DDR 1
+#define ZYNQMP_SIP_SVC_GET_API_VERSION 0xC2000001
+
+#define ZYNQMP_PM_VERSION_MAJOR 1
+#define ZYNQMP_PM_VERSION_MINOR 0
+#define ZYNQMP_PM_VERSION_MAJOR_SHIFT 16
+#define ZYNQMP_PM_VERSION_MINOR_MASK 0xFFFF
+
+#define ZYNQMP_PM_VERSION \
+ ((ZYNQMP_PM_VERSION_MAJOR << ZYNQMP_PM_VERSION_MAJOR_SHIFT) | \
+ ZYNQMP_PM_VERSION_MINOR)
+
+#define ZYNQMP_PM_VERSION_INVALID ~0
+
+#define PMUFW_V1_0 ((1 << ZYNQMP_PM_VERSION_MAJOR_SHIFT) | 0)
+
enum {
IDCODE,
VERSION,
@@ -44,7 +59,7 @@ unsigned int zynqmp_get_silicon_version(void);
void handoff_setup(void);
-void zynqmp_pmufw_version(void);
+unsigned int zynqmp_pmufw_version(void);
int zynqmp_mmio_write(const u32 address, const u32 mask, const u32 value);
int zynqmp_mmio_read(const u32 address, u32 *value);
int invoke_smc(u32 pm_api_id, u32 arg0, u32 arg1, u32 arg2, u32 arg3,