diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-omap2/powerdomain.c | 81 | ||||
-rw-r--r-- | arch/arm/mach-omap2/powerdomain.h | 5 |
2 files changed, 0 insertions, 86 deletions
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index 7fb033eca0a5..6bd6025716ea 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c | |||
@@ -484,87 +484,6 @@ pac_exit: | |||
484 | } | 484 | } |
485 | 485 | ||
486 | /** | 486 | /** |
487 | * pwrdm_del_clkdm - remove a clockdomain from a powerdomain | ||
488 | * @pwrdm: struct powerdomain * to add the clockdomain to | ||
489 | * @clkdm: struct clockdomain * to associate with a powerdomain | ||
490 | * | ||
491 | * Dissociate the clockdomain @clkdm from the powerdomain | ||
492 | * @pwrdm. Returns -EINVAL if presented with invalid pointers; -ENOENT | ||
493 | * if @clkdm was not associated with the powerdomain, or 0 upon | ||
494 | * success. | ||
495 | */ | ||
496 | int pwrdm_del_clkdm(struct powerdomain *pwrdm, struct clockdomain *clkdm) | ||
497 | { | ||
498 | int ret = -EINVAL; | ||
499 | int i; | ||
500 | |||
501 | if (!pwrdm || !clkdm) | ||
502 | return -EINVAL; | ||
503 | |||
504 | pr_debug("powerdomain: %s: dissociating clockdomain %s\n", | ||
505 | pwrdm->name, clkdm->name); | ||
506 | |||
507 | for (i = 0; i < PWRDM_MAX_CLKDMS; i++) | ||
508 | if (pwrdm->pwrdm_clkdms[i] == clkdm) | ||
509 | break; | ||
510 | |||
511 | if (i == PWRDM_MAX_CLKDMS) { | ||
512 | pr_debug("powerdomain: %s: clkdm %s not associated?!\n", | ||
513 | pwrdm->name, clkdm->name); | ||
514 | ret = -ENOENT; | ||
515 | goto pdc_exit; | ||
516 | } | ||
517 | |||
518 | pwrdm->pwrdm_clkdms[i] = NULL; | ||
519 | |||
520 | ret = 0; | ||
521 | |||
522 | pdc_exit: | ||
523 | return ret; | ||
524 | } | ||
525 | |||
526 | /** | ||
527 | * pwrdm_for_each_clkdm - call function on each clkdm in a pwrdm | ||
528 | * @pwrdm: struct powerdomain * to iterate over | ||
529 | * @fn: callback function * | ||
530 | * | ||
531 | * Call the supplied function @fn for each clockdomain in the powerdomain | ||
532 | * @pwrdm. The callback function can return anything but 0 to bail | ||
533 | * out early from the iterator. Returns -EINVAL if presented with | ||
534 | * invalid pointers; or passes along the last return value of the | ||
535 | * callback function, which should be 0 for success or anything else | ||
536 | * to indicate failure. | ||
537 | */ | ||
538 | int pwrdm_for_each_clkdm(struct powerdomain *pwrdm, | ||
539 | int (*fn)(struct powerdomain *pwrdm, | ||
540 | struct clockdomain *clkdm)) | ||
541 | { | ||
542 | int ret = 0; | ||
543 | int i; | ||
544 | |||
545 | if (!fn) | ||
546 | return -EINVAL; | ||
547 | |||
548 | for (i = 0; i < PWRDM_MAX_CLKDMS && !ret; i++) | ||
549 | if (pwrdm->pwrdm_clkdms[i]) | ||
550 | ret = (*fn)(pwrdm, pwrdm->pwrdm_clkdms[i]); | ||
551 | |||
552 | return ret; | ||
553 | } | ||
554 | |||
555 | /** | ||
556 | * pwrdm_get_voltdm - return a ptr to the voltdm that this pwrdm resides in | ||
557 | * @pwrdm: struct powerdomain * | ||
558 | * | ||
559 | * Return a pointer to the struct voltageomain that the specified powerdomain | ||
560 | * @pwrdm exists in. | ||
561 | */ | ||
562 | struct voltagedomain *pwrdm_get_voltdm(struct powerdomain *pwrdm) | ||
563 | { | ||
564 | return pwrdm->voltdm.ptr; | ||
565 | } | ||
566 | |||
567 | /** | ||
568 | * pwrdm_get_mem_bank_count - get number of memory banks in this powerdomain | 487 | * pwrdm_get_mem_bank_count - get number of memory banks in this powerdomain |
569 | * @pwrdm: struct powerdomain * | 488 | * @pwrdm: struct powerdomain * |
570 | * | 489 | * |
diff --git a/arch/arm/mach-omap2/powerdomain.h b/arch/arm/mach-omap2/powerdomain.h index 11bd4dd7d8d6..28a796ce07d7 100644 --- a/arch/arm/mach-omap2/powerdomain.h +++ b/arch/arm/mach-omap2/powerdomain.h | |||
@@ -212,11 +212,6 @@ int pwrdm_for_each_nolock(int (*fn)(struct powerdomain *pwrdm, void *user), | |||
212 | void *user); | 212 | void *user); |
213 | 213 | ||
214 | int pwrdm_add_clkdm(struct powerdomain *pwrdm, struct clockdomain *clkdm); | 214 | int pwrdm_add_clkdm(struct powerdomain *pwrdm, struct clockdomain *clkdm); |
215 | int pwrdm_del_clkdm(struct powerdomain *pwrdm, struct clockdomain *clkdm); | ||
216 | int pwrdm_for_each_clkdm(struct powerdomain *pwrdm, | ||
217 | int (*fn)(struct powerdomain *pwrdm, | ||
218 | struct clockdomain *clkdm)); | ||
219 | struct voltagedomain *pwrdm_get_voltdm(struct powerdomain *pwrdm); | ||
220 | 215 | ||
221 | int pwrdm_get_mem_bank_count(struct powerdomain *pwrdm); | 216 | int pwrdm_get_mem_bank_count(struct powerdomain *pwrdm); |
222 | 217 | ||