Introduce isst_is_punit_valid() for checking a valid domain.
For current platforms, it requires a punit 0 in a valid Package/Die.
No functional changes are expected.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
[srinivas.pandruvada@linux.intel.com: changelog edits]
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
}
}
+int isst_is_punit_valid(struct isst_id *id)
+{
+ if (id->cpu < 0)
+ return 0;
+
+ if (id->pkg < 0 || id->die < 0 || id->punit)
+ return 0;
+
+ return 1;
+}
+
int isst_write_pm_config(struct isst_id *id, int cp_state)
{
unsigned int req, resp;
extern int isst_get_trl_max_levels(void);
extern char *isst_get_trl_level_name(int level);
+extern int isst_is_punit_valid(struct isst_id *id);
extern int isst_get_ctdp_levels(struct isst_id *id, struct isst_pkg_ctdp *pkg_dev);
extern int isst_get_ctdp_control(struct isst_id *id, int config_index,