clk-rk-gate.h 973 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright (c) 2006-2022, 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 __CLK_RK_GATE_H__
  11. #define __CLK_RK_GATE_H__
  12. #include "clk-rk.h"
  13. #define GATE(_id, cname, pname, f, o, b, gf) \
  14. (void *)&(struct rockchip_clk_cell) \
  15. { \
  16. .cell.name = cname, \
  17. .cell.ops = &rockchip_gate_clk_ops, \
  18. .cell.parent_name = pname, \
  19. .cell.parents_nr = 1, \
  20. .cell.flags = f | RT_CLK_F_SET_RATE_PARENT, \
  21. .id = _id, \
  22. .gate_offset = o, \
  23. .gate_shift = b, \
  24. .gate_flags = gf, \
  25. }
  26. extern const struct rt_clk_ops rockchip_gate_clk_ops;
  27. #endif /* __CLK_RK_GATE_H__ */