2 * arch/shmedia/boot/compressed/cache.c -- simple cache management functions
4 * Code extracted from sh-ipl+g, sh-stub.c, which has the copyright:
6 * This is originally based on an m68k software stub written by Glenn
7 * Engel at HP, but has changed quite a bit.
9 * Modifications for the SH by Ben Lee and Steve Chamberlain
11 ****************************************************************************
13 THIS SOFTWARE IS NOT COPYRIGHTED
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.
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.
23 ****************************************************************************/
25 #define CACHE_ENABLE 0
26 #define CACHE_DISABLE 1
28 int cache_control(unsigned int command
)
30 volatile unsigned int *p
= (volatile unsigned int *) 0x80000000;
33 for (i
= 0; i
< (32 * 1024); i
+= 32) {
35 p
+= (32 / sizeof (int));