Skip to content

Commit

Permalink
ARM/clk: move the ICST library to drivers/clk
Browse files Browse the repository at this point in the history
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.)

Acked-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Linus Walleij committed Apr 7, 2017
1 parent b6acb2e commit ba3fae0
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 12 deletions.
3 changes: 0 additions & 3 deletions arch/arm/common/Kconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
config ICST
bool

config SA1111
bool
select DMABOUNCE if !ARCH_PXA
Expand Down
1 change: 0 additions & 1 deletion arch/arm/common/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions drivers/clk/versatile/Kconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
config ICST
bool

config COMMON_CLK_VERSATILE
bool "Clock driver for ARM Reference designs"
depends on ARCH_INTEGRATOR || ARCH_REALVIEW || \
Expand Down
2 changes: 1 addition & 1 deletion drivers/clk/versatile/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions drivers/clk/versatile/clk-icst.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <linux/regmap.h>
#include <linux/mfd/syscon.h>

#include "icst.h"
#include "clk-icst.h"

/* Magic unlocking token used on all Versatile boards */
Expand Down
2 changes: 0 additions & 2 deletions drivers/clk/versatile/clk-icst.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#include <asm/hardware/icst.h>

/**
* struct clk_icst_desc - descriptor for the ICST VCO
* @params: ICST parameters
Expand Down
1 change: 1 addition & 0 deletions drivers/clk/versatile/clk-impd1.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <linux/io.h>
#include <linux/platform_data/clk-integrator.h>

#include "icst.h"
#include "clk-icst.h"

#define IMPD1_OSC1 0x00
Expand Down
1 change: 1 addition & 0 deletions drivers/clk/versatile/clk-realview.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <linux/io.h>
#include <linux/clk-provider.h>

#include "icst.h"
#include "clk-icst.h"

#define REALVIEW_SYS_OSC0_OFFSET 0x0C
Expand Down
1 change: 1 addition & 0 deletions drivers/clk/versatile/clk-versatile.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <linux/of.h>
#include <linux/of_address.h>

#include "icst.h"
#include "clk-icst.h"

#define INTEGRATOR_HDR_LOCK_OFFSET 0x14
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/common/icst.c → drivers/clk/versatile/icst.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <linux/module.h>
#include <linux/kernel.h>
#include <asm/div64.h>
#include <asm/hardware/icst.h>
#include "icst.h"

/*
* Divisors for each OD setting.
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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;
Expand Down

0 comments on commit ba3fae0

Please sign in to comment.