platform_debug.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. /* Copyright Statement:
  2. *
  3. * This software/firmware and related documentation ("MediaTek Software") are
  4. * protected under relevant copyright laws. The information contained herein
  5. * is confidential and proprietary to MediaTek Inc. and/or its licensors.
  6. * Without the prior written permission of MediaTek inc. and/or its licensors,
  7. * any reproduction, modification, use or disclosure of MediaTek Software,
  8. * and information contained herein, in whole or in part, shall be strictly prohibited.
  9. */
  10. /* MediaTek Inc. (C) 2016. All rights reserved.
  11. *
  12. * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
  13. * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
  14. * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON
  15. * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
  16. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
  17. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
  18. * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
  19. * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
  20. * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH
  21. * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES
  22. * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES
  23. * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK
  24. * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
  25. * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND
  26. * CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
  27. * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
  28. * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO
  29. * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
  30. */
  31. #ifndef __PLATFORM_DEBUG_H__
  32. #define __PLATFORM_DEBUG_H__
  33. #include <latch.h>
  34. const struct plt_cfg_pc_latch cfg_pc_latch = {
  35. .nr_max_core = 8,
  36. .nr_max_big_core = 4,
  37. .mp0_dbg_ctrl = 0x0404,
  38. .mp0_dbg_flag = 0x0408,
  39. .mp1_dbg_ctrl = 0x0504,
  40. .mp1_dbg_flag = 0x0508,
  41. .spm_pwr_sts = 0x80C,
  42. .plat_sram_flag0 = 0x0,
  43. };
  44. int plt_infrasys_is_timeout(const struct plt_cfg_bus_latch *self);
  45. const struct plt_cfg_bus_latch cfg_bus_latch = {
  46. .supported = 1,
  47. .num_master_port = 3,
  48. .num_slave_port = 4,
  49. .num_perisys_mon = 18,
  50. .num_infrasys_mon = 24,
  51. .mcusys_offsets = {
  52. .bus_mcu_m0 = 0x05A4,
  53. .bus_mcu_s1 = 0x05B0,
  54. .bus_mcu_m0_m = 0x05C0,
  55. .bus_mcu_s1_m = 0x05CC,
  56. },
  57. .perisys_offsets = {
  58. .bus_peri_r0 = 0x0500,
  59. .bus_peri_r1 = 0x0504,
  60. .bus_peri_mon = 0x0508,
  61. },
  62. .secure_perisys = 0,
  63. .perisys_enable = 0xc,
  64. .perisys_timeout = 0x3fff,
  65. .infrasys_offsets = {
  66. .bus_infra_ctrl = 0x0d04,
  67. .bus_infra_snapshot = 0x0d08,
  68. },
  69. .infrasys_config = 0xffff000c,
  70. .infrasys_ops = {
  71. .is_timeout = plt_infrasys_is_timeout,
  72. },
  73. };
  74. const struct plt_cfg_l2_parity_latch cfg_l2_parity_latch = {
  75. .supported = 1,
  76. .mp0_l2_cache_parity1_rdata = 0x007c,
  77. .mp0_l2_cache_parity2_rdata = 0x0080,
  78. .mp1_l2_cache_parity1_rdata = 0x22d0,
  79. .mp1_l2_cache_parity2_rdata = 0x22d4,
  80. };
  81. const struct plt_cfg_big_core cfg_big_core[] = {
  82. {
  83. .cpuid = 4,
  84. .nr_circular_buffer_entry = 64,
  85. .circular_buffer_addr = 0x0d810600,
  86. },
  87. {
  88. .cpuid = 5,
  89. .nr_circular_buffer_entry = 64,
  90. .circular_buffer_addr = 0x0d910600,
  91. },
  92. {
  93. .cpuid = 6,
  94. .nr_circular_buffer_entry = 64,
  95. .circular_buffer_addr = 0x0da10600,
  96. },
  97. {
  98. .cpuid = 7,
  99. .nr_circular_buffer_entry = 64,
  100. .circular_buffer_addr = 0x0db10600,
  101. },
  102. };
  103. struct plt_circular_buffer_op circular_buffer_op = {
  104. .lock = NULL,
  105. .unlock = NULL,
  106. };
  107. #define MCU_ALL_PWR_ON_CTRL (0x0C530B58)
  108. /******* dfd *******/
  109. #include "dfd.h"
  110. const struct plt_cfg_dfd cfg_dfd = {
  111. .version = DFD_V2_0,
  112. .sw_version = DFD_SW_V3,
  113. .nr_header_row = 4,
  114. .buffer_addr = 0x0c600000,
  115. .buffer_length = 0x2d000,
  116. .plat_sram_flag1 = 0x11dbf4,
  117. .plat_sram_flag2 = 0x11dbf8,
  118. .dfd_disable_devinfo_index = 4,
  119. .dfd_disable_bit = 0x10,
  120. .chip_id_offset = 0x18,
  121. .chip_id = {'6','7','7','1',0,0,0,0},
  122. };
  123. struct plt_dfd_op dfd_op = {
  124. .acquire_ram_control = NULL,
  125. .release_ram_control = NULL,
  126. .check_dfd_valid = NULL,
  127. };
  128. /******* etb *******/
  129. #include "etb.h"
  130. const struct plt_cfg_etb cfg_etb = {
  131. .nr_etb = 0,
  132. };
  133. #endif