From patchwork Thu Apr 21 05:43:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 66292 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp2854989qge; Wed, 20 Apr 2016 23:06:42 -0700 (PDT) X-Received: by 10.194.48.7 with SMTP id h7mr13560124wjn.81.1461218802580; Wed, 20 Apr 2016 23:06:42 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id c5si1206222wjm.164.2016.04.20.23.06.42; Wed, 20 Apr 2016 23:06:42 -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 6DF67B386E; Thu, 21 Apr 2016 07:52:32 +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 h4Frt_UUPb97; Thu, 21 Apr 2016 07:52:32 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1CF92A7AED; Thu, 21 Apr 2016 07:46:58 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 98D8EA785A for ; Thu, 21 Apr 2016 07:44:18 +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 8GB88NPAWEb5 for ; Thu, 21 Apr 2016 07:44:18 +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 5F92EA785E for ; Thu, 21 Apr 2016 07:42:40 +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 u3L5gQcI010871; Thu, 21 Apr 2016 14:42:32 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com u3L5gQcI010871 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1461217352; bh=/2nLIHR7ROeDs6jF7QkUJ3Xi/95SBYYZ5uPYV2997q4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sQmfGY60ebQ1tYr/FMKhkOD5+2VaIOgtkXlPdUPsR+G1Z7vl0OgTgK01KjGcK/JX0 uqP1P1Dfwnq4TDmrqlpPFcyPuD4xGY4KJMCpc1bWgdtS7OuF1Vy7JWQ2oS7gfxwjGE 4EmupHF3Yhga882lsqIBdvX6IWzBlurf6kBumWUga2iufEWHCde4i0LvHveCyf3OUq GLe9//3E0MnVB2JTWcorjfQvZeo+sMMog+SOnGzm+Tf12JyOT+vUAB1HWOy6doggul hU/qXiQLVV/Hl5/tORahl+s3T9LJNSqWEqLFc8EHVlofFvWLPfk6a21EUwK1MnAlMN 3Arjn+OPGfZuA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Thu, 21 Apr 2016 14:43:15 +0900 Message-Id: <1461217402-25430-7-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1461217402-25430-1-git-send-email-yamada.masahiro@socionext.com> References: <1461217402-25430-1-git-send-email-yamada.masahiro@socionext.com> Subject: [U-Boot] [PATCH v4 06/13] 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 v4: None 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 */