Angel Pons | e67ab18 | 2020-04-04 18:51:11 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Tristan Shieh | 85c3475 | 2018-06-05 12:20:00 +0800 | [diff] [blame] | 2 | |
Kyösti Mälkki | 13f6650 | 2019-03-03 08:01:05 +0200 | [diff] [blame] | 3 | #include <device/mmio.h> |
Tristan Shieh | 85c3475 | 2018-06-05 12:20:00 +0800 | [diff] [blame] | 4 | #include <soc/infracfg.h> |
| 5 | #include <soc/smi.h> |
| 6 | #include <soc/mtcmos.h> |
| 7 | |
| 8 | enum { |
| 9 | DISP_PROT_STEP1_0_MASK = 0x3 << 16, |
| 10 | DISP_PROT_STEP2_0_MASK = 0x3 << 10, |
| 11 | DISP_PROT_STEP2_1_MASK = 0xff, |
| 12 | }; |
| 13 | |
| 14 | void mtcmos_protect_display_bus(void) |
| 15 | { |
| 16 | write32(&mt8183_infracfg->infra_topaxi_protecten_clr, |
| 17 | DISP_PROT_STEP2_0_MASK); |
| 18 | write32(&mt8183_smi->smi_common_clamp_en_clr, DISP_PROT_STEP2_1_MASK); |
| 19 | write32(&mt8183_infracfg->infra_topaxi_protecten_1_clr, |
| 20 | DISP_PROT_STEP1_0_MASK); |
| 21 | } |