提交 a453698b 编写于 作者: D Dean Luick 提交者: Doug Ledford

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: NMitko Haralanov <mitko.haralanov@intel.com>
Reviewed-by: NEaswar Hariharan <easwar.hariharan@intel.com>
Signed-off-by: NDean Luick <dean.luick@intel.com>
Signed-off-by: NJubin John <jubin.john@intel.com>
Signed-off-by: NDoug Ledford <dledford@redhat.com>
上级 765a6fac
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册