2 * Support for Intel Camera Imaging ISP subsystem.
3 * Copyright (c) 2015, Intel Corporation.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 #include "ia_css_mmu.h"
16 #include "ia_css_mmu_private.h"
17 #include <ia_css_debug.h>
18 #include "sh_css_sp.h"
19 #include "sh_css_firmware.h"
21 #include "mmu_device.h"
24 ia_css_mmu_invalidate_cache(void)
26 const struct ia_css_fw_info *fw = &sh_css_sp_fw;
27 unsigned int HIVE_ADDR_ia_css_dmaproxy_sp_invalidate_tlb;
29 ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_mmu_invalidate_cache() enter\n");
31 /* if the SP is not running we should not access its dmem */
32 if (sh_css_sp_is_running()) {
33 HIVE_ADDR_ia_css_dmaproxy_sp_invalidate_tlb = fw->info.sp.invalidate_tlb;
35 (void)HIVE_ADDR_ia_css_dmaproxy_sp_invalidate_tlb; /* Suppres warnings in CRUN */
37 sp_dmem_store_uint32(SP0_ID,
38 (unsigned int)sp_address_of(ia_css_dmaproxy_sp_invalidate_tlb),
41 ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_mmu_invalidate_cache() leave\n");
44 /* Deprecated, this is an HRT backend function (memory_access.h) */
46 sh_css_mmu_set_page_table_base_index(hrt_data base_index)
49 IA_CSS_ENTER_PRIVATE("base_index=0x%08x\n", base_index);
50 for (i = 0; i < N_MMU_ID; i++) {
52 mmu_set_page_table_base_index(mmu_id, base_index);
53 mmu_invalidate_cache(mmu_id);
55 IA_CSS_LEAVE_PRIVATE("");