mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-24 05:54:08 +00:00
utils: move BIT(n) macro to utils.h
We are duplicating this macro define, and it is useful enough to be placed in the common place. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
This commit is contained in:
parent
9eb4d4dd93
commit
152c8c11b7
4 changed files with 5 additions and 5 deletions
|
@ -39,6 +39,7 @@
|
|||
#include <gpio.h>
|
||||
#include <mmio.h>
|
||||
#include <pl061_gpio.h>
|
||||
#include <utils.h>
|
||||
|
||||
#if !PLAT_PL061_MAX_GPIOS
|
||||
# define PLAT_PL061_MAX_GPIOS 32
|
||||
|
@ -52,7 +53,6 @@ CASSERT(PLAT_PL061_MAX_GPIOS > 0, assert_plat_pl061_max_gpios);
|
|||
#define PL061_GPIO_DIR 0x400
|
||||
|
||||
#define GPIOS_PER_PL061 8
|
||||
#define BIT(nr) (1UL << (nr))
|
||||
|
||||
static int pl061_get_direction(int gpio);
|
||||
static void pl061_set_direction(int gpio, int direction);
|
||||
|
|
|
@ -40,6 +40,8 @@
|
|||
|
||||
#define SIZE_FROM_LOG2_WORDS(n) (4 << (n))
|
||||
|
||||
#define BIT(nr) (1UL << (nr))
|
||||
|
||||
/*
|
||||
* The round_up() macro rounds up a value to the given boundary in a
|
||||
* type-agnostic yet type-safe manner. The boundary must be a power of two.
|
||||
|
|
|
@ -75,10 +75,6 @@ struct rockchip_pm_ops_cb {
|
|||
******************************************************************************/
|
||||
#define REG_MSK_SHIFT 16
|
||||
|
||||
#ifndef BIT
|
||||
#define BIT(nr) (1 << (nr))
|
||||
#endif
|
||||
|
||||
#ifndef WMSK_BIT
|
||||
#define WMSK_BIT(nr) BIT((nr) + REG_MSK_SHIFT)
|
||||
#endif
|
||||
|
|
|
@ -31,6 +31,8 @@
|
|||
#ifndef __SOC_H__
|
||||
#define __SOC_H__
|
||||
|
||||
#include <utils.h>
|
||||
|
||||
#define GLB_SRST_FST_CFG_VAL 0xfdb9
|
||||
#define GLB_SRST_SND_CFG_VAL 0xeca8
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue