aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-m68knommu
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-07-24 15:17:19 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-24 15:17:19 -0400
commit3fde80e94c2bbffbb13f5faa3340cf438440ebea (patch)
tree43eeac74dc34596772b9d9883e9208da8ae84184 /include/asm-m68knommu
parentac9f80ad16e6e934b6c1f12f82d27889c0f9abcc (diff)
parent9b0e74102494971ca37a425c63031fea68bb5b79 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68knommu: put ColdFire head code into .text.head section m68knommu: remove last use of CONFIG_FADS and CONFIG_RPXCLASSIC m68knommu: remove RPXCLASSIC from the m68k tree m68knommu: fec: remove FADS m68knommu: MCF5307 PIT GENERIC_CLOCKEVENTS support m68knommu: add read_barrier_depends() and irqs_disabled_flags() m68knommu: add byteswap assembly opcode for ISA A+ m68knommu: add ffs and __ffs plattform which support ISA A+ or ISA C m68knommu: add sched_clock() for the DMA timer m68knommu: complete generic time m68knommu: move code within time.c m68knommu: m68knommu: add old stack trace method m68knommu: Add Coldfire DMA Timer support m68knommu: defconfig for M5407C3 board m68knommu: defconfig for M5307C3 board m68knommu: defconfig for M5275EVB board m68knommu: defconfig for M5249EVB board m68knommu: change to a configs directory for board configurations
Diffstat (limited to 'include/asm-m68knommu')
-rw-r--r--include/asm-m68knommu/bitops.h30
-rw-r--r--include/asm-m68knommu/byteorder.h16
-rw-r--r--include/asm-m68knommu/commproc.h19
-rw-r--r--include/asm-m68knommu/system.h11
4 files changed, 56 insertions, 20 deletions
diff --git a/include/asm-m68knommu/bitops.h b/include/asm-m68knommu/bitops.h
index c142fbf2f376..6f3685eab44c 100644
--- a/include/asm-m68knommu/bitops.h
+++ b/include/asm-m68knommu/bitops.h
@@ -14,8 +14,38 @@
14#error only <linux/bitops.h> can be included directly 14#error only <linux/bitops.h> can be included directly
15#endif 15#endif
16 16
17#if defined (__mcfisaaplus__) || defined (__mcfisac__)
18static inline int ffs(unsigned int val)
19{
20 if (!val)
21 return 0;
22
23 asm volatile(
24 "bitrev %0\n\t"
25 "ff1 %0\n\t"
26 : "=d" (val)
27 : "0" (val)
28 );
29 val++;
30 return val;
31}
32
33static inline int __ffs(unsigned int val)
34{
35 asm volatile(
36 "bitrev %0\n\t"
37 "ff1 %0\n\t"
38 : "=d" (val)
39 : "0" (val)
40 );
41 return val;
42}
43
44#else
17#include <asm-generic/bitops/ffs.h> 45#include <asm-generic/bitops/ffs.h>
18#include <asm-generic/bitops/__ffs.h> 46#include <asm-generic/bitops/__ffs.h>
47#endif
48
19#include <asm-generic/bitops/sched.h> 49#include <asm-generic/bitops/sched.h>
20#include <asm-generic/bitops/ffz.h> 50#include <asm-generic/bitops/ffz.h>
21 51
diff --git a/include/asm-m68knommu/byteorder.h b/include/asm-m68knommu/byteorder.h
index 8fcde907b0f9..20bb4426b610 100644
--- a/include/asm-m68knommu/byteorder.h
+++ b/include/asm-m68knommu/byteorder.h
@@ -1,13 +1,27 @@
1#ifndef _M68KNOMMU_BYTEORDER_H 1#ifndef _M68KNOMMU_BYTEORDER_H
2#define _M68KNOMMU_BYTEORDER_H 2#define _M68KNOMMU_BYTEORDER_H
3 3
4#include <asm/types.h> 4#include <linux/types.h>
5 5
6#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__) 6#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)
7# define __BYTEORDER_HAS_U64__ 7# define __BYTEORDER_HAS_U64__
8# define __SWAB_64_THRU_32__ 8# define __SWAB_64_THRU_32__
9#endif 9#endif
10 10
11#if defined (__mcfisaaplus__) || defined (__mcfisac__)
12static inline __attribute_const__ __u32 ___arch__swab32(__u32 val)
13{
14 asm(
15 "byterev %0"
16 : "=d" (val)
17 : "0" (val)
18 );
19 return val;
20}
21
22#define __arch__swab32(x) ___arch__swab32(x)
23#endif
24
11#include <linux/byteorder/big_endian.h> 25#include <linux/byteorder/big_endian.h>
12 26
13#endif /* _M68KNOMMU_BYTEORDER_H */ 27#endif /* _M68KNOMMU_BYTEORDER_H */
diff --git a/include/asm-m68knommu/commproc.h b/include/asm-m68knommu/commproc.h
index 36e870b468ef..edf5eb6c08d2 100644
--- a/include/asm-m68knommu/commproc.h
+++ b/include/asm-m68knommu/commproc.h
@@ -519,25 +519,6 @@ typedef struct scc_enet {
519#define SICR_ENET_CLKRT ((uint)0x00002c00) 519#define SICR_ENET_CLKRT ((uint)0x00002c00)
520#endif 520#endif
521 521
522#ifdef CONFIG_RPXCLASSIC
523/* Bits in parallel I/O port registers that have to be set/cleared
524 * to configure the pins for SCC1 use.
525 */
526#define PA_ENET_RXD ((ushort)0x0001)
527#define PA_ENET_TXD ((ushort)0x0002)
528#define PA_ENET_TCLK ((ushort)0x0200)
529#define PA_ENET_RCLK ((ushort)0x0800)
530#define PB_ENET_TENA ((uint)0x00001000)
531#define PC_ENET_CLSN ((ushort)0x0010)
532#define PC_ENET_RENA ((ushort)0x0020)
533
534/* Control bits in the SICR to route TCLK (CLK2) and RCLK (CLK4) to
535 * SCC1. Also, make sure GR1 (bit 24) and SC1 (bit 25) are zero.
536 */
537#define SICR_ENET_MASK ((uint)0x000000ff)
538#define SICR_ENET_CLKRT ((uint)0x0000003d)
539#endif
540
541/* SCC Event register as used by Ethernet. 522/* SCC Event register as used by Ethernet.
542*/ 523*/
543#define SCCE_ENET_GRA ((ushort)0x0080) /* Graceful stop complete */ 524#define SCCE_ENET_GRA ((ushort)0x0080) /* Graceful stop complete */
diff --git a/include/asm-m68knommu/system.h b/include/asm-m68knommu/system.h
index 64c64432bbb8..40f49de69821 100644
--- a/include/asm-m68knommu/system.h
+++ b/include/asm-m68knommu/system.h
@@ -118,6 +118,8 @@ asmlinkage void resume(void);
118#define smp_read_barrier_depends() do { } while(0) 118#define smp_read_barrier_depends() do { } while(0)
119#endif 119#endif
120 120
121#define read_barrier_depends() ((void)0)
122
121#define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) 123#define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
122 124
123struct __xchg_dummy { unsigned long a[100]; }; 125struct __xchg_dummy { unsigned long a[100]; };
@@ -310,4 +312,13 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz
310#endif 312#endif
311#define arch_align_stack(x) (x) 313#define arch_align_stack(x) (x)
312 314
315
316static inline int irqs_disabled_flags(unsigned long flags)
317{
318 if (flags & 0x0700)
319 return 0;
320 else
321 return 1;
322}
323
313#endif /* _M68KNOMMU_SYSTEM_H */ 324#endif /* _M68KNOMMU_SYSTEM_H */