1 /* cache.S: cache managment routines
3 * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
12 #include <asm/spr-regs.h>
13 #include <asm/cache.h>
18 ###############################################################################
20 # Write back a range of dcache
21 # - void frv_dcache_writeback(unsigned long start [GR8], unsigned long size [GR9])
23 ###############################################################################
24 .globl frv_dcache_writeback
25 .type frv_dcache_writeback,@function
27 andi gr8,~(L1_CACHE_BYTES-1),gr8
30 addi gr8,#L1_CACHE_BYTES,gr8
36 .size frv_dcache_writeback, .-frv_dcache_writeback
38 ##############################################################################
40 # Invalidate a range of dcache and icache
41 # - void frv_cache_invalidate(unsigned long start [GR8], unsigned long end [GR9]);
43 ###############################################################################
44 .globl frv_cache_invalidate
45 .type frv_cache_invalidate,@function
47 andi gr8,~(L1_CACHE_BYTES-1),gr8
51 addi gr8,#L1_CACHE_BYTES,gr8
57 .size frv_cache_invalidate, .-frv_cache_invalidate
59 ##############################################################################
61 # Invalidate a range of icache
62 # - void frv_icache_invalidate(unsigned long start [GR8], unsigned long end [GR9]);
64 ###############################################################################
65 .globl frv_icache_invalidate
66 .type frv_icache_invalidate,@function
67 frv_icache_invalidate:
68 andi gr8,~(L1_CACHE_BYTES-1),gr8
71 addi gr8,#L1_CACHE_BYTES,gr8
77 .size frv_icache_invalidate, .-frv_icache_invalidate
79 ###############################################################################
81 # Write back and invalidate a range of dcache and icache
82 # - void frv_cache_wback_inv(unsigned long start [GR8], unsigned long end [GR9])
84 ###############################################################################
85 .globl frv_cache_wback_inv
86 .type frv_cache_wback_inv,@function
88 andi gr8,~(L1_CACHE_BYTES-1),gr8
92 addi gr8,#L1_CACHE_BYTES,gr8
98 .size frv_cache_wback_inv, .-frv_cache_wback_inv