From: <gerg@snapgear.com>
To: linux-m68k@vger.kernel.org, uclinux-dev@uclinux.org
Cc: Greg Ungerer <gerg@uclinux.org>
Subject: [PATCH 01/12] m68knommu: add clock creation support macro for other ColdFire CPUs
Date: Fri, 16 Nov 2012 14:47:25 +1000 [thread overview]
Message-ID: <1353041256-2959-2-git-send-email-gerg@snapgear.com> (raw)
In-Reply-To: <1353041256-2959-1-git-send-email-gerg@snapgear.com>
From: Greg Ungerer <gerg@uclinux.org>
The clock support code for ColdFire CPUs currently supports those that
have the clock control register PPMCR. Expose the struct clk for all CPU
types and add a definition for all other ColdFire CPU types.
With this we will be able to define simple clock trees for all ColdFire
CPU types, even though will not be able to be enabled or disabled. They
will be able to report the clock rate.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---
arch/m68k/include/asm/mcfclk.h | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/arch/m68k/include/asm/mcfclk.h b/arch/m68k/include/asm/mcfclk.h
index b676a02..ea4791e 100644
--- a/arch/m68k/include/asm/mcfclk.h
+++ b/arch/m68k/include/asm/mcfclk.h
@@ -8,7 +8,6 @@
struct clk;
-#ifdef MCFPM_PPMCR0
struct clk_ops {
void (*enable)(struct clk *);
void (*disable)(struct clk *);
@@ -23,6 +22,8 @@ struct clk {
};
extern struct clk *mcf_clks[];
+
+#ifdef MCFPM_PPMCR0
extern struct clk_ops clk_ops0;
#ifdef MCFPM_PPMCR1
extern struct clk_ops clk_ops1;
@@ -38,6 +39,12 @@ static struct clk __clk_##clk_bank##_##clk_slot = { \
void __clk_init_enabled(struct clk *);
void __clk_init_disabled(struct clk *);
+#else
+#define DEFINE_CLK(clk_ref, clk_name, clk_rate) \
+ static struct clk clk_##clk_ref = { \
+ .name = clk_name, \
+ .rate = clk_rate, \
+ }
#endif /* MCFPM_PPMCR0 */
#endif /* mcfclk_h */
--
1.7.0.4
next prev parent reply other threads:[~2012-11-16 4:41 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-16 4:47 [PATCH 00/12] m68knommu: generalize the ColdFire clock support for all CPU types gerg
2012-11-16 4:47 ` gerg [this message]
2012-11-16 6:30 ` [PATCH 01/12] m68knommu: add clock creation support macro for other ColdFire CPUs Geert Uytterhoeven
2012-11-16 4:47 ` [PATCH 02/12] m68knommu: add clock definitions for 5206 ColdFire CPU types gerg
2012-11-16 4:47 ` [PATCH 03/12] m68knommu: add clock definitions for 523x " gerg
2012-11-16 4:47 ` [PATCH 04/12] m68knommu: add clock definitions for 5249 " gerg
2012-11-16 4:47 ` [PATCH 05/12] m68knommu: add clock definitions for 525x " gerg
2012-11-16 4:47 ` [PATCH 06/12] m68knommu: add clock definitions for 5272 " gerg
2012-11-16 4:47 ` [PATCH 07/12] m68knommu: add clock definitions for 527x " gerg
2012-11-16 4:47 ` [PATCH 08/12] m68knommu: add clock definitions for 528x " gerg
2012-11-16 4:47 ` [PATCH 09/12] m68knommu: add clock definitions for 5307 " gerg
2012-11-16 4:47 ` [PATCH 10/12] m68knommu: add clock definitions for 5407 " gerg
2012-11-16 4:47 ` [PATCH 11/12] m68knommu: add clock definitions for 54xx " gerg
2012-11-16 4:47 ` [PATCH 12/12] m68knommu: modify clock code so it can be used by all " gerg
2012-11-16 6:28 ` [PATCH 00/12] m68knommu: generalize the ColdFire clock support for all " Geert Uytterhoeven
2012-11-16 9:09 ` Greg Ungerer
2012-11-26 15:34 ` [uClinux-dev] " Thomas Petazzoni
2012-11-26 22:49 ` Greg Ungerer
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=1353041256-2959-2-git-send-email-gerg@snapgear.com \
--to=gerg@snapgear.com \
--cc=gerg@uclinux.org \
--cc=linux-m68k@vger.kernel.org \
--cc=uclinux-dev@uclinux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox