[PATCH v2 2/3] coresight: tmc: refactor the tmc-etr mode setting to avoid race conditions