Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
hardware.h File Reference
#include <asm/cputype.h>
#include "SA-1100.h"

Go to the source code of this file.

Macros

#define UNCACHEABLE_ADDR   0xfa050000
 
#define VIO_BASE   0xf8000000 /* virtual start of IO space */
 
#define VIO_SHIFT   3 /* x = IO space shrink power */
 
#define PIO_START   0x80000000 /* physical start of IO space */
 
#define io_p2v(x)   IOMEM( (((x)&0x00ffffff) | (((x)&0x30000000)>>VIO_SHIFT)) + VIO_BASE )
 
#define io_v2p(x)   ( (((x)&0x00ffffff) | (((x)&(0x30000000>>VIO_SHIFT))<<VIO_SHIFT)) + PIO_START )
 
#define CPU_SA1110_A0   (0)
 
#define CPU_SA1110_B0   (4)
 
#define CPU_SA1110_B1   (5)
 
#define CPU_SA1110_B2   (6)
 
#define CPU_SA1110_B4   (8)
 
#define CPU_SA1100_ID   (0x4401a110)
 
#define CPU_SA1100_MASK   (0xfffffff0)
 
#define CPU_SA1110_ID   (0x6901b110)
 
#define CPU_SA1110_MASK   (0xfffffff0)
 
#define __MREG(x)   IOMEM(io_p2v(x))
 
#define CPU_REVISION   (read_cpuid_id() & 15)
 
#define cpu_is_sa1100()   ((read_cpuid_id() & CPU_SA1100_MASK) == CPU_SA1100_ID)
 
#define cpu_is_sa1110()   ((read_cpuid_id() & CPU_SA1110_MASK) == CPU_SA1110_ID)
 
#define __REG(x)   (*((volatile unsigned long __iomem *)io_p2v(x)))
 
#define __PREG(x)   (io_v2p((unsigned long)&(x)))
 

Macro Definition Documentation

#define __MREG (   x)    IOMEM(io_p2v(x))

Definition at line 50 of file hardware.h.

#define __PREG (   x)    (io_v2p((unsigned long)&(x)))

Definition at line 62 of file hardware.h.

#define __REG (   x)    (*((volatile unsigned long __iomem *)io_p2v(x)))

Definition at line 61 of file hardware.h.

#define cpu_is_sa1100 ( )    ((read_cpuid_id() & CPU_SA1100_MASK) == CPU_SA1100_ID)

Definition at line 58 of file hardware.h.

#define cpu_is_sa1110 ( )    ((read_cpuid_id() & CPU_SA1110_MASK) == CPU_SA1110_ID)

Definition at line 59 of file hardware.h.

#define CPU_REVISION   (read_cpuid_id() & 15)

Definition at line 56 of file hardware.h.

#define CPU_SA1100_ID   (0x4401a110)

Definition at line 45 of file hardware.h.

#define CPU_SA1100_MASK   (0xfffffff0)

Definition at line 46 of file hardware.h.

#define CPU_SA1110_A0   (0)

Definition at line 39 of file hardware.h.

#define CPU_SA1110_B0   (4)

Definition at line 40 of file hardware.h.

#define CPU_SA1110_B1   (5)

Definition at line 41 of file hardware.h.

#define CPU_SA1110_B2   (6)

Definition at line 42 of file hardware.h.

#define CPU_SA1110_B4   (8)

Definition at line 43 of file hardware.h.

#define CPU_SA1110_ID   (0x6901b110)

Definition at line 47 of file hardware.h.

#define CPU_SA1110_MASK   (0xfffffff0)

Definition at line 48 of file hardware.h.

#define io_p2v (   x)    IOMEM( (((x)&0x00ffffff) | (((x)&0x30000000)>>VIO_SHIFT)) + VIO_BASE )

Definition at line 34 of file hardware.h.

#define io_v2p (   x)    ( (((x)&0x00ffffff) | (((x)&(0x30000000>>VIO_SHIFT))<<VIO_SHIFT)) + PIO_START )

Definition at line 36 of file hardware.h.

#define PIO_START   0x80000000 /* physical start of IO space */

Definition at line 32 of file hardware.h.

#define UNCACHEABLE_ADDR   0xfa050000

Definition at line 16 of file hardware.h.

#define VIO_BASE   0xf8000000 /* virtual start of IO space */

Definition at line 30 of file hardware.h.

#define VIO_SHIFT   3 /* x = IO space shrink power */

Definition at line 31 of file hardware.h.