From patchwork Fri Nov 24 15:25:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 119592 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp2376874qgn; Fri, 24 Nov 2017 07:29:18 -0800 (PST) X-Google-Smtp-Source: AGs4zMbTo94A+1v/zLBqtrjvx7wC2Uq7JCOhzJwOdGwxdi56NoPP9huLYuOodAnLV2/Hlprm22Xy X-Received: by 10.80.147.93 with SMTP id n29mr39079071eda.237.1511537358559; Fri, 24 Nov 2017 07:29:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511537358; cv=none; d=google.com; s=arc-20160816; b=qGOUqGqMnhupO3e1GSdD4flWRzUxfZf+QmHaQMV4fYPNPHFEeX+damG0ab3P1xR8a/ amFOnVQtD802rDLAPRXFY7W7cLHTD8gGxmmZSh20Z0XYbl8MuJmGuGuCISTrz9JnXhsx aZ6PDM6cMw7l5Cp+S/D7M12FGqjCSsNPBmB9SBBDEXUHyq3KzLassVApIR9f7VrAtdH9 Z27S3b7i9rPpQckIEOEsc1Kv0yDpRXnVeAHnOfr/pVietAYQbKBOg0oYk3bd/rJIDTCk d7H7UvWv/8Mzw1mtO547CnxX8kTtxL2z9SxFaYW6aQ7DRwu5luyQ0jIWrN7IJuH+Ajye 4lZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:dkim-filter:arc-authentication-results; bh=/VhEvfdvnKCnWfGtaE9qYGOGeYELsAdPuF+g2aI8TSk=; b=Y6UrVchV3vigMc3vPWpG6x6BobpczB0uBeT/AdyJb9YK3itO/nm963Na4DIF9zNrQ4 gGK9UC7lL7HRKmC31i6ux9lpzuhACDIRZ3R9YZds31DBIoXY/YbqHvumz4kBDQeQSKoQ TFy3jsMaplgQzfLZuXsQpvdza9HIUcK6+7UmHzgxZdmKJlnpKe4dUuCGf1VXiKeSzh85 QCkNkfxSiFkDwEVogo0buvzn9q3LEn2eAUXXI6iqT5/0KYYe2BxRwytawtvS0feWTycv ld6VZeapRo6WcNASCxj0sEoLBGRN4ht42ZZtyLjWeSletUb8BjFdPXSlKhE+MJXi2hPY Zu+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=bASorbUf; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id a54si4107264edc.11.2017.11.24.07.29.17; Fri, 24 Nov 2017 07:29:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=bASorbUf; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id D670CC21DE4; Fri, 24 Nov 2017 15:27:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 4EB8FC21E10; Fri, 24 Nov 2017 15:27:09 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 83582C21DDA; Fri, 24 Nov 2017 15:25:53 +0000 (UTC) Received: from conuserg-11.nifty.com (conuserg-11.nifty.com [210.131.2.78]) by lists.denx.de (Postfix) with ESMTPS id E437FC21DDB for ; Fri, 24 Nov 2017 15:25:52 +0000 (UTC) Received: from grover.sesame (FL1-125-199-20-195.osk.mesh.ad.jp [125.199.20.195]) (authenticated) by conuserg-11.nifty.com with ESMTP id vAOFPbJn011993; Sat, 25 Nov 2017 00:25:39 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com vAOFPbJn011993 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1511537140; bh=+edk3NSG1w3RvEbq92fAXmusAZ2C33B3JIm6Tjz620k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bASorbUfsXUMsoRw6+j7xqXZO+91s4stD3knRfiXA371YRbpN7ySvMdN0kOGZUqal 6lJH//U3y4qC77loJhPxJME+cEVnyj793MDSK1Jb/Vp8OlRigMBRqgCKcmpXIW0QaH 6qnjedhB1MFOt0Ru7ZaEbKipkC9YyMBkBMmuUWqGb2wwLQ/doF6Lz9l1O2yEJSKoq0 tfgvNYqn7sGQh2ieZsZQGD7g36NjXldTuJpkCyCZg5MtxXeB99FtA/GzSSD2CzhIQb ePQLvzKTdVvHMSw+cpDYvg3M23LRnyJRVWV6aTQ+4j/T4w3HtJ8GI1QBTX87ImdG6a s7x79M38VlfjA== X-Nifty-SrcIP: [125.199.20.195] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Sat, 25 Nov 2017 00:25:34 +0900 Message-Id: <1511537135-26482-5-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511537135-26482-1-git-send-email-yamada.masahiro@socionext.com> References: <1511537135-26482-1-git-send-email-yamada.masahiro@socionext.com> Subject: [U-Boot] [PATCH 4/5] gpio: uniphier: import dt-binginds header from Linux X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Signed-off-by: Masahiro Yamada --- drivers/gpio/gpio-uniphier.c | 3 +-- include/dt-bindings/gpio/uniphier-gpio.h | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 include/dt-bindings/gpio/uniphier-gpio.h diff --git a/drivers/gpio/gpio-uniphier.c b/drivers/gpio/gpio-uniphier.c index 107c3fc..8d72ab8 100644 --- a/drivers/gpio/gpio-uniphier.c +++ b/drivers/gpio/gpio-uniphier.c @@ -13,8 +13,7 @@ #include #include #include - -#define UNIPHIER_GPIO_LINES_PER_BANK 8 +#include #define UNIPHIER_GPIO_PORT_DATA 0x0 /* data */ #define UNIPHIER_GPIO_PORT_DIR 0x4 /* direction (1:in, 0:out) */ diff --git a/include/dt-bindings/gpio/uniphier-gpio.h b/include/dt-bindings/gpio/uniphier-gpio.h new file mode 100644 index 0000000..9f0ad17 --- /dev/null +++ b/include/dt-bindings/gpio/uniphier-gpio.h @@ -0,0 +1,18 @@ +/* + * Copyright (C) 2017 Socionext Inc. + * Author: Masahiro Yamada + */ + +#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 */