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