summaryrefslogtreecommitdiff
path: root/drivers/media/video/tiler/dmm_reg.h
blob: dbd8683c58b40e8e7732788ae97e6c713302e517 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
 * dmm_reg.h
 *
 * DMM driver support functions for TI OMAP processors.
 *
 * Copyright (C) 2009-2010 Texas Instruments, Inc.
 *
 * This package is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */
#ifndef DMM_REG_H
#define DMM_REG_H

#define BITS_32(in_NbBits) \
  ((((unsigned long)1 << in_NbBits) - 1) | ((unsigned long)1 << in_NbBits))

#define BITFIELD_32(in_UpBit, in_LowBit) \
  (BITS_32(in_UpBit) & ~((BITS_32(in_LowBit)) >> 1))

#define BITFIELD BITFIELD_32

extern unsigned long *dmm_virt_base_addr;
#endif