From patchwork Mon Mar 26 17:39:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 132431 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp4117353ljb; Mon, 26 Mar 2018 10:42:58 -0700 (PDT) X-Google-Smtp-Source: AG47ELtLNI/k2BckH473QMARNlF3wl/Y1WuS1Lg9GGOexW1dM/RZMlRpfAYkrTH30p97q14qTBZu X-Received: by 2002:a17:902:28e3:: with SMTP id f90-v6mr33286468plb.250.1522086178263; Mon, 26 Mar 2018 10:42:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522086178; cv=none; d=google.com; s=arc-20160816; b=gWiH3q+S00HGp7yNd53elt80HQomvznCkwvqkrjmKwbXmgq71a4CXLJITMxPagDhZJ xAbttcC39eQ7/psru0sDVryNvU4mhlpsALF8fAmzkXfwumVBTcAzz1iIcbhv65BoSqn7 RITyLWbJ5G2ZLW8fdCACTPlfm46d/yD2sFL2S6mF1AsTL3FCAV/uownlOwYYBMHxtUUV kjtR1yfG4Jn9ss/USyEX3s6iOOB5SNDh1+GGEjZQooK+mVfY2FQTpcSGudcJsHhhhM6n Ot63zV8MMto9aNxsKm49M4cVPIO98XgB2qCkblieX4qqRaKvGZnPZCUedHkiiSF4vMnD vJ8g== 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=0iPJ96YoVDWQRbCwPnlZm3jkGvr74Qqb/1Au/7LTbgdWoC/vFaC3viDCwR6G2/VtSj FWp29Ms5OjqcR8KyhrslbvDFuHowTDi0irbfV8Np5/msITZi2SLcmlIlzQHYjVc6N4qs 7hB782IqrvnmQ5ywYoSmJg0xdpjUDxg3NpB8yDdPQX7BXPJb0Y/4guFN9Zxr3vXmksj4 dKd4hkylAdumWjVDDRPtUZLZAWm4zPp0SbC2kFj1z53LdcJHrn8UiqhAanoHkUwSkWn4 oneI3TLwrGxRq01ANTGHH0E9xlvU7VmglUm+2nFYd0JQ5OMQQKMgyOBZv660YloJvoEg b0cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Prob9GDf; 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 w186si10721580pgd.573.2018.03.26.10.42.57; Mon, 26 Mar 2018 10:42:58 -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=Prob9GDf; 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 S1753003AbeCZRmy (ORCPT + 28 others); Mon, 26 Mar 2018 13:42:54 -0400 Received: from mail-pl0-f65.google.com ([209.85.160.65]:39533 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752980AbeCZRmw (ORCPT ); Mon, 26 Mar 2018 13:42:52 -0400 Received: by mail-pl0-f65.google.com with SMTP id s24-v6so2006187plq.6 for ; Mon, 26 Mar 2018 10:42:52 -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=Prob9GDfp40k/73jQzj1MVfgH6O/IOEL09YMSwD7RfqYU4R5xNxUHWXJ1cULNaUT++ LN1kYHC5+HdhflIOV4l0KwywsXyDMdcDr8D5c3adr8qiex6c30C35jbCv37RhHJA5+PB Lp5bDrBQsF+2CW072tJ5e9e3s8QeedklJrwJI= 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=KmfzINg73TjB9TduVoNg1Ocqj3LaVyVpPBonGN0qtFiGUCWQT4uqyCvbmEh60SJSRu lfB4xkoNv/TgOsrQ5RCC6jSLq97uOjro+esuGEm2dqnftxT6zsofqXEx8N/Sy4pIjzrX 722u+fdUQdOHl3NHloRMLTy1HhNMb3FMJAPw9Id92AJE+d00hdOPedot1EC3UtRXkSUy KGLCFtYPc/SS9DJFG7yL+LdKURAXp6t4I1tlXlAORYMAImEzf+xeiEkE/Nvh/PiXfd9i lwQKYr1QgTqHWPwUB51dYTbxdjPQowwYfEuwRh641D0qyLX23rtlLC29fH75ByMbQoQS dJHg== X-Gm-Message-State: AElRT7HmOLv7+tA+nYIpbNmGDsCslQyrWqmgvxXOL3Yy5Z3xa1Sh3dvZ x/eq5dXFHn8xls0wbqcisDZ9 X-Received: by 2002:a17:902:2e:: with SMTP id 43-v6mr41474525pla.282.1522086171575; Mon, 26 Mar 2018 10:42:51 -0700 (PDT) Received: from localhost.localdomain ([2405:204:73cc:afee:304e:6518:873b:59b1]) by smtp.gmail.com with ESMTPSA id x14sm24986115pgo.82.2018.03.26.10.42.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Mar 2018 10:42:51 -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 v7 08/11] clk: actions: Add fixed factor clock support Date: Mon, 26 Mar 2018 23:09:02 +0530 Message-Id: <20180326173905.22313-9-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180326173905.22313-1-manivannan.sadhasivam@linaro.org> References: <20180326173905.22313-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_ */