diff options
author | Kyungmin Park <kyungmin.park@samsung.com> | 2008-11-19 16:32:36 +0100 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2008-11-19 20:34:39 +0100 |
commit | 7e6ee7ad27de5216db1baef76f38c3429c8f4a2a (patch) | |
tree | fe2108d4ddfea1d8054eefe57740b68036f70644 /include/linux/types.h | |
parent | c91a719daa331b5856109313371e4ece5ec06d96 (diff) |
UBI: Add basic UBI support to U-Boot (Part 6/8)
This patch adds basic UBI (Unsorted Block Image) support to U-Boot.
It's based on the Linux UBI version and basically has a "OS"
translation wrapper that defines most Linux specific calls
(spin_lock() etc.) into no-ops. Some source code parts have been
uncommented by "#ifdef UBI_LINUX". This makes it easier to compare
this version with the Linux version and simplifies future UBI
ports/bug-fixes from the Linux version.
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'include/linux/types.h')
-rw-r--r-- | include/linux/types.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/linux/types.h b/include/linux/types.h index df4808fcdf..1b0b4a44c4 100644 --- a/include/linux/types.h +++ b/include/linux/types.h @@ -119,6 +119,30 @@ typedef __s64 int64_t; * Below are truly Linux-specific types that should never collide with * any application/library that wants linux/types.h. */ +#ifdef __CHECKER__ +#define __bitwise__ __attribute__((bitwise)) +#else +#define __bitwise__ +#endif +#ifdef __CHECK_ENDIAN__ +#define __bitwise __bitwise__ +#else +#define __bitwise +#endif + +typedef __u16 __bitwise __le16; +typedef __u16 __bitwise __be16; +typedef __u32 __bitwise __le32; +typedef __u32 __bitwise __be32; +#if defined(__GNUC__) +typedef __u64 __bitwise __le64; +typedef __u64 __bitwise __be64; +#endif +typedef __u16 __bitwise __sum16; +typedef __u32 __bitwise __wsum; + + +typedef unsigned __bitwise__ gfp_t; struct ustat { __kernel_daddr_t f_tfree; |