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

Go to the source code of this file.

Macros

#define delay()
 
#define LOONGSON_REG(x)   (*(volatile u32 *)((char *)CKSEG1ADDR(LOONGSON_REG_BASE) + (x)))
 
#define LOONGSON_IRQ_BASE   32
 
#define LOONGSON2_PERFCNT_IRQ   (MIPS_CPU_IRQ_BASE + 6) /* cpu perf counter */
 
#define LOONGSON_FLASH_BASE   0x1c000000
 
#define LOONGSON_FLASH_SIZE   0x02000000 /* 32M */
 
#define LOONGSON_FLASH_TOP   (LOONGSON_FLASH_BASE+LOONGSON_FLASH_SIZE-1)
 
#define LOONGSON_LIO0_BASE   0x1e000000
 
#define LOONGSON_LIO0_SIZE   0x01C00000 /* 28M */
 
#define LOONGSON_LIO0_TOP   (LOONGSON_LIO0_BASE+LOONGSON_LIO0_SIZE-1)
 
#define LOONGSON_BOOT_BASE   0x1fc00000
 
#define LOONGSON_BOOT_SIZE   0x00100000 /* 1M */
 
#define LOONGSON_BOOT_TOP   (LOONGSON_BOOT_BASE+LOONGSON_BOOT_SIZE-1)
 
#define LOONGSON_REG_BASE   0x1fe00000
 
#define LOONGSON_REG_SIZE   0x00100000 /* 256Bytes + 256Bytes + ??? */
 
#define LOONGSON_REG_TOP   (LOONGSON_REG_BASE+LOONGSON_REG_SIZE-1)
 
#define LOONGSON_LIO1_BASE   0x1ff00000
 
#define LOONGSON_LIO1_SIZE   0x00100000 /* 1M */
 
#define LOONGSON_LIO1_TOP   (LOONGSON_LIO1_BASE+LOONGSON_LIO1_SIZE-1)
 
#define LOONGSON_PCILO0_BASE   0x10000000
 
#define LOONGSON_PCILO1_BASE   0x14000000
 
#define LOONGSON_PCILO2_BASE   0x18000000
 
#define LOONGSON_PCILO_BASE   LOONGSON_PCILO0_BASE
 
#define LOONGSON_PCILO_SIZE   0x0c000000 /* 64M * 3 */
 
#define LOONGSON_PCILO_TOP   (LOONGSON_PCILO0_BASE+LOONGSON_PCILO_SIZE-1)
 
#define LOONGSON_PCICFG_BASE   0x1fe80000
 
#define LOONGSON_PCICFG_SIZE   0x00000800 /* 2K */
 
#define LOONGSON_PCICFG_TOP   (LOONGSON_PCICFG_BASE+LOONGSON_PCICFG_SIZE-1)
 
#define LOONGSON_PCIIO_BASE   0x1fd00000
 
#define LOONGSON_PCIIO_SIZE   0x00100000 /* 1M */
 
#define LOONGSON_PCIIO_TOP   (LOONGSON_PCIIO_BASE+LOONGSON_PCIIO_SIZE-1)
 
#define LOONGSON_PCICONFIGBASE   0x00
 
#define LOONGSON_REGBASE   0x100
 
#define LOONGSON_PCI_REG(x)   LOONGSON_REG(LOONGSON_PCICONFIGBASE + (x))
 
#define LOONGSON_PCIDID   LOONGSON_PCI_REG(0x00)
 
#define LOONGSON_PCICMD   LOONGSON_PCI_REG(0x04)
 
#define LOONGSON_PCICLASS   LOONGSON_PCI_REG(0x08)
 
#define LOONGSON_PCILTIMER   LOONGSON_PCI_REG(0x0c)
 
#define LOONGSON_PCIBASE0   LOONGSON_PCI_REG(0x10)
 
#define LOONGSON_PCIBASE1   LOONGSON_PCI_REG(0x14)
 
#define LOONGSON_PCIBASE2   LOONGSON_PCI_REG(0x18)
 
#define LOONGSON_PCIBASE3   LOONGSON_PCI_REG(0x1c)
 
#define LOONGSON_PCIBASE4   LOONGSON_PCI_REG(0x20)
 
#define LOONGSON_PCIEXPRBASE   LOONGSON_PCI_REG(0x30)
 
#define LOONGSON_PCIINT   LOONGSON_PCI_REG(0x3c)
 
#define LOONGSON_PCI_ISR4C   LOONGSON_PCI_REG(0x4c)
 
#define LOONGSON_PCICMD_PERR_CLR   0x80000000
 
#define LOONGSON_PCICMD_SERR_CLR   0x40000000
 
#define LOONGSON_PCICMD_MABORT_CLR   0x20000000
 
#define LOONGSON_PCICMD_MTABORT_CLR   0x10000000
 
#define LOONGSON_PCICMD_TABORT_CLR   0x08000000
 
#define LOONGSON_PCICMD_MPERR_CLR   0x01000000
 
#define LOONGSON_PCICMD_PERRRESPEN   0x00000040
 
#define LOONGSON_PCICMD_ASTEPEN   0x00000080
 
#define LOONGSON_PCICMD_SERREN   0x00000100
 
#define LOONGSON_PCILTIMER_BUSLATENCY   0x0000ff00
 
#define LOONGSON_PCILTIMER_BUSLATENCY_SHIFT   8
 
#define LOONGSON_GENCFG_OFFSET   0x4
 
#define LOONGSON_GENCFG   LOONGSON_REG(LOONGSON_REGBASE + LOONGSON_GENCFG_OFFSET)
 
#define LOONGSON_GENCFG_DEBUGMODE   0x00000001
 
#define LOONGSON_GENCFG_SNOOPEN   0x00000002
 
#define LOONGSON_GENCFG_CPUSELFRESET   0x00000004
 
#define LOONGSON_GENCFG_FORCE_IRQA   0x00000008
 
#define LOONGSON_GENCFG_IRQA_ISOUT   0x00000010
 
#define LOONGSON_GENCFG_IRQA_FROM_INT1   0x00000020
 
#define LOONGSON_GENCFG_BYTESWAP   0x00000040
 
#define LOONGSON_GENCFG_UNCACHED   0x00000080
 
#define LOONGSON_GENCFG_PREFETCHEN   0x00000100
 
#define LOONGSON_GENCFG_WBEHINDEN   0x00000200
 
#define LOONGSON_GENCFG_CACHEALG   0x00000c00
 
#define LOONGSON_GENCFG_CACHEALG_SHIFT   10
 
#define LOONGSON_GENCFG_PCIQUEUE   0x00001000
 
#define LOONGSON_GENCFG_CACHESTOP   0x00002000
 
#define LOONGSON_GENCFG_MSTRBYTESWAP   0x00004000
 
#define LOONGSON_GENCFG_BUSERREN   0x00008000
 
#define LOONGSON_GENCFG_NORETRYTIMEOUT   0x00010000
 
#define LOONGSON_GENCFG_SHORTCOPYTIMEOUT   0x00020000
 
#define LOONGSON_PCIMAP   LOONGSON_REG(LOONGSON_REGBASE + 0x10)
 
#define LOONGSON_PCIMEMBASECFG   LOONGSON_REG(LOONGSON_REGBASE + 0x14)
 
#define LOONGSON_PCIMAP_CFG   LOONGSON_REG(LOONGSON_REGBASE + 0x18)
 
#define LOONGSON_GPIODATA   LOONGSON_REG(LOONGSON_REGBASE + 0x1c)
 
#define LOONGSON_GPIOIE   LOONGSON_REG(LOONGSON_REGBASE + 0x20)
 
#define LOONGSON_INTEDGE   LOONGSON_REG(LOONGSON_REGBASE + 0x24)
 
#define LOONGSON_INTSTEER   LOONGSON_REG(LOONGSON_REGBASE + 0x28)
 
#define LOONGSON_INTPOL   LOONGSON_REG(LOONGSON_REGBASE + 0x2c)
 
#define LOONGSON_INTENSET   LOONGSON_REG(LOONGSON_REGBASE + 0x30)
 
#define LOONGSON_INTENCLR   LOONGSON_REG(LOONGSON_REGBASE + 0x34)
 
#define LOONGSON_INTEN   LOONGSON_REG(LOONGSON_REGBASE + 0x38)
 
#define LOONGSON_INTISR   LOONGSON_REG(LOONGSON_REGBASE + 0x3c)
 
#define LOONGSON_ICU_MBOXES   0x0000000f
 
#define LOONGSON_ICU_MBOXES_SHIFT   0
 
#define LOONGSON_ICU_DMARDY   0x00000010
 
#define LOONGSON_ICU_DMAEMPTY   0x00000020
 
#define LOONGSON_ICU_COPYRDY   0x00000040
 
#define LOONGSON_ICU_COPYEMPTY   0x00000080
 
#define LOONGSON_ICU_COPYERR   0x00000100
 
#define LOONGSON_ICU_PCIIRQ   0x00000200
 
#define LOONGSON_ICU_MASTERERR   0x00000400
 
#define LOONGSON_ICU_SYSTEMERR   0x00000800
 
#define LOONGSON_ICU_DRAMPERR   0x00001000
 
#define LOONGSON_ICU_RETRYERR   0x00002000
 
#define LOONGSON_ICU_GPIOS   0x01ff0000
 
#define LOONGSON_ICU_GPIOS_SHIFT   16
 
#define LOONGSON_ICU_GPINS   0x7e000000
 
#define LOONGSON_ICU_GPINS_SHIFT   25
 
#define LOONGSON_ICU_MBOX(N)   (1<<(LOONGSON_ICU_MBOXES_SHIFT+(N)))
 
#define LOONGSON_ICU_GPIO(N)   (1<<(LOONGSON_ICU_GPIOS_SHIFT+(N)))
 
#define LOONGSON_ICU_GPIN(N)   (1<<(LOONGSON_ICU_GPINS_SHIFT+(N)))
 
#define LOONGSON_MEM_WIN_BASE_L   LOONGSON_REG(LOONGSON_REGBASE + 0x40)
 
#define LOONGSON_MEM_WIN_BASE_H   LOONGSON_REG(LOONGSON_REGBASE + 0x44)
 
#define LOONGSON_MEM_WIN_MASK_L   LOONGSON_REG(LOONGSON_REGBASE + 0x48)
 
#define LOONGSON_MEM_WIN_MASK_H   LOONGSON_REG(LOONGSON_REGBASE + 0x4c)
 
#define LOONGSON_PCI_HIT0_SEL_L   LOONGSON_REG(LOONGSON_REGBASE + 0x50)
 
#define LOONGSON_PCI_HIT0_SEL_H   LOONGSON_REG(LOONGSON_REGBASE + 0x54)
 
#define LOONGSON_PCI_HIT1_SEL_L   LOONGSON_REG(LOONGSON_REGBASE + 0x58)
 
#define LOONGSON_PCI_HIT1_SEL_H   LOONGSON_REG(LOONGSON_REGBASE + 0x5c)
 
#define LOONGSON_PCI_HIT2_SEL_L   LOONGSON_REG(LOONGSON_REGBASE + 0x60)
 
#define LOONGSON_PCI_HIT2_SEL_H   LOONGSON_REG(LOONGSON_REGBASE + 0x64)
 
#define LOONGSON_PXARB_CFG   LOONGSON_REG(LOONGSON_REGBASE + 0x68)
 
#define LOONGSON_PXARB_STATUS   LOONGSON_REG(LOONGSON_REGBASE + 0x6c)
 
#define LOONGSON_PCIMAP_PCIMAP_LO0   0x0000003f
 
#define LOONGSON_PCIMAP_PCIMAP_LO0_SHIFT   0
 
#define LOONGSON_PCIMAP_PCIMAP_LO1   0x00000fc0
 
#define LOONGSON_PCIMAP_PCIMAP_LO1_SHIFT   6
 
#define LOONGSON_PCIMAP_PCIMAP_LO2   0x0003f000
 
#define LOONGSON_PCIMAP_PCIMAP_LO2_SHIFT   12
 
#define LOONGSON_PCIMAP_PCIMAP_2   0x00040000
 
#define LOONGSON_PCIMAP_WIN(WIN, ADDR)   ((((ADDR)>>26) & LOONGSON_PCIMAP_PCIMAP_LO0) << ((WIN)*6))
 

Functions

void bonito_irq_init (void)
 
void mach_prepare_reboot (void)
 
void mach_prepare_shutdown (void)
 
void __init prom_init_memory (void)
 
void __init prom_init_cmdline (void)
 
void __init prom_init_machtype (void)
 
void __init prom_init_env (void)
 
void bonito_irqdispatch (void)
 
void __init mach_init_irq (void)
 
void mach_irq_dispatch (unsigned int pending)
 
int mach_i8259_irq (void)
 

Variables

unsigned long cpu_clock_freq
 
unsigned long memsize
 
unsigned long highmemsize
 

Macro Definition Documentation

#define delay (   void)
Value:
({ \
int x; \
for (x = 0; x < 100000; x++) \
__asm__ __volatile__(""); \
})

Definition at line 55 of file loongson.h.

#define LOONGSON2_PERFCNT_IRQ   (MIPS_CPU_IRQ_BASE + 6) /* cpu perf counter */

Definition at line 65 of file loongson.h.

#define LOONGSON_BOOT_BASE   0x1fc00000

Definition at line 83 of file loongson.h.

#define LOONGSON_BOOT_SIZE   0x00100000 /* 1M */

Definition at line 84 of file loongson.h.

#define LOONGSON_BOOT_TOP   (LOONGSON_BOOT_BASE+LOONGSON_BOOT_SIZE-1)

Definition at line 85 of file loongson.h.

#define LOONGSON_FLASH_BASE   0x1c000000

Definition at line 75 of file loongson.h.

#define LOONGSON_FLASH_SIZE   0x02000000 /* 32M */

Definition at line 76 of file loongson.h.

#define LOONGSON_FLASH_TOP   (LOONGSON_FLASH_BASE+LOONGSON_FLASH_SIZE-1)

Definition at line 77 of file loongson.h.

#define LOONGSON_GENCFG   LOONGSON_REG(LOONGSON_REGBASE + LOONGSON_GENCFG_OFFSET)

Definition at line 145 of file loongson.h.

#define LOONGSON_GENCFG_BUSERREN   0x00008000

Definition at line 164 of file loongson.h.

#define LOONGSON_GENCFG_BYTESWAP   0x00000040

Definition at line 154 of file loongson.h.

#define LOONGSON_GENCFG_CACHEALG   0x00000c00

Definition at line 159 of file loongson.h.

#define LOONGSON_GENCFG_CACHEALG_SHIFT   10

Definition at line 160 of file loongson.h.

#define LOONGSON_GENCFG_CACHESTOP   0x00002000

Definition at line 162 of file loongson.h.

#define LOONGSON_GENCFG_CPUSELFRESET   0x00000004

Definition at line 149 of file loongson.h.

#define LOONGSON_GENCFG_DEBUGMODE   0x00000001

Definition at line 147 of file loongson.h.

#define LOONGSON_GENCFG_FORCE_IRQA   0x00000008

Definition at line 151 of file loongson.h.

#define LOONGSON_GENCFG_IRQA_FROM_INT1   0x00000020

Definition at line 153 of file loongson.h.

#define LOONGSON_GENCFG_IRQA_ISOUT   0x00000010

Definition at line 152 of file loongson.h.

#define LOONGSON_GENCFG_MSTRBYTESWAP   0x00004000

Definition at line 163 of file loongson.h.

#define LOONGSON_GENCFG_NORETRYTIMEOUT   0x00010000

Definition at line 165 of file loongson.h.

#define LOONGSON_GENCFG_OFFSET   0x4

Definition at line 144 of file loongson.h.

#define LOONGSON_GENCFG_PCIQUEUE   0x00001000

Definition at line 161 of file loongson.h.

#define LOONGSON_GENCFG_PREFETCHEN   0x00000100

Definition at line 157 of file loongson.h.

#define LOONGSON_GENCFG_SHORTCOPYTIMEOUT   0x00020000

Definition at line 166 of file loongson.h.

#define LOONGSON_GENCFG_SNOOPEN   0x00000002

Definition at line 148 of file loongson.h.

#define LOONGSON_GENCFG_UNCACHED   0x00000080

Definition at line 156 of file loongson.h.

#define LOONGSON_GENCFG_WBEHINDEN   0x00000200

Definition at line 158 of file loongson.h.

#define LOONGSON_GPIODATA   LOONGSON_REG(LOONGSON_REGBASE + 0x1c)

Definition at line 176 of file loongson.h.

#define LOONGSON_GPIOIE   LOONGSON_REG(LOONGSON_REGBASE + 0x20)

Definition at line 177 of file loongson.h.

#define LOONGSON_ICU_COPYEMPTY   0x00000080

Definition at line 198 of file loongson.h.

#define LOONGSON_ICU_COPYERR   0x00000100

Definition at line 199 of file loongson.h.

#define LOONGSON_ICU_COPYRDY   0x00000040

Definition at line 197 of file loongson.h.

#define LOONGSON_ICU_DMAEMPTY   0x00000020

Definition at line 196 of file loongson.h.

#define LOONGSON_ICU_DMARDY   0x00000010

Definition at line 195 of file loongson.h.

#define LOONGSON_ICU_DRAMPERR   0x00001000

Definition at line 203 of file loongson.h.

#define LOONGSON_ICU_GPIN (   N)    (1<<(LOONGSON_ICU_GPINS_SHIFT+(N)))

Definition at line 211 of file loongson.h.

#define LOONGSON_ICU_GPINS   0x7e000000

Definition at line 207 of file loongson.h.

#define LOONGSON_ICU_GPINS_SHIFT   25

Definition at line 208 of file loongson.h.

#define LOONGSON_ICU_GPIO (   N)    (1<<(LOONGSON_ICU_GPIOS_SHIFT+(N)))

Definition at line 210 of file loongson.h.

#define LOONGSON_ICU_GPIOS   0x01ff0000

Definition at line 205 of file loongson.h.

#define LOONGSON_ICU_GPIOS_SHIFT   16

Definition at line 206 of file loongson.h.

#define LOONGSON_ICU_MASTERERR   0x00000400

Definition at line 201 of file loongson.h.

#define LOONGSON_ICU_MBOX (   N)    (1<<(LOONGSON_ICU_MBOXES_SHIFT+(N)))

Definition at line 209 of file loongson.h.

#define LOONGSON_ICU_MBOXES   0x0000000f

Definition at line 193 of file loongson.h.

#define LOONGSON_ICU_MBOXES_SHIFT   0

Definition at line 194 of file loongson.h.

#define LOONGSON_ICU_PCIIRQ   0x00000200

Definition at line 200 of file loongson.h.

#define LOONGSON_ICU_RETRYERR   0x00002000

Definition at line 204 of file loongson.h.

#define LOONGSON_ICU_SYSTEMERR   0x00000800

Definition at line 202 of file loongson.h.

#define LOONGSON_INTEDGE   LOONGSON_REG(LOONGSON_REGBASE + 0x24)

Definition at line 181 of file loongson.h.

#define LOONGSON_INTEN   LOONGSON_REG(LOONGSON_REGBASE + 0x38)

Definition at line 189 of file loongson.h.

#define LOONGSON_INTENCLR   LOONGSON_REG(LOONGSON_REGBASE + 0x34)

Definition at line 188 of file loongson.h.

#define LOONGSON_INTENSET   LOONGSON_REG(LOONGSON_REGBASE + 0x30)

Definition at line 187 of file loongson.h.

#define LOONGSON_INTISR   LOONGSON_REG(LOONGSON_REGBASE + 0x3c)

Definition at line 190 of file loongson.h.

#define LOONGSON_INTPOL   LOONGSON_REG(LOONGSON_REGBASE + 0x2c)

Definition at line 183 of file loongson.h.

#define LOONGSON_INTSTEER   LOONGSON_REG(LOONGSON_REGBASE + 0x28)

Definition at line 182 of file loongson.h.

#define LOONGSON_IRQ_BASE   32

Definition at line 64 of file loongson.h.

#define LOONGSON_LIO0_BASE   0x1e000000

Definition at line 79 of file loongson.h.

#define LOONGSON_LIO0_SIZE   0x01C00000 /* 28M */

Definition at line 80 of file loongson.h.

#define LOONGSON_LIO0_TOP   (LOONGSON_LIO0_BASE+LOONGSON_LIO0_SIZE-1)

Definition at line 81 of file loongson.h.

#define LOONGSON_LIO1_BASE   0x1ff00000

Definition at line 90 of file loongson.h.

#define LOONGSON_LIO1_SIZE   0x00100000 /* 1M */

Definition at line 91 of file loongson.h.

#define LOONGSON_LIO1_TOP   (LOONGSON_LIO1_BASE+LOONGSON_LIO1_SIZE-1)

Definition at line 92 of file loongson.h.

#define LOONGSON_MEM_WIN_BASE_H   LOONGSON_REG(LOONGSON_REGBASE + 0x44)

Definition at line 216 of file loongson.h.

#define LOONGSON_MEM_WIN_BASE_L   LOONGSON_REG(LOONGSON_REGBASE + 0x40)

Definition at line 215 of file loongson.h.

#define LOONGSON_MEM_WIN_MASK_H   LOONGSON_REG(LOONGSON_REGBASE + 0x4c)

Definition at line 218 of file loongson.h.

#define LOONGSON_MEM_WIN_MASK_L   LOONGSON_REG(LOONGSON_REGBASE + 0x48)

Definition at line 217 of file loongson.h.

#define LOONGSON_PCI_HIT0_SEL_H   LOONGSON_REG(LOONGSON_REGBASE + 0x54)

Definition at line 223 of file loongson.h.

#define LOONGSON_PCI_HIT0_SEL_L   LOONGSON_REG(LOONGSON_REGBASE + 0x50)

Definition at line 222 of file loongson.h.

#define LOONGSON_PCI_HIT1_SEL_H   LOONGSON_REG(LOONGSON_REGBASE + 0x5c)

Definition at line 225 of file loongson.h.

#define LOONGSON_PCI_HIT1_SEL_L   LOONGSON_REG(LOONGSON_REGBASE + 0x58)

Definition at line 224 of file loongson.h.

#define LOONGSON_PCI_HIT2_SEL_H   LOONGSON_REG(LOONGSON_REGBASE + 0x64)

Definition at line 227 of file loongson.h.

#define LOONGSON_PCI_HIT2_SEL_L   LOONGSON_REG(LOONGSON_REGBASE + 0x60)

Definition at line 226 of file loongson.h.

#define LOONGSON_PCI_ISR4C   LOONGSON_PCI_REG(0x4c)

Definition at line 128 of file loongson.h.

#define LOONGSON_PCI_REG (   x)    LOONGSON_REG(LOONGSON_PCICONFIGBASE + (x))

Definition at line 115 of file loongson.h.

#define LOONGSON_PCIBASE0   LOONGSON_PCI_REG(0x10)

Definition at line 120 of file loongson.h.

#define LOONGSON_PCIBASE1   LOONGSON_PCI_REG(0x14)

Definition at line 121 of file loongson.h.

#define LOONGSON_PCIBASE2   LOONGSON_PCI_REG(0x18)

Definition at line 122 of file loongson.h.

#define LOONGSON_PCIBASE3   LOONGSON_PCI_REG(0x1c)

Definition at line 123 of file loongson.h.

#define LOONGSON_PCIBASE4   LOONGSON_PCI_REG(0x20)

Definition at line 124 of file loongson.h.

#define LOONGSON_PCICFG_BASE   0x1fe80000

Definition at line 101 of file loongson.h.

#define LOONGSON_PCICFG_SIZE   0x00000800 /* 2K */

Definition at line 102 of file loongson.h.

#define LOONGSON_PCICFG_TOP   (LOONGSON_PCICFG_BASE+LOONGSON_PCICFG_SIZE-1)

Definition at line 103 of file loongson.h.

#define LOONGSON_PCICLASS   LOONGSON_PCI_REG(0x08)

Definition at line 118 of file loongson.h.

#define LOONGSON_PCICMD   LOONGSON_PCI_REG(0x04)

Definition at line 117 of file loongson.h.

#define LOONGSON_PCICMD_ASTEPEN   0x00000080

Definition at line 137 of file loongson.h.

#define LOONGSON_PCICMD_MABORT_CLR   0x20000000

Definition at line 132 of file loongson.h.

#define LOONGSON_PCICMD_MPERR_CLR   0x01000000

Definition at line 135 of file loongson.h.

#define LOONGSON_PCICMD_MTABORT_CLR   0x10000000

Definition at line 133 of file loongson.h.

#define LOONGSON_PCICMD_PERR_CLR   0x80000000

Definition at line 130 of file loongson.h.

#define LOONGSON_PCICMD_PERRRESPEN   0x00000040

Definition at line 136 of file loongson.h.

#define LOONGSON_PCICMD_SERR_CLR   0x40000000

Definition at line 131 of file loongson.h.

#define LOONGSON_PCICMD_SERREN   0x00000100

Definition at line 138 of file loongson.h.

#define LOONGSON_PCICMD_TABORT_CLR   0x08000000

Definition at line 134 of file loongson.h.

#define LOONGSON_PCICONFIGBASE   0x00

Definition at line 110 of file loongson.h.

#define LOONGSON_PCIDID   LOONGSON_PCI_REG(0x00)

Definition at line 116 of file loongson.h.

#define LOONGSON_PCIEXPRBASE   LOONGSON_PCI_REG(0x30)

Definition at line 125 of file loongson.h.

#define LOONGSON_PCIINT   LOONGSON_PCI_REG(0x3c)

Definition at line 126 of file loongson.h.

#define LOONGSON_PCIIO_BASE   0x1fd00000

Definition at line 104 of file loongson.h.

#define LOONGSON_PCIIO_SIZE   0x00100000 /* 1M */

Definition at line 105 of file loongson.h.

#define LOONGSON_PCIIO_TOP   (LOONGSON_PCIIO_BASE+LOONGSON_PCIIO_SIZE-1)

Definition at line 106 of file loongson.h.

#define LOONGSON_PCILO0_BASE   0x10000000

Definition at line 94 of file loongson.h.

#define LOONGSON_PCILO1_BASE   0x14000000

Definition at line 95 of file loongson.h.

#define LOONGSON_PCILO2_BASE   0x18000000

Definition at line 96 of file loongson.h.

#define LOONGSON_PCILO_BASE   LOONGSON_PCILO0_BASE

Definition at line 97 of file loongson.h.

#define LOONGSON_PCILO_SIZE   0x0c000000 /* 64M * 3 */

Definition at line 98 of file loongson.h.

#define LOONGSON_PCILO_TOP   (LOONGSON_PCILO0_BASE+LOONGSON_PCILO_SIZE-1)

Definition at line 99 of file loongson.h.

#define LOONGSON_PCILTIMER   LOONGSON_PCI_REG(0x0c)

Definition at line 119 of file loongson.h.

#define LOONGSON_PCILTIMER_BUSLATENCY   0x0000ff00

Definition at line 139 of file loongson.h.

#define LOONGSON_PCILTIMER_BUSLATENCY_SHIFT   8

Definition at line 140 of file loongson.h.

#define LOONGSON_PCIMAP   LOONGSON_REG(LOONGSON_REGBASE + 0x10)

Definition at line 170 of file loongson.h.

#define LOONGSON_PCIMAP_CFG   LOONGSON_REG(LOONGSON_REGBASE + 0x18)

Definition at line 172 of file loongson.h.

#define LOONGSON_PCIMAP_PCIMAP_2   0x00040000

Definition at line 242 of file loongson.h.

#define LOONGSON_PCIMAP_PCIMAP_LO0   0x0000003f

Definition at line 236 of file loongson.h.

#define LOONGSON_PCIMAP_PCIMAP_LO0_SHIFT   0

Definition at line 237 of file loongson.h.

#define LOONGSON_PCIMAP_PCIMAP_LO1   0x00000fc0

Definition at line 238 of file loongson.h.

#define LOONGSON_PCIMAP_PCIMAP_LO1_SHIFT   6

Definition at line 239 of file loongson.h.

#define LOONGSON_PCIMAP_PCIMAP_LO2   0x0003f000

Definition at line 240 of file loongson.h.

#define LOONGSON_PCIMAP_PCIMAP_LO2_SHIFT   12

Definition at line 241 of file loongson.h.

#define LOONGSON_PCIMAP_WIN (   WIN,
  ADDR 
)    ((((ADDR)>>26) & LOONGSON_PCIMAP_PCIMAP_LO0) << ((WIN)*6))

Definition at line 243 of file loongson.h.

#define LOONGSON_PCIMEMBASECFG   LOONGSON_REG(LOONGSON_REGBASE + 0x14)

Definition at line 171 of file loongson.h.

#define LOONGSON_PXARB_CFG   LOONGSON_REG(LOONGSON_REGBASE + 0x68)

Definition at line 231 of file loongson.h.

#define LOONGSON_PXARB_STATUS   LOONGSON_REG(LOONGSON_REGBASE + 0x6c)

Definition at line 232 of file loongson.h.

#define LOONGSON_REG (   x)    (*(volatile u32 *)((char *)CKSEG1ADDR(LOONGSON_REG_BASE) + (x)))

Definition at line 61 of file loongson.h.

#define LOONGSON_REG_BASE   0x1fe00000

Definition at line 86 of file loongson.h.

#define LOONGSON_REG_SIZE   0x00100000 /* 256Bytes + 256Bytes + ??? */

Definition at line 87 of file loongson.h.

#define LOONGSON_REG_TOP   (LOONGSON_REG_BASE+LOONGSON_REG_SIZE-1)

Definition at line 88 of file loongson.h.

#define LOONGSON_REGBASE   0x100

Definition at line 111 of file loongson.h.

Function Documentation

void __init bonito_irq_init ( void  )

Definition at line 42 of file bonito-irq.c.

void bonito_irqdispatch ( void  )

Definition at line 17 of file irq.c.

int mach_i8259_irq ( void  )

Definition at line 33 of file irq.c.

void __init mach_init_irq ( void  )

Definition at line 48 of file irq.c.

void mach_irq_dispatch ( unsigned int  pending)

Definition at line 28 of file irq.c.

void mach_prepare_reboot ( void  )

Definition at line 15 of file reset.c.

void mach_prepare_shutdown ( void  )

Definition at line 21 of file reset.c.

void __init prom_init_cmdline ( void  )

Definition at line 46 of file prom.c.

void __init prom_init_env ( void  )

Definition at line 38 of file env.c.

void __init prom_init_machtype ( void  )

Definition at line 42 of file machtype.c.

void __init prom_init_memory ( void  )

Definition at line 17 of file mem.c.

Variable Documentation

unsigned long cpu_clock_freq

Definition at line 26 of file env.c.

unsigned long highmemsize

Definition at line 28 of file env.c.

unsigned long memsize

Definition at line 28 of file env.c.