From: heiko@sntech.de (Heiko Stübner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH RFC 2/3] clk: dt: binding for basic multiplexor clock
Date: Mon, 3 Jun 2013 22:15:45 +0200 [thread overview]
Message-ID: <201306032215.45983.heiko@sntech.de> (raw)
In-Reply-To: <20130603200722.6077.85426@quantum>
Am Montag, 3. Juni 2013, 22:07:22 schrieb Mike Turquette:
> Quoting Heiko St?bner (2013-06-03 12:33:19)
>
> > Hi Mike,
> >
> > I think it's a multiplexEr clock in the patch title, and see below
>
> Doh, you are right. But "xor" is so much cooler looking than "xer"...
>
> > Am Montag, 3. Juni 2013, 19:53:09 schrieb Mike Turquette:
> > > Device Tree binding for the basic clock multiplexor, plus the setup
> > > function to register the clock. Based on the existing fixed-clock
> > > binding.
> > >
> > > Also relocate declaration of of_fixed_factor_clk_setup to keep things
> > > tidy.
> > >
> > > Signed-off-by: Mike Turquette <mturquette@linaro.org>
> >
> > [...]
> >
> > > +
> > > + reg = of_iomap(node, 0);
> > > + pr_err("%s: reg is 0x%p\n", __func__, reg);
> > > +
> > > + if (of_property_read_u32(node, "mask", &mask)) {
> > > + pr_err("%s: missing mask property for %s\n", __func__,
> > > node->name); + return;
> > > + }
> > > +
> > > + if (of_property_read_u32(node, "shift", &shift))
> > > + pr_debug("%s: missing shift property defaults to zero for
> > > %s\n", + __func__, node->name);
> > > +
> > > + if (of_property_read_bool(node, "index_one"))
> > > + clk_mux_flags |= CLK_MUX_INDEX_ONE;
> > > +
> > > + clk = clk_register_mux_table(NULL, clk_name, parent_names,
> > > num_parents, + 0, reg, 0, mask, clk_mux_flags,
> > >
> > ^- should probably be shift
> >
> > Otherwise looks cool and I'm currently trying it with my Rockchip code.
>
> Right again. My test platform seems to not shift the mask at all so
> this did not cause a visible bug for me.
I'm currently converting my rockchip stuff to it, as it would solve a lot of
problems with the numerous clock types I'm defining just to put the shift and
mask values somewhere.
So lets see if anything more turns up ;-)
WARNING: multiple messages have this Message-ID (diff)
From: "Heiko Stübner" <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
Mike Turquette
<mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH RFC 2/3] clk: dt: binding for basic multiplexor clock
Date: Mon, 3 Jun 2013 22:15:45 +0200 [thread overview]
Message-ID: <201306032215.45983.heiko@sntech.de> (raw)
In-Reply-To: <20130603200722.6077.85426@quantum>
Am Montag, 3. Juni 2013, 22:07:22 schrieb Mike Turquette:
> Quoting Heiko Stübner (2013-06-03 12:33:19)
>
> > Hi Mike,
> >
> > I think it's a multiplexEr clock in the patch title, and see below
>
> Doh, you are right. But "xor" is so much cooler looking than "xer"...
>
> > Am Montag, 3. Juni 2013, 19:53:09 schrieb Mike Turquette:
> > > Device Tree binding for the basic clock multiplexor, plus the setup
> > > function to register the clock. Based on the existing fixed-clock
> > > binding.
> > >
> > > Also relocate declaration of of_fixed_factor_clk_setup to keep things
> > > tidy.
> > >
> > > Signed-off-by: Mike Turquette <mturquette@linaro.org>
> >
> > [...]
> >
> > > +
> > > + reg = of_iomap(node, 0);
> > > + pr_err("%s: reg is 0x%p\n", __func__, reg);
> > > +
> > > + if (of_property_read_u32(node, "mask", &mask)) {
> > > + pr_err("%s: missing mask property for %s\n", __func__,
> > > node->name); + return;
> > > + }
> > > +
> > > + if (of_property_read_u32(node, "shift", &shift))
> > > + pr_debug("%s: missing shift property defaults to zero for
> > > %s\n", + __func__, node->name);
> > > +
> > > + if (of_property_read_bool(node, "index_one"))
> > > + clk_mux_flags |= CLK_MUX_INDEX_ONE;
> > > +
> > > + clk = clk_register_mux_table(NULL, clk_name, parent_names,
> > > num_parents, + 0, reg, 0, mask, clk_mux_flags,
> > >
> > ^- should probably be shift
> >
> > Otherwise looks cool and I'm currently trying it with my Rockchip code.
>
> Right again. My test platform seems to not shift the mask at all so
> this did not cause a visible bug for me.
I'm currently converting my rockchip stuff to it, as it would solve a lot of
problems with the numerous clock types I'm defining just to put the shift and
mask values somewhere.
So lets see if anything more turns up ;-)
_______________________________________________
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss
WARNING: multiple messages have this Message-ID (diff)
From: "Heiko Stübner" <heiko@sntech.de>
To: linux-arm-kernel@lists.infradead.org
Cc: Mike Turquette <mturquette@linaro.org>,
devicetree-discuss@lists.ozlabs.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC 2/3] clk: dt: binding for basic multiplexor clock
Date: Mon, 3 Jun 2013 22:15:45 +0200 [thread overview]
Message-ID: <201306032215.45983.heiko@sntech.de> (raw)
In-Reply-To: <20130603200722.6077.85426@quantum>
Am Montag, 3. Juni 2013, 22:07:22 schrieb Mike Turquette:
> Quoting Heiko Stübner (2013-06-03 12:33:19)
>
> > Hi Mike,
> >
> > I think it's a multiplexEr clock in the patch title, and see below
>
> Doh, you are right. But "xor" is so much cooler looking than "xer"...
>
> > Am Montag, 3. Juni 2013, 19:53:09 schrieb Mike Turquette:
> > > Device Tree binding for the basic clock multiplexor, plus the setup
> > > function to register the clock. Based on the existing fixed-clock
> > > binding.
> > >
> > > Also relocate declaration of of_fixed_factor_clk_setup to keep things
> > > tidy.
> > >
> > > Signed-off-by: Mike Turquette <mturquette@linaro.org>
> >
> > [...]
> >
> > > +
> > > + reg = of_iomap(node, 0);
> > > + pr_err("%s: reg is 0x%p\n", __func__, reg);
> > > +
> > > + if (of_property_read_u32(node, "mask", &mask)) {
> > > + pr_err("%s: missing mask property for %s\n", __func__,
> > > node->name); + return;
> > > + }
> > > +
> > > + if (of_property_read_u32(node, "shift", &shift))
> > > + pr_debug("%s: missing shift property defaults to zero for
> > > %s\n", + __func__, node->name);
> > > +
> > > + if (of_property_read_bool(node, "index_one"))
> > > + clk_mux_flags |= CLK_MUX_INDEX_ONE;
> > > +
> > > + clk = clk_register_mux_table(NULL, clk_name, parent_names,
> > > num_parents, + 0, reg, 0, mask, clk_mux_flags,
> > >
> > ^- should probably be shift
> >
> > Otherwise looks cool and I'm currently trying it with my Rockchip code.
>
> Right again. My test platform seems to not shift the mask at all so
> this did not cause a visible bug for me.
I'm currently converting my rockchip stuff to it, as it would solve a lot of
problems with the numerous clock types I'm defining just to put the shift and
mask values somewhere.
So lets see if anything more turns up ;-)
next prev parent reply other threads:[~2013-06-03 20:15 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-03 17:53 [PATCH RFC 0/3] clk: dt: bindings for mux & divider clocks Mike Turquette
2013-06-03 17:53 ` Mike Turquette
2013-06-03 17:53 ` [PATCH RFC 1/3] clk: of: helper for determining number of parent clocks Mike Turquette
2013-06-03 17:53 ` Mike Turquette
2013-06-03 17:53 ` Mike Turquette
2013-06-03 17:53 ` [PATCH RFC 2/3] clk: dt: binding for basic multiplexor clock Mike Turquette
2013-06-03 17:53 ` Mike Turquette
2013-06-03 19:33 ` Heiko Stübner
2013-06-03 19:33 ` Heiko Stübner
2013-06-03 20:07 ` Mike Turquette
2013-06-03 20:07 ` Mike Turquette
2013-06-03 20:15 ` Heiko Stübner [this message]
2013-06-03 20:15 ` Heiko Stübner
2013-06-03 20:15 ` Heiko Stübner
2013-06-03 21:39 ` Heiko Stübner
2013-06-03 21:39 ` Heiko Stübner
2013-06-03 21:39 ` Heiko Stübner
2013-06-04 6:14 ` Mike Turquette
2013-06-04 6:14 ` Mike Turquette
2013-06-03 17:53 ` [PATCH RFC 3/3] clk: dt: binding for basic divider clock Mike Turquette
2013-06-03 17:53 ` Mike Turquette
2013-06-03 22:18 ` Heiko Stübner
2013-06-03 22:18 ` Heiko Stübner
2013-06-03 22:18 ` Heiko Stübner
2013-06-13 2:41 ` Mike Turquette
2013-06-13 2:41 ` Mike Turquette
2013-06-04 17:11 ` Stephen Boyd
2013-06-04 17:11 ` Stephen Boyd
2013-06-04 17:39 ` Matt Sealey
2013-06-04 17:39 ` Matt Sealey
2013-06-04 17:39 ` Matt Sealey
2013-06-04 19:22 ` Mike Turquette
2013-06-04 19:22 ` Mike Turquette
2013-06-04 20:13 ` Matt Sealey
2013-06-04 20:13 ` Matt Sealey
2013-06-06 0:09 ` Heiko Stübner
2013-06-06 0:09 ` Heiko Stübner
2013-06-06 0:09 ` Heiko Stübner
2013-06-03 22:31 ` [PATCH RFC 0/3] clk: dt: bindings for mux & divider clocks Heiko Stübner
2013-06-03 22:31 ` Heiko Stübner
2013-06-03 22:31 ` Heiko Stübner
2013-06-07 5:51 ` Shawn Guo
2013-06-07 5:51 ` Shawn Guo
2013-06-07 5:51 ` Shawn Guo
2013-06-07 17:52 ` Mike Turquette
2013-06-07 17:52 ` Mike Turquette
2013-06-08 3:02 ` Shawn Guo
2013-06-08 3:02 ` Shawn Guo
2013-06-08 3:02 ` Shawn Guo
2013-06-08 18:25 ` Mike Turquette
2013-06-08 18:25 ` Mike Turquette
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=201306032215.45983.heiko@sntech.de \
--to=heiko@sntech.de \
--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.