aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-m68knommu
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-m68knommu')
-rw-r--r--include/asm-m68knommu/auxvec.h4
-rw-r--r--include/asm-m68knommu/coldfire.h6
-rw-r--r--include/asm-m68knommu/futex.h53
-rw-r--r--include/asm-m68knommu/hdreg.h1
-rw-r--r--include/asm-m68knommu/m523xsim.h46
-rw-r--r--include/asm-m68knommu/mcfsim.h6
-rw-r--r--include/asm-m68knommu/mcfuart.h2
-rw-r--r--include/asm-m68knommu/page.h16
-rw-r--r--include/asm-m68knommu/uaccess.h6
9 files changed, 114 insertions, 26 deletions
diff --git a/include/asm-m68knommu/auxvec.h b/include/asm-m68knommu/auxvec.h
new file mode 100644
index 000000000000..844d6d52204b
--- /dev/null
+++ b/include/asm-m68knommu/auxvec.h
@@ -0,0 +1,4 @@
1#ifndef __ASMm68k_AUXVEC_H
2#define __ASMm68k_AUXVEC_H
3
4#endif
diff --git a/include/asm-m68knommu/coldfire.h b/include/asm-m68knommu/coldfire.h
index 16f32cc80c40..1df3f666a28e 100644
--- a/include/asm-m68knommu/coldfire.h
+++ b/include/asm-m68knommu/coldfire.h
@@ -22,7 +22,7 @@
22#define MCF_MBAR2 0x80000000 22#define MCF_MBAR2 0x80000000
23#define MCF_IPSBAR 0x40000000 23#define MCF_IPSBAR 0x40000000
24 24
25#if defined(CONFIG_M527x) || defined(CONFIG_M528x) 25#if defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x)
26#undef MCF_MBAR 26#undef MCF_MBAR
27#define MCF_MBAR MCF_IPSBAR 27#define MCF_MBAR MCF_IPSBAR
28#endif 28#endif
@@ -54,6 +54,8 @@
54#define MCF_CLK 54000000 54#define MCF_CLK 54000000
55#elif defined(CONFIG_CLOCK_60MHz) 55#elif defined(CONFIG_CLOCK_60MHz)
56#define MCF_CLK 60000000 56#define MCF_CLK 60000000
57#elif defined(CONFIG_CLOCK_62_5MHz)
58#define MCF_CLK 62500000
57#elif defined(CONFIG_CLOCK_64MHz) 59#elif defined(CONFIG_CLOCK_64MHz)
58#define MCF_CLK 64000000 60#define MCF_CLK 64000000
59#elif defined(CONFIG_CLOCK_66MHz) 61#elif defined(CONFIG_CLOCK_66MHz)
@@ -76,7 +78,7 @@
76 * One some ColdFire family members the bus clock (used by internal 78 * One some ColdFire family members the bus clock (used by internal
77 * peripherals) is not the same as the CPU clock. 79 * peripherals) is not the same as the CPU clock.
78 */ 80 */
79#if defined(CONFIG_M5249) || defined(CONFIG_M527x) 81#if defined(CONFIG_M523x) || defined(CONFIG_M5249) || defined(CONFIG_M527x)
80#define MCF_BUSCLK (MCF_CLK / 2) 82#define MCF_BUSCLK (MCF_CLK / 2)
81#else 83#else
82#define MCF_BUSCLK MCF_CLK 84#define MCF_BUSCLK MCF_CLK
diff --git a/include/asm-m68knommu/futex.h b/include/asm-m68knommu/futex.h
new file mode 100644
index 000000000000..2cac5ecd9d00
--- /dev/null
+++ b/include/asm-m68knommu/futex.h
@@ -0,0 +1,53 @@
1#ifndef _ASM_FUTEX_H
2#define _ASM_FUTEX_H
3
4#ifdef __KERNEL__
5
6#include <linux/futex.h>
7#include <asm/errno.h>
8#include <asm/uaccess.h>
9
10static inline int
11futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
12{
13 int op = (encoded_op >> 28) & 7;
14 int cmp = (encoded_op >> 24) & 15;
15 int oparg = (encoded_op << 8) >> 20;
16 int cmparg = (encoded_op << 20) >> 20;
17 int oldval = 0, ret, tem;
18 if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
19 oparg = 1 << oparg;
20
21 if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int)))
22 return -EFAULT;
23
24 inc_preempt_count();
25
26 switch (op) {
27 case FUTEX_OP_SET:
28 case FUTEX_OP_ADD:
29 case FUTEX_OP_OR:
30 case FUTEX_OP_ANDN:
31 case FUTEX_OP_XOR:
32 default:
33 ret = -ENOSYS;
34 }
35
36 dec_preempt_count();
37
38 if (!ret) {
39 switch (cmp) {
40 case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break;
41 case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break;
42 case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break;
43 case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break;
44 case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break;
45 case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break;
46 default: ret = -ENOSYS;
47 }
48 }
49 return ret;
50}
51
52#endif
53#endif
diff --git a/include/asm-m68knommu/hdreg.h b/include/asm-m68knommu/hdreg.h
deleted file mode 100644
index 5cdd9b084d37..000000000000
--- a/include/asm-m68knommu/hdreg.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-m68k/hdreg.h>
diff --git a/include/asm-m68knommu/m523xsim.h b/include/asm-m68knommu/m523xsim.h
new file mode 100644
index 000000000000..926cfb805df7
--- /dev/null
+++ b/include/asm-m68knommu/m523xsim.h
@@ -0,0 +1,46 @@
1/****************************************************************************/
2
3/*
4 * m523xsim.h -- ColdFire 523x System Integration Module support.
5 *
6 * (C) Copyright 2003-2005, Greg Ungerer <gerg@snapgear.com>
7 */
8
9/****************************************************************************/
10#ifndef m523xsim_h
11#define m523xsim_h
12/****************************************************************************/
13
14#include <linux/config.h>
15
16/*
17 * Define the 523x SIM register set addresses.
18 */
19#define MCFICM_INTC0 0x0c00 /* Base for Interrupt Ctrl 0 */
20#define MCFICM_INTC1 0x0d00 /* Base for Interrupt Ctrl 0 */
21#define MCFINTC_IPRH 0x00 /* Interrupt pending 32-63 */
22#define MCFINTC_IPRL 0x04 /* Interrupt pending 1-31 */
23#define MCFINTC_IMRH 0x08 /* Interrupt mask 32-63 */
24#define MCFINTC_IMRL 0x0c /* Interrupt mask 1-31 */
25#define MCFINTC_INTFRCH 0x10 /* Interrupt force 32-63 */
26#define MCFINTC_INTFRCL 0x14 /* Interrupt force 1-31 */
27#define MCFINTC_IRLR 0x18 /* */
28#define MCFINTC_IACKL 0x19 /* */
29#define MCFINTC_ICR0 0x40 /* Base ICR register */
30
31#define MCFINT_VECBASE 64 /* Vector base number */
32#define MCFINT_UART0 13 /* Interrupt number for UART0 */
33#define MCFINT_PIT1 36 /* Interrupt number for PIT1 */
34#define MCFINT_QSPI 18 /* Interrupt number for QSPI */
35
36/*
37 * SDRAM configuration registers.
38 */
39#define MCFSIM_DCR 0x44 /* SDRAM control */
40#define MCFSIM_DACR0 0x48 /* SDRAM base address 0 */
41#define MCFSIM_DMR0 0x4c /* SDRAM address mask 0 */
42#define MCFSIM_DACR1 0x50 /* SDRAM base address 1 */
43#define MCFSIM_DMR1 0x54 /* SDRAM address mask 1 */
44
45/****************************************************************************/
46#endif /* m523xsim_h */
diff --git a/include/asm-m68knommu/mcfsim.h b/include/asm-m68knommu/mcfsim.h
index 522e513c2bc6..b0c7736f7a99 100644
--- a/include/asm-m68knommu/mcfsim.h
+++ b/include/asm-m68knommu/mcfsim.h
@@ -15,13 +15,15 @@
15#include <linux/config.h> 15#include <linux/config.h>
16 16
17/* 17/*
18 * Include 5204, 5206/e, 5249, 5270/5271, 5272, 5280/5282, 5307 or 18 * Include 5204, 5206/e, 5235, 5249, 5270/5271, 5272, 5280/5282,
19 * 5407 specific addresses. 19 * 5307 or 5407 specific addresses.
20 */ 20 */
21#if defined(CONFIG_M5204) 21#if defined(CONFIG_M5204)
22#include <asm/m5204sim.h> 22#include <asm/m5204sim.h>
23#elif defined(CONFIG_M5206) || defined(CONFIG_M5206e) 23#elif defined(CONFIG_M5206) || defined(CONFIG_M5206e)
24#include <asm/m5206sim.h> 24#include <asm/m5206sim.h>
25#elif defined(CONFIG_M523x)
26#include <asm/m523xsim.h>
25#elif defined(CONFIG_M5249) 27#elif defined(CONFIG_M5249)
26#include <asm/m5249sim.h> 28#include <asm/m5249sim.h>
27#elif defined(CONFIG_M527x) 29#elif defined(CONFIG_M527x)
diff --git a/include/asm-m68knommu/mcfuart.h b/include/asm-m68knommu/mcfuart.h
index 54d4a85f4fdf..9c1210613bc7 100644
--- a/include/asm-m68knommu/mcfuart.h
+++ b/include/asm-m68knommu/mcfuart.h
@@ -29,7 +29,7 @@
29#define MCFUART_BASE1 0x140 /* Base address of UART1 */ 29#define MCFUART_BASE1 0x140 /* Base address of UART1 */
30#define MCFUART_BASE2 0x180 /* Base address of UART2 */ 30#define MCFUART_BASE2 0x180 /* Base address of UART2 */
31#endif 31#endif
32#elif defined(CONFIG_M527x) || defined(CONFIG_M528x) 32#elif defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x)
33#define MCFUART_BASE1 0x200 /* Base address of UART1 */ 33#define MCFUART_BASE1 0x200 /* Base address of UART1 */
34#define MCFUART_BASE2 0x240 /* Base address of UART2 */ 34#define MCFUART_BASE2 0x240 /* Base address of UART2 */
35#define MCFUART_BASE3 0x280 /* Base address of UART3 */ 35#define MCFUART_BASE3 0x280 /* Base address of UART3 */
diff --git a/include/asm-m68knommu/page.h b/include/asm-m68knommu/page.h
index ff6a9265ed1c..942dfbead27f 100644
--- a/include/asm-m68knommu/page.h
+++ b/include/asm-m68knommu/page.h
@@ -48,20 +48,6 @@ typedef struct { unsigned long pgprot; } pgprot_t;
48/* to align the pointer to the (next) page boundary */ 48/* to align the pointer to the (next) page boundary */
49#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) 49#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK)
50 50
51/* Pure 2^n version of get_order */
52extern __inline__ int get_order(unsigned long size)
53{
54 int order;
55
56 size = (size-1) >> (PAGE_SHIFT-1);
57 order = -1;
58 do {
59 size >>= 1;
60 order++;
61 } while (size);
62 return order;
63}
64
65extern unsigned long memory_start; 51extern unsigned long memory_start;
66extern unsigned long memory_end; 52extern unsigned long memory_end;
67 53
@@ -93,4 +79,6 @@ extern unsigned long memory_end;
93 79
94#endif /* __KERNEL__ */ 80#endif /* __KERNEL__ */
95 81
82#include <asm-generic/page.h>
83
96#endif /* _M68KNOMMU_PAGE_H */ 84#endif /* _M68KNOMMU_PAGE_H */
diff --git a/include/asm-m68knommu/uaccess.h b/include/asm-m68knommu/uaccess.h
index f0be74bb353c..05be9515a2d2 100644
--- a/include/asm-m68knommu/uaccess.h
+++ b/include/asm-m68knommu/uaccess.h
@@ -23,12 +23,6 @@ static inline int _access_ok(unsigned long addr, unsigned long size)
23 (is_in_rom(addr) && is_in_rom(addr+size))); 23 (is_in_rom(addr) && is_in_rom(addr+size)));
24} 24}
25 25
26/* this function will go away soon - use access_ok() instead */
27extern inline int __deprecated verify_area(int type, const void * addr, unsigned long size)
28{
29 return access_ok(type,addr,size)?0:-EFAULT;
30}
31
32/* 26/*
33 * The exception table consists of pairs of addresses: the first is the 27 * The exception table consists of pairs of addresses: the first is the
34 * address of an instruction that is allowed to fault, and the second is 28 * address of an instruction that is allowed to fault, and the second is