From patchwork Thu Apr 21 02:55:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 66287 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp2852230qge; Wed, 20 Apr 2016 22:59:56 -0700 (PDT) X-Received: by 10.194.184.38 with SMTP id er6mr11641748wjc.93.1461218396461; Wed, 20 Apr 2016 22:59:56 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id gq6si1174476wjb.181.2016.04.20.22.59.56; Wed, 20 Apr 2016 22:59:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) client-ip=85.214.87.163; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 79419B3A3F; Thu, 21 Apr 2016 07:49:44 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6op_OQ1GacUm; Thu, 21 Apr 2016 07:49:44 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1A777B381B; Thu, 21 Apr 2016 07:44:32 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 682E7A75E1 for ; Thu, 21 Apr 2016 04:55:39 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rsqePXiak-d0 for ; Thu, 21 Apr 2016 04:55:39 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from conuserg-07.nifty.com (conuserg-07.nifty.com [210.131.2.74]) by theia.denx.de (Postfix) with ESMTPS id AFF55A7600 for ; Thu, 21 Apr 2016 04:54:44 +0200 (CEST) Received: from beagle.diag.org (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-07.nifty.com with ESMTP id u3L2sQar017163; Thu, 21 Apr 2016 11:54:32 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com u3L2sQar017163 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1461207272; bh=xECcUC+80cs8oti8Q2b21hD8iBETwPA4GXy6x+vzxzA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BbMnj0hrae8l4jCExe4qCyovh5NoFsZuqPnwJakHAUh/vWA8cYODEHyxRLa4k0yS8 bgSwPoWXUUdyhlqn8DvJeUExV7l9X1kuURH/4L8m8oJPQtnZ7oWuck243yD4B9W9Po kmFJdemT8E7ytkFXI9xZBAYXoEfZ5yYbQbgcbDXm9/UHlSWag9qeQ8xdGhkZMen6c4 nAcWzJKANfiHYUHUzwI0PqyoOmckEiE1xnT4kjb0cDOF82/VCdUcg4LfuA5WlolSlk MJpV7TxYJc5QckFqD19GjLOiRkDSrqkMkvAFXHJE3yLaZTLWpJpq4D8Lt/VkWqwxG/ wEDE8HBvOvHEg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Thu, 21 Apr 2016 11:55:09 +0900 Message-Id: <1461207314-32272-7-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1461207314-32272-1-git-send-email-yamada.masahiro@socionext.com> References: <1461207314-32272-1-git-send-email-yamada.masahiro@socionext.com> Subject: [U-Boot] [PATCH v3 06/11] ARM: uniphier: add sg_set_iectrl_range() X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 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" For PH1-LD20 or later, per-pin input-enable control is supported, that is, we need to set-up IECTRL registers for a group of pins. This helper function will be useful for a bunch of register settings. Signed-off-by: Masahiro Yamada --- Changes in v3: None Changes in v2: None arch/arm/mach-uniphier/sg-regs.h | 8 ++++++++ 1 file changed, 8 insertions(+) -- 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot diff --git a/arch/arm/mach-uniphier/sg-regs.h b/arch/arm/mach-uniphier/sg-regs.h index 2cdc2db..4044245 100644 --- a/arch/arm/mach-uniphier/sg-regs.h +++ b/arch/arm/mach-uniphier/sg-regs.h @@ -126,6 +126,14 @@ static inline void sg_set_iectrl(unsigned pin) writel(tmp, reg); } +static inline void sg_set_iectrl_range(unsigned min, unsigned max) +{ + int i; + + for (i = min; i <= max; i++) + sg_set_iectrl(i); +} + #endif /* __ASSEMBLY__ */ #endif /* ARCH_SG_REGS_H */