All of lore.kernel.org
 help / color / mirror / Atom feed
From: andrew@lunn.ch (Andrew Lunn)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/7] arm: mvebu: move DT cpu clock nodes to the Armada XP specific .dtsi
Date: Mon, 19 Nov 2012 19:38:03 +0100	[thread overview]
Message-ID: <20121119183803.GT14643@lunn.ch> (raw)
In-Reply-To: <1353343963-23034-5-git-send-email-thomas.petazzoni@free-electrons.com>

On Mon, Nov 19, 2012 at 05:52:40PM +0100, Thomas Petazzoni wrote:
> The cpu clock nodes have originally been added in
> armada-xp.dtsi. However, this .dtsi file is common to all SoCs in the
> Armada XP family: the MV78230, the MV78260 and the MV78460. Those SoCs
> differ in a number of ways, but one of the main difference is the
> number of CPUs: one CPU in the MV78230, two CPUs in the MV78260 and
> four CPUs in the MV78460.
> 
> Therefore, this patch moves the cpu clock DT nodes into the
> armada-xp-mv78230.dtsi, armada-xp-mv78260.dtsi and
> armada-xp-mv78460.dtsi files, instantiating the right number of CPUs
> and CPU clocks as needed.

Hi Thomas

This is only part of the story:

void __init of_cpu_clk_setup(struct device_node *node)
{
        struct cpu_clk *cpuclk;
        void __iomem *clock_complex_base = of_iomap(node, 0);
        int cpu;
        if (clock_complex_base == NULL) {
                pr_err("%s: clock-complex base register not set\n",
                        __func__);
                return;
        }

        cpuclk = kzalloc(MAX_CPU * sizeof(*cpuclk), GFP_KERNEL);
        clks = kzalloc(MAX_CPU * sizeof(*clks), GFP_KERNEL);

        if (WARN_ON(!cpuclk))
                return;
        for (cpu = 0; cpu < MAX_CPU; cpu++) {
                struct clk_init_data init;
                struct clk *clk;
                struct clk *parent_clk;
                char *clk_name = kzalloc(5, GFP_KERNEL);

                sprintf(clk_name, "cpu%d", cpu);
                parent_clk = of_clk_get(node, 0);

...

                clk = clk_register(NULL, &cpuclk[cpu].hw);
                if (WARN_ON(IS_ERR(clk)))
                        goto bail_out;
                clks[cpu] = clk;
        }

You are still registering 4 clocks as far as i can see.

    Andrew

  reply	other threads:[~2012-11-19 18:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-19 16:52 arm: mvebu: Various mvebu clock fixes/improvements Thomas Petazzoni
2012-11-19 16:52 ` [PATCH 1/7] clk: mvebu: init all mvebu clock types from mvebu_clocks_init() Thomas Petazzoni
2012-11-19 18:25   ` Andrew Lunn
2012-11-19 18:44     ` Thomas Petazzoni
2012-11-19 16:52 ` [PATCH 2/7] clk: mvebu: move clk-cpu compatible strings into the clk-cpu driver Thomas Petazzoni
2012-11-19 16:52 ` [PATCH 3/7] clk: mvebu: rename mvebu_clk_gating_init() to mvebu_gating_clk_init() Thomas Petazzoni
2012-11-19 16:52 ` [PATCH 4/7] arm: mvebu: move DT cpu clock nodes to the Armada XP specific .dtsi Thomas Petazzoni
2012-11-19 18:38   ` Andrew Lunn [this message]
2012-11-19 18:50     ` Thomas Petazzoni
2012-11-19 16:52 ` [PATCH 5/7] clk: mvebu: rename *-core-clocks to *-core-clock Thomas Petazzoni
2012-11-19 16:52 ` [PATCH 6/7] clk: mvebu: rename armada-xp-cpu-clockctrl to armada-xp-cpu-clock Thomas Petazzoni
2012-11-19 16:52 ` [PATCH 7/7] arm: mvebu: fix SATA clocks on Armada 370/XP Thomas Petazzoni
2012-11-19 18:27 ` arm: mvebu: Various mvebu clock fixes/improvements Andrew Lunn
2012-11-19 18:46   ` Thomas Petazzoni
2012-11-20  9:40   ` Thomas Petazzoni
2012-11-20  9:43     ` Andrew Lunn
2012-11-20 10:06       ` Thomas Petazzoni
2012-11-20 10:50         ` Thomas Petazzoni
2012-11-20 16:22   ` Thomas Petazzoni

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=20121119183803.GT14643@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.