2 * Copyright (C) 2000 Murray Jensen <Murray.Jensen@cmst.csiro.au>
4 * SPDX-License-Identifier: GPL-2.0+
12 #define CONFIG_8260 1 /* needed for Linux kernel header files */
14 #include <ppc_asm.tmpl>
17 #include <asm/cache.h>
20 #if defined(CONFIG_CMD_KGDB)
23 * cache flushing routines for kgdb
26 .globl kgdb_flush_cache_all
29 ori r3, r3, HID0_ICFI|HID0_DCI /* Invalidate All */
34 .globl kgdb_flush_cache_range
35 kgdb_flush_cache_range:
36 li r5,CONFIG_SYS_CACHELINE_SIZE-1
40 srwi. r4,r4,CONFIG_SYS_CACHELINE_SHIFT
45 addi r3,r3,CONFIG_SYS_CACHELINE_SIZE
47 sync /* wait for dcbst's to get to ram */
50 addi r6,r6,CONFIG_SYS_CACHELINE_SIZE