diff options
author | Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> | 2017-08-10 09:01:18 +0530 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-08-10 22:39:53 +1000 |
commit | cb8b340de21e1c57e1c6d4f26ccc4af46a3ed559 (patch) | |
tree | 8f6e572060c3a724d4a6add5f558bf0417d05177 /arch/powerpc/platforms/powernv/opal.c | |
parent | a70a0b9f4404d8edb72ca0e0272731dc75bd00fb (diff) | |
download | talos-op-linux-cb8b340de21e1c57e1c6d4f26ccc4af46a3ed559.tar.gz talos-op-linux-cb8b340de21e1c57e1c6d4f26ccc4af46a3ed559.zip |
powerpc/powernv: Add support for powercap framework
Adds a generic powercap framework to change the system powercap
inband through OPAL-OCC command/response interface.
Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/platforms/powernv/opal.c')
-rw-r--r-- | arch/powerpc/platforms/powernv/opal.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c index 946158e6fc1d..28323c75e672 100644 --- a/arch/powerpc/platforms/powernv/opal.c +++ b/arch/powerpc/platforms/powernv/opal.c @@ -850,6 +850,9 @@ static int __init opal_init(void) /* Initialise OPAL kmsg dumper for flushing console on panic */ opal_kmsg_init(); + /* Initialise OPAL powercap interface */ + opal_powercap_init(); + return 0; } machine_subsys_initcall(powernv, opal_init); @@ -966,6 +969,7 @@ int opal_error_code(int rc) case OPAL_UNSUPPORTED: return -EIO; case OPAL_HARDWARE: return -EIO; case OPAL_INTERNAL_ERROR: return -EIO; + case OPAL_TIMEOUT: return -ETIMEDOUT; default: pr_err("%s: unexpected OPAL error %d\n", __func__, rc); return -EIO; |