| // SPDX-License-Identifier: GPL-2.0+ |
| * Christophe Leroy, CS Systemes d'Information, christophe.leroy@c-s.fr |
| #include <asm/processor.h> |
| return !!(mfspr(IC_CST) & IDC_ENABLED); |
| mtspr(IC_CST, IDC_INVALL); |
| mtspr(IC_CST, IDC_ENABLE); |
| void icache_disable(void) |
| mtspr(IC_CST, IDC_DISABLE); |
| return !!(mfspr(IC_CST) & IDC_ENABLED); |
| mtspr(MD_CTR, MD_RESETVAL); /* Set cache mode with MMU off */ |
| mtspr(DC_CST, IDC_INVALL); |
| mtspr(DC_CST, IDC_ENABLE); |
| void dcache_disable(void) |
| mtspr(DC_CST, IDC_DISABLE); |
| mtspr(DC_CST, IDC_INVALL); |