Linux Audio

Check our new training course

Loading...
v6.2
 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 Ralf Baechle
 7 * Copyright (C) 2000, 2002  Maciej W. Rozycki
 8 * Copyright (C) 1990, 1999, 2000 Silicon Graphics, Inc.
 9 */
10#ifndef _ASM_MACH_GENERIC_SPACES_H
11#define _ASM_MACH_GENERIC_SPACES_H
12
13#include <linux/const.h>
14
15#include <asm/mipsregs.h>
16
17#ifndef IO_SPACE_LIMIT
18#define IO_SPACE_LIMIT 0xffff
19#endif
20
21/*
22 * This gives the physical RAM offset.
23 */
24#ifndef __ASSEMBLY__
25# if defined(CONFIG_MIPS_AUTO_PFN_OFFSET)
26#  define PHYS_OFFSET		((unsigned long)PFN_PHYS(ARCH_PFN_OFFSET))
27# elif !defined(PHYS_OFFSET)
28#  define PHYS_OFFSET		_AC(0, UL)
29# endif
30#endif /* __ASSEMBLY__ */
31
32#ifdef CONFIG_32BIT
 
33#define CAC_BASE		_AC(0x80000000, UL)
34#ifndef IO_BASE
35#define IO_BASE			_AC(0xa0000000, UL)
36#endif
37#ifndef UNCAC_BASE
38#define UNCAC_BASE		_AC(0xa0000000, UL)
39#endif
40
41#ifndef MAP_BASE
42#define MAP_BASE		_AC(0xc0000000, UL)
43#endif
44
45/*
46 * Memory above this physical address will be considered highmem.
47 */
48#ifndef HIGHMEM_START
49#define HIGHMEM_START		_AC(0x20000000, UL)
50#endif
51
52#endif /* CONFIG_32BIT */
53
54#ifdef CONFIG_64BIT
55
56#ifndef CAC_BASE
57#define CAC_BASE	PHYS_TO_XKPHYS(read_c0_config() & CONF_CM_CMASK, 0)
 
 
 
 
58#endif
59
60#ifndef IO_BASE
61#define IO_BASE			_AC(0x9000000000000000, UL)
62#endif
63
64#ifndef UNCAC_BASE
65#define UNCAC_BASE		_AC(0x9000000000000000, UL)
66#endif
67
68#ifndef MAP_BASE
69#define MAP_BASE		_AC(0xc000000000000000, UL)
70#endif
71
72/*
73 * Memory above this physical address will be considered highmem.
74 * Fixme: 59 bits is a fictive number and makes assumptions about processors
75 * in the distant future.  Nobody will care for a few years :-)
76 */
77#ifndef HIGHMEM_START
78#define HIGHMEM_START		(_AC(1, UL) << _AC(59, UL))
79#endif
80
81#define TO_PHYS(x)		(	      ((x) & TO_PHYS_MASK))
82#define TO_CAC(x)		(CAC_BASE   | ((x) & TO_PHYS_MASK))
83#define TO_UNCAC(x)		(UNCAC_BASE | ((x) & TO_PHYS_MASK))
84
85#endif /* CONFIG_64BIT */
86
87/*
88 * This handles the memory map.
89 */
90#ifndef PAGE_OFFSET
91#define PAGE_OFFSET		(CAC_BASE + PHYS_OFFSET)
92#endif
93
94#ifndef FIXADDR_TOP
95#define FIXADDR_TOP		((unsigned long)(long)(int)0xfffe0000)
96#endif
97
98#endif /* __ASM_MACH_GENERIC_SPACES_H */
v3.5.6
 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 Ralf Baechle
 7 * Copyright (C) 2000, 2002  Maciej W. Rozycki
 8 * Copyright (C) 1990, 1999, 2000 Silicon Graphics, Inc.
 9 */
10#ifndef _ASM_MACH_GENERIC_SPACES_H
11#define _ASM_MACH_GENERIC_SPACES_H
12
13#include <linux/const.h>
14
 
 
 
 
 
 
15/*
16 * This gives the physical RAM offset.
17 */
18#ifndef PHYS_OFFSET
19#define PHYS_OFFSET		_AC(0, UL)
20#endif
 
 
 
 
21
22#ifdef CONFIG_32BIT
23
24#define CAC_BASE		_AC(0x80000000, UL)
 
25#define IO_BASE			_AC(0xa0000000, UL)
 
 
26#define UNCAC_BASE		_AC(0xa0000000, UL)
 
27
28#ifndef MAP_BASE
29#define MAP_BASE		_AC(0xc0000000, UL)
30#endif
31
32/*
33 * Memory above this physical address will be considered highmem.
34 */
35#ifndef HIGHMEM_START
36#define HIGHMEM_START		_AC(0x20000000, UL)
37#endif
38
39#endif /* CONFIG_32BIT */
40
41#ifdef CONFIG_64BIT
42
43#ifndef CAC_BASE
44#ifdef CONFIG_DMA_NONCOHERENT
45#define CAC_BASE		_AC(0x9800000000000000, UL)
46#else
47#define CAC_BASE		_AC(0xa800000000000000, UL)
48#endif
49#endif
50
51#ifndef IO_BASE
52#define IO_BASE			_AC(0x9000000000000000, UL)
53#endif
54
55#ifndef UNCAC_BASE
56#define UNCAC_BASE		_AC(0x9000000000000000, UL)
57#endif
58
59#ifndef MAP_BASE
60#define MAP_BASE		_AC(0xc000000000000000, UL)
61#endif
62
63/*
64 * Memory above this physical address will be considered highmem.
65 * Fixme: 59 bits is a fictive number and makes assumptions about processors
66 * in the distant future.  Nobody will care for a few years :-)
67 */
68#ifndef HIGHMEM_START
69#define HIGHMEM_START		(_AC(1, UL) << _AC(59, UL))
70#endif
71
72#define TO_PHYS(x)		(             ((x) & TO_PHYS_MASK))
73#define TO_CAC(x)		(CAC_BASE   | ((x) & TO_PHYS_MASK))
74#define TO_UNCAC(x)		(UNCAC_BASE | ((x) & TO_PHYS_MASK))
75
76#endif /* CONFIG_64BIT */
77
78/*
79 * This handles the memory map.
80 */
81#ifndef PAGE_OFFSET
82#define PAGE_OFFSET		(CAC_BASE + PHYS_OFFSET)
83#endif
84
85#ifndef FIXADDR_TOP
86#define FIXADDR_TOP		((unsigned long)(long)(int)0xfffe0000)
87#endif
88
89#endif /* __ASM_MACH_GENERIC_SPACES_H */