aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips/mach-ip32
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-mips/mach-ip32
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/asm-mips/mach-ip32')
-rw-r--r--include/asm-mips/mach-ip32/cpu-feature-overrides.h41
-rw-r--r--include/asm-mips/mach-ip32/mangle-port.h17
-rw-r--r--include/asm-mips/mach-ip32/mc146818rtc.h35
-rw-r--r--include/asm-mips/mach-ip32/spaces.h36
4 files changed, 129 insertions, 0 deletions
diff --git a/include/asm-mips/mach-ip32/cpu-feature-overrides.h b/include/asm-mips/mach-ip32/cpu-feature-overrides.h
new file mode 100644
index 000000000000..b932237f2193
--- /dev/null
+++ b/include/asm-mips/mach-ip32/cpu-feature-overrides.h
@@ -0,0 +1,41 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2005 Ilya A. Volynets-Evenbakh
7 * Copyright (C) 2005 Ralf Baechle (ralf@linux-mips.org)
8 */
9#ifndef __ASM_MACH_IP32_CPU_FEATURE_OVERRIDES_H
10#define __ASM_MACH_IP32_CPU_FEATURE_OVERRIDES_H
11
12#include <linux/config.h>
13
14/*
15 * R5000 has an interesting "restriction": ll(d)/sc(d)
16 * instructions to XKPHYS region simply do uncached bus
17 * requests. This breaks all the atomic bitops functions.
18 * so, for 64bit IP32 kernel we just don't use ll/sc.
19 * This does not affect luserland.
20 */
21#if defined(CONFIG_CPU_R5000) && defined(CONFIG_MIPS64)
22#define cpu_has_llsc 0
23#else
24#define cpu_has_llsc 1
25#endif
26
27/* Settings which are common for all ip32 CPUs */
28#define cpu_has_tlb 1
29#define cpu_has_4kex 1
30#define cpu_has_fpu 1
31#define cpu_has_32fpr 1
32#define cpu_has_counter 1
33#define cpu_has_mips16 0
34#define cpu_has_vce 0
35#define cpu_has_cache_cdex_s 0
36#define cpu_has_mcheck 0
37#define cpu_has_ejtag 0
38#define cpu_has_vtag_icache 0
39#define cpu_has_ic_fills_f_dc 0
40
41#endif /* __ASM_MACH_IP32_CPU_FEATURE_OVERRIDES_H */
diff --git a/include/asm-mips/mach-ip32/mangle-port.h b/include/asm-mips/mach-ip32/mangle-port.h
new file mode 100644
index 000000000000..6e25b52ed8f2
--- /dev/null
+++ b/include/asm-mips/mach-ip32/mangle-port.h
@@ -0,0 +1,17 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2003 Ladislav Michl
7 * Copyright (C) 2004 Ralf Baechle
8 */
9#ifndef __ASM_MACH_IP32_MANGLE_PORT_H
10#define __ASM_MACH_IP32_MANGLE_PORT_H
11
12#define __swizzle_addr_b(port) ((port) ^ 3)
13#define __swizzle_addr_w(port) ((port) ^ 2)
14#define __swizzle_addr_l(port) (port)
15#define __swizzle_addr_q(port) (port)
16
17#endif /* __ASM_MACH_IP32_MANGLE_PORT_H */
diff --git a/include/asm-mips/mach-ip32/mc146818rtc.h b/include/asm-mips/mach-ip32/mc146818rtc.h
new file mode 100644
index 000000000000..f5d780ff843f
--- /dev/null
+++ b/include/asm-mips/mach-ip32/mc146818rtc.h
@@ -0,0 +1,35 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1998, 2001, 03 by Ralf Baechle
7 * Copyright (C) 2000 Harald Koerfgen
8 *
9 * RTC routines for IP32 style attached Dallas chip.
10 */
11#ifndef __ASM_MACH_IP32_MC146818RTC_H
12#define __ASM_MACH_IP32_MC146818RTC_H
13
14#include <asm/io.h>
15#include <asm/ip32/mace.h>
16
17#define RTC_PORT(x) (0x70 + (x))
18
19static unsigned char CMOS_READ(unsigned long addr)
20{
21 return mace->isa.rtc[addr << 8];
22}
23
24static inline void CMOS_WRITE(unsigned char data, unsigned long addr)
25{
26 mace->isa.rtc[addr << 8] = data;
27}
28
29/* FIXME: Do it right. For now just assume that noone lives in 20th century
30 * and no O2 user in 22th century ;-) */
31#define mc146818_decode_year(year) ((year) + 2000)
32
33#define RTC_ALWAYS_BCD 0
34
35#endif /* __ASM_MACH_IP32_MC146818RTC_H */
diff --git a/include/asm-mips/mach-ip32/spaces.h b/include/asm-mips/mach-ip32/spaces.h
new file mode 100644
index 000000000000..c7839f85c68d
--- /dev/null
+++ b/include/asm-mips/mach-ip32/spaces.h
@@ -0,0 +1,36 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1994 - 1999, 2000, 03, 04, 05 Ralf Baechle (ralf@linux-mips.org)
7 * Copyright (C) 2000, 2002 Maciej W. Rozycki
8 * Copyright (C) 1990, 1999, 2000 Silicon Graphics, Inc.
9 */
10#ifndef _ASM_MACH_IP32_SPACES_H
11#define _ASM_MACH_IP32_SPACES_H
12
13/*
14 * Memory above this physical address will be considered highmem.
15 * Fixme: 59 bits is a fictive number and makes assumptions about processors
16 * in the distant future. Nobody will care for a few years :-)
17 */
18#ifndef HIGHMEM_START
19#define HIGHMEM_START (1UL << 59UL)
20#endif
21
22#define CAC_BASE 0x9800000000000000
23#define IO_BASE 0x9000000000000000
24#define UNCAC_BASE 0x9000000000000000
25#define MAP_BASE 0xc000000000000000
26
27#define TO_PHYS(x) ( ((x) & TO_PHYS_MASK))
28#define TO_CAC(x) (CAC_BASE | ((x) & TO_PHYS_MASK))
29#define TO_UNCAC(x) (UNCAC_BASE | ((x) & TO_PHYS_MASK))
30
31/*
32 * This handles the memory map.
33 */
34#define PAGE_OFFSET CAC_BASE
35
36#endif /* __ASM_MACH_IP32_SPACES_H */