uboot/arch/mips/include/asm/types.h
<<
>>
Prefs
   1/*
   2 * Copyright (C) 1994, 1995, 1996, 1999 by Ralf Baechle
   3 * Copyright (C) 1999 Silicon Graphics, Inc.
   4 *
   5 * SPDX-License-Identifier:     GPL-2.0
   6 */
   7#ifndef _ASM_TYPES_H
   8#define _ASM_TYPES_H
   9
  10#ifndef __ASSEMBLY__
  11
  12typedef unsigned short umode_t;
  13
  14/*
  15 * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
  16 * header files exported to user space
  17 */
  18
  19typedef __signed__ char __s8;
  20typedef unsigned char __u8;
  21
  22typedef __signed__ short __s16;
  23typedef unsigned short __u16;
  24
  25typedef __signed__ int __s32;
  26typedef unsigned int __u32;
  27
  28#if defined(__GNUC__)
  29__extension__ typedef __signed__ long long __s64;
  30__extension__ typedef unsigned long long __u64;
  31#else
  32typedef __signed__ long long __s64;
  33typedef unsigned long long __u64;
  34#endif
  35
  36#endif /* __ASSEMBLY__ */
  37
  38/*
  39 * These aren't exported outside the kernel to avoid name space clashes
  40 */
  41#ifdef __KERNEL__
  42
  43#define BITS_PER_LONG _MIPS_SZLONG
  44
  45#ifndef __ASSEMBLY__
  46
  47typedef __signed char s8;
  48typedef unsigned char u8;
  49
  50typedef __signed short s16;
  51typedef unsigned short u16;
  52
  53typedef __signed int s32;
  54typedef unsigned int u32;
  55
  56typedef __signed__ long long s64;
  57typedef unsigned long long u64;
  58
  59#if (defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) \
  60    || defined(CONFIG_64BIT)
  61typedef u64 dma_addr_t;
  62
  63typedef u64 phys_addr_t;
  64typedef u64 phys_size_t;
  65
  66#else
  67typedef u32 dma_addr_t;
  68
  69typedef u32 phys_addr_t;
  70typedef u32 phys_size_t;
  71
  72#endif
  73typedef u64 dma64_addr_t;
  74
  75/*
  76 * Don't use phys_t.  You've been warned.
  77 */
  78#ifdef CONFIG_64BIT_PHYS_ADDR
  79typedef unsigned long long phys_t;
  80#else
  81typedef unsigned long phys_t;
  82#endif
  83
  84#endif /* __ASSEMBLY__ */
  85
  86#endif /* __KERNEL__ */
  87
  88#endif /* _ASM_TYPES_H */
  89