Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
cache.c File Reference
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/io.h>
#include <asm/cache.h>
#include <asm/soc.h>

Go to the source code of this file.

Macros

#define IMCR_CCFG   0x0000
 
#define IMCR_L1PCFG   0x0020
 
#define IMCR_L1PCC   0x0024
 
#define IMCR_L1DCFG   0x0040
 
#define IMCR_L1DCC   0x0044
 
#define IMCR_L2ALLOC0   0x2000
 
#define IMCR_L2ALLOC1   0x2004
 
#define IMCR_L2ALLOC2   0x2008
 
#define IMCR_L2ALLOC3   0x200c
 
#define IMCR_L2WBAR   0x4000
 
#define IMCR_L2WWC   0x4004
 
#define IMCR_L2WIBAR   0x4010
 
#define IMCR_L2WIWC   0x4014
 
#define IMCR_L2IBAR   0x4018
 
#define IMCR_L2IWC   0x401c
 
#define IMCR_L1PIBAR   0x4020
 
#define IMCR_L1PIWC   0x4024
 
#define IMCR_L1DWIBAR   0x4030
 
#define IMCR_L1DWIWC   0x4034
 
#define IMCR_L1DWBAR   0x4040
 
#define IMCR_L1DWWC   0x4044
 
#define IMCR_L1DIBAR   0x4048
 
#define IMCR_L1DIWC   0x404c
 
#define IMCR_L2WB   0x5000
 
#define IMCR_L2WBINV   0x5004
 
#define IMCR_L2INV   0x5008
 
#define IMCR_L1PINV   0x5028
 
#define IMCR_L1DWB   0x5040
 
#define IMCR_L1DWBINV   0x5044
 
#define IMCR_L1DINV   0x5048
 
#define IMCR_MAR_BASE   0x8000
 
#define IMCR_MAR96_111   0x8180
 
#define IMCR_MAR128_191   0x8200
 
#define IMCR_MAR224_239   0x8380
 
#define IMCR_L2MPFAR   0xa000
 
#define IMCR_L2MPFSR   0xa004
 
#define IMCR_L2MPFCR   0xa008
 
#define IMCR_L2MPLK0   0xa100
 
#define IMCR_L2MPLK1   0xa104
 
#define IMCR_L2MPLK2   0xa108
 
#define IMCR_L2MPLK3   0xa10c
 
#define IMCR_L2MPLKCMD   0xa110
 
#define IMCR_L2MPLKSTAT   0xa114
 
#define IMCR_L2MPPA_BASE   0xa200
 
#define IMCR_L1PMPFAR   0xa400
 
#define IMCR_L1PMPFSR   0xa404
 
#define IMCR_L1PMPFCR   0xa408
 
#define IMCR_L1PMPLK0   0xa500
 
#define IMCR_L1PMPLK1   0xa504
 
#define IMCR_L1PMPLK2   0xa508
 
#define IMCR_L1PMPLK3   0xa50c
 
#define IMCR_L1PMPLKCMD   0xa510
 
#define IMCR_L1PMPLKSTAT   0xa514
 
#define IMCR_L1PMPPA_BASE   0xa600
 
#define IMCR_L1DMPFAR   0xac00
 
#define IMCR_L1DMPFSR   0xac04
 
#define IMCR_L1DMPFCR   0xac08
 
#define IMCR_L1DMPLK0   0xad00
 
#define IMCR_L1DMPLK1   0xad04
 
#define IMCR_L1DMPLK2   0xad08
 
#define IMCR_L1DMPLK3   0xad0c
 
#define IMCR_L1DMPLKCMD   0xad10
 
#define IMCR_L1DMPLKSTAT   0xad14
 
#define IMCR_L1DMPPA_BASE   0xae00
 
#define IMCR_L2PDWAKE0   0xc040
 
#define IMCR_L2PDWAKE1   0xc044
 
#define IMCR_L2PDSLEEP0   0xc050
 
#define IMCR_L2PDSLEEP1   0xc054
 
#define IMCR_L2PDSTAT0   0xc060
 
#define IMCR_L2PDSTAT1   0xc064
 
#define L2MODE_0K_CACHE   0x0
 
#define L2MODE_32K_CACHE   0x1
 
#define L2MODE_64K_CACHE   0x2
 
#define L2MODE_128K_CACHE   0x3
 
#define L2MODE_256K_CACHE   0x7
 
#define L2PRIO_URGENT   0x0
 
#define L2PRIO_HIGH   0x1
 
#define L2PRIO_MEDIUM   0x2
 
#define L2PRIO_LOW   0x3
 
#define CCFG_ID   0x100 /* Invalidate L1P bit */
 
#define CCFG_IP   0x200 /* Invalidate L1D bit */
 
#define imcr_get(reg)   soc_readl(cache_base + (reg))
 
#define imcr_set(reg, value)
 

Functions

void L1_cache_off (void)
 
void L1_cache_on (void)
 
void L1P_cache_global_invalidate (void)
 
void L1D_cache_global_invalidate (void)
 
void L1D_cache_global_writeback (void)
 
void L1D_cache_global_writeback_invalidate (void)
 
void L2_cache_set_mode (unsigned int mode)
 
void L2_cache_global_writeback_invalidate (void)
 
void L2_cache_global_writeback (void)
 
void enable_caching (unsigned long start, unsigned long end)
 
void disable_caching (unsigned long start, unsigned long end)
 
void L1P_cache_block_invalidate (unsigned int start, unsigned int end)
 
void L1D_cache_block_invalidate (unsigned int start, unsigned int end)
 
void L1D_cache_block_writeback_invalidate (unsigned int start, unsigned int end)
 
void L1D_cache_block_writeback (unsigned int start, unsigned int end)
 
void L2_cache_block_invalidate (unsigned int start, unsigned int end)
 
void L2_cache_block_writeback (unsigned int start, unsigned int end)
 
void L2_cache_block_writeback_invalidate (unsigned int start, unsigned int end)
 
void L2_cache_block_invalidate_nowait (unsigned int start, unsigned int end)
 
void L2_cache_block_writeback_nowait (unsigned int start, unsigned int end)
 
void L2_cache_block_writeback_invalidate_nowait (unsigned int start, unsigned int end)
 
void __init c6x_cache_init (void)
 

Macro Definition Documentation

#define CCFG_ID   0x100 /* Invalidate L1P bit */

Definition at line 104 of file cache.c.

#define CCFG_IP   0x200 /* Invalidate L1D bit */

Definition at line 105 of file cache.c.

#define IMCR_CCFG   0x0000

Definition at line 19 of file cache.c.

#define imcr_get (   reg)    soc_readl(cache_base + (reg))

Definition at line 112 of file cache.c.

#define IMCR_L1DCC   0x0044

Definition at line 23 of file cache.c.

#define IMCR_L1DCFG   0x0040

Definition at line 22 of file cache.c.

#define IMCR_L1DIBAR   0x4048

Definition at line 40 of file cache.c.

#define IMCR_L1DINV   0x5048

Definition at line 48 of file cache.c.

#define IMCR_L1DIWC   0x404c

Definition at line 41 of file cache.c.

#define IMCR_L1DMPFAR   0xac00

Definition at line 73 of file cache.c.

#define IMCR_L1DMPFCR   0xac08

Definition at line 75 of file cache.c.

#define IMCR_L1DMPFSR   0xac04

Definition at line 74 of file cache.c.

#define IMCR_L1DMPLK0   0xad00

Definition at line 76 of file cache.c.

#define IMCR_L1DMPLK1   0xad04

Definition at line 77 of file cache.c.

#define IMCR_L1DMPLK2   0xad08

Definition at line 78 of file cache.c.

#define IMCR_L1DMPLK3   0xad0c

Definition at line 79 of file cache.c.

#define IMCR_L1DMPLKCMD   0xad10

Definition at line 80 of file cache.c.

#define IMCR_L1DMPLKSTAT   0xad14

Definition at line 81 of file cache.c.

#define IMCR_L1DMPPA_BASE   0xae00

Definition at line 82 of file cache.c.

#define IMCR_L1DWB   0x5040

Definition at line 46 of file cache.c.

#define IMCR_L1DWBAR   0x4040

Definition at line 38 of file cache.c.

#define IMCR_L1DWBINV   0x5044

Definition at line 47 of file cache.c.

#define IMCR_L1DWIBAR   0x4030

Definition at line 36 of file cache.c.

#define IMCR_L1DWIWC   0x4034

Definition at line 37 of file cache.c.

#define IMCR_L1DWWC   0x4044

Definition at line 39 of file cache.c.

#define IMCR_L1PCC   0x0024

Definition at line 21 of file cache.c.

#define IMCR_L1PCFG   0x0020

Definition at line 20 of file cache.c.

#define IMCR_L1PIBAR   0x4020

Definition at line 34 of file cache.c.

#define IMCR_L1PINV   0x5028

Definition at line 45 of file cache.c.

#define IMCR_L1PIWC   0x4024

Definition at line 35 of file cache.c.

#define IMCR_L1PMPFAR   0xa400

Definition at line 63 of file cache.c.

#define IMCR_L1PMPFCR   0xa408

Definition at line 65 of file cache.c.

#define IMCR_L1PMPFSR   0xa404

Definition at line 64 of file cache.c.

#define IMCR_L1PMPLK0   0xa500

Definition at line 66 of file cache.c.

#define IMCR_L1PMPLK1   0xa504

Definition at line 67 of file cache.c.

#define IMCR_L1PMPLK2   0xa508

Definition at line 68 of file cache.c.

#define IMCR_L1PMPLK3   0xa50c

Definition at line 69 of file cache.c.

#define IMCR_L1PMPLKCMD   0xa510

Definition at line 70 of file cache.c.

#define IMCR_L1PMPLKSTAT   0xa514

Definition at line 71 of file cache.c.

#define IMCR_L1PMPPA_BASE   0xa600

Definition at line 72 of file cache.c.

#define IMCR_L2ALLOC0   0x2000

Definition at line 24 of file cache.c.

#define IMCR_L2ALLOC1   0x2004

Definition at line 25 of file cache.c.

#define IMCR_L2ALLOC2   0x2008

Definition at line 26 of file cache.c.

#define IMCR_L2ALLOC3   0x200c

Definition at line 27 of file cache.c.

#define IMCR_L2IBAR   0x4018

Definition at line 32 of file cache.c.

#define IMCR_L2INV   0x5008

Definition at line 44 of file cache.c.

#define IMCR_L2IWC   0x401c

Definition at line 33 of file cache.c.

#define IMCR_L2MPFAR   0xa000

Definition at line 53 of file cache.c.

#define IMCR_L2MPFCR   0xa008

Definition at line 55 of file cache.c.

#define IMCR_L2MPFSR   0xa004

Definition at line 54 of file cache.c.

#define IMCR_L2MPLK0   0xa100

Definition at line 56 of file cache.c.

#define IMCR_L2MPLK1   0xa104

Definition at line 57 of file cache.c.

#define IMCR_L2MPLK2   0xa108

Definition at line 58 of file cache.c.

#define IMCR_L2MPLK3   0xa10c

Definition at line 59 of file cache.c.

#define IMCR_L2MPLKCMD   0xa110

Definition at line 60 of file cache.c.

#define IMCR_L2MPLKSTAT   0xa114

Definition at line 61 of file cache.c.

#define IMCR_L2MPPA_BASE   0xa200

Definition at line 62 of file cache.c.

#define IMCR_L2PDSLEEP0   0xc050

Definition at line 85 of file cache.c.

#define IMCR_L2PDSLEEP1   0xc054

Definition at line 86 of file cache.c.

#define IMCR_L2PDSTAT0   0xc060

Definition at line 87 of file cache.c.

#define IMCR_L2PDSTAT1   0xc064

Definition at line 88 of file cache.c.

#define IMCR_L2PDWAKE0   0xc040

Definition at line 83 of file cache.c.

#define IMCR_L2PDWAKE1   0xc044

Definition at line 84 of file cache.c.

#define IMCR_L2WB   0x5000

Definition at line 42 of file cache.c.

#define IMCR_L2WBAR   0x4000

Definition at line 28 of file cache.c.

#define IMCR_L2WBINV   0x5004

Definition at line 43 of file cache.c.

#define IMCR_L2WIBAR   0x4010

Definition at line 30 of file cache.c.

#define IMCR_L2WIWC   0x4014

Definition at line 31 of file cache.c.

#define IMCR_L2WWC   0x4004

Definition at line 29 of file cache.c.

#define IMCR_MAR128_191   0x8200

Definition at line 51 of file cache.c.

#define IMCR_MAR224_239   0x8380

Definition at line 52 of file cache.c.

#define IMCR_MAR96_111   0x8180

Definition at line 50 of file cache.c.

#define IMCR_MAR_BASE   0x8000

Definition at line 49 of file cache.c.

#define imcr_set (   reg,
  value 
)
Value:
do { \
soc_writel((value), cache_base + (reg)); \
soc_readl(cache_base + (reg)); \
} while (0)

Definition at line 113 of file cache.c.

#define L2MODE_0K_CACHE   0x0

Definition at line 93 of file cache.c.

#define L2MODE_128K_CACHE   0x3

Definition at line 96 of file cache.c.

#define L2MODE_256K_CACHE   0x7

Definition at line 97 of file cache.c.

#define L2MODE_32K_CACHE   0x1

Definition at line 94 of file cache.c.

#define L2MODE_64K_CACHE   0x2

Definition at line 95 of file cache.c.

#define L2PRIO_HIGH   0x1

Definition at line 100 of file cache.c.

#define L2PRIO_LOW   0x3

Definition at line 102 of file cache.c.

#define L2PRIO_MEDIUM   0x2

Definition at line 101 of file cache.c.

#define L2PRIO_URGENT   0x0

Definition at line 99 of file cache.c.

Function Documentation

void __init c6x_cache_init ( void  )

Definition at line 425 of file cache.c.

void disable_caching ( unsigned long  start,
unsigned long  end 
)

Definition at line 334 of file cache.c.

void enable_caching ( unsigned long  start,
unsigned long  end 
)

Definition at line 325 of file cache.c.

void L1_cache_off ( void  )

Definition at line 217 of file cache.c.

void L1_cache_on ( void  )

Definition at line 231 of file cache.c.

void L1D_cache_block_invalidate ( unsigned int  start,
unsigned int  end 
)

Definition at line 354 of file cache.c.

void L1D_cache_block_writeback ( unsigned int  start,
unsigned int  end 
)

Definition at line 368 of file cache.c.

void L1D_cache_block_writeback_invalidate ( unsigned int  start,
unsigned int  end 
)

Definition at line 361 of file cache.c.

void L1D_cache_global_invalidate ( void  )

Definition at line 260 of file cache.c.

void L1D_cache_global_writeback ( void  )

Definition at line 268 of file cache.c.

void L1D_cache_global_writeback_invalidate ( void  )

Definition at line 276 of file cache.c.

void L1P_cache_block_invalidate ( unsigned int  start,
unsigned int  end 
)

Definition at line 347 of file cache.c.

void L1P_cache_global_invalidate ( void  )

Definition at line 245 of file cache.c.

void L2_cache_block_invalidate ( unsigned int  start,
unsigned int  end 
)

Definition at line 378 of file cache.c.

void L2_cache_block_invalidate_nowait ( unsigned int  start,
unsigned int  end 
)

Definition at line 399 of file cache.c.

void L2_cache_block_writeback ( unsigned int  start,
unsigned int  end 
)

Definition at line 385 of file cache.c.

void L2_cache_block_writeback_invalidate ( unsigned int  start,
unsigned int  end 
)

Definition at line 392 of file cache.c.

void L2_cache_block_writeback_invalidate_nowait ( unsigned int  start,
unsigned int  end 
)

Definition at line 413 of file cache.c.

void L2_cache_block_writeback_nowait ( unsigned int  start,
unsigned int  end 
)

Definition at line 406 of file cache.c.

void L2_cache_global_writeback ( void  )

Definition at line 315 of file cache.c.

void L2_cache_global_writeback_invalidate ( void  )

Definition at line 305 of file cache.c.

void L2_cache_set_mode ( unsigned int  mode)

Definition at line 291 of file cache.c.