rockchip.h 627 B

12345678910111213141516171819202122
  1. /*
  2. * Copyright (c) 2006-2024 RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2022-3-08 GuEe-GUI the first version
  9. */
  10. #ifndef __ROCKCHIP_H__
  11. #define __ROCKCHIP_H__
  12. #include <rthw.h>
  13. #define rk_clrsetreg(addr, clr, set) HWREG32(addr) = (((clr) | (set)) << 16 | (set))
  14. #define rk_clrreg(addr, clr) HWREG32(addr) = ((clr) << 16)
  15. #define rk_setreg(addr, set) HWREG32(addr) = ((set) << 16 | (set))
  16. #define HIWORD_UPDATE(val, mask, shift) ((val) << (shift) | (mask) << ((shift) + 16))
  17. #endif /* __ROCKCHIP_H__ */