diff options
author | Dean Luick <dean.luick@intel.com> | 2016-03-05 08:50:11 -0800 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-03-17 15:55:15 -0400 |
commit | a453698b52dbfb248d23331450c638eaa3219025 (patch) | |
tree | b630362b002bdf7d1311c7d8f70033c2cbcb68df /drivers/staging/rdma/hfi1/chip.c | |
parent | 765a6fac9132da203347525032bb40b1e9055104 (diff) | |
download | linux-stable-a453698b52dbfb248d23331450c638eaa3219025.tar.gz linux-stable-a453698b52dbfb248d23331450c638eaa3219025.tar.bz2 linux-stable-a453698b52dbfb248d23331450c638eaa3219025.zip |
IB/hfi1: Change thermal init to use resource reservation
Use the resource reservation system to flag that the ASIC
thermal has been initialized.
Reviewed-by: Mitko Haralanov <mitko.haralanov@intel.com>
Reviewed-by: Easwar Hariharan <easwar.hariharan@intel.com>
Signed-off-by: Dean Luick <dean.luick@intel.com>
Signed-off-by: Jubin John <jubin.john@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/staging/rdma/hfi1/chip.c')
-rw-r--r-- | drivers/staging/rdma/hfi1/chip.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/staging/rdma/hfi1/chip.c b/drivers/staging/rdma/hfi1/chip.c index d3a9b9f3b4f5..717091375810 100644 --- a/drivers/staging/rdma/hfi1/chip.c +++ b/drivers/staging/rdma/hfi1/chip.c @@ -14331,7 +14331,7 @@ static int thermal_init(struct hfi1_devdata *dd) int ret = 0; if (dd->icode != ICODE_RTL_SILICON || - !(dd->flags & HFI1_DO_INIT_ASIC)) + check_chip_resource(dd, CR_THERM_INIT, NULL)) return ret; ret = acquire_chip_resource(dd, CR_SBUS, SBUS_TIMEOUT); @@ -14386,6 +14386,12 @@ static int thermal_init(struct hfi1_devdata *dd) /* Enable polling of thermal readings */ write_csr(dd, ASIC_CFG_THERM_POLL_EN, 0x1); + + /* Set initialized flag */ + ret = acquire_chip_resource(dd, CR_THERM_INIT, 0); + if (ret) + THERM_FAILURE(dd, ret, "Unable to set thermal init flag"); + done: release_chip_resource(dd, CR_SBUS); return ret; |