diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/sh64/boot/compressed/cache.c |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'arch/sh64/boot/compressed/cache.c')
-rw-r--r-- | arch/sh64/boot/compressed/cache.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/arch/sh64/boot/compressed/cache.c b/arch/sh64/boot/compressed/cache.c new file mode 100644 index 000000000000..708707355ffa --- /dev/null +++ b/arch/sh64/boot/compressed/cache.c | |||
@@ -0,0 +1,39 @@ | |||
1 | /* | ||
2 | * arch/shmedia/boot/compressed/cache.c -- simple cache management functions | ||
3 | * | ||
4 | * Code extracted from sh-ipl+g, sh-stub.c, which has the copyright: | ||
5 | * | ||
6 | * This is originally based on an m68k software stub written by Glenn | ||
7 | * Engel at HP, but has changed quite a bit. | ||
8 | * | ||
9 | * Modifications for the SH by Ben Lee and Steve Chamberlain | ||
10 | * | ||
11 | **************************************************************************** | ||
12 | |||
13 | THIS SOFTWARE IS NOT COPYRIGHTED | ||
14 | |||
15 | HP offers the following for use in the public domain. HP makes no | ||
16 | warranty with regard to the software or it's performance and the | ||
17 | user accepts the software "AS IS" with all faults. | ||
18 | |||
19 | HP DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED, WITH REGARD | ||
20 | TO THIS SOFTWARE INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
21 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
22 | |||
23 | ****************************************************************************/ | ||
24 | |||
25 | #define CACHE_ENABLE 0 | ||
26 | #define CACHE_DISABLE 1 | ||
27 | |||
28 | int cache_control(unsigned int command) | ||
29 | { | ||
30 | volatile unsigned int *p = (volatile unsigned int *) 0x80000000; | ||
31 | int i; | ||
32 | |||
33 | for (i = 0; i < (32 * 1024); i += 32) { | ||
34 | (void *) *p; | ||
35 | p += (32 / sizeof (int)); | ||
36 | } | ||
37 | |||
38 | return 0; | ||
39 | } | ||