Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
leon.h File Reference
#include <linux/irq.h>
#include <linux/interrupt.h>

Go to the source code of this file.

Data Structures

struct  leon3_cacheregs
 

Macros

#define LEON_CNR_CTRL   0x000
 
#define LEON_CNR_CTXP   0x100
 
#define LEON_CNR_CTX   0x200
 
#define LEON_CNR_F   0x300
 
#define LEON_CNR_FADDR   0x400
 
#define LEON_CNR_CTX_NCTX   256 /*number of MMU ctx */
 
#define LEON_CNR_CTRL_TLBDIS   0x80000000
 
#define LEON_MMUTLB_ENT_MAX   64
 
#define LEON_DIAGF_LVL   0x3
 
#define LEON_DIAGF_WR   0x8
 
#define LEON_DIAGF_WR_SHIFT   3
 
#define LEON_DIAGF_HIT   0x10
 
#define LEON_DIAGF_HIT_SHIFT   4
 
#define LEON_DIAGF_CTX   0x1fe0
 
#define LEON_DIAGF_CTX_SHIFT   5
 
#define LEON_DIAGF_VALID   0x2000
 
#define LEON_DIAGF_VALID_SHIFT   13
 
#define LEON_HARD_INT(x)   (1 << (x)) /* irq 0-15 */
 
#define LEON_IRQMASK_R   0x0000fffe /* bit 15- 1 of lregs.irqmask */
 
#define LEON_IRQPRIO_R   0xfffe0000 /* bit 31-17 of lregs.irqmask */
 
#define LEON_MCFG2_SRAMDIS   0x00002000
 
#define LEON_MCFG2_SDRAMEN   0x00004000
 
#define LEON_MCFG2_SRAMBANKSZ   0x00001e00 /* [12-9] */
 
#define LEON_MCFG2_SRAMBANKSZ_SHIFT   9
 
#define LEON_MCFG2_SDRAMBANKSZ   0x03800000 /* [25-23] */
 
#define LEON_MCFG2_SDRAMBANKSZ_SHIFT   23
 
#define LEON_TCNT0_MASK   0x7fffff
 
#define ASI_LEON3_SYSCTRL   0x02
 
#define ASI_LEON3_SYSCTRL_ICFG   0x08
 
#define ASI_LEON3_SYSCTRL_DCFG   0x0c
 
#define ASI_LEON3_SYSCTRL_CFG_SNOOPING   (1 << 27)
 
#define ASI_LEON3_SYSCTRL_CFG_SSIZE(c)   (1 << ((c >> 20) & 0xf))
 
#define LEON3_BYPASS_LOAD_PA(x)   (leon_load_reg((unsigned long)(x)))
 
#define LEON3_BYPASS_STORE_PA(x, v)   (leon_store_reg((unsigned long)(x), (unsigned long)(v)))
 
#define LEON_BYPASS_LOAD_PA(x)   leon_load_reg((unsigned long)(x))
 
#define LEON_BYPASS_STORE_PA(x, v)   leon_store_reg((unsigned long)(x), (unsigned long)(v))
 
#define LEON_PAGE_SIZE_LEON   0
 
#define LEON_PGD_SH   24
 
#define LEON_PGD_M   0xff
 
#define LEON_PMD_SH   18
 
#define LEON_PMD_SH_V   (LEON_PGD_SH-2)
 
#define LEON_PMD_M   0x3f
 
#define LEON_PTE_SH   12
 
#define LEON_PTE_M   0x3f
 
#define LEON3_XCCR_SETS_MASK   0x07000000UL
 
#define LEON3_XCCR_SSIZE_MASK   0x00f00000UL
 
#define LEON2_CCR_DSETS_MASK   0x03000000UL
 
#define LEON2_CFG_SSIZE_MASK   0x00007000UL
 
#define PFN(x)   ((x) >> PAGE_SHIFT)
 
#define _pfn_valid(pfn)   ((pfn < last_valid_pfn) && (pfn >= PFN(phys_base)))
 
#define _SRMMU_PTE_PMASK_LEON   0xffffffff
 

Functions

void leon_switch_mm (void)
 
void leon_init_IRQ (void)
 
unsigned long leon_swprobe (unsigned long vaddr, unsigned long *paddr)
 
void leon_flush_icache_all (void)
 
void leon_flush_dcache_all (void)
 
void leon_flush_cache_all (void)
 
void leon_flush_tlb_all (void)
 
int leon_flush_needed (void)
 
void leon_flush_pcache_all (struct vm_area_struct *vma, unsigned long page)
 
unsigned int leon_build_device_irq (unsigned int real_irq, irq_flow_handler_t flow_handler, const char *name, int do_ack)
 
void leon_update_virq_handling (unsigned int virq, irq_flow_handler_t flow_handler, const char *name, int do_ack)
 
void leon_init_timers (void)
 
void leon_trans_init (struct device_node *dp)
 
void leon_node_init (struct device_node *dp, struct device_node ***nextp)
 
void init_leon (void)
 
void poke_leonsparc (void)
 
void leon3_getCacheRegs (struct leon3_cacheregs *regs)
 

Variables

int leon_flush_during_switch
 
int leon3_ticker_irq
 

Macro Definition Documentation

#define _pfn_valid (   pfn)    ((pfn < last_valid_pfn) && (pfn >= PFN(phys_base)))

Definition at line 254 of file leon.h.

#define _SRMMU_PTE_PMASK_LEON   0xffffffff

Definition at line 255 of file leon.h.

#define ASI_LEON3_SYSCTRL   0x02

Definition at line 55 of file leon.h.

#define ASI_LEON3_SYSCTRL_CFG_SNOOPING   (1 << 27)

Definition at line 58 of file leon.h.

#define ASI_LEON3_SYSCTRL_CFG_SSIZE (   c)    (1 << ((c >> 20) & 0xf))

Definition at line 59 of file leon.h.

#define ASI_LEON3_SYSCTRL_DCFG   0x0c

Definition at line 57 of file leon.h.

#define ASI_LEON3_SYSCTRL_ICFG   0x08

Definition at line 56 of file leon.h.

#define LEON2_CCR_DSETS_MASK   0x03000000UL

Definition at line 193 of file leon.h.

#define LEON2_CFG_SSIZE_MASK   0x00007000UL

Definition at line 194 of file leon.h.

#define LEON3_BYPASS_LOAD_PA (   x)    (leon_load_reg((unsigned long)(x)))

Definition at line 80 of file leon.h.

#define LEON3_BYPASS_STORE_PA (   x,
  v 
)    (leon_store_reg((unsigned long)(x), (unsigned long)(v)))

Definition at line 81 of file leon.h.

#define LEON3_XCCR_SETS_MASK   0x07000000UL

Definition at line 190 of file leon.h.

#define LEON3_XCCR_SSIZE_MASK   0x00f00000UL

Definition at line 191 of file leon.h.

#define LEON_BYPASS_LOAD_PA (   x)    leon_load_reg((unsigned long)(x))

Definition at line 82 of file leon.h.

#define LEON_BYPASS_STORE_PA (   x,
  v 
)    leon_store_reg((unsigned long)(x), (unsigned long)(v))

Definition at line 83 of file leon.h.

#define LEON_CNR_CTRL   0x000

Definition at line 12 of file leon.h.

#define LEON_CNR_CTRL_TLBDIS   0x80000000

Definition at line 20 of file leon.h.

#define LEON_CNR_CTX   0x200

Definition at line 14 of file leon.h.

#define LEON_CNR_CTX_NCTX   256 /*number of MMU ctx */

Definition at line 18 of file leon.h.

#define LEON_CNR_CTXP   0x100

Definition at line 13 of file leon.h.

#define LEON_CNR_F   0x300

Definition at line 15 of file leon.h.

#define LEON_CNR_FADDR   0x400

Definition at line 16 of file leon.h.

#define LEON_DIAGF_CTX   0x1fe0

Definition at line 35 of file leon.h.

#define LEON_DIAGF_CTX_SHIFT   5

Definition at line 36 of file leon.h.

#define LEON_DIAGF_HIT   0x10

Definition at line 33 of file leon.h.

#define LEON_DIAGF_HIT_SHIFT   4

Definition at line 34 of file leon.h.

#define LEON_DIAGF_LVL   0x3

Definition at line 30 of file leon.h.

#define LEON_DIAGF_VALID   0x2000

Definition at line 37 of file leon.h.

#define LEON_DIAGF_VALID_SHIFT   13

Definition at line 38 of file leon.h.

#define LEON_DIAGF_WR   0x8

Definition at line 31 of file leon.h.

#define LEON_DIAGF_WR_SHIFT   3

Definition at line 32 of file leon.h.

#define LEON_HARD_INT (   x)    (1 << (x)) /* irq 0-15 */

Definition at line 41 of file leon.h.

#define LEON_IRQMASK_R   0x0000fffe /* bit 15- 1 of lregs.irqmask */

Definition at line 42 of file leon.h.

#define LEON_IRQPRIO_R   0xfffe0000 /* bit 31-17 of lregs.irqmask */

Definition at line 43 of file leon.h.

#define LEON_MCFG2_SDRAMBANKSZ   0x03800000 /* [25-23] */

Definition at line 49 of file leon.h.

#define LEON_MCFG2_SDRAMBANKSZ_SHIFT   23

Definition at line 50 of file leon.h.

#define LEON_MCFG2_SDRAMEN   0x00004000

Definition at line 46 of file leon.h.

#define LEON_MCFG2_SRAMBANKSZ   0x00001e00 /* [12-9] */

Definition at line 47 of file leon.h.

#define LEON_MCFG2_SRAMBANKSZ_SHIFT   9

Definition at line 48 of file leon.h.

#define LEON_MCFG2_SRAMDIS   0x00002000

Definition at line 45 of file leon.h.

#define LEON_MMUTLB_ENT_MAX   64

Definition at line 22 of file leon.h.

#define LEON_PAGE_SIZE_LEON   0

ASSEMBLY

Definition at line 147 of file leon.h.

#define LEON_PGD_M   0xff

Definition at line 153 of file leon.h.

#define LEON_PGD_SH   24

Definition at line 152 of file leon.h.

#define LEON_PMD_M   0x3f

Definition at line 156 of file leon.h.

#define LEON_PMD_SH   18

Definition at line 154 of file leon.h.

#define LEON_PMD_SH_V   (LEON_PGD_SH-2)

Definition at line 155 of file leon.h.

#define LEON_PTE_M   0x3f

Definition at line 158 of file leon.h.

#define LEON_PTE_SH   12

Definition at line 157 of file leon.h.

#define LEON_TCNT0_MASK   0x7fffff

Definition at line 52 of file leon.h.

#define PFN (   x)    ((x) >> PAGE_SHIFT)

Definition at line 253 of file leon.h.

Function Documentation

void init_leon ( void  )

Definition at line 344 of file leon_mm.c.

void leon3_getCacheRegs ( struct leon3_cacheregs regs)

Definition at line 215 of file leon_mm.c.

unsigned int leon_build_device_irq ( unsigned int  real_irq,
irq_flow_handler_t  flow_handler,
const char name,
int  do_ack 
)

Definition at line 210 of file leon_kernel.c.

void leon_flush_cache_all ( void  )

Definition at line 200 of file leon_mm.c.

void leon_flush_dcache_all ( void  )

Definition at line 187 of file leon_mm.c.

void leon_flush_icache_all ( void  )

Definition at line 182 of file leon_mm.c.

int leon_flush_needed ( void  )

Definition at line 243 of file leon_mm.c.

void leon_flush_pcache_all ( struct vm_area_struct vma,
unsigned long  page 
)

Definition at line 193 of file leon_mm.c.

void leon_flush_tlb_all ( void  )

Definition at line 207 of file leon_mm.c.

void leon_init_IRQ ( void  )

Definition at line 508 of file leon_kernel.c.

void leon_init_timers ( void  )

Definition at line 289 of file leon_kernel.c.

void leon_node_init ( struct device_node dp,
struct device_node ***  nextp 
)
void leon_switch_mm ( void  )

Definition at line 269 of file leon_mm.c.

unsigned long leon_swprobe ( unsigned long  vaddr,
unsigned long paddr 
)

Definition at line 35 of file leon_mm.c.

void leon_trans_init ( struct device_node dp)

Definition at line 477 of file leon_kernel.c.

void leon_update_virq_handling ( unsigned int  virq,
irq_flow_handler_t  flow_handler,
const char name,
int  do_ack 
)

Definition at line 243 of file leon_kernel.c.

void poke_leonsparc ( void  )

Definition at line 326 of file leon_mm.c.

Variable Documentation

int leon3_ticker_irq

Definition at line 41 of file leon_kernel.c.

int leon_flush_during_switch

Definition at line 20 of file leon_mm.c.