mirror of
https://xff.cz/git/u-boot/
synced 2025-09-06 19:22:11 +02:00
ARM64: zynqmp: Adjust to new SMC interface to get silicon version
The new FW interface returns the IDCODE and version register, leaving extracting bitfields to the caller. Cc: Michal Simek <michal.simek@xilinx.com> Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
This commit is contained in:
committed by
Michal Simek
parent
05c59d0bc8
commit
0cba6abbba
@@ -86,6 +86,17 @@ static int chip_id(void)
|
|||||||
|
|
||||||
smc_call(®s);
|
smc_call(®s);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SMC returns:
|
||||||
|
* regs[0][31:0] = status of the operation
|
||||||
|
* regs[0][63:32] = CSU.IDCODE register
|
||||||
|
* regs[1][31:0] = CSU.version register
|
||||||
|
*/
|
||||||
|
regs.regs[0] = upper_32_bits(regs.regs[0]);
|
||||||
|
regs.regs[0] &= ZYNQMP_CSU_IDCODE_DEVICE_CODE_MASK |
|
||||||
|
ZYNQMP_CSU_IDCODE_SVD_MASK;
|
||||||
|
regs.regs[0] >>= ZYNQMP_CSU_IDCODE_SVD_SHIFT;
|
||||||
|
|
||||||
return regs.regs[0];
|
return regs.regs[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -16,6 +16,12 @@
|
|||||||
#define ZYNQMP_FPGA_OP_LOAD (1 << 1)
|
#define ZYNQMP_FPGA_OP_LOAD (1 << 1)
|
||||||
#define ZYNQMP_FPGA_OP_DONE (1 << 2)
|
#define ZYNQMP_FPGA_OP_DONE (1 << 2)
|
||||||
|
|
||||||
|
#define ZYNQMP_CSU_IDCODE_DEVICE_CODE_SHIFT 15
|
||||||
|
#define ZYNQMP_CSU_IDCODE_DEVICE_CODE_MASK (0xf << \
|
||||||
|
ZYNQMP_CSU_IDCODE_DEVICE_CODE_SHIFT)
|
||||||
|
#define ZYNQMP_CSU_IDCODE_SVD_SHIFT 12
|
||||||
|
#define ZYNQMP_CSU_IDCODE_SVD_MASK (0xe << ZYNQMP_CSU_IDCODE_SVD_SHIFT)
|
||||||
|
|
||||||
extern struct xilinx_fpga_op zynqmp_op;
|
extern struct xilinx_fpga_op zynqmp_op;
|
||||||
|
|
||||||
#define XILINX_ZYNQMP_DESC \
|
#define XILINX_ZYNQMP_DESC \
|
||||||
|
Reference in New Issue
Block a user