forked from AndyLaiJS/SkyMelon-msm8939
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust the arch overrides to the new names as well. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
- Loading branch information
Showing
6 changed files
with
44 additions
and
45 deletions.
There are no files selected for viewing
16 changes: 10 additions & 6 deletions
16
arch/cris/include/arch-v10/arch/byteorder.h → arch/cris/include/arch-v10/arch/swab.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,30 @@ | ||
#ifndef _CRIS_ARCH_BYTEORDER_H | ||
#define _CRIS_ARCH_BYTEORDER_H | ||
#ifndef _CRIS_ARCH_SWAB_H | ||
#define _CRIS_ARCH_SWAB_H | ||
|
||
#include <asm/types.h> | ||
#include <linux/compiler.h> | ||
|
||
#define __SWAB_64_THRU_32__ | ||
|
||
/* we just define these two (as we can do the swap in a single | ||
* asm instruction in CRIS) and the arch-independent files will put | ||
* them together into ntohl etc. | ||
*/ | ||
|
||
static inline __attribute_const__ __u32 ___arch__swab32(__u32 x) | ||
static inline __attribute_const__ __u32 __arch_swab32(__u32 x) | ||
{ | ||
__asm__ ("swapwb %0" : "=r" (x) : "0" (x)); | ||
|
||
return(x); | ||
} | ||
#define __arch_swab32 __arch_swab32 | ||
|
||
static inline __attribute_const__ __u16 ___arch__swab16(__u16 x) | ||
static inline __attribute_const__ __u16 __arch_swab16(__u16 x) | ||
{ | ||
__asm__ ("swapb %0" : "=r" (x) : "0" (x)); | ||
|
||
return(x); | ||
} | ||
#define __arch_swab16 __arch_swab16 | ||
|
||
#endif |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#ifndef _ASM_CRIS_ARCH_SWAB_H | ||
#define _ASM_CRIS_ARCH_SWAB_H | ||
|
||
#include <asm/types.h> | ||
|
||
#define __SWAB_64_THRU_32__ | ||
|
||
static inline __const__ __u32 | ||
__arch_swab32(__u32 x) | ||
{ | ||
__asm__ __volatile__ ("swapwb %0" : "=r" (x) : "0" (x)); | ||
return (x); | ||
} | ||
#define __arch_swab32 __arch_swab32 | ||
|
||
static inline __const__ __u16 | ||
__arch_swab16(__u16 x) | ||
{ | ||
__asm__ __volatile__ ("swapb %0" : "=r" (x) : "0" (x)); | ||
return (x); | ||
} | ||
#define __arch_swab16 __arch_swab16 | ||
|
||
#endif /* _ASM_CRIS_ARCH_SWAB_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ header-y += sync_serial.h | |
|
||
unifdef-y += etraxgpio.h | ||
unifdef-y += rs485.h | ||
unifdef-y += swab.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#ifndef _CRIS_SWAB_H | ||
#define _CRIS_SWAB_H | ||
|
||
#ifdef __KERNEL__ | ||
#include <arch/swab.h> | ||
#endif /* __KERNEL__ */ | ||
|
||
#endif /* _CRIS_SWAB_H */ |