mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-21 14:41:31 +00:00
gpio: uniphier: import dt-binginds header from Linux
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
This commit is contained in:
parent
10c62f41e3
commit
e9986a4fa7
2 changed files with 19 additions and 2 deletions
|
@ -13,8 +13,7 @@
|
|||
#include <linux/errno.h>
|
||||
#include <asm/global_data.h>
|
||||
#include <asm/gpio.h>
|
||||
|
||||
#define UNIPHIER_GPIO_LINES_PER_BANK 8
|
||||
#include <dt-bindings/gpio/uniphier-gpio.h>
|
||||
|
||||
#define UNIPHIER_GPIO_PORT_DATA 0x0 /* data */
|
||||
#define UNIPHIER_GPIO_PORT_DIR 0x4 /* direction (1:in, 0:out) */
|
||||
|
|
18
include/dt-bindings/gpio/uniphier-gpio.h
Normal file
18
include/dt-bindings/gpio/uniphier-gpio.h
Normal file
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* Copyright (C) 2017 Socionext Inc.
|
||||
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
|
||||
*/
|
||||
|
||||
#ifndef _DT_BINDINGS_GPIO_UNIPHIER_H
|
||||
#define _DT_BINDINGS_GPIO_UNIPHIER_H
|
||||
|
||||
#define UNIPHIER_GPIO_LINES_PER_BANK 8
|
||||
|
||||
#define UNIPHIER_GPIO_IRQ_OFFSET ((UNIPHIER_GPIO_LINES_PER_BANK) * 15)
|
||||
|
||||
#define UNIPHIER_GPIO_PORT(bank, line) \
|
||||
((UNIPHIER_GPIO_LINES_PER_BANK) * (bank) + (line))
|
||||
|
||||
#define UNIPHIER_GPIO_IRQ(n) ((UNIPHIER_GPIO_IRQ_OFFSET) + (n))
|
||||
|
||||
#endif /* _DT_BINDINGS_GPIO_UNIPHIER_H */
|
Loading…
Add table
Reference in a new issue