mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-21 04:00:25 +09:00
3747bdbb2b
All architectures have the same definition for s8/16/32/64 and u8/16/32/64. Factor out the duplicated code into <asm-generic/int-ll64.h>. BTW, Linux unified the kernel space definition into int-ll64.h a few years ago as you see in Linux commit 0c79a8e29b5f ("asm/types.h: Remove include/asm-generic/int-l64.h"). Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
56 lines
987 B
C
56 lines
987 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright (C) 1994, 1995, 1996, 1999 by Ralf Baechle
|
|
* Copyright (C) 1999 Silicon Graphics, Inc.
|
|
*/
|
|
#ifndef _ASM_TYPES_H
|
|
#define _ASM_TYPES_H
|
|
|
|
#include <asm-generic/int-ll64.h>
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
typedef unsigned short umode_t;
|
|
|
|
#endif /* __ASSEMBLY__ */
|
|
|
|
/*
|
|
* These aren't exported outside the kernel to avoid name space clashes
|
|
*/
|
|
#ifdef __KERNEL__
|
|
|
|
#define BITS_PER_LONG _MIPS_SZLONG
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
#if (defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) \
|
|
|| defined(CONFIG_64BIT)
|
|
typedef u64 dma_addr_t;
|
|
|
|
typedef u64 phys_addr_t;
|
|
typedef u64 phys_size_t;
|
|
|
|
#else
|
|
typedef u32 dma_addr_t;
|
|
|
|
typedef u32 phys_addr_t;
|
|
typedef u32 phys_size_t;
|
|
|
|
#endif
|
|
typedef u64 dma64_addr_t;
|
|
|
|
/*
|
|
* Don't use phys_t. You've been warned.
|
|
*/
|
|
#ifdef CONFIG_64BIT_PHYS_ADDR
|
|
typedef unsigned long long phys_t;
|
|
#else
|
|
typedef unsigned long phys_t;
|
|
#endif
|
|
|
|
#endif /* __ASSEMBLY__ */
|
|
|
|
#endif /* __KERNEL__ */
|
|
|
|
#endif /* _ASM_TYPES_H */
|