| 1 |
|
| 2 |
|
| 3 |
#include <device/mmio.h> |
| 4 |
#include <soc/infracfg.h> |
| 5 |
#include <soc/mtcmos.h> |
| 6 |
#include <soc/spm.h> |
| 7 |
|
| 8 |
enum { |
| 9 |
DISP_PROT_STEP_2_MASK = 0x00000C06, |
| 10 |
DISP_PROT_STEP_1_MASK = 0x00001800, |
| 11 |
}; |
| 12 |
|
| 13 |
enum { |
| 14 |
TOP_AXI_PROT_EN_3_ADSP_TOP_STEP1 = 0x00001800, |
| 15 |
TOP_AXI_PROT_EN_3_ADSP_TOP_STEP2 = 0x00000003, |
| 16 |
}; |
| 17 |
|
| 18 |
void mtcmos_adsp_power_on(void) |
| 19 |
{ |
| 20 |
int i; |
| 21 |
|
| 22 |
for (i = 0; i < ARRAY_SIZE(adsp); i++) |
| 23 |
mtcmos_power_on(&adsp[i]); |
| 24 |
} |
| 25 |
|
| 26 |
void mtcmos_protect_display_bus(void) |
| 27 |
{ |
| 28 |
write32(&mt8186_infracfg_ao->infra_topaxi_protecten_clr, |
| 29 |
DISP_PROT_STEP_2_MASK); |
| 30 |
write32(&mt8186_infracfg_ao->infra_topaxi_protecten_1_clr, |
| 31 |
DISP_PROT_STEP_1_MASK); |
| 32 |
} |
| 33 |
|
| 34 |
void mtcmos_protect_audio_bus(void) |
| 35 |
{ |
| 36 |
|
| 37 |
} |
| 38 |
|
| 39 |
void mtcmos_protect_adsp_bus(void) |
| 40 |
{ |
| 41 |
write32(&mt8186_infracfg_ao->infra_topaxi_protecten_3_clr, |
| 42 |
TOP_AXI_PROT_EN_3_ADSP_TOP_STEP2); |
| 43 |
write32(&mt8186_infracfg_ao->infra_topaxi_protecten_3_clr, |
| 44 |
TOP_AXI_PROT_EN_3_ADSP_TOP_STEP1); |
| 45 |
} |