diff options
-rw-r--r-- | Documentation/clk.txt | 11 | ||||
-rw-r--r-- | Documentation/kernel-parameters.txt | 8 | ||||
-rw-r--r-- | drivers/clk/clk.c | 13 |
3 files changed, 32 insertions, 0 deletions
diff --git a/Documentation/clk.txt b/Documentation/clk.txt index 4274a546eb57..b9911c27f496 100644 --- a/Documentation/clk.txt +++ b/Documentation/clk.txt | |||
@@ -231,3 +231,14 @@ To better enforce this policy, always follow this simple rule: any | |||
231 | statically initialized clock data MUST be defined in a separate file | 231 | statically initialized clock data MUST be defined in a separate file |
232 | from the logic that implements its ops. Basically separate the logic | 232 | from the logic that implements its ops. Basically separate the logic |
233 | from the data and all is well. | 233 | from the data and all is well. |
234 | |||
235 | Part 6 - Disabling clock gating of unused clocks | ||
236 | |||
237 | Sometimes during development it can be useful to be able to bypass the | ||
238 | default disabling of unused clocks. For example, if drivers aren't enabling | ||
239 | clocks properly but rely on them being on from the bootloader, bypassing | ||
240 | the disabling means that the driver will remain functional while the issues | ||
241 | are sorted out. | ||
242 | |||
243 | To bypass this disabling, include "clk_ignore_unused" in the bootargs to the | ||
244 | kernel. | ||
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 4609e81dbc37..9aa5562fed9c 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -44,6 +44,7 @@ parameter is applicable: | |||
44 | AVR32 AVR32 architecture is enabled. | 44 | AVR32 AVR32 architecture is enabled. |
45 | AX25 Appropriate AX.25 support is enabled. | 45 | AX25 Appropriate AX.25 support is enabled. |
46 | BLACKFIN Blackfin architecture is enabled. | 46 | BLACKFIN Blackfin architecture is enabled. |
47 | CLK Common clock infrastructure is enabled. | ||
47 | DRM Direct Rendering Management support is enabled. | 48 | DRM Direct Rendering Management support is enabled. |
48 | DYNAMIC_DEBUG Build in debug messages and enable them at runtime | 49 | DYNAMIC_DEBUG Build in debug messages and enable them at runtime |
49 | EDD BIOS Enhanced Disk Drive Services (EDD) is enabled | 50 | EDD BIOS Enhanced Disk Drive Services (EDD) is enabled |
@@ -465,6 +466,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
465 | 466 | ||
466 | cio_ignore= [S390] | 467 | cio_ignore= [S390] |
467 | See Documentation/s390/CommonIO for details. | 468 | See Documentation/s390/CommonIO for details. |
469 | clk_ignore_unused | ||
470 | [CLK] | ||
471 | Keep all clocks already enabled by bootloader on, | ||
472 | even if no driver has claimed them. This is useful | ||
473 | for debug and development, but should not be | ||
474 | needed on a platform with proper driver support. | ||
475 | For more information, see Documentation/clk.txt. | ||
468 | 476 | ||
469 | clock= [BUGS=X86-32, HW] gettimeofday clocksource override. | 477 | clock= [BUGS=X86-32, HW] gettimeofday clocksource override. |
470 | [Deprecated] | 478 | [Deprecated] |
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 20ce67f82d65..934cfd18f72d 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c | |||
@@ -499,10 +499,23 @@ out: | |||
499 | return; | 499 | return; |
500 | } | 500 | } |
501 | 501 | ||
502 | static bool clk_ignore_unused; | ||
503 | static int __init clk_ignore_unused_setup(char *__unused) | ||
504 | { | ||
505 | clk_ignore_unused = true; | ||
506 | return 1; | ||
507 | } | ||
508 | __setup("clk_ignore_unused", clk_ignore_unused_setup); | ||
509 | |||
502 | static int clk_disable_unused(void) | 510 | static int clk_disable_unused(void) |
503 | { | 511 | { |
504 | struct clk *clk; | 512 | struct clk *clk; |
505 | 513 | ||
514 | if (clk_ignore_unused) { | ||
515 | pr_warn("clk: Not disabling unused clocks\n"); | ||
516 | return 0; | ||
517 | } | ||
518 | |||
506 | clk_prepare_lock(); | 519 | clk_prepare_lock(); |
507 | 520 | ||
508 | hlist_for_each_entry(clk, &clk_root_list, child_node) | 521 | hlist_for_each_entry(clk, &clk_root_list, child_node) |