vg_lite_hw.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /****************************************************************************
  2. *
  3. * The MIT License (MIT)
  4. *
  5. * Copyright (c) 2014 - 2022 Vivante Corporation
  6. *
  7. * Permission is hereby granted, free of charge, to any person obtaining a
  8. * copy of this software and associated documentation files (the "Software"),
  9. * to deal in the Software without restriction, including without limitation
  10. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  11. * and/or sell copies of the Software, and to permit persons to whom the
  12. * Software is furnished to do so, subject to the following conditions:
  13. *
  14. * The above copyright notice and this permission notice shall be included in
  15. * all copies or substantial portions of the Software.
  16. *
  17. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  18. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  20. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  21. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  22. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  23. * DEALINGS IN THE SOFTWARE.
  24. *
  25. *****************************************************************************
  26. *
  27. * The GPL License (GPL)
  28. *
  29. * Copyright (C) 2014 - 2022 Vivante Corporation
  30. *
  31. * This program is free software; you can redistribute it and/or
  32. * modify it under the terms of the GNU General Public License
  33. * as published by the Free Software Foundation; either version 2
  34. * of the License, or (at your option) any later version.
  35. *
  36. * This program is distributed in the hope that it will be useful,
  37. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  38. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  39. * GNU General Public License for more details.
  40. *
  41. * You should have received a copy of the GNU General Public License
  42. * along with this program; if not, write to the Free Software Foundation,
  43. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  44. *
  45. *****************************************************************************
  46. *
  47. * Note: This software is released under dual MIT and GPL licenses. A
  48. * recipient may use this file under the terms of either the MIT license or
  49. * GPL License. If you wish to use only one license not the other, you can
  50. * indicate your decision by deleting one of the above license notices in your
  51. * version of this file.
  52. *
  53. *****************************************************************************/
  54. #ifndef _vg_lite_hw_h
  55. #define _vg_lite_hw_h
  56. #define VG_LITE_HW_CLOCK_CONTROL 0x000
  57. #define VG_LITE_HW_IDLE 0x004
  58. #define VG_LITE_INTR_STATUS 0x010
  59. #define VG_LITE_INTR_ENABLE 0x014
  60. #define VG_LITE_HW_CHIP_ID 0x020
  61. #define VG_LITE_HW_CMDBUF_ADDRESS 0x500
  62. #define VG_LITE_HW_CMDBUF_SIZE 0x504
  63. #define VG_LITE_POWER_CONTROL 0x100
  64. #define VG_LITE_POWER_MODULE_CONTROL 0x104
  65. #define VG_LITE_EXT_WORK_CONTROL 0x520
  66. #define VG_LITE_EXT_VIDEO_SIZE 0x524
  67. #define VG_LITE_EXT_CLEAR_VALUE 0x528
  68. #define VG_LITE_EXT_VIDEO_CONTROL 0x51C
  69. typedef struct clock_control {
  70. uint32_t reserved0 : 1;
  71. uint32_t clock_gate : 1;
  72. uint32_t scale : 7;
  73. uint32_t scale_load : 1;
  74. uint32_t ram_clock_gating : 1;
  75. uint32_t debug_registers : 1;
  76. uint32_t soft_reset : 1;
  77. uint32_t reserved13 : 6;
  78. uint32_t isolate : 1;
  79. } clock_control_t;
  80. typedef union vg_lite_hw_clock_control {
  81. clock_control_t control;
  82. uint32_t data;
  83. } vg_lite_hw_clock_control_t;
  84. #define VG_LITE_HW_IDLE_STATE 0x0B05
  85. #endif /* defined(_vg_lite_hw_h) */