tcl: add SPDX tag

For historical reasons, no license information was added to the
tcl files. This makes trivial adding the SPDX tag through script:
	fgrep -rL SPDX tcl | while read a;do \
	sed -i '1{i# SPDX-License-Identifier: GPL-2.0-or-later\n
	}' $a;done

With no specific license information from the author, let's extend
the OpenOCD project license GPL-2.0-or-later to the files.

Change-Id: Ief3da306a6e1978de7dfb8f552f9ff23151f9944
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7030
Tested-by: jenkins
This commit is contained in:
Antonio Borneo 2022-06-12 23:51:51 +02:00
parent 3bccc77999
commit 573a39b36c
54 changed files with 101 additions and 0 deletions

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
#---------------------------------------- #----------------------------------------
# Purpose - Create some $BIT variables # Purpose - Create some $BIT variables
# Create $K and $M variables # Create $K and $M variables

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set AIC_SMR [expr {$AT91C_BASE_AIC + 0x00000000} ] set AIC_SMR [expr {$AT91C_BASE_AIC + 0x00000000} ]
global AIC_SMR global AIC_SMR
set AIC_SVR [expr {$AT91C_BASE_AIC + 0x00000080} ] set AIC_SVR [expr {$AT91C_BASE_AIC + 0x00000080} ]

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set PIO_PER 0x00 ;# Enable Register set PIO_PER 0x00 ;# Enable Register
set PIO_PDR 0x04 ;# Disable Register set PIO_PDR 0x04 ;# Disable Register
set PIO_PSR 0x08 ;# Status Register set PIO_PSR 0x08 ;# Status Register

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set AT91_PMC_SCER [expr {$AT91_PMC + 0x00}] ;# System Clock Enable Register set AT91_PMC_SCER [expr {$AT91_PMC + 0x00}] ;# System Clock Enable Register
set AT91_PMC_SCDR [expr {$AT91_PMC + 0x04}] ;# System Clock Disable Register set AT91_PMC_SCDR [expr {$AT91_PMC + 0x04}] ;# System Clock Disable Register

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set AT91_RSTC_CR [expr {$AT91_RSTC + 0x00}] ;# Reset Controller Control Register set AT91_RSTC_CR [expr {$AT91_RSTC + 0x00}] ;# Reset Controller Control Register
set AT91_RSTC_PROCRST [expr {1 << 0}] ;# Processor Reset set AT91_RSTC_PROCRST [expr {1 << 0}] ;# Processor Reset
set AT91_RSTC_PERRST [expr {1 << 2}] ;# Peripheral Reset set AT91_RSTC_PERRST [expr {1 << 2}] ;# Peripheral Reset

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set AT91_WDT_CR [expr {$AT91_WDT + 0x00}] ;# Watchdog Control Register set AT91_WDT_CR [expr {$AT91_WDT + 0x00}] ;# Watchdog Control Register
set AT91_WDT_WDRSTT [expr {1 << 0}] ;# Restart set AT91_WDT_WDRSTT [expr {1 << 0}] ;# Restart
set AT91_WDT_KEY [expr {0xa5 << 24}] ;# KEY Password set AT91_WDT_KEY [expr {0xa5 << 24}] ;# KEY Password

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
source [find bitsbytes.tcl] source [find bitsbytes.tcl]
source [find cpu/arm/arm7tdmi.tcl] source [find cpu/arm/arm7tdmi.tcl]
source [find memory.tcl] source [find memory.tcl]

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
source [find bitsbytes.tcl] source [find bitsbytes.tcl]
source [find cpu/arm/arm7tdmi.tcl] source [find cpu/arm/arm7tdmi.tcl]
source [find memory.tcl] source [find memory.tcl]

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# #
# Peripheral identifiers/interrupts. # Peripheral identifiers/interrupts.
# #

View File

@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set AT91_MATRIX_MCFG [expr {$AT91_MATRIX + 0x00}] ;# Master Configuration Register # set AT91_MATRIX_MCFG [expr {$AT91_MATRIX + 0x00}] ;# Master Configuration Register #
set AT91_MATRIX_RCB0 [expr {1 << 0}] ;# Remap Command for AHB Master 0 (ARM926EJ-S Instruction Master) set AT91_MATRIX_RCB0 [expr {1 << 0}] ;# Remap Command for AHB Master 0 (ARM926EJ-S Instruction Master)

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# #
# Peripheral identifiers/interrupts. # Peripheral identifiers/interrupts.
# #

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set AT91_MATRIX_MCFG0 [expr {$AT91_MATRIX + 0x00}] ;# Master Configuration Register 0 set AT91_MATRIX_MCFG0 [expr {$AT91_MATRIX + 0x00}] ;# Master Configuration Register 0
set AT91_MATRIX_MCFG1 [expr {$AT91_MATRIX + 0x04}] ;# Master Configuration Register 1 set AT91_MATRIX_MCFG1 [expr {$AT91_MATRIX + 0x04}] ;# Master Configuration Register 1
set AT91_MATRIX_MCFG2 [expr {$AT91_MATRIX + 0x08}] ;# Master Configuration Register 2 set AT91_MATRIX_MCFG2 [expr {$AT91_MATRIX + 0x08}] ;# Master Configuration Register 2

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
uplevel #0 [list source [find chip/atmel/at91/at91sam9_sdramc.cfg]] uplevel #0 [list source [find chip/atmel/at91/at91sam9_sdramc.cfg]]
uplevel #0 [list source [find chip/atmel/at91/at91_pmc.cfg]] uplevel #0 [list source [find chip/atmel/at91/at91_pmc.cfg]]
uplevel #0 [list source [find chip/atmel/at91/at91_pio.cfg]] uplevel #0 [list source [find chip/atmel/at91/at91_pio.cfg]]

View File

@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# SDRAM Controller (SDRAMC) registers # SDRAM Controller (SDRAMC) registers
set AT91_SDRAMC_MR [expr {$AT91_SDRAMC + 0x00}] ;# SDRAM Controller Mode Register set AT91_SDRAMC_MR [expr {$AT91_SDRAMC + 0x00}] ;# SDRAM Controller Mode Register

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set AT91_SMC_READMODE [expr {1 << 0}] ;# Read Mode set AT91_SMC_READMODE [expr {1 << 0}] ;# Read Mode
set AT91_SMC_WRITEMODE [expr {1 << 1}] ;# Write Mode set AT91_SMC_WRITEMODE [expr {1 << 1}] ;# Write Mode
set AT91_SMC_EXNWMODE [expr {3 << 4}] ;# NWAIT Mode set AT91_SMC_EXNWMODE [expr {3 << 4}] ;# NWAIT Mode

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# External Memory Map # External Memory Map
set AT91_CHIPSELECT_0 0x10000000 set AT91_CHIPSELECT_0 0x10000000
set AT91_CHIPSELECT_1 0x20000000 set AT91_CHIPSELECT_1 0x20000000

View File

@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-2.0-or-later
if [info exists AT91C_MAINOSC_FREQ] { if [info exists AT91C_MAINOSC_FREQ] {
# user set this... let it be. # user set this... let it be.

View File

@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set RTTC_RTMR [expr {$AT91C_BASE_RTTC + 0x00}] set RTTC_RTMR [expr {$AT91C_BASE_RTTC + 0x00}]
set RTTC_RTAR [expr {$AT91C_BASE_RTTC + 0x04}] set RTTC_RTAR [expr {$AT91C_BASE_RTTC + 0x04}]

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Setup register # Setup register
# #
# ncs_read_setup # ncs_read_setup

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# the DBGU and USARTs are 'almost' indentical' # the DBGU and USARTs are 'almost' indentical'
set DBGU_CR [expr {$AT91C_BASE_DBGU + 0x00000000}] set DBGU_CR [expr {$AT91C_BASE_DBGU + 0x00000000}]
set DBGU_MR [expr {$AT91C_BASE_DBGU + 0x00000004}] set DBGU_MR [expr {$AT91C_BASE_DBGU + 0x00000004}]

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Quirks to bypass missing SRST on JTAG connector # Quirks to bypass missing SRST on JTAG connector
# EVALSPEAr310 Rev. 2.0 # EVALSPEAr310 Rev. 2.0
# http://www.st.com/spear # http://www.st.com/spear

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Generic init scripts for all ST SPEAr3xx family # Generic init scripts for all ST SPEAr3xx family
# http://www.st.com/spear # http://www.st.com/spear
# #

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Init scripts to configure DDR controller of SPEAr3xx # Init scripts to configure DDR controller of SPEAr3xx
# http://www.st.com/spear # http://www.st.com/spear
# Original values taken from XLoader source code # Original values taken from XLoader source code

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
source [find bitsbytes.tcl] source [find bitsbytes.tcl]
source [find cpu/arm/cortex_m3.tcl] source [find cpu/arm/cortex_m3.tcl]
source [find memory.tcl] source [find memory.tcl]

View File

@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set RCC_CR [expr {$RCC_BASE + 0x00}] set RCC_CR [expr {$RCC_BASE + 0x00}]
set RCC_CFGR [expr {$RCC_BASE + 0x04}] set RCC_CFGR [expr {$RCC_BASE + 0x04}]

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# /* Peripheral and SRAM base address in the alias region */ # /* Peripheral and SRAM base address in the alias region */
set PERIPH_BB_BASE 0x42000000 set PERIPH_BB_BASE 0x42000000
set SRAM_BB_BASE 0x22000000 set SRAM_BB_BASE 0x22000000

View File

@ -1 +1,3 @@
# SPDX-License-Identifier: GPL-2.0-or-later
source [find chip/ti/lm3s/lm3s_regs.tcl] source [find chip/ti/lm3s/lm3s_regs.tcl]

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
#***************************************************************************** #*****************************************************************************
# #
# The following are defines for the System Control register addresses. # The following are defines for the System Control register addresses.

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Altera MAXV 5M24OZ/5M570Z CPLD # Altera MAXV 5M24OZ/5M570Z CPLD
# see MAX V Device Handbook # see MAX V Device Handbook
# Table 6-3: 32-Bit MAX V Device IDCODE # Table 6-3: 32-Bit MAX V Device IDCODE

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Altera MAXII EPM240T100C CPLD # Altera MAXII EPM240T100C CPLD
if { [info exists CHIPNAME] } { if { [info exists CHIPNAME] } {

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set _USER1 0x02 set _USER1 0x02
if { [info exists JTAGSPI_IR] } { if { [info exists JTAGSPI_IR] } {

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Lattice ispMACH 4000ZE family, device LC4032ZE # Lattice ispMACH 4000ZE family, device LC4032ZE
# just configure a tap # just configure a tap
jtag newtap LC4032ZE tap -irlen 8 -expected-id 0x01806043 jtag newtap LC4032ZE tap -irlen 8 -expected-id 0x01806043

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# xilinx spartan6 # xilinx spartan6
# http://www.xilinx.com/support/documentation/user_guides/ug380.pdf # http://www.xilinx.com/support/documentation/user_guides/ug380.pdf

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# xilinx series 7 (artix, kintex, virtex) # xilinx series 7 (artix, kintex, virtex)
# http://www.xilinx.com/support/documentation/user_guides/ug470_7Series_Config.pdf # http://www.xilinx.com/support/documentation/user_guides/ug470_7Series_Config.pdf

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
if { [info exists CHIPNAME] } { if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME set _CHIPNAME $CHIPNAME
} else { } else {

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
if { [info exists CHIPNAME] } { if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME set _CHIPNAME $CHIPNAME
} else { } else {

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
#xilinx coolrunner xcr3256 #xilinx coolrunner xcr3256
#simple device - just configure a tap #simple device - just configure a tap
jtag newtap xcr tap -irlen 5 -ircapture 0x01 -irmask 0x1f -expected-id 0x0494c093 jtag newtap xcr tap -irlen 5 -ircapture 0x01 -irmask 0x1f -expected-id 0x0494c093

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Xilinx Ultrascale (Kintex, Virtex, Zynq) # Xilinx Ultrascale (Kintex, Virtex, Zynq)
# https://www.xilinx.com/support/documentation/user_guides/ug570-ultrascale-configuration.pdf # https://www.xilinx.com/support/documentation/user_guides/ug570-ultrascale-configuration.pdf

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set CPU_TYPE arm set CPU_TYPE arm
set CPU_NAME arm7tdmi set CPU_NAME arm7tdmi
set CPU_ARCH armv4t set CPU_ARCH armv4t

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set CPU_TYPE arm set CPU_TYPE arm
set CPU_NAME arm920 set CPU_NAME arm920
set CPU_ARCH armv4t set CPU_ARCH armv4t

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set CPU_TYPE arm set CPU_TYPE arm
set CPU_NAME arm946 set CPU_NAME arm946
set CPU_ARCH armv5te set CPU_ARCH armv5te

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set CPU_TYPE arm set CPU_TYPE arm
set CPU_NAME arm966 set CPU_NAME arm966
set CPU_ARCH armv5te set CPU_ARCH armv5te

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set CPU_TYPE arm set CPU_TYPE arm
set CPU_NAME cortex_m3 set CPU_NAME cortex_m3
set CPU_ARCH armv7 set CPU_ARCH armv7

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# see MAX 10 FPGA Device Architecture # see MAX 10 FPGA Device Architecture
# Table 3-1: IDCODE Information for MAX 10 Devices # Table 3-1: IDCODE Information for MAX 10 Devices
# Intel MAX 10M02 0x31810dd # Intel MAX 10M02 0x31810dd

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Altera Cyclone III EP3C10 # Altera Cyclone III EP3C10
# see Cyclone III Device Handbook, Volume 1; # see Cyclone III Device Handbook, Volume 1;
# Table 145. 32-Bit Cyclone III Device IDCODE # Table 145. 32-Bit Cyclone III Device IDCODE

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
proc xilinx_dna_addr {chip} { proc xilinx_dna_addr {chip} {
array set addrs { array set addrs {
Spartan6 0x30 Spartan6 0x30

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Xilinx XADC support for 7 Series FPGAs # Xilinx XADC support for 7 Series FPGAs
# #
# The 7 Series FPGAs contain an on-chip 12 bit ADC that can probe die # The 7 Series FPGAs contain an on-chip 12 bit ADC that can probe die

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Helper for common memory read/modify/write procedures # Helper for common memory read/modify/write procedures
# mrw: "memory read word", returns value of $reg # mrw: "memory read word", returns value of $reg

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# MEMORY # MEMORY
# #
# All Memory regions have two components. # All Memory regions have two components.

View File

@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-2.0-or-later
proc proc_exists { NAME } { proc proc_exists { NAME } {
set n [info commands $NAME] set n [info commands $NAME]

View File

@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-2.0-or-later
add_help_text selftest "run selftest using working ram <tmpfile> <address> <size>" add_help_text selftest "run selftest using working ram <tmpfile> <address> <size>"

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
adapter srst delay 200 adapter srst delay 200
jtag_ntrst_delay 200 jtag_ntrst_delay 200

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
echo "\n\nFirmware recovery helpers" echo "\n\nFirmware recovery helpers"
echo "Use -c firmware_help to get help\n" echo "Use -c firmware_help to get help\n"

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Algorithms by Michael Barr, released into public domain # Algorithms by Michael Barr, released into public domain
# Ported to OpenOCD by Shane Volpe, additional fixes by Paul Fertser # Ported to OpenOCD by Shane Volpe, additional fixes by Paul Fertser