summaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/mach-lemote/loongson.h
blob: 95ee4c8f2d56eb4b413c51a6feb617b52bd42b21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
 * Copyright (C) 2009 Lemote, Inc. & Institute of Computing Technology
 * Author: Wu Zhangjin <wuzj@lemote.com>
 *
 * This program is free software; you can redistribute  it and/or modify it
 * under  the terms of  the GNU General  Public License as published by the
 * Free Software Foundation;  either version 2 of the  License, or (at your
 * option) any later version.
 *
 */

#ifndef __ASM_MACH_LOONGSON_LOONGSON_H
#define __ASM_MACH_LOONGSON_LOONGSON_H

#include <linux/io.h>
#include <linux/init.h>

/* there is an internal bonito64-compatiable northbridge in loongson2e/2f */
#include <asm/mips-boards/bonito64.h>

/* loongson internal northbridge initialization */
extern void bonito_irq_init(void);

/* loongson-based machines specific reboot setup */
extern void mips_reboot_setup(void);

/* environment arguments from bootloader */
extern unsigned long bus_clock, cpu_clock_freq;
extern unsigned long memsize, highmemsize;

/* loongson-specific command line, env and memory initialization */
extern void __init prom_init_memory(void);
extern void __init prom_init_cmdline(void);
extern void __init prom_init_env(void);

/* PCI Configuration Registers */
#define LOONGSON_PCI_ISR4C  BONITO_PCI_REG(0x4c)

/* PCI_Hit*_Sel_* */

#define LOONGSON_PCI_HIT0_SEL_L     BONITO(BONITO_REGBASE + 0x50)
#define LOONGSON_PCI_HIT0_SEL_H     BONITO(BONITO_REGBASE + 0x54)
#define LOONGSON_PCI_HIT1_SEL_L     BONITO(BONITO_REGBASE + 0x58)
#define LOONGSON_PCI_HIT1_SEL_H     BONITO(BONITO_REGBASE + 0x5c)
#define LOONGSON_PCI_HIT2_SEL_L     BONITO(BONITO_REGBASE + 0x60)
#define LOONGSON_PCI_HIT2_SEL_H     BONITO(BONITO_REGBASE + 0x64)

/* PXArb Config & Status */

#define LOONGSON_PXARB_CFG      BONITO(BONITO_REGBASE + 0x68)
#define LOONGSON_PXARB_STATUS       BONITO(BONITO_REGBASE + 0x6c)

/* loongson2-specific perf counter IRQ */
#define LOONGSON2_PERFCNT_IRQ   (MIPS_CPU_IRQ_BASE + 6)

#endif /* __ASM_MACH_LOONGSON_LOONGSON_H */