From patchwork Sat Mar 18 08:59:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 9632087 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 08B65601E9 for ; Sat, 18 Mar 2017 09:08:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DD14828489 for ; Sat, 18 Mar 2017 09:08:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CEF6928514; Sat, 18 Mar 2017 09:08:41 +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=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2482628489 for ; Sat, 18 Mar 2017 09:08:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751217AbdCRJIl (ORCPT ); Sat, 18 Mar 2017 05:08:41 -0400 Received: from mail-lf0-f48.google.com ([209.85.215.48]:36558 "EHLO mail-lf0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750957AbdCRJIj (ORCPT ); Sat, 18 Mar 2017 05:08:39 -0400 Received: by mail-lf0-f48.google.com with SMTP id y193so40752282lfd.3 for ; Sat, 18 Mar 2017 02:08:37 -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=mIWwyd2pQSl815b6xWV94bf/ZtLdWQ7VOogF9eDdcw0=; b=R1IlVaGS4QBLsnXbynWDjvfjep2gPqiYiH2Ax1DE1MlLcJ3bwrzPavx4kHH5icyqfO xM9B0Coy3HgHAeYESHCNto/qK3l6pE1v8/k9Yqa1kDm/3RRamW+g7lsY4qWPt+D3CmO5 oTkMQUPGpZa5A/a2cl4gRB0oz/mnBuOL4hb9E= 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=mIWwyd2pQSl815b6xWV94bf/ZtLdWQ7VOogF9eDdcw0=; b=T0uIXdWmNYyHvI4DPXRLSvKqKOYCSXhqiP2cK0hgrW7pZp9Oxm2oMx9N0iSdNQy+Iv d/BIq11bcSjqVJGgIbO3R5y0Hh2jxXnTHygYrAkSzeO+IYVq+SVfaKK+CFc2vQNbURyk cNjnGnx2BY1S9kNX7MHV78dMOH9pSbZzn2J60P+CR1eGhUn5qb1071qivEUUzRfmmaQr w3Oy49zssxS1871/bnyLXgdO6peezWdDdSICM3EIZxzX2m9Lwn1JUBqCilJ2qt96xrWF nAMYxeZfjD/pG5e3a2g3oZBZLtl+qWWKnAFPzSCxNPjCFHVz13NFUfKKXu9sSfiG2bJQ tC1A== X-Gm-Message-State: AFeK/H0GVOjT4JTsaQuQbDR1AOgNSKz47i3JGkD31aq+P37cng368NRhW8DNjPqVb/geV2rC X-Received: by 10.25.33.208 with SMTP id h199mr5581837lfh.68.1489827595974; Sat, 18 Mar 2017 01:59:55 -0700 (PDT) Received: from localhost.localdomain (c-357171d5.014-348-6c756e10.cust.bredbandsbolaget.se. [213.113.113.53]) by smtp.gmail.com with ESMTPSA id p81sm1872365lfd.47.2017.03.18.01.59.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 18 Mar 2017 01:59:54 -0700 (PDT) From: Linus Walleij To: Michael Turquette , Stephen Boyd , Russell King Cc: linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Linus Walleij Subject: [PATCH 2/2] ARM/clk: move the ICST library to drivers/clk Date: Sat, 18 Mar 2017 09:59:44 +0100 Message-Id: <20170318085944.15899-3-linus.walleij@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170318085944.15899-1-linus.walleij@linaro.org> References: <20170318085944.15899-1-linus.walleij@linaro.org> Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This moves the ICST clock divider helper library from arch/arm/common to drivers/clk/versatile so it is maintained with the other clock drivers. We keep the structure as a helper library intact and do not fuse it with the clk-icst.c Versatile ICST clock driver: there may be other users out there that need to use this library for their clocking, and then it will be helpful to keep the library contained. (The icst.[c|h] files could just be moved to drivers/clk/lib or a similar location to share the library.) Signed-off-by: Linus Walleij Acked-by: Stephen Boyd --- arch/arm/common/Kconfig | 3 --- arch/arm/common/Makefile | 1 - drivers/clk/versatile/Kconfig | 3 +++ drivers/clk/versatile/Makefile | 2 +- drivers/clk/versatile/clk-icst.c | 1 + drivers/clk/versatile/clk-icst.h | 2 -- drivers/clk/versatile/clk-impd1.c | 1 + drivers/clk/versatile/clk-realview.c | 1 + drivers/clk/versatile/clk-versatile.c | 1 + {arch/arm/common => drivers/clk/versatile}/icst.c | 2 +- {arch/arm/include/asm/hardware => drivers/clk/versatile}/icst.h | 6 ++---- 11 files changed, 11 insertions(+), 12 deletions(-) rename {arch/arm/common => drivers/clk/versatile}/icst.c (98%) rename {arch/arm/include/asm/hardware => drivers/clk/versatile}/icst.h (94%) diff --git a/arch/arm/common/Kconfig b/arch/arm/common/Kconfig index 9353184d730d..1181053e3ade 100644 --- a/arch/arm/common/Kconfig +++ b/arch/arm/common/Kconfig @@ -1,6 +1,3 @@ -config ICST - bool - config SA1111 bool select DMABOUNCE if !ARCH_PXA diff --git a/arch/arm/common/Makefile b/arch/arm/common/Makefile index 27f23b15b1ea..29fdf6a3601d 100644 --- a/arch/arm/common/Makefile +++ b/arch/arm/common/Makefile @@ -4,7 +4,6 @@ obj-y += firmware.o -obj-$(CONFIG_ICST) += icst.o obj-$(CONFIG_SA1111) += sa1111.o obj-$(CONFIG_DMABOUNCE) += dmabounce.o obj-$(CONFIG_SHARP_LOCOMO) += locomo.o diff --git a/drivers/clk/versatile/Kconfig b/drivers/clk/versatile/Kconfig index a6da2aa09f83..8aa875f25239 100644 --- a/drivers/clk/versatile/Kconfig +++ b/drivers/clk/versatile/Kconfig @@ -1,3 +1,6 @@ +config ICST + bool + config COMMON_CLK_VERSATILE bool "Clock driver for ARM Reference designs" depends on ARCH_INTEGRATOR || ARCH_REALVIEW || \ diff --git a/drivers/clk/versatile/Makefile b/drivers/clk/versatile/Makefile index 8ff03744fe98..794130402c8d 100644 --- a/drivers/clk/versatile/Makefile +++ b/drivers/clk/versatile/Makefile @@ -1,5 +1,5 @@ # Makefile for Versatile-specific clocks -obj-$(CONFIG_ICST) += clk-icst.o clk-versatile.o +obj-$(CONFIG_ICST) += icst.o clk-icst.o clk-versatile.o obj-$(CONFIG_INTEGRATOR_IMPD1) += clk-impd1.o obj-$(CONFIG_ARCH_REALVIEW) += clk-realview.o obj-$(CONFIG_CLK_SP810) += clk-sp810.o diff --git a/drivers/clk/versatile/clk-icst.c b/drivers/clk/versatile/clk-icst.c index 4faa94440779..09fbe66f1f11 100644 --- a/drivers/clk/versatile/clk-icst.c +++ b/drivers/clk/versatile/clk-icst.c @@ -22,6 +22,7 @@ #include #include +#include "icst.h" #include "clk-icst.h" /* Magic unlocking token used on all Versatile boards */ diff --git a/drivers/clk/versatile/clk-icst.h b/drivers/clk/versatile/clk-icst.h index 04e6f0aef588..5add02ebec5d 100644 --- a/drivers/clk/versatile/clk-icst.h +++ b/drivers/clk/versatile/clk-icst.h @@ -1,5 +1,3 @@ -#include - /** * struct clk_icst_desc - descriptor for the ICST VCO * @params: ICST parameters diff --git a/drivers/clk/versatile/clk-impd1.c b/drivers/clk/versatile/clk-impd1.c index 74c3216dbb00..401558bfc409 100644 --- a/drivers/clk/versatile/clk-impd1.c +++ b/drivers/clk/versatile/clk-impd1.c @@ -12,6 +12,7 @@ #include #include +#include "icst.h" #include "clk-icst.h" #define IMPD1_OSC1 0x00 diff --git a/drivers/clk/versatile/clk-realview.c b/drivers/clk/versatile/clk-realview.c index c56efc70ac16..6fdfee3232f4 100644 --- a/drivers/clk/versatile/clk-realview.c +++ b/drivers/clk/versatile/clk-realview.c @@ -11,6 +11,7 @@ #include #include +#include "icst.h" #include "clk-icst.h" #define REALVIEW_SYS_OSC0_OFFSET 0x0C diff --git a/drivers/clk/versatile/clk-versatile.c b/drivers/clk/versatile/clk-versatile.c index a89a927567e0..d6960de64d4a 100644 --- a/drivers/clk/versatile/clk-versatile.c +++ b/drivers/clk/versatile/clk-versatile.c @@ -12,6 +12,7 @@ #include #include +#include "icst.h" #include "clk-icst.h" #define INTEGRATOR_HDR_LOCK_OFFSET 0x14 diff --git a/arch/arm/common/icst.c b/drivers/clk/versatile/icst.c similarity index 98% rename from arch/arm/common/icst.c rename to drivers/clk/versatile/icst.c index d7ed252708c5..de2af63a3aad 100644 --- a/arch/arm/common/icst.c +++ b/drivers/clk/versatile/icst.c @@ -17,7 +17,7 @@ #include #include #include -#include +#include "icst.h" /* * Divisors for each OD setting. diff --git a/arch/arm/include/asm/hardware/icst.h b/drivers/clk/versatile/icst.h similarity index 94% rename from arch/arm/include/asm/hardware/icst.h rename to drivers/clk/versatile/icst.h index 794220b087d2..7519bba03b04 100644 --- a/arch/arm/include/asm/hardware/icst.h +++ b/drivers/clk/versatile/icst.h @@ -1,6 +1,4 @@ /* - * arch/arm/include/asm/hardware/icst.h - * * Copyright (C) 2003 Deep Blue Solutions, Ltd, All Rights Reserved. * * This program is free software; you can redistribute it and/or modify @@ -11,8 +9,8 @@ * clock generators. See http://www.idt.com/ for more information * on these devices. */ -#ifndef ASMARM_HARDWARE_ICST_H -#define ASMARM_HARDWARE_ICST_H +#ifndef ICST_H +#define ICST_H struct icst_params { unsigned long ref;