flash/nor/at91samd: Use 32-bit register writes for ST-Link compat
[fw/openocd] / src / target / armv7m_trace.h
index 02bec96a172624595a36e5a60e1c406aa9666679..5abb0b9406c2198e9d55c7a26d7fa795f15c08ef 100644 (file)
@@ -1,43 +1,20 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
 /***************************************************************************
  *   Copyright (C) 2015  Paul Fertser <fercerpav@gmail.com>                *
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- *   This program is distributed in the hope that it will be useful,       *
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
- *   GNU General Public License for more details.                          *
- *                                                                         *
- *   You should have received a copy of the GNU General Public License     *
- *   along with this program.  If not, see <http://www.gnu.org/licenses/>. *
  ***************************************************************************/
 
 #ifndef OPENOCD_TARGET_ARMV7M_TRACE_H
 #define OPENOCD_TARGET_ARMV7M_TRACE_H
 
+#include <helper/command.h>
 #include <target/target.h>
-#include <command.h>
 
 /**
  * @file
- * Holds the interface to TPIU, ITM and DWT configuration functions.
+ * Holds the interface to ITM and DWT configuration functions.
  */
 
-enum trace_config_type {
-       DISABLED,       /**< tracing is disabled */
-       EXTERNAL,       /**< trace output is captured externally */
-       INTERNAL        /**< trace output is handled by OpenOCD adapter driver */
-};
-
-enum tpiu_pin_protocol {
-       SYNC,                   /**< synchronous trace output */
-       ASYNC_MANCHESTER,       /**< asynchronous output with Manchester coding */
-       ASYNC_UART              /**< asynchronous output with NRZ coding */
-};
-
 enum itm_ts_prescaler {
        ITM_TS_PRESCALE1,       /**< no prescaling for the timestamp counter */
        ITM_TS_PRESCALE4,       /**< refclock divided by 4 for the timestamp counter */
@@ -46,17 +23,7 @@ enum itm_ts_prescaler {
 };
 
 struct armv7m_trace_config {
-       /** Currently active trace capture mode */
-       enum trace_config_type config_type;
-
-       /** Currently active trace output mode */
-       enum tpiu_pin_protocol pin_protocol;
-       /** TPIU formatter enable/disable (in async mode) */
-       bool formatter;
-       /** Synchronous output port width */
-       uint32_t port_size;
-
-       /** Bitmask of currenty enabled ITM stimuli */
+       /** Bitmask of currently enabled ITM stimuli */
        uint32_t itm_ter[8];
        /** Identifier for multi-source trace stream formatting */
        unsigned int trace_bus_id;
@@ -68,21 +35,12 @@ struct armv7m_trace_config {
        bool itm_async_timestamps;
        /** Enable synchronisation packet transmission (for sync port only) */
        bool itm_synchro_packets;
-
-       /** Current frequency of TRACECLKIN (usually matches HCLK) */
-       unsigned int traceclkin_freq;
-       /** Current frequency of trace port */
-       unsigned int trace_freq;
-       /** Handle to output trace data in INTERNAL capture mode */
-       FILE *trace_file;
+       /** Config ITM after target examine */
+       bool itm_deferred_config;
 };
 
 extern const struct command_registration armv7m_trace_command_handlers[];
 
-/**
- * Configure hardware accordingly to the current TPIU target settings
- */
-int armv7m_trace_tpiu_config(struct target *target);
 /**
  * Configure hardware accordingly to the current ITM target settings
  */