Changeset 5e77d129 in rtems for c/src/lib/libcpu/m68k


Ignore:
Timestamp:
Jun 14, 2000, 8:32:44 PM (20 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
b91b1cf
Parents:
9b05600
Message:

Patch from John Cotton <john.cotton@…> to correct cache
routine naming to follow RTEMS package/object.method rule.
This patch also eliminated calls to the obsolete routine
m68k_enable_caching.

Location:
c/src/lib/libcpu/m68k/shared/cache
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libcpu/m68k/shared/cache/cache.c

    r9b05600 r5e77d129  
    5353/* Only the mc68030 has a data cache; it is writethrough only. */
    5454
    55 void _CPU_flush_1_data_cache_line ( const void * d_addr ) {}
    56 void _CPU_flush_entire_data_cache ( const void * d_addr ) {}
     55void _CPU_cache_flush_1_data_line ( const void * d_addr ) {}
     56void _CPU_cache_flush_entire_data ( const void * d_addr ) {}
    5757
    58 void _CPU_invalidate_1_data_cache_line (
     58void _CPU_cache_invalidate_1_data_line (
    5959  const void * d_addr )
    6060{
     
    6464}
    6565
    66 void _CPU_invalidate_entire_data_cache ( void )
     66void _CPU_cache_invalidate_entire_data ( void )
    6767{
    6868  _CPU_CACR_OR( 0x00000800 );
    6969}
    7070
    71 void _CPU_freeze_data_cache ( void )
     71void _CPU_cache_freeze_data ( void )
    7272{
    7373  _CPU_CACR_OR( 0x00000200 );
    7474}
    7575
    76 void _CPU_unfreeze_data_cache ( void )
     76void _CPU_cache_unfreeze_data ( void )
    7777{
    7878  _CPU_CACR_AND( 0xFFFFFDFF );
    7979}
    8080
    81 void _CPU_enable_data_cache ( void )
     81void _CPU_cache_enable_data ( void )
    8282{
    8383  _CPU_CACR_OR( 0x00000100 );
    8484}
    85 void _CPU_disable_data_cache (  void )
     85void _CPU_cache_disable_data (  void )
    8686{
    8787  _CPU_CACR_AND( 0xFFFFFEFF );
     
    9292/* Both the 68020 and 68030 have instruction caches */
    9393
    94 void _CPU_invalidate_1_inst_cache_line (
     94void _CPU_cache_invalidate_1_instruction_line (
    9595  const void * d_addr )
    9696{
     
    100100}
    101101
    102 void _CPU_invalidate_entire_inst_cache ( void )
     102void _CPU_cache_invalidate_entire_instruction ( void )
    103103{
    104104  _CPU_CACR_OR( 0x00000008 );
    105105}
    106106
    107 void _CPU_freeze_inst_cache ( void )
     107void _CPU_cache_freeze_instruction ( void )
    108108{
    109109  _CPU_CACR_OR( 0x00000002);
    110110}
    111111
    112 void _CPU_unfreeze_inst_cache ( void )
     112void _CPU_cache_unfreeze_instruction ( void )
    113113{
    114114  _CPU_CACR_AND( 0xFFFFFFFD );
    115115}
    116116
    117 void _CPU_enable_inst_cache ( void )
     117void _CPU_cache_enable_instruction ( void )
    118118{
    119119  _CPU_CACR_OR( 0x00000001 );
    120120}
    121121
    122 void _CPU_disable_inst_cache (  void )
     122void _CPU_cache_disable_instruction (   void )
    123123{
    124124  _CPU_CACR_AND( 0xFFFFFFFE );
     
    129129
    130130/* Cannot be frozen */
    131 void _CPU_freeze_data_cache ( void ) {}
    132 void _CPU_unfreeze_data_cache ( void ) {}
    133 void _CPU_freeze_inst_cache ( void ) {}
    134 void _CPU_unfreeze_inst_cache ( void ) {}
     131void _CPU_cache_freeze_data ( void ) {}
     132void _CPU_cache_unfreeze_data ( void ) {}
     133void _CPU_cache_freeze_instruction ( void ) {}
     134void _CPU_cache_unfreeze_instruction ( void ) {}
    135135
    136 void _CPU_flush_1_data_cache_line (
     136void _CPU_cache_flush_1_data_line (
    137137  const void * d_addr )
    138138{
     
    141141}
    142142
    143 void _CPU_invalidate_1_data_cache_line (
     143void _CPU_cache_invalidate_1_data_line (
    144144  const void * d_addr )
    145145{
     
    148148}
    149149
    150 void _CPU_flush_entire_data_cache ( void )
     150void _CPU_cache_flush_entire_data ( void )
    151151{
    152152        asm volatile ( "cpusha %%dc" :: );
    153153}
    154154
    155 void _CPU_invalidate_entire_data_cache ( void )
     155void _CPU_cache_invalidate_entire_data ( void )
    156156{
    157157        asm volatile ( "cinva %%dc" :: );
    158158}
    159159
    160 void _CPU_enable_data_cache ( void )
     160void _CPU_cache_enable_data ( void )
    161161{
    162162  _CPU_CACR_OR( 0x80000000 );
    163163}
    164164
    165 void _CPU_disable_data_cache ( void )
     165void _CPU_cache_disable_data ( void )
    166166{
    167167  _CPU_CACR_AND( 0x7FFFFFFF );
    168168}
    169169
    170 void _CPU_invalidate_1_inst_cache_line (
     170void _CPU_cache_invalidate_1_instruction_line (
    171171  const void * i_addr )
    172172{
     
    175175}
    176176
    177 void _CPU_invalidate_entire_inst_cache ( void )
     177void _CPU_cache_invalidate_entire_instruction ( void )
    178178{
    179179                asm volatile ( "cinva %%ic" :: );
    180180}
    181181
    182 void _CPU_enable_inst_cache ( void )
     182void _CPU_cache_enable_instruction ( void )
    183183{
    184184  _CPU_CACR_OR( 0x00008000 );
    185185}
    186186
    187 void _CPU_disable_inst_cache ( void )
     187void _CPU_cache_disable_instruction ( void )
    188188{
    189189        _CPU_CACR_AND( 0xFFFF7FFF );
  • c/src/lib/libcpu/m68k/shared/cache/cache_.h

    r9b05600 r5e77d129  
    77
    88#if defined(__mc68020__)
    9 #define M68K_INST_CACHE_ALIGNMENT 16
     9#define M68K_INSTRUCTION_CACHE_ALIGNMENT 16
    1010#elif defined(__mc68030__)
    11 #define M68K_INST_CACHE_ALIGNMENT 16
     11#define M68K_INSTRUCTION_CACHE_ALIGNMENT 16
    1212#define M68K_DATA_CACHE_ALIGNMENT 16
    1313#elif ( defined(__mc68040__) || defined (__mc68060__) )
    14 #define M68K_INST_CACHE_ALIGNMENT 16
     14#define M68K_INSTRUCTION_CACHE_ALIGNMENT 16
    1515#define M68K_DATA_CACHE_ALIGNMENT 16
    1616#endif
    1717
    1818#if defined(M68K_DATA_CACHE_ALIGNMENT)
    19 #define _CPU_DATA_CACHE_ALIGNMENT M68K_DATA_CACHE_ALIGNMENT
     19#define CPU_DATA_CACHE_ALIGNMENT M68K_DATA_CACHE_ALIGNMENT
    2020#endif
    2121
    22 #if defined(M68K_INST_CACHE_ALIGNMENT)
    23 #define _CPU_INST_CACHE_ALIGNMENT M68K_INST_CACHE_ALIGNMENT
     22#if defined(M68K_INSTRUCTION_CACHE_ALIGNMENT)
     23#define CPU_INSTRUCTION_CACHE_ALIGNMENT M68K_INSTRUCTION_CACHE_ALIGNMENT
    2424#endif
    2525
Note: See TracChangeset for help on using the changeset viewer.