OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [include/] [asm-m68knommu/] [page.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1633 jcastillo
#ifndef _M68K_PAGE_H
2
#define _M68K_PAGE_H
3
 
4
#include <linux/config.h>
5
#include <asm/shglcore.h>
6
 
7
/* PAGE_SHIFT determines the page size */
8
#define PAGE_SHIFT      12
9
#define PAGE_SIZE       (1UL << PAGE_SHIFT)
10
#define PAGE_MASK       (~(PAGE_SIZE-1))
11
 
12
#ifdef __KERNEL__
13
 
14
#define STRICT_MM_TYPECHECKS
15
 
16
#ifdef STRICT_MM_TYPECHECKS
17
/*
18
 * These are used to make use of C type-checking..
19
 */
20
typedef struct { unsigned long pte; } pte_t;
21
typedef struct { unsigned long pmd[16]; } pmd_t;
22
typedef struct { unsigned long pgd; } pgd_t;
23
typedef struct { unsigned long pgprot; } pgprot_t;
24
 
25
#define pte_val(x)      ((x).pte)
26
#define pmd_val(x)      ((&x)->pmd[0])
27
#define pgd_val(x)      ((x).pgd)
28
#define pgprot_val(x)   ((x).pgprot)
29
 
30
#define __pte(x)        ((pte_t) { (x) } )
31
#define __pmd(x)        ((pmd_t) { (x) } )
32
#define __pgd(x)        ((pgd_t) { (x) } )
33
#define __pgprot(x)     ((pgprot_t) { (x) } )
34
 
35
#else
36
/*
37
 * .. while these make it easier on the compiler
38
 */
39
typedef unsigned long pte_t;
40
typedef struct { unsigned long pmd[16]; } pmd_t;
41
typedef unsigned long pgd_t;
42
typedef unsigned long pgprot_t;
43
 
44
#define pte_val(x)      (x)
45
#define pmd_val(x)      ((&x)->pmd[0])
46
#define pgd_val(x)      (x)
47
#define pgprot_val(x)   (x)
48
 
49
#define __pte(x)        (x)
50
#define __pmd(x)        ((pmd_t) { (x) } )
51
#define __pgd(x)        (x)
52
#define __pgprot(x)     (x)
53
 
54
#endif
55
 
56
/* to align the pointer to the (next) page boundary */
57
#define PAGE_ALIGN(addr)        (((addr)+PAGE_SIZE-1)&PAGE_MASK)
58
 
59
/* This handles the memory map.. */
60
#ifdef CONFIG_COLDFIRE
61
#ifdef CONFIG_SMALL
62
#define PAGE_OFFSET             0x30020000
63
#else
64
#define PAGE_OFFSET             0x00000000
65
#endif
66
#endif
67
 
68
#ifdef CONFIG_PILOT
69
#ifdef CONFIG_M68328
70
#define PAGE_OFFSET             0x10000000
71
#endif
72
#ifdef CONFIG_M68EZ328
73
#define PAGE_OFFSET             0x00000000
74
#endif
75
#endif
76
#ifdef CONFIG_UCSIMM
77
#define PAGE_OFFSET             0x00000000
78
#endif
79
#ifdef CONFIG_M68EZ328ADS
80
#define PAGE_OFFSET             0x00000000
81
#endif
82
#ifdef CONFIG_ALMA_ANS
83
#define PAGE_OFFSET             0x00000000
84
#endif
85
#ifdef CONFIG_M68EN302
86
#define PAGE_OFFSET             0x00000000
87
#endif
88
#ifdef CONFIG_SHGLCORE
89
#define PAGE_OFFSET             SHGLCORE_RAM_BANK_0_ADDR 
90
#endif
91
#define MAP_NR(addr)            ((((unsigned long)(addr)) - PAGE_OFFSET) >> PAGE_SHIFT)
92
 
93
#endif /* __KERNEL__ */
94
 
95
#endif /* _M68K_PAGE_H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.