From patchwork Sat Mar 24 13:31:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 132381 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp1790716ljb; Sat, 24 Mar 2018 06:34:19 -0700 (PDT) X-Google-Smtp-Source: AG47ELv3WXD/pdiimys+thX0GXaPhPRnUSeVduTUe5cpbW9UgS//cSo3UmPYnLf4ePYcSj5lJbAf X-Received: by 2002:a17:902:8bc1:: with SMTP id r1-v6mr23627891plo.310.1521898459747; Sat, 24 Mar 2018 06:34:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521898459; cv=none; d=google.com; s=arc-20160816; b=KnHw+yVHnssjOjhs9fTsUqleZYtsmLb2zm95K3m4GyhYqLTkIISd1fJWtqoCegF965 0l463JzNnDkeXZavfeDFq/2vWBlGqAk3QbSr25qFX+RVIaoUjbkJue++YGattjDBayF8 L82ENXG0UmE9tibG+UvIPlxVD+N0xHMtyvyDoe6O2tlDyMxXjuRyDmjoa2k5yYJU+qW/ NWkUz3FAJmiOnfVZYBlFeNMQH4KPmfYO/1l9F9Ss5kwwp9b2b0o29c2a5QM7xHf+s0Zw BqEn2P69lufn4I/XtYWpv1av/LXdOzSe87AHR/iFE1X5w1h7LVU3Y4vhr9jKG5XOh9mg 97/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=MtYw5ZglphWoZiZ0OyIUg9MLYMTF02J9LivuF0AcZP8=; b=BExmiJ6faci0yyGwf6uA8D5frQkxhlJRTRNF+UW17XR3e6FO8nLfxmxjkjaiHEU0iI HJB1fD9fXRx4GMXCTuFJK5z8fyqo4AYKH9rQQ19GSKhmw9BtncWi04ejL3lJ1sXpCT/P oMOmE4RngSm3G/arJw6OHDCOWy2jxwJ6gYRtACc5TsVTFiPr7PVdHl0pPz8rucAPTO4/ sD68Vzhab6WxhZBOfbdG0xJ1J37HrRQm8MiCf4wLTMJSgptDJsSDsuFAfrnKCNVS5t2S EchnmMx8CwDYVnwtaPpF73Mq5Z6awLuJHVdF0pW7nmfUU1TJ10GZV29PFNZ+SDtafR9y 7bLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bSXHG0d6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d4si7460079pgv.560.2018.03.24.06.34.19; Sat, 24 Mar 2018 06:34:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bSXHG0d6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752563AbeCXNeP (ORCPT + 28 others); Sat, 24 Mar 2018 09:34:15 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:34400 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752543AbeCXNeM (ORCPT ); Sat, 24 Mar 2018 09:34:12 -0400 Received: by mail-pf0-f195.google.com with SMTP id j20so5793388pfi.1 for ; Sat, 24 Mar 2018 06:34:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MtYw5ZglphWoZiZ0OyIUg9MLYMTF02J9LivuF0AcZP8=; b=bSXHG0d6E656L/2/niO4QBfPg5A3VvV5RZloVwRQ7g54EpUSyDIvZLSczGfVJo8dQi SLnRcQAxevOEGE0wGpZ95l7jfPT0X6iVJrElBxIormduRzbmsNlK+q+v99JGH22MbP+6 Po6Ug2XVHAtZ6wZ4xSonbkWmmY463P9sXkTBs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MtYw5ZglphWoZiZ0OyIUg9MLYMTF02J9LivuF0AcZP8=; b=sTthEdlx5RBANck4E3nvp59Gp/Smyd6WoqAXnbf87pry2q/8bJzoyVgH6nzzTbNnYW kfWuAWQ13c4zBPc4tFntS8NrfJtbMDHkbrJoV+GE1NCEB5f6/7L30AWgtuymi9317If7 8WNBy2uSJimEa/awx/v8TnHZMP2t1Z3ZE6WnCmVNr51g61RqigwVIoEGdLb951HRMkuP 20hMOqLnDwOUoJOvY9rBbSTwJPtp9Aj7+Ea0yX5lLvFHovFciEL5yFU+njLYfpCQIE5Z LEg4HeB/mo3YMLGDmkdXAK1F+IZPAGSAKQAr3JxqjiMc0aZYUbfEhOUmgnEn89xfTmV+ Pvnw== X-Gm-Message-State: AElRT7Fj47e56iFOqydAN3mMBCLT6pTP4tl0oIzU+gRSdWO7m2grSnew 9UCcctTNNY/oipSopyxi7Y0Z X-Received: by 10.101.97.13 with SMTP id z13mr23564065pgu.54.1521898451996; Sat, 24 Mar 2018 06:34:11 -0700 (PDT) Received: from localhost.localdomain ([2405:204:7401:11e6:b12d:f551:4edc:7f21]) by smtp.gmail.com with ESMTPSA id a76sm4133980pfc.97.2018.03.24.06.34.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 24 Mar 2018 06:34:11 -0700 (PDT) From: Manivannan Sadhasivam To: mturquette@baylibre.com, sboyd@kernel.org, afaerber@suse.de, robh+dt@kernel.org, mark.rutland@arm.com Cc: liuwei@actions-semi.com, mp-cs@actions-semi.com, 96boards@ucrobotics.com, devicetree@vger.kernel.org, davem@davemloft.net, mchehab@kernel.org, daniel.thompson@linaro.org, amit.kucheria@linaro.org, viresh.kumar@linaro.org, hzhang@ucrobotics.com, bdong@ucrobotics.com, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, manivannanece23@gmail.com, Manivannan Sadhasivam Subject: [PATCH v6 08/11] clk: actions: Add fixed factor clock support Date: Sat, 24 Mar 2018 19:01:56 +0530 Message-Id: <20180324133159.4824-9-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180324133159.4824-1-manivannan.sadhasivam@linaro.org> References: <20180324133159.4824-1-manivannan.sadhasivam@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add support for Actions Semi fixed factor clock reusing the clk ops from common clock driver. Signed-off-by: Manivannan Sadhasivam --- drivers/clk/actions/owl-fixed-factor.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 drivers/clk/actions/owl-fixed-factor.h -- 2.14.1 diff --git a/drivers/clk/actions/owl-fixed-factor.h b/drivers/clk/actions/owl-fixed-factor.h new file mode 100644 index 000000000000..cc9fe36c0964 --- /dev/null +++ b/drivers/clk/actions/owl-fixed-factor.h @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: GPL-2.0+ +// +// OWL fixed factor clock driver +// +// Copyright (c) 2014 Actions Semi Inc. +// Author: David Liu +// +// Copyright (c) 2018 Linaro Ltd. +// Author: Manivannan Sadhasivam + +#ifndef _OWL_FIXED_FACTOR_H_ +#define _OWL_FIXED_FACTOR_H_ + +#include "owl-common.h" + +#define OWL_FIX_FACT(_struct, _name, _parent, _mul, _div, _flags) \ + struct clk_fixed_factor _struct = { \ + .mult = _mul, \ + .div = _div, \ + .hw.init = CLK_HW_INIT(_name, \ + _parent, \ + &clk_fixed_factor_ops, \ + _flags), \ + } + +extern const struct clk_ops clk_fixed_factor_ops; + +#endif /* _OWL_FIXED_FACTOR_H_ */