History

firmware: xilinx: Add APIs to read/write GGS/PGGS registers

Add APIs to read/write PGGS and GGS registers.

Rajan Vaja committed 6 years ago

Commit 4f680b71 parent 4db81802 files · +90 −0Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/firmware/xlnx-zynqmp.h+24−0
@@ -107,6 +107,10 @@ enum pm_ioctl_id { · 106 unmodified lines
107 IOCTL_GET_PLL_FRAC_MODE,107 IOCTL_GET_PLL_FRAC_MODE,
108 IOCTL_SET_PLL_FRAC_DATA,108 IOCTL_SET_PLL_FRAC_DATA,
109 IOCTL_GET_PLL_FRAC_DATA,109 IOCTL_GET_PLL_FRAC_DATA,
110 IOCTL_WRITE_GGS = 12,
111 IOCTL_READ_GGS = 13,
112 IOCTL_WRITE_PGGS = 14,
113 IOCTL_READ_PGGS = 15,
110};114};
111 115
112enum pm_query_id {116enum pm_query_id {
@@ -330,6 +334,10 @@ int zynqmp_pm_set_requirement(const u32 node, const u32 capabilities, · 217 unmodified lines
330int zynqmp_pm_aes_engine(const u64 address, u32 *out);334int zynqmp_pm_aes_engine(const u64 address, u32 *out);
331int zynqmp_pm_fpga_load(const u64 address, const u32 size, const u32 flags);335int zynqmp_pm_fpga_load(const u64 address, const u32 size, const u32 flags);
332int zynqmp_pm_fpga_get_status(u32 *value);336int zynqmp_pm_fpga_get_status(u32 *value);
337int zynqmp_pm_write_ggs(u32 index, u32 value);
338int zynqmp_pm_read_ggs(u32 index, u32 *value);
339int zynqmp_pm_write_pggs(u32 index, u32 value);
340int zynqmp_pm_read_pggs(u32 index, u32 *value);
333#else341#else
334static inline struct zynqmp_eemi_ops *zynqmp_pm_get_eemi_ops(void)342static inline struct zynqmp_eemi_ops *zynqmp_pm_get_eemi_ops(void)
335{343{
@@ -456,6 +464,22 @@ static inline int zynqmp_pm_fpga_get_status(u32 *value) · 120 unmodified lines
456{464{
457 return -ENODEV;465 return -ENODEV;
458}466}
467static inline int zynqmp_pm_write_ggs(u32 index, u32 value)
468{
469 return -ENODEV;
470}
471static inline int zynqmp_pm_read_ggs(u32 index, u32 *value)
472{
473 return -ENODEV;
474}
475static inline int zynqmp_pm_write_pggs(u32 index, u32 value)
476{
477 return -ENODEV;
478}
479static inline int zynqmp_pm_read_pggs(u32 index, u32 *value)
480{
481 return -ENODEV;
482}
459#endif483#endif
460 484
461#endif /* __FIRMWARE_ZYNQMP_H__ */485#endif /* __FIRMWARE_ZYNQMP_H__ */