Commit 9f1f118035b2d28bb741844537b9ee87705b4c6e

Authored by Geert Uytterhoeven
1 parent 5df58f3aac

m68k: Introduce config option CPU_HAS_NO_UNALIGNED

Use CONFIG_CPU_HAS_NO_UNALIGNED instead of open coding CONFIG_M68000 ||
CONFIG_COLDFIRE

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Greg Ungerer<gerg@uclinux.org>

Showing 2 changed files with 7 additions and 2 deletions Side-by-side Diff

arch/m68k/Kconfig.cpu
... ... @@ -27,6 +27,7 @@
27 27 select ARCH_HAVE_CUSTOM_GPIO_H
28 28 select CPU_HAS_NO_BITFIELDS
29 29 select CPU_HAS_NO_MULDIV64
  30 + select CPU_HAS_NO_UNALIGNED
30 31 select GENERIC_CSUM
31 32  
32 33 endchoice
... ... @@ -37,6 +38,7 @@
37 38 bool
38 39 select CPU_HAS_NO_BITFIELDS
39 40 select CPU_HAS_NO_MULDIV64
  41 + select CPU_HAS_NO_UNALIGNED
40 42 select GENERIC_CSUM
41 43 help
42 44 The Freescale (was Motorola) 68000 CPU is the first generation of
... ... @@ -364,6 +366,9 @@
364 366 bool
365 367  
366 368 config CPU_HAS_NO_MULDIV64
  369 + bool
  370 +
  371 +config CPU_HAS_NO_UNALIGNED
367 372 bool
368 373  
369 374 config CPU_HAS_ADDRESS_SPACES
arch/m68k/include/asm/unaligned.h
... ... @@ -2,7 +2,7 @@
2 2 #define _ASM_M68K_UNALIGNED_H
3 3  
4 4  
5   -#if defined(CONFIG_COLDFIRE) || defined(CONFIG_M68000)
  5 +#ifdef CONFIG_CPU_HAS_NO_UNALIGNED
6 6 #include <linux/unaligned/be_struct.h>
7 7 #include <linux/unaligned/le_byteshift.h>
8 8 #include <linux/unaligned/generic.h>
... ... @@ -12,7 +12,7 @@
12 12  
13 13 #else
14 14 /*
15   - * The m68k can do unaligned accesses itself.
  15 + * The m68k can do unaligned accesses itself.
16 16 */
17 17 #include <linux/unaligned/access_ok.h>
18 18 #include <linux/unaligned/generic.h>