Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4257942imm; Fri, 18 May 2018 01:59:00 -0700 (PDT) X-Google-Smtp-Source: AB8JxZogs0sn8ZCT5RJPGVwKdcvU3gg/xQAxo8u8ptB9EvC731NlZnrE4oGHqkgdLoAMpgQgwSkj X-Received: by 2002:a17:902:9004:: with SMTP id a4-v6mr8552597plp.143.1526633940295; Fri, 18 May 2018 01:59:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526633940; cv=none; d=google.com; s=arc-20160816; b=S0VSZSQpJO9OAKflq4d8UcFmnSdYNa+C73rsKkZPMJLILi8MWP3bilNbL89z73N/WK MNnRzNL8ODQO0TbH44KAU91oRn5WoGX2PeIyfOX3mUxLwHIUEbih3m4JkCkKdts3oj1J 0zZ8B7sKdXQh4MjAKo/5dXomQWN5EN570Anz9GeTSPETJNLeiMHWrG84QTDv+MIbWBLc 0HErB46+qsjfAIlXfMbD+AxoXb055+A+5FyZ9rZnN0dAG9SzcaaS0zo0skKQ26vnR9pu QlYV6mQ0x1ikr80Wh5j5x7WxDaO/D6wdH+5xzqNMwHZKk/DtI3Onzyq5nR73f9Ir5/Oe UC9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:to:from :dkim-signature:arc-authentication-results; bh=In/rAxssEniz8nyglrw0kplwiD7IyDZ4JEz4TkFeRTs=; b=d66ibz/SPHwfHO0BLrYVSent971B3LljEaONP4CQVYtCTzQPvYgrARmo9y4KzQC7dX EQUcbr42IDDGLwPes0C/S0bfPABjzDPkSo0SsaXVEvmTckU7NhqsTTDlMTi29mpyrKFY y/ZQRtxhA7MPN4PcA9XIqeeGb6ZW/0+bDct1372Zy9D9FoI+M73ytNMuwtWqJSIsj8IO +LnzICFCC+OUplrOG/Kvti61ogjg4w93FgCve79XxenyTXXpVXLAFUe880BB5Z4VpO9/ gus7UXqyJpmY2NZZ4Clv1ShRL5rUHOuV2ZL66lZurLf+U6nt9ANHHJHiZj0zS0Ed0WCv +tKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=E2s2e8dE; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s64-v6si5610573pgb.113.2018.05.18.01.58.45; Fri, 18 May 2018 01:59:00 -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=@gmail.com header.s=20161025 header.b=E2s2e8dE; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753532AbeERI5f (ORCPT + 99 others); Fri, 18 May 2018 04:57:35 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:46740 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751965AbeERI52 (ORCPT ); Fri, 18 May 2018 04:57:28 -0400 Received: by mail-pg0-f65.google.com with SMTP id u8-v6so3037429pgp.13; Fri, 18 May 2018 01:57:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=In/rAxssEniz8nyglrw0kplwiD7IyDZ4JEz4TkFeRTs=; b=E2s2e8dEMPQNbfzxtopk2bG/XiZH5lN7Zyt3i+l7d7kPHH0fETuALEV1MxgUa25CTh fYI1nqjeZviJbBP1BKiKFZPfmhyXS9sTeq6VXzwahUFbPvwLZIWrtEoaYGmoxuDqFJym WXz6fQYkqmXF0/MHJOAU4TffRNSlxxZ2LZWPgrmAItU0vRjVrYy5xMm+9noRCQCCNaXP 8aDipKmAYbAxuUm/zabCFxktVDuwly7z9EteFgWc2FFjWJ372bYpgLIdJmaRR/6oKFev BsP8ancZmjbzB7DRwmS131x4FYfbYqZmvg+r5jQaloJ+iVU5Mzga+e3BmQN6RnwE4Kk4 HLsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=In/rAxssEniz8nyglrw0kplwiD7IyDZ4JEz4TkFeRTs=; b=dSQCeAVhkKHObVULKV7sElDwbtFOf1K57kLQ1/AFu7nLZVFQuVZYYIQE5iUd9UCaFT Szv9W91AwtXgan7cywK4B3RL+8UukkZcq91naAjtMv1drCSwoqK2g/u1MULbk/UYcsD7 Jt3kcr02VwioiXnjNlITwWva1FCas7TbyiPbUPBKIAQ+oUCY9mKfiyxGswWlc1UfmTJU 1bNlpTBxSpC7E/EjQy6TogaMWqgZqWHsw3QcsU9ElNE3udf3Mt5OTNJ1mPqBTpKB+o8D iYwXUWVDp8wc31nD0jCCWo+0ydDeeQWwmVEKRdJHE7KeuU/EHwFO3lvb0wwFlOZSm4qX pzhA== X-Gm-Message-State: ALKqPwfgm/BL6xwK0KcM9NkOEeMweoNL1pEN3KvydRYPBFqj2gWCpk3L DTZhEs0AXDXkbZTHhN14GMw= X-Received: by 2002:a65:6489:: with SMTP id e9-v6mr6822362pgv.44.1526633847554; Fri, 18 May 2018 01:57:27 -0700 (PDT) Received: from localhost (45.62.100.246.16clouds.com. [45.62.100.246]) by smtp.gmail.com with ESMTPSA id x88-v6sm19773430pfj.126.2018.05.18.01.57.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 May 2018 01:57:26 -0700 (PDT) From: Lei YU To: Michael Turquette , Stephen Boyd , Joel Stanley , Andrew Jeffery , Rob Herring , Mark Rutland , Lei YU , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH] clk: aspeed: Add 24MHz fixed clock Date: Fri, 18 May 2018 16:57:02 +0800 Message-Id: <1526633822-17138-1-git-send-email-mine260309@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a 24MHz fixed clock. This clock will be used for certain devices, e.g. pwm. Signed-off-by: Lei YU --- drivers/clk/clk-aspeed.c | 9 ++++++++- include/dt-bindings/clock/aspeed-clock.h | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/clk/clk-aspeed.c b/drivers/clk/clk-aspeed.c index 5eb50c3..4664088 100644 --- a/drivers/clk/clk-aspeed.c +++ b/drivers/clk/clk-aspeed.c @@ -14,7 +14,7 @@ #include -#define ASPEED_NUM_CLKS 35 +#define ASPEED_NUM_CLKS 36 #define ASPEED_RESET_CTRL 0x04 #define ASPEED_CLK_SELECTION 0x08 @@ -474,6 +474,13 @@ static int aspeed_clk_probe(struct platform_device *pdev) return PTR_ERR(hw); aspeed_clk_data->hws[ASPEED_CLK_BCLK] = hw; + /* Fixed 24MHz clock */ + hw = clk_hw_register_fixed_rate(NULL, "fixed-24m", "clkin", + 0, 24000000); + if (IS_ERR(hw)) + return PTR_ERR(hw); + aspeed_clk_data->hws[ASPEED_CLK_24M] = hw; + /* * TODO: There are a number of clocks that not included in this driver * as more information is required: diff --git a/include/dt-bindings/clock/aspeed-clock.h b/include/dt-bindings/clock/aspeed-clock.h index d3558d8..ff29d8e 100644 --- a/include/dt-bindings/clock/aspeed-clock.h +++ b/include/dt-bindings/clock/aspeed-clock.h @@ -38,6 +38,7 @@ #define ASPEED_CLK_MAC 32 #define ASPEED_CLK_BCLK 33 #define ASPEED_CLK_MPLL 34 +#define ASPEED_CLK_24M 35 #define ASPEED_RESET_XDMA 0 #define ASPEED_RESET_MCTP 1 -- 2.7.4