ark1668-sysreg.h 626 B

12345678910111213141516171819202122232425262728
  1. #ifndef __ASM_ARCH_ARK1668_SYSREG_H
  2. #define __ASM_ARCH_ARK1668_SYSREG_H
  3. #include <asm/io.h>
  4. #define SYS_REG_BASE 0xe4900000
  5. #define SYS_CLK_SEL 0x40
  6. #define SYS_DEVICE_CLK_CFG3 0x6c
  7. #define SYS_PLLRFCK_CTL 0x14c
  8. #define SYS_CPUPLL_CFG 0x150
  9. #define SYS_SYSPLL_CFG 0x154
  10. #define SYS_AUDPLL_CFG 0x158
  11. #define SYS_DDR_IO_CFG 0x19c
  12. #define SYS_IO_DRIVER01 0x1f4
  13. #define SYS_IO_DRIVER02 0x1f8
  14. static inline volatile unsigned int read_sys_reg(int offset)
  15. {
  16. return readl(SYS_REG_BASE + offset);
  17. }
  18. static inline void write_sys_reg(unsigned int val, int offset)
  19. {
  20. writel(val, SYS_REG_BASE + offset);
  21. }
  22. #endif