From: Jon Hunter <jon-hunter@ti.com>
To: Rajendra Nayak <rnayak@ti.com>
Cc: mturquette@ti.com, paul@pwsan.com, linux-omap@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC 13/24] ARM: omap4: clk: Add 44xx data using common struct clk
Date: Mon, 4 Jun 2012 17:14:47 -0500 [thread overview]
Message-ID: <4FCD3357.5090409@ti.com> (raw)
In-Reply-To: <1338552485-31325-14-git-send-email-rnayak@ti.com>
Hi Rajendra,
On 06/01/2012 07:07 AM, Rajendra Nayak wrote:
> The data is autogenerated using the OMAP autogeneration scripts (python
> scripts). Thanks to Mike Turquette for the initial efforts in updating
> the script which was later updated by me.
> All data is added into a new cclock44xx_data.c file, a later patch will get
> rid of clock44xx_data.c file.
>
> Signed-off-by: Rajendra Nayak <rnayak@ti.com>
> ---
> arch/arm/mach-omap2/cclock44xx_data.c | 2602 +++++++++++++++++++++++++++++++
> arch/arm/mach-omap2/clock.h | 17 +
> arch/arm/mach-omap2/clock_common_data.c | 14 +
> arch/arm/mach-omap2/scrm44xx.h | 2 +
> 4 files changed, 2635 insertions(+), 0 deletions(-)
> create mode 100644 arch/arm/mach-omap2/cclock44xx_data.c
>
> diff --git a/arch/arm/mach-omap2/cclock44xx_data.c b/arch/arm/mach-omap2/cclock44xx_data.c
> new file mode 100644
> index 0000000..fa421dc
> --- /dev/null
> +++ b/arch/arm/mach-omap2/cclock44xx_data.c
> @@ -0,0 +1,2602 @@
> +/*
> + * OMAP4 Clock data
> + *
> + * Copyright (C) 2009-2012 Texas Instruments, Inc.
> + * Copyright (C) 2009-2010 Nokia Corporation
> + *
> + * Paul Walmsley (paul@pwsan.com)
> + * Rajendra Nayak (rnayak@ti.com)
> + * Benoit Cousson (b-cousson@ti.com)
> + * Mike Turquette (mturquette@ti.com)
> + *
> + * This file is automatically generated from the OMAP hardware databases.
> + * We respectfully ask that any modifications to this file be coordinated
> + * with the public linux-omap@vger.kernel.org mailing list and the
> + * authors above to ensure that the autogeneration scripts are kept
> + * up-to-date with the file contents.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + *
> + * XXX Some of the ES1 clocks have been removed/changed; once support
> + * is added for discriminating clocks by ES level, these should be added back
> + * in.
> + */
> +
> +#include <linux/kernel.h>
> +#include <linux/list.h>
> +#include <linux/clk-private.h>
> +#include <linux/clkdev.h>
> +#include <linux/io.h>
> +
> +#include <plat/hardware.h>
> +#include <plat/clkdev_omap.h>
> +
> +#include "iomap.h"
> +#include "clock.h"
> +#include "clock44xx.h"
> +#include "cm1_44xx.h"
> +#include "cm2_44xx.h"
> +#include "cm-regbits-44xx.h"
> +#include "prm44xx.h"
> +#include "prm-regbits-44xx.h"
> +#include "control.h"
> +#include "scrm44xx.h"
> +
> +/* OMAP4 modulemode control */
> +#define OMAP4430_MODULEMODE_HWCTRL_SHIFT 0
> +#define OMAP4430_MODULEMODE_SWCTRL_SHIFT 1
> +
> +/*LIST_HEAD(clocks);*/
> +
> +/* Root clocks */
> +
> +DEFINE_CLK_FIXED_RATE(extalt_clkin_ck, CLK_IS_ROOT, 59000000, 0x0);
> +
> +DEFINE_CLK_FIXED_RATE(pad_clks_src_ck, CLK_IS_ROOT, 12000000, 0x0);
> +
> +DEFINE_CLK_GATE(pad_clks_ck, "pad_clks_src_ck", &pad_clks_src_ck, 0x0,
> + OMAP4430_CM_CLKSEL_ABE, OMAP4430_PAD_CLKS_GATE_SHIFT,
> + 0x0, NULL);
> +
> +DEFINE_CLK_FIXED_RATE(pad_slimbus_core_clks_ck, CLK_IS_ROOT, 12000000, 0x0);
> +
> +DEFINE_CLK_FIXED_RATE(secure_32k_clk_src_ck, CLK_IS_ROOT, 32768, 0x0);
> +
> +DEFINE_CLK_FIXED_RATE(slimbus_src_clk, CLK_IS_ROOT, 12000000, 0x0);
> +
> +DEFINE_CLK_GATE(slimbus_clk, "slimbus_src_clk", &slimbus_src_clk, 0x0,
> + OMAP4430_CM_CLKSEL_ABE, OMAP4430_SLIMBUS_CLK_GATE_SHIFT,
> + 0x0, NULL);
> +
> +DEFINE_CLK_FIXED_RATE(sys_32k_ck, CLK_IS_ROOT, 32768, 0x0);
> +
> +DEFINE_CLK_FIXED_RATE(virt_12000000_ck, CLK_IS_ROOT, 12000000, 0x0);
> +
> +DEFINE_CLK_FIXED_RATE(virt_13000000_ck, CLK_IS_ROOT, 13000000, 0x0);
> +
> +DEFINE_CLK_FIXED_RATE(virt_16800000_ck, CLK_IS_ROOT, 16800000, 0x0);
> +
> +DEFINE_CLK_FIXED_RATE(virt_19200000_ck, CLK_IS_ROOT, 19200000, 0x0);
> +
> +DEFINE_CLK_FIXED_RATE(virt_26000000_ck, CLK_IS_ROOT, 26000000, 0x0);
> +
> +DEFINE_CLK_FIXED_RATE(virt_27000000_ck, CLK_IS_ROOT, 27000000, 0x0);
> +
> +DEFINE_CLK_FIXED_RATE(virt_38400000_ck, CLK_IS_ROOT, 38400000, 0x0);
> +
> +static const struct clksel_rate div_1_0_rates[] = {
> + { .div = 1, .val = 0, .flags = RATE_IN_4430 },
> + { .div = 0 },
> +};
> +
> +static const struct clksel_rate div_1_1_rates[] = {
> + { .div = 1, .val = 1, .flags = RATE_IN_4430 },
> + { .div = 0 },
> +};
> +
> +static const struct clksel_rate div_1_2_rates[] = {
> + { .div = 1, .val = 2, .flags = RATE_IN_4430 },
> + { .div = 0 },
> +};
> +
> +static const struct clksel_rate div_1_3_rates[] = {
> + { .div = 1, .val = 3, .flags = RATE_IN_4430 },
> + { .div = 0 },
> +};
> +
> +static const struct clksel_rate div_1_4_rates[] = {
> + { .div = 1, .val = 4, .flags = RATE_IN_4430 },
> + { .div = 0 },
> +};
> +
> +static const struct clksel_rate div_1_5_rates[] = {
> + { .div = 1, .val = 5, .flags = RATE_IN_4430 },
> + { .div = 0 },
> +};
The above clksel_rate structures could be used by OMAP2/3 devices too
(assuming that the flags is set for OMAP2/3/4 devices). Any reason why
these cannot be placed in a global header? It could remove quite a bit
of repetitive code. I know these are auto-generated, but maybe we should
have the auto-generator spit out the clksel_rate structs to another file
(ie. a global header).
By the way, div_1_3/4/5_rates don't appear to be used in this file.
Cheers
Jon
next prev parent reply other threads:[~2012-06-04 22:15 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-01 12:07 [RFC 00/24] Move OMAP2+ over to use COMMON clock Rajendra Nayak
2012-06-01 12:07 ` [RFC 01/24] clk: Add CLK_IS_BASIC flag to identify basic clocks Rajendra Nayak
2012-06-01 12:07 ` [RFC 02/24] ARM: omap4: cm: add bitfield width values Rajendra Nayak
2012-06-01 12:07 ` [RFC 03/24] ARM: omap: clk: convert all clk_enable to clk_prepare_enable Rajendra Nayak
2012-06-01 12:07 ` [RFC 04/24] ARM: omap: hwmod: get rid of all omap_clk_get_by_name usage Rajendra Nayak
2012-06-01 12:07 ` [RFC 05/24] ARM: omap: clk: Nuke plat clock.c & clock.h if CONFIG_COMMON_CLK Rajendra Nayak
2012-06-04 13:57 ` Jon Hunter
2012-06-04 14:16 ` Rajendra Nayak
2012-06-04 14:25 ` Jon Hunter
2012-06-05 4:58 ` Rajendra Nayak
2012-06-05 13:11 ` Jon Hunter
2012-06-01 12:07 ` [RFC 06/24] ARM: omap: clk: Remove all direct dereferncing of struct clk Rajendra Nayak
2012-06-01 12:07 ` [RFC 07/24] ARM: omap: hwmod: Fix up hwmod based clkdm accesses Rajendra Nayak
2012-06-01 12:07 ` [RFC 08/24] ARM: omap4: clk: Convert to common clk Rajendra Nayak
2012-06-01 12:07 ` [RFC 09/24] ARM: omap3: " Rajendra Nayak
2012-06-01 12:07 ` [RFC 10/24] ARM: omap2: " Rajendra Nayak
2012-06-01 12:07 ` [RFC 11/24] ARM: omap: clk: list all clk_hw_omap clks to enable/disable autoidle Rajendra Nayak
2012-06-04 5:44 ` Tony Lindgren
2012-06-04 8:53 ` Rajendra Nayak
2012-06-01 12:07 ` [RFC 12/24] ARM: omap: clk: Define a function to enable clocks at init Rajendra Nayak
2012-06-01 12:07 ` [RFC 13/24] ARM: omap4: clk: Add 44xx data using common struct clk Rajendra Nayak
2012-06-04 22:14 ` Jon Hunter [this message]
2012-06-05 4:35 ` Rajendra Nayak
2012-06-05 6:42 ` Tony Lindgren
2012-06-05 6:44 ` Tony Lindgren
2012-06-07 5:29 ` Rajendra Nayak
2012-06-20 11:39 ` Tony Lindgren
2012-06-21 6:28 ` Rajendra Nayak
2012-06-21 7:00 ` Tony Lindgren
2012-06-01 12:07 ` [RFC 14/24] ARM: omap3: clk: Add 3xxx " Rajendra Nayak
2012-06-01 12:07 ` [RFC 15/24] ARM: omap2: clk: Add 24xx " Rajendra Nayak
2012-06-01 12:07 ` [RFC 16/24] ARM: omap: clk: Switch to COMMON clk Rajendra Nayak
2012-06-01 12:07 ` [RFC 17/24] ARM: omap: clk: Use plat clock.c & clock.h only for OMAP1 Rajendra Nayak
2012-06-01 12:07 ` [RFC 18/24] ARM: omap: hwmod: Cleanup !CONFIG_COMMON_CLK parts Rajendra Nayak
2012-06-01 12:08 ` [RFC 19/24] ARM: omap4: clk: " Rajendra Nayak
2012-06-01 12:08 ` [RFC 20/24] ARM: omap3: " Rajendra Nayak
2012-06-01 12:08 ` [RFC 21/24] ARM: omap2: " Rajendra Nayak
2012-06-01 12:08 ` [RFC 22/24] ARM: omap4: clk: Delete old OMAP clock data Rajendra Nayak
2012-06-01 12:08 ` [RFC 23/24] ARM: omap3: " Rajendra Nayak
2012-06-01 12:08 ` [RFC 24/24] ARM: omap2: " Rajendra Nayak
2012-06-01 13:37 ` [RFC 00/24] Move OMAP2+ over to use COMMON clock Paul Walmsley
2012-06-04 8:38 ` Rajendra Nayak
2012-06-01 17:58 ` Mike Turquette
2012-06-01 20:37 ` Jon Hunter
2012-06-01 23:27 ` Jon Hunter
2012-06-04 8:52 ` Rajendra Nayak
2012-06-04 13:51 ` Jon Hunter
2012-06-04 14:04 ` Rajendra Nayak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FCD3357.5090409@ti.com \
--to=jon-hunter@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=mturquette@ti.com \
--cc=paul@pwsan.com \
--cc=rnayak@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).