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: 10308431 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 02DEC60325 for ; Mon, 26 Mar 2018 17:45:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E61C728B83 for ; Mon, 26 Mar 2018 17:45:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D92FE297B4; Mon, 26 Mar 2018 17:45:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 49DE628B83 for ; Mon, 26 Mar 2018 17:45:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=AtwSRtVzajXjgw5QcZNJp4Gq0qAtDv4VK9Rz7/4MEhA=; b=na+I+fyZw+tijLDNNs0v1SeXCZ cn4K/sYWPu7dRHPyPxWQeMFPwlaTmsVXKKY5phJ7DxCJRymJU7kzS1w+nu89o57uvg/fB/0XO3hln BdrqoEdpAYLhlT8jSLGtDWduhtw44YfeML5k6K69f96kVfxhldjfIv3QS7ej+3MvOoRiP6zzDHWLt nRy/Vy6JSw1ouHzayah6mwMWblD4OFgD5eohLLvPHmKYOL27Kr55/v5KDmc+ZbHmVpOKV/5d3qjiU i8U+MsFtRFxC2YdSoJMClBQ1jNQfPNpF5k59fWRm09zcTl5uCZ44JN5KAaUNTJ6Hn6itco71Xu1wi SEjp4ADw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f0WBk-0003j2-KG; Mon, 26 Mar 2018 17:45:44 +0000 Received: from mail-pl0-x243.google.com ([2607:f8b0:400e:c01::243]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f0W99-0000Ho-7N for linux-arm-kernel@lists.infradead.org; Mon, 26 Mar 2018 17:43:04 +0000 Received: by mail-pl0-x243.google.com with SMTP id p9-v6so12383007pls.2 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=Ry6QaLMt8ZcX25qJpE1SbQhMFWyLRDEFS4XLLfO5O4n+CZ4ozgSDwSuqRNdML2CISI lpSeV0JHP6u9RkgGVsbXtQxp3KdUpbh37g/3UT3ZJjYaxHBGddF2yY68PDy6RhpQoIWf h7g/ZUhsoQKeniu+PEBQ25/XysM97tLsrjo79kBqtUOxI4wRoe65YaIZlhmObwNyd2Jd mqpA5VAcX357Kt/0Th1Ee/EZoHCTrhhPVMhvYMRGl8hVkNXYi+sCnWugIt8j3tCrKovV aVcS3dksqYkzsfyKFOUGgbu63l3w5PZe1f9gSUvKMRjeGUCyVg3R/NF92G2wHKAEHabJ rMsw== X-Gm-Message-State: AElRT7E/McaolC79RQ82MoRbpBY+idIHHHoyBsRmCr20/VqcilizerwQ ZcxtsxVeps7eMpkeN3aCAmi1 X-Google-Smtp-Source: AG47ELsKsBLPqacuZB1hmee5kD4BqYA0cmFlYIE5KAHoVr80xmEUnKwyStb9pdXU42xlUmUMHccgSg== 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180326_104303_305588_B4EF394C X-CRM114-Status: GOOD ( 12.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, daniel.thompson@linaro.org, manivannanece23@gmail.com, viresh.kumar@linaro.org, bdong@ucrobotics.com, liuwei@actions-semi.com, linux-kernel@vger.kernel.org, amit.kucheria@linaro.org, linux-clk@vger.kernel.org, hzhang@ucrobotics.com, mp-cs@actions-semi.com, 96boards@ucrobotics.com, mchehab@kernel.org, Manivannan Sadhasivam , davem@davemloft.net, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 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_ */