]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - arch/powerpc/cpu/mpc8260/kgdb.S
remove unnecessary version.h includes
[karo-tx-uboot.git] / arch / powerpc / cpu / mpc8260 / kgdb.S
1 /*
2  *  Copyright (C) 2000  Murray Jensen <Murray.Jensen@cmst.csiro.au>
3  *
4  * SPDX-License-Identifier:     GPL-2.0+
5  */
6
7 #include <config.h>
8 #include <command.h>
9 #include <mpc8260.h>
10
11 #include <ppc_asm.tmpl>
12 #include <ppc_defs.h>
13
14 #include <asm/cache.h>
15 #include <asm/mmu.h>
16
17 #if defined(CONFIG_CMD_KGDB)
18
19  /*
20  * cache flushing routines for kgdb
21  */
22
23         .globl  kgdb_flush_cache_all
24 kgdb_flush_cache_all:
25         mfspr   r3, HID0
26         ori     r3, r3, HID0_ICFI|HID0_DCI      /* Invalidate All */
27         SYNC
28         mtspr   HID0, r3
29         blr
30
31         .globl  kgdb_flush_cache_range
32 kgdb_flush_cache_range:
33         li      r5,CONFIG_SYS_CACHELINE_SIZE-1
34         andc    r3,r3,r5
35         subf    r4,r3,r4
36         add     r4,r4,r5
37         srwi.   r4,r4,CONFIG_SYS_CACHELINE_SHIFT
38         beqlr
39         mtctr   r4
40         mr      r6,r3
41 1:      dcbst   0,r3
42         addi    r3,r3,CONFIG_SYS_CACHELINE_SIZE
43         bdnz    1b
44         sync                            /* wait for dcbst's to get to ram */
45         mtctr   r4
46 2:      icbi    0,r6
47         addi    r6,r6,CONFIG_SYS_CACHELINE_SIZE
48         bdnz    2b
49         SYNC
50         blr
51
52 #endif