intel_telemetry_pltdrv: Change verbosity control bits
authorSouvik Kumar Chakravarty <souvik.k.chakravarty@intel.com>
Wed, 17 Feb 2016 06:35:22 +0000 (12:05 +0530)
committerDarren Hart <dvhart@linux.intel.com>
Wed, 23 Mar 2016 17:05:46 +0000 (10:05 -0700)
Due to a recent fix in the firmware, the Punit verbosity control bits
now adhere to the correct pattern. Hence remove the workaround and
do a read-modify-write of the register.

Signed-off-by: Souvik Kumar Chakravarty <souvik.k.chakravarty@intel.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
drivers/platform/x86/intel_telemetry_pltdrv.c

index f97019b0106f2c67277c85d8000d2185af6e50f1..397119f83e82384913a305065a70f1ca7ae815d8 100644 (file)
@@ -1029,9 +1029,20 @@ static int telemetry_plt_set_trace_verbosity(enum telemetry_unit telem_unit,
        mutex_lock(&(telm_conf->telem_trace_lock));
        switch (telem_unit) {
        case TELEM_PSS:
+               ret = intel_punit_ipc_command(
+                               IPC_PUNIT_BIOS_READ_TELE_TRACE_CTRL,
+                               0, 0, NULL, &temp);
+               if (ret) {
+                       pr_err("PSS TRACE_CTRL Read Failed\n");
+                       goto out;
+               }
+
+               TELEM_CLEAR_VERBOSITY_BITS(temp);
+               TELEM_SET_VERBOSITY_BITS(temp, verbosity);
+
                ret = intel_punit_ipc_command(
                                IPC_PUNIT_BIOS_WRITE_TELE_TRACE_CTRL,
-                               0, 0, &verbosity, NULL);
+                               0, 0, &temp, NULL);
                if (ret) {
                        pr_err("PSS TRACE_CTRL Verbosity Set Failed\n");
                        goto out;