linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* S3C/SAMSUNG: clock fixes and updates
@ 2010-01-25  1:57 Ben Dooks
  2010-01-25  1:57 ` [PATCH] ARM: SAMSUNG: Fix bad use of __initdata for s3c_register_clocks() Ben Dooks
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ben Dooks @ 2010-01-25  1:57 UTC (permalink / raw)
  To: linux-arm-kernel

Clock fixes and updates for next-samsung.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] ARM: SAMSUNG: Fix bad use of __initdata for s3c_register_clocks()
  2010-01-25  1:57 S3C/SAMSUNG: clock fixes and updates Ben Dooks
@ 2010-01-25  1:57 ` Ben Dooks
  2010-01-25  1:57 ` [PATCH] ARM: SAMSUNG: Add documentation to the clock registration calls Ben Dooks
  2010-01-25  1:57 ` [PATCH] ARM: SAMSUNG: Add error printing to s3c24xx_register_clocks Ben Dooks
  2 siblings, 0 replies; 4+ messages in thread
From: Ben Dooks @ 2010-01-25  1:57 UTC (permalink / raw)
  To: linux-arm-kernel

Functions should be marked __init, not __initdata.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
---
 arch/arm/plat-samsung/clock.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-samsung/clock.c b/arch/arm/plat-samsung/clock.c
index 0c746ae..e9cdbe4 100644
--- a/arch/arm/plat-samsung/clock.c
+++ b/arch/arm/plat-samsung/clock.c
@@ -344,7 +344,7 @@ int s3c24xx_register_clocks(struct clk **clks, int nr_clks)
  * Call s3c24xx_register_clock() on the @clkp array given, printing an
  * error if it fails to register the clock (unlikely).
  */
-void __initdata s3c_register_clocks(struct clk *clkp, int nr_clks)
+void __init s3c_register_clocks(struct clk *clkp, int nr_clks)
 {
 	int ret;
 
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] ARM: SAMSUNG: Add documentation to the clock registration calls.
  2010-01-25  1:57 S3C/SAMSUNG: clock fixes and updates Ben Dooks
  2010-01-25  1:57 ` [PATCH] ARM: SAMSUNG: Fix bad use of __initdata for s3c_register_clocks() Ben Dooks
@ 2010-01-25  1:57 ` Ben Dooks
  2010-01-25  1:57 ` [PATCH] ARM: SAMSUNG: Add error printing to s3c24xx_register_clocks Ben Dooks
  2 siblings, 0 replies; 4+ messages in thread
From: Ben Dooks @ 2010-01-25  1:57 UTC (permalink / raw)
  To: linux-arm-kernel

Add some kerneldoc documentation to the s3c24xx_register_clock and the
s3c24xx_register_clocks() call.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
---
 arch/arm/plat-samsung/clock.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-samsung/clock.c b/arch/arm/plat-samsung/clock.c
index e9cdbe4..4b95b39 100644
--- a/arch/arm/plat-samsung/clock.c
+++ b/arch/arm/plat-samsung/clock.c
@@ -307,6 +307,12 @@ struct clk s3c24xx_uclk = {
 
 /* initialise the clock system */
 
+/**
+ * s3c24xx_register_clock() - register a clock
+ * @clk: The clock to register
+ *
+ * Add the specified clock to the list of clocks known by the system.
+ */
 int s3c24xx_register_clock(struct clk *clk)
 {
 	if (clk->enable == NULL)
@@ -324,6 +330,14 @@ int s3c24xx_register_clock(struct clk *clk)
 	return 0;
 }
 
+/**
+ * s3c24xx_register_clocks() - register an array of clock pointers
+ * @clks: Pointer to an array of struct clk pointers
+ * @nr_clks: The number of clocks in the @clks array.
+ *
+ * Call s3c24xx_register_clock() for all the clock pointers contained
+ * in the @clks list. Returns the number of failures.
+ */
 int s3c24xx_register_clocks(struct clk **clks, int nr_clks)
 {
 	int fails = 0;
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] ARM: SAMSUNG: Add error printing to s3c24xx_register_clocks
  2010-01-25  1:57 S3C/SAMSUNG: clock fixes and updates Ben Dooks
  2010-01-25  1:57 ` [PATCH] ARM: SAMSUNG: Fix bad use of __initdata for s3c_register_clocks() Ben Dooks
  2010-01-25  1:57 ` [PATCH] ARM: SAMSUNG: Add documentation to the clock registration calls Ben Dooks
@ 2010-01-25  1:57 ` Ben Dooks
  2 siblings, 0 replies; 4+ messages in thread
From: Ben Dooks @ 2010-01-25  1:57 UTC (permalink / raw)
  To: linux-arm-kernel

Add an error print to s3c24xx_register_clocks to provide more useful
information when failing to register the clock.

I belive this was originally left out due to the possibility of a
problem with low-level debugging code. However, if the low-level
debug code is not functional by now there will be a whole other set of
problems being presented to the system.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
---
 arch/arm/plat-samsung/clock.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-samsung/clock.c b/arch/arm/plat-samsung/clock.c
index 4b95b39..1b25c9d 100644
--- a/arch/arm/plat-samsung/clock.c
+++ b/arch/arm/plat-samsung/clock.c
@@ -343,8 +343,12 @@ int s3c24xx_register_clocks(struct clk **clks, int nr_clks)
 	int fails = 0;
 
 	for (; nr_clks > 0; nr_clks--, clks++) {
-		if (s3c24xx_register_clock(*clks) < 0)
+		if (s3c24xx_register_clock(*clks) < 0) {
+			struct clk *clk = *clks;
+			printk(KERN_ERR "%s: failed to register %p: %s\n",
+			       __func__, clk, clk->name);
 			fails++;
+		}
 	}
 
 	return fails;
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-01-25  1:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-25  1:57 S3C/SAMSUNG: clock fixes and updates Ben Dooks
2010-01-25  1:57 ` [PATCH] ARM: SAMSUNG: Fix bad use of __initdata for s3c_register_clocks() Ben Dooks
2010-01-25  1:57 ` [PATCH] ARM: SAMSUNG: Add documentation to the clock registration calls Ben Dooks
2010-01-25  1:57 ` [PATCH] ARM: SAMSUNG: Add error printing to s3c24xx_register_clocks Ben Dooks

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).