aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-samsung/clock.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-samsung/clock.c')
-rw-r--r--arch/arm/plat-samsung/clock.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/arch/arm/plat-samsung/clock.c b/arch/arm/plat-samsung/clock.c
index e9cdbe47beb6..1b25c9d8c403 100644
--- a/arch/arm/plat-samsung/clock.c
+++ b/arch/arm/plat-samsung/clock.c
@@ -307,6 +307,12 @@ struct clk s3c24xx_uclk = {
307 307
308/* initialise the clock system */ 308/* initialise the clock system */
309 309
310/**
311 * s3c24xx_register_clock() - register a clock
312 * @clk: The clock to register
313 *
314 * Add the specified clock to the list of clocks known by the system.
315 */
310int s3c24xx_register_clock(struct clk *clk) 316int s3c24xx_register_clock(struct clk *clk)
311{ 317{
312 if (clk->enable == NULL) 318 if (clk->enable == NULL)
@@ -324,13 +330,25 @@ int s3c24xx_register_clock(struct clk *clk)
324 return 0; 330 return 0;
325} 331}
326 332
333/**
334 * s3c24xx_register_clocks() - register an array of clock pointers
335 * @clks: Pointer to an array of struct clk pointers
336 * @nr_clks: The number of clocks in the @clks array.
337 *
338 * Call s3c24xx_register_clock() for all the clock pointers contained
339 * in the @clks list. Returns the number of failures.
340 */
327int s3c24xx_register_clocks(struct clk **clks, int nr_clks) 341int s3c24xx_register_clocks(struct clk **clks, int nr_clks)
328{ 342{
329 int fails = 0; 343 int fails = 0;
330 344
331 for (; nr_clks > 0; nr_clks--, clks++) { 345 for (; nr_clks > 0; nr_clks--, clks++) {
332 if (s3c24xx_register_clock(*clks) < 0) 346 if (s3c24xx_register_clock(*clks) < 0) {
347 struct clk *clk = *clks;
348 printk(KERN_ERR "%s: failed to register %p: %s\n",
349 __func__, clk, clk->name);
333 fails++; 350 fails++;
351 }
334 } 352 }
335 353
336 return fails; 354 return fails;