cr50_test: clear tpm owner during init

The FWMP can disable opening ccd. Clear the TPM owner during init to
make sure the FWMP space is cleared.

BUG=none
BRANCH=none
TEST=set fwmp to disable ccd then run firmware_Cr50RMAOpen

Change-Id: I518d35d7390db5a02f3f2fed2d0ee3ad4bfcfaed
Signed-off-by: Mary Ruthven <mruthven@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1089713
Reviewed-by: Kevin Shelton <kmshelton@chromium.org>
Commit-Queue: Mary Ruthven <mruthven@chromium.org>
Tested-by: Mary Ruthven <mruthven@chromium.org>
diff --git a/server/cros/faft/cr50_test.py b/server/cros/faft/cr50_test.py
index 4ea1018..9d1fbe4 100644
--- a/server/cros/faft/cr50_test.py
+++ b/server/cros/faft/cr50_test.py
@@ -53,13 +53,17 @@
             self.cr50.testlab_is_on()) and not self.ccd_lockout
         self.original_ccd_level = self.cr50.get_ccd_level()
         self.original_ccd_settings = self.cr50.get_cap_dict()
+
+        # Clear the TPM owner so the FWMP can't disable CCD.
+        self.host = host
+        tpm_utils.ClearTPMOwnerRequest(self.host, wait_for_ready=True)
+
         if self.can_set_ccd_level:
             # Lock cr50 so the console will be restricted
             self.cr50.set_ccd_level('lock')
         elif self.original_ccd_level != 'lock':
             raise error.TestNAError('Lock the console before running cr50 test')
 
-        self.host = host
         self._save_original_state()
         # We successfully saved the device state
         self._saved_state |= self.INITIAL_STATE