Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Variables
core_wildfire.h File Reference
#include <linux/types.h>
#include <asm/compiler.h>

Go to the source code of this file.

Data Structures

struct  wildfire_64
 
struct  wildfire_256
 
struct  wildfire_2k
 
struct  wildfire_qsd
 
struct  wildfire_fast_qsd
 
struct  wildfire_qsa
 
struct  wildfire_iop
 
struct  wildfire_gp
 
struct  wildfire_pca
 
struct  wildfire_ne
 
struct  wildfire_fe
 
struct  wildfire_pci
 

Macros

#define WILDFIRE_MAX_QBB   8 /* more than 8 requires other mods */
 
#define WILDFIRE_PCA_PER_QBB   4
 
#define WILDFIRE_IRQ_PER_PCA   64
 
#define WILDFIRE_NR_IRQS   (WILDFIRE_MAX_QBB * WILDFIRE_PCA_PER_QBB * WILDFIRE_IRQ_PER_PCA)
 
#define QBB_MAP_EMPTY   0xff
 
#define WILDFIRE_QBB_EXISTS(qbbno)   (wildfire_soft_qbb_mask & (1 << (qbbno)))
 
#define WILDFIRE_MEM_EXISTS(qbbno)   (wildfire_mem_mask & (0xf << ((qbbno) << 2)))
 
#define WILDFIRE_PCA_EXISTS(qbbno, pcano)   (wildfire_pca_mask & (1 << (((qbbno) << 2) + (pcano))))
 
#define WILDFIRE_ENTITY_SHIFT   18
 
#define WILDFIRE_GP_ENTITY   (0x10UL << WILDFIRE_ENTITY_SHIFT)
 
#define WILDFIRE_IOP_ENTITY   (0x08UL << WILDFIRE_ENTITY_SHIFT)
 
#define WILDFIRE_QSA_ENTITY   (0x04UL << WILDFIRE_ENTITY_SHIFT)
 
#define WILDFIRE_QSD_ENTITY_SLOW   (0x05UL << WILDFIRE_ENTITY_SHIFT)
 
#define WILDFIRE_QSD_ENTITY_FAST   (0x01UL << WILDFIRE_ENTITY_SHIFT)
 
#define WILDFIRE_PCA_ENTITY(pca)   ((0xc|(pca))<<WILDFIRE_ENTITY_SHIFT)
 
#define WILDFIRE_BASE   (IDENT_ADDR | (1UL << 40))
 
#define WILDFIRE_QBB_MASK   0x0fUL /* for now, only 4 bits/16 QBBs */
 
#define WILDFIRE_QBB(q)   ((~((long)(q)) & WILDFIRE_QBB_MASK) << 36)
 
#define WILDFIRE_HOSE(h)   ((long)(h) << 33)
 
#define WILDFIRE_QBB_IO(q)   (WILDFIRE_BASE | WILDFIRE_QBB(q))
 
#define WILDFIRE_QBB_HOSE(q, h)   (WILDFIRE_QBB_IO(q) | WILDFIRE_HOSE(h))
 
#define WILDFIRE_MEM(q, h)   (WILDFIRE_QBB_HOSE(q,h) | 0x000000000UL)
 
#define WILDFIRE_CONF(q, h)   (WILDFIRE_QBB_HOSE(q,h) | 0x1FE000000UL)
 
#define WILDFIRE_IO(q, h)   (WILDFIRE_QBB_HOSE(q,h) | 0x1FF000000UL)
 
#define WILDFIRE_qsd(q)   ((wildfire_qsd *)(WILDFIRE_QBB_IO(q)|WILDFIRE_QSD_ENTITY_SLOW|(((1UL<<13)-1)<<23)))
 
#define WILDFIRE_fast_qsd()   ((wildfire_fast_qsd *)(WILDFIRE_QBB_IO(0)|WILDFIRE_QSD_ENTITY_FAST|(((1UL<<13)-1)<<23)))
 
#define WILDFIRE_qsa(q)   ((wildfire_qsa *)(WILDFIRE_QBB_IO(q)|WILDFIRE_QSA_ENTITY|(((1UL<<13)-1)<<23)))
 
#define WILDFIRE_iop(q)   ((wildfire_iop *)(WILDFIRE_QBB_IO(q)|WILDFIRE_IOP_ENTITY|(((1UL<<13)-1)<<23)))
 
#define WILDFIRE_gp(q)   ((wildfire_gp *)(WILDFIRE_QBB_IO(q)|WILDFIRE_GP_ENTITY|(((1UL<<13)-1)<<23)))
 
#define WILDFIRE_pca(q, pca)   ((wildfire_pca *)(WILDFIRE_QBB_IO(q)|WILDFIRE_PCA_ENTITY(pca)|(((1UL<<13)-1)<<23)))
 
#define WILDFIRE_ne(q, pca)   ((wildfire_ne *)(WILDFIRE_QBB_IO(q)|WILDFIRE_PCA_ENTITY(pca)|(((1UL<<13)-1)<<23)|(1UL<<16)))
 
#define WILDFIRE_fe(q, pca)   ((wildfire_fe *)(WILDFIRE_QBB_IO(q)|WILDFIRE_PCA_ENTITY(pca)|(((1UL<<13)-1)<<23)|(3UL<<15)))
 
#define WILDFIRE_pci(q, h)   ((wildfire_pci *)(WILDFIRE_QBB_IO(q)|WILDFIRE_PCA_ENTITY(((h)&6)>>1)|((((h)&1)|2)<<16)|(((1UL<<13)-1)<<23)))
 
#define WILDFIRE_IO_BIAS   WILDFIRE_IO(0,0)
 
#define WILDFIRE_MEM_BIAS   WILDFIRE_MEM(0,0) /* ??? */
 
#define WILDFIRE_IO_SPACE   (8UL*1024*1024)
 

Variables

unsigned char wildfire_hard_qbb_map [WILDFIRE_MAX_QBB]
 
unsigned char wildfire_soft_qbb_map [WILDFIRE_MAX_QBB]
 
unsigned long wildfire_hard_qbb_mask
 
unsigned long wildfire_soft_qbb_mask
 
unsigned long wildfire_gp_mask
 
unsigned long wildfire_hs_mask
 
unsigned long wildfire_iop_mask
 
unsigned long wildfire_ior_mask
 
unsigned long wildfire_pca_mask
 
unsigned long wildfire_cpu_mask
 
unsigned long wildfire_mem_mask
 

Macro Definition Documentation

#define QBB_MAP_EMPTY   0xff

Definition at line 16 of file core_wildfire.h.

#define WILDFIRE_BASE   (IDENT_ADDR | (1UL << 40))

Definition at line 222 of file core_wildfire.h.

#define WILDFIRE_CONF (   q,
  h 
)    (WILDFIRE_QBB_HOSE(q,h) | 0x1FE000000UL)

Definition at line 233 of file core_wildfire.h.

#define WILDFIRE_ENTITY_SHIFT   18

Definition at line 212 of file core_wildfire.h.

#define WILDFIRE_fast_qsd ( )    ((wildfire_fast_qsd *)(WILDFIRE_QBB_IO(0)|WILDFIRE_QSD_ENTITY_FAST|(((1UL<<13)-1)<<23)))

Definition at line 239 of file core_wildfire.h.

#define WILDFIRE_fe (   q,
  pca 
)    ((wildfire_fe *)(WILDFIRE_QBB_IO(q)|WILDFIRE_PCA_ENTITY(pca)|(((1UL<<13)-1)<<23)|(3UL<<15)))

Definition at line 257 of file core_wildfire.h.

#define WILDFIRE_gp (   q)    ((wildfire_gp *)(WILDFIRE_QBB_IO(q)|WILDFIRE_GP_ENTITY|(((1UL<<13)-1)<<23)))

Definition at line 248 of file core_wildfire.h.

#define WILDFIRE_GP_ENTITY   (0x10UL << WILDFIRE_ENTITY_SHIFT)

Definition at line 214 of file core_wildfire.h.

#define WILDFIRE_HOSE (   h)    ((long)(h) << 33)

Definition at line 227 of file core_wildfire.h.

#define WILDFIRE_IO (   q,
  h 
)    (WILDFIRE_QBB_HOSE(q,h) | 0x1FF000000UL)

Definition at line 234 of file core_wildfire.h.

#define WILDFIRE_IO_BIAS   WILDFIRE_IO(0,0)

Definition at line 263 of file core_wildfire.h.

#define WILDFIRE_IO_SPACE   (8UL*1024*1024)

Definition at line 267 of file core_wildfire.h.

#define WILDFIRE_iop (   q)    ((wildfire_iop *)(WILDFIRE_QBB_IO(q)|WILDFIRE_IOP_ENTITY|(((1UL<<13)-1)<<23)))

Definition at line 245 of file core_wildfire.h.

#define WILDFIRE_IOP_ENTITY   (0x08UL << WILDFIRE_ENTITY_SHIFT)

Definition at line 215 of file core_wildfire.h.

#define WILDFIRE_IRQ_PER_PCA   64

Definition at line 9 of file core_wildfire.h.

#define WILDFIRE_MAX_QBB   8 /* more than 8 requires other mods */

Definition at line 7 of file core_wildfire.h.

#define WILDFIRE_MEM (   q,
  h 
)    (WILDFIRE_QBB_HOSE(q,h) | 0x000000000UL)

Definition at line 232 of file core_wildfire.h.

#define WILDFIRE_MEM_BIAS   WILDFIRE_MEM(0,0) /* ??? */

Definition at line 264 of file core_wildfire.h.

#define WILDFIRE_MEM_EXISTS (   qbbno)    (wildfire_mem_mask & (0xf << ((qbbno) << 2)))

Definition at line 30 of file core_wildfire.h.

#define WILDFIRE_ne (   q,
  pca 
)    ((wildfire_ne *)(WILDFIRE_QBB_IO(q)|WILDFIRE_PCA_ENTITY(pca)|(((1UL<<13)-1)<<23)|(1UL<<16)))

Definition at line 254 of file core_wildfire.h.

#define WILDFIRE_NR_IRQS   (WILDFIRE_MAX_QBB * WILDFIRE_PCA_PER_QBB * WILDFIRE_IRQ_PER_PCA)

Definition at line 11 of file core_wildfire.h.

#define WILDFIRE_pca (   q,
  pca 
)    ((wildfire_pca *)(WILDFIRE_QBB_IO(q)|WILDFIRE_PCA_ENTITY(pca)|(((1UL<<13)-1)<<23)))

Definition at line 251 of file core_wildfire.h.

#define WILDFIRE_PCA_ENTITY (   pca)    ((0xc|(pca))<<WILDFIRE_ENTITY_SHIFT)

Definition at line 220 of file core_wildfire.h.

#define WILDFIRE_PCA_EXISTS (   qbbno,
  pcano 
)    (wildfire_pca_mask & (1 << (((qbbno) << 2) + (pcano))))

Definition at line 32 of file core_wildfire.h.

#define WILDFIRE_PCA_PER_QBB   4

Definition at line 8 of file core_wildfire.h.

#define WILDFIRE_pci (   q,
  h 
)    ((wildfire_pci *)(WILDFIRE_QBB_IO(q)|WILDFIRE_PCA_ENTITY(((h)&6)>>1)|((((h)&1)|2)<<16)|(((1UL<<13)-1)<<23)))

Definition at line 260 of file core_wildfire.h.

#define WILDFIRE_QBB (   q)    ((~((long)(q)) & WILDFIRE_QBB_MASK) << 36)

Definition at line 226 of file core_wildfire.h.

#define WILDFIRE_QBB_EXISTS (   qbbno)    (wildfire_soft_qbb_mask & (1 << (qbbno)))

Definition at line 28 of file core_wildfire.h.

#define WILDFIRE_QBB_HOSE (   q,
  h 
)    (WILDFIRE_QBB_IO(q) | WILDFIRE_HOSE(h))

Definition at line 230 of file core_wildfire.h.

#define WILDFIRE_QBB_IO (   q)    (WILDFIRE_BASE | WILDFIRE_QBB(q))

Definition at line 229 of file core_wildfire.h.

#define WILDFIRE_QBB_MASK   0x0fUL /* for now, only 4 bits/16 QBBs */

Definition at line 224 of file core_wildfire.h.

#define WILDFIRE_qsa (   q)    ((wildfire_qsa *)(WILDFIRE_QBB_IO(q)|WILDFIRE_QSA_ENTITY|(((1UL<<13)-1)<<23)))

Definition at line 242 of file core_wildfire.h.

#define WILDFIRE_QSA_ENTITY   (0x04UL << WILDFIRE_ENTITY_SHIFT)

Definition at line 216 of file core_wildfire.h.

#define WILDFIRE_qsd (   q)    ((wildfire_qsd *)(WILDFIRE_QBB_IO(q)|WILDFIRE_QSD_ENTITY_SLOW|(((1UL<<13)-1)<<23)))

Definition at line 236 of file core_wildfire.h.

#define WILDFIRE_QSD_ENTITY_FAST   (0x01UL << WILDFIRE_ENTITY_SHIFT)

Definition at line 218 of file core_wildfire.h.

#define WILDFIRE_QSD_ENTITY_SLOW   (0x05UL << WILDFIRE_ENTITY_SHIFT)

Definition at line 217 of file core_wildfire.h.

Variable Documentation

unsigned long wildfire_cpu_mask

Definition at line 58 of file core_wildfire.c.

unsigned long wildfire_gp_mask

Definition at line 53 of file core_wildfire.c.

unsigned char wildfire_hard_qbb_map[WILDFIRE_MAX_QBB]

Definition at line 47 of file core_wildfire.c.

unsigned long wildfire_hard_qbb_mask

Definition at line 51 of file core_wildfire.c.

unsigned long wildfire_hs_mask

Definition at line 54 of file core_wildfire.c.

unsigned long wildfire_iop_mask

Definition at line 55 of file core_wildfire.c.

unsigned long wildfire_ior_mask

Definition at line 56 of file core_wildfire.c.

unsigned long wildfire_mem_mask

Definition at line 59 of file core_wildfire.c.

unsigned long wildfire_pca_mask

Definition at line 57 of file core_wildfire.c.

unsigned char wildfire_soft_qbb_map[WILDFIRE_MAX_QBB]

Definition at line 48 of file core_wildfire.c.

unsigned long wildfire_soft_qbb_mask

Definition at line 52 of file core_wildfire.c.