48#ifndef LIBBSP_ARM_XILINX_ZYNQ_SLCR_REGS_H
49#define LIBBSP_ARM_XILINX_ZYNQ_SLCR_REGS_H
57#define ZYNQ_SLCR_BASE_ADDR ( 0xF8000000 )
59#define ZYNQ_SLCR_LOCK_OFF ( 0x4 )
60#define ZYNQ_SLCR_UNLOCK_OFF ( 0x8 )
61#define ZYNQ_SLCR_FPGA_RST_CTRL_OFF ( 0x240 )
62#define ZYNQ_SLCR_PSS_IDCODE_OFF ( 0x530 )
63#define ZYNQ_SLCR_LVL_SHFTR_EN_OFF ( 0x900 )
65#define ZYNQ_SLCR_LOCK_KEY ( 0x767b )
66#define ZYNQ_SLCR_UNLOCK_KEY ( 0xdf0d )
69#define ZYNQ_SLCR_FPGA_RST_CTRL_FPGA_OUT_RST_GET( reg ) \
70 BSP_FLD32GET( reg, 0, 3 )
71#define ZYNQ_SLCR_FPGA_RST_CTRL_FPGA_OUT_RST( val ) BSP_FLD32( val, 0, 3 )
74#define ZYNQ_SLCR_PSS_IDCODE_DEVICE_GET( reg ) BSP_FLD32GET( reg, 12, 16 )
75#define ZYNQ_SLCR_PSS_IDCODE_DEVICE_7z007s ( 0x03 )
76#define ZYNQ_SLCR_PSS_IDCODE_DEVICE_7z012s ( 0x1c )
77#define ZYNQ_SLCR_PSS_IDCODE_DEVICE_7z014s ( 0x08 )
78#define ZYNQ_SLCR_PSS_IDCODE_DEVICE_7z010 ( 0x02 )
79#define ZYNQ_SLCR_PSS_IDCODE_DEVICE_7z015 ( 0x1b )
80#define ZYNQ_SLCR_PSS_IDCODE_DEVICE_7z020 ( 0x07 )
81#define ZYNQ_SLCR_PSS_IDCODE_DEVICE_7z030 ( 0x0c )
82#define ZYNQ_SLCR_PSS_IDCODE_DEVICE_7z035 ( 0x12 )
83#define ZYNQ_SLCR_PSS_IDCODE_DEVICE_7z045 ( 0x11 )
84#define ZYNQ_SLCR_PSS_IDCODE_DEVICE_7z100 ( 0x16 )
86#define ZYNQ_SLCR_LVL_SHFTR_EN_DISABLE ( 0 )
87#define ZYNQ_SLCR_LVL_SHFTR_EN_PS_TO_PL ( 0xA )
88#define ZYNQ_SLCR_LVL_SHFTR_EN_ALL ( 0xF )
90static inline void zynq_slcr_write32(
91 const uint32_t reg_off,
95 volatile uint32_t *slcr_reg;
96 slcr_reg = (
volatile uint32_t *)( ZYNQ_SLCR_BASE_ADDR + reg_off );
100static inline uint32_t zynq_slcr_read32(
101 const uint32_t reg_off
104 volatile uint32_t *slcr_reg;
105 slcr_reg = (
volatile uint32_t *)( ZYNQ_SLCR_BASE_ADDR + reg_off);
This header file provides utility macros for BSPs.