From patchwork Mon Aug 5 16:12:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Santosh Shilimkar X-Patchwork-Id: 2838748 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 539B2BF535 for ; Mon, 5 Aug 2013 16:14:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DCA312021B for ; Mon, 5 Aug 2013 16:14:17 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CD3CB2021C for ; Mon, 5 Aug 2013 16:14:15 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V6NPk-0001Dt-LN; Mon, 05 Aug 2013 16:13:44 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V6NPZ-0008QW-8q; Mon, 05 Aug 2013 16:13:33 +0000 Received: from devils.ext.ti.com ([198.47.26.153]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V6NOx-0008Kb-Lu for linux-arm-kernel@lists.infradead.org; Mon, 05 Aug 2013 16:13:00 +0000 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id r75GCY5c012928; Mon, 5 Aug 2013 11:12:34 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id r75GCYbp018824; Mon, 5 Aug 2013 11:12:34 -0500 Received: from dlelxv22.itg.ti.com (172.17.1.197) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.2.342.3; Mon, 5 Aug 2013 11:12:34 -0500 Received: from ula0393909.am.dhcp.ti.com (ula0393909.am.dhcp.ti.com [158.218.103.117]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id r75GCVEM021067; Mon, 5 Aug 2013 11:12:33 -0500 From: Santosh Shilimkar To: Subject: [PATCH 3/8] clk: keystone: common clk driver initialization Date: Mon, 5 Aug 2013 12:12:22 -0400 Message-ID: <1375719147-7578-4-git-send-email-santosh.shilimkar@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1375719147-7578-1-git-send-email-santosh.shilimkar@ti.com> References: <1375719147-7578-1-git-send-email-santosh.shilimkar@ti.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130805_121255_986938_A1157E22 X-CRM114-Status: GOOD ( 12.37 ) X-Spam-Score: -6.9 (------) Cc: Santosh Shilimkar , mturquette@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Initialise common clock drivers for Keystone 2 devices. Cc: Mike Turquette Signed-off-by: Santosh Shilimkar --- drivers/clk/keystone/clk.c | 34 ++++++++++++++++++++++++++++++++++ include/linux/clk/keystone.h | 1 + 2 files changed, 35 insertions(+) create mode 100644 drivers/clk/keystone/clk.c diff --git a/drivers/clk/keystone/clk.c b/drivers/clk/keystone/clk.c new file mode 100644 index 0000000..9001380 --- /dev/null +++ b/drivers/clk/keystone/clk.c @@ -0,0 +1,34 @@ +/* + * Common Clock initialization code for Keystone SOCs + * + * Copyright (C) 2013 Texas Instruments Inc. + * Murali Karicheri + * Santosh Shilimkar + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ +#include +#include +#include +#include +#include + +static const __initconst struct of_device_id clk_match[] = { + { .compatible = "fixed-clock", .data = of_fixed_clk_setup, }, + { .compatible = "fixed-factor-clock", .data = + of_fixed_factor_clk_setup, }, + { .compatible = "keystone,pll-clk", .data = of_keystone_pll_clk_init, }, + { .compatible = "mux-clk", .data = of_mux_clk_setup, }, + { .compatible = "divider-clock", .data = of_divider_clk_setup, }, + { .compatible = "keystone,psc-clk", .data = of_keystone_psc_clk_init, }, + {} +}; + +void __init of_keystone_clk_init() +{ + /* initialize clk providers from device tree */ + of_clk_init(clk_match); +} diff --git a/include/linux/clk/keystone.h b/include/linux/clk/keystone.h index 7b3e154..282e88f 100644 --- a/include/linux/clk/keystone.h +++ b/include/linux/clk/keystone.h @@ -15,5 +15,6 @@ extern void of_keystone_pll_clk_init(struct device_node *node); extern void of_keystone_psc_clk_init(struct device_node *node); +extern void of_keystone_clk_init(void); #endif /* __LINUX_CLK_KEYSTONE_H_ */