Skip to content

Commit 49b352a

Browse files
committed
arch/tricore: Rename tc3xx and tc4xx to tc3x and tc4x.
The chip family options are ARCH_CHIP_TC3X and ARCH_CHIP_TC4X, but the chip and board directories, file names and identifiers still use tc3xx and tc4xx. Rename arch/tricore/src, arch/tricore/include, boards/tricore and Documentation/platforms/tricore tc3xx and tc4xx to tc3x and tc4x, ARCH_CHIP with them, the chip file names and the tc3xx_, tc4xx_, TC3XX_ and TC4XX_ prefixes, keeping the aligned columns. The board names stay. The chip and board directories both follow ARCH_CHIP, so they move in one step. No functional change. The Make.defs files move together with their CMakeLists.txt, and the board Make.defs only change the Toolchain.defs path, which CMake takes from ARCH_CHIP [skip-cmake-parity]. Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
1 parent 1eb3d68 commit 49b352a

87 files changed

Lines changed: 1659 additions & 1659 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Documentation/platforms/tricore/tc3xx/boards/a2g-tc397-5v-tft/index.rst renamed to Documentation/platforms/tricore/tc3x/boards/a2g-tc397-5v-tft/index.rst

File renamed without changes.
File renamed without changes.

Documentation/platforms/tricore/tc4xx/boards/triboard_tc4x9_com/index.rst renamed to Documentation/platforms/tricore/tc4x/boards/triboard_tc4x9_com/index.rst

File renamed without changes.
File renamed without changes.

‎arch/tricore/Kconfig‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ endchoice # AURIX family
117117

118118
config ARCH_CHIP
119119
string
120-
default "tc3xx" if ARCH_CHIP_TC3X
121-
default "tc4xx" if ARCH_CHIP_TC4X
120+
default "tc3x" if ARCH_CHIP_TC3X
121+
default "tc4x" if ARCH_CHIP_TC4X
122122

123123
config ARCH_IRQ_DISABLE_PRIORITY
124124
int "IRQ disable priority threshold"
@@ -163,7 +163,7 @@ config ARCH_HAVE_PPRS
163163
config HAVE_SECURITY_CORE
164164
bool
165165
---help---
166-
In addition to the 6 cores, tc4xx also has one more security core.
166+
In addition to the 6 cores, tc4x also has one more security core.
167167

168168
config CPU_COREID
169169
int "TRICORE CPU CORE ID"
@@ -191,11 +191,11 @@ config TRICORE_FCU_CSA_NUM
191191
source "arch/tricore/src/common/aurix/Kconfig"
192192

193193
if ARCH_CHIP_TC3X
194-
source "arch/tricore/src/tc3xx/Kconfig"
194+
source "arch/tricore/src/tc3x/Kconfig"
195195
endif
196196

197197
if ARCH_CHIP_TC4X
198-
source "arch/tricore/src/tc4xx/Kconfig"
198+
source "arch/tricore/src/tc4x/Kconfig"
199199
endif
200200

201201
endif # ARCH_TRICORE
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/****************************************************************************
2-
* arch/tricore/include/tc3xx/irq.h
2+
* arch/tricore/include/tc3x/irq.h
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*
@@ -24,8 +24,8 @@
2424
* only indirectly through nuttx/irq.h
2525
*/
2626

27-
#ifndef __ARCH_TRICORE_INCLUDE_TC3XX_IRQ_H
28-
#define __ARCH_TRICORE_INCLUDE_TC3XX_IRQ_H
27+
#ifndef __ARCH_TRICORE_INCLUDE_TC3X_IRQ_H
28+
#define __ARCH_TRICORE_INCLUDE_TC3X_IRQ_H
2929

3030
/****************************************************************************
3131
* Included Files
@@ -82,4 +82,4 @@ extern "C"
8282
#endif
8383
#endif
8484

85-
#endif /* __ARCH_TRICORE_INCLUDE_TC3XX_IRQ_H */
85+
#endif /* __ARCH_TRICORE_INCLUDE_TC3X_IRQ_H */
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/****************************************************************************
2-
* arch/tricore/include/tc4xx/irq.h
2+
* arch/tricore/include/tc4x/irq.h
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*
@@ -24,8 +24,8 @@
2424
* only indirectly through nuttx/irq.h
2525
*/
2626

27-
#ifndef __ARCH_TRICORE_INCLUDE_TC4XX_IRQ_H
28-
#define __ARCH_TRICORE_INCLUDE_TC4XX_IRQ_H
27+
#ifndef __ARCH_TRICORE_INCLUDE_TC4X_IRQ_H
28+
#define __ARCH_TRICORE_INCLUDE_TC4X_IRQ_H
2929

3030
/****************************************************************************
3131
* Included Files
@@ -84,4 +84,4 @@ extern "C"
8484
#endif
8585
#endif
8686

87-
#endif /* __ARCH_TRICORE_INCLUDE_TC4XX_IRQ_H */
87+
#endif /* __ARCH_TRICORE_INCLUDE_TC4X_IRQ_H */

‎arch/tricore/src/common/aurix/tricore_asclin.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
#include <nuttx/config.h>
3131

3232
#if defined(CONFIG_ARCH_CHIP_TC3X)
33-
# include "hardware/tc3xx_asclin.h"
33+
# include "hardware/tc3x_asclin.h"
3434
#elif defined(CONFIG_ARCH_CHIP_TC4X)
35-
# include "hardware/tc4xx_asclin.h"
35+
# include "hardware/tc4x_asclin.h"
3636
#endif
3737

3838
/****************************************************************************

‎arch/tricore/src/common/aurix/tricore_serial.c‎

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@
4545
#include "tricore_asclin.h"
4646

4747
#if defined(CONFIG_ARCH_CHIP_TC3X)
48-
# include "hardware/tc3xx_port.h"
49-
# include "tc3xx_wdt.h"
48+
# include "hardware/tc3x_port.h"
49+
# include "tc3x_wdt.h"
5050
#elif defined(CONFIG_ARCH_CHIP_TC4X)
51-
# include "hardware/tc4xx_port.h"
51+
# include "hardware/tc4x_port.h"
5252
#endif
5353

5454
#include <chip.h>
@@ -235,22 +235,22 @@ static void asclin_modify(uintptr_t reg, uint32_t clear, uint32_t set)
235235
static void asclin_pin_config(uintptr_t port, int pin, bool tx)
236236
{
237237
#if defined(CONFIG_ARCH_CHIP_TC3X)
238-
int shift = TC3XX_PORT_IOCR_SHIFT(pin);
238+
int shift = TC3X_PORT_IOCR_SHIFT(pin);
239239

240-
asclin_modify(TC3XX_PORT_IOCR(port, pin), TC3XX_PORT_IOCR_MASK << shift,
241-
(tx ? TC3XX_PORT_OUT_ALT2 : TC3XX_PORT_IN_PULLUP) << shift);
240+
asclin_modify(TC3X_PORT_IOCR(port, pin), TC3X_PORT_IOCR_MASK << shift,
241+
(tx ? TC3X_PORT_OUT_ALT2 : TC3X_PORT_IN_PULLUP) << shift);
242242

243-
shift = TC3XX_PORT_PDR_SHIFT(pin);
244-
tc3xx_wdt_cpu_endinit(false);
245-
asclin_modify(TC3XX_PORT_PDR(port, pin), TC3XX_PORT_PDR_MASK << shift,
246-
TC3XX_PORT_PAD_SPEED1 << shift);
247-
tc3xx_wdt_cpu_endinit(true);
243+
shift = TC3X_PORT_PDR_SHIFT(pin);
244+
tc3x_wdt_cpu_endinit(false);
245+
asclin_modify(TC3X_PORT_PDR(port, pin), TC3X_PORT_PDR_MASK << shift,
246+
TC3X_PORT_PAD_SPEED1 << shift);
247+
tc3x_wdt_cpu_endinit(true);
248248
#elif defined(CONFIG_ARCH_CHIP_TC4X)
249-
uintptr_t drvcfg = TC4XX_PORT_DRVCFG(port, pin);
249+
uintptr_t drvcfg = TC4X_PORT_DRVCFG(port, pin);
250250

251-
asclin_modify(drvcfg, TC4XX_PORT_DRVCFG_MODE_MASK,
252-
tx ? TC4XX_PORT_OUT_ALT2 : TC4XX_PORT_IN_PULLUP);
253-
asclin_modify(drvcfg, TC4XX_PORT_DRVCFG_PAD_MASK, TC4XX_PORT_PAD_SPEED1);
251+
asclin_modify(drvcfg, TC4X_PORT_DRVCFG_MODE_MASK,
252+
tx ? TC4X_PORT_OUT_ALT2 : TC4X_PORT_IN_PULLUP);
253+
asclin_modify(drvcfg, TC4X_PORT_DRVCFG_PAD_MASK, TC4X_PORT_PAD_SPEED1);
254254
#endif
255255
}
256256

@@ -354,11 +354,11 @@ static void asclin_init(struct up_dev_s *priv)
354354
/* Enable the module, under the CPU ENDINIT on TC3xx */
355355

356356
#ifdef CONFIG_ARCH_CHIP_TC3X
357-
tc3xx_wdt_cpu_endinit(false);
357+
tc3x_wdt_cpu_endinit(false);
358358
#endif
359359
asclin_modify(ASCLIN_REG(priv, CLC), ASCLIN_CLC_DISR, 0);
360360
#ifdef CONFIG_ARCH_CHIP_TC3X
361-
tc3xx_wdt_cpu_endinit(true);
361+
tc3x_wdt_cpu_endinit(true);
362362
#endif
363363

364364
/* Clock off, initialise mode, bit timing and baud rate */

‎arch/tricore/src/common/gnu/tricore_head.S‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@
3535
#define TRICORE_BIV_VECTOR 0x1fe0 /* Single interrupt vector at INTTAB + 0x1fe0 */
3636

3737
#ifdef CONFIG_ARCH_CHIP_TC3X
38-
# define TC3XX_WDTCPU0_CON0 0xf003624c /* CPU0 watchdog CON0, 0xc apart per CPU */
38+
# define TC3X_WDTCPU0_CON0 0xf003624c /* CPU0 watchdog CON0, 0xc apart per CPU */
3939
#endif
4040
#ifdef CONFIG_ARCH_CHIP_TC4X
41-
# define TC4XX_PSW_VIRT 0xb00 /* PSW for disabling the virtualization */
41+
# define TC4X_PSW_VIRT 0xb00 /* PSW for disabling the virtualization */
4242
#endif
4343

4444
/* Make the CSA link word of the CSA address in addr: the segment in bits
@@ -92,7 +92,7 @@ tricore_head:
9292
lea %a9, [%a9]lo:__a9_mem
9393

9494
#ifdef CONFIG_ARCH_CHIP_TC3X
95-
jl tc3xx_endinit_clear
95+
jl tc3x_endinit_clear
9696

9797
#endif
9898
movh.a %a15, hi:__TRAPTAB_CPU0
@@ -190,7 +190,7 @@ tricore_head:
190190
isync
191191

192192
#ifdef CONFIG_ARCH_CHIP_TC3X
193-
jl tc3xx_endinit_set
193+
jl tc3x_endinit_set
194194

195195
#endif
196196
movh.a %sp, hi:__ustack
@@ -245,23 +245,23 @@ tricore_head:
245245

246246
#ifdef CONFIG_ARCH_CHIP_TC3X
247247
/****************************************************************************
248-
* Name: tc3xx_endinit_clear, tc3xx_endinit_set
248+
* Name: tc3x_endinit_clear, tc3x_endinit_set
249249
*
250250
* Description:
251-
* Clear (tc3xx_endinit_clear) or set (tc3xx_endinit_set) the ENDINIT
251+
* Clear (tc3x_endinit_clear) or set (tc3x_endinit_set) the ENDINIT
252252
* of the watchdog of the calling CPU with the password and the lock
253253
* sequence, and wait until it has changed. Called with jl, before
254254
* any CSA exists. CPU5 has the core ID 6 on TC39x.
255255
*
256256
****************************************************************************/
257257

258-
.type tc3xx_endinit_clear, %function
259-
tc3xx_endinit_clear:
258+
.type tc3x_endinit_clear, %function
259+
tc3x_endinit_clear:
260260
mov %d5, 0
261261
j 2f
262262

263-
.type tc3xx_endinit_set, %function
264-
tc3xx_endinit_set:
263+
.type tc3x_endinit_set, %function
264+
tc3x_endinit_set:
265265
mov %d5, 1
266266
2:
267267
mfcr %d4, TRICORE_CPU_CORE_ID
@@ -271,8 +271,8 @@ tc3xx_endinit_set:
271271
3:
272272
sh %d15, %d4, 1
273273
add %d4, %d15, %d4
274-
movh.a %a15, hi:TC3XX_WDTCPU0_CON0
275-
lea %a15, [%a15]lo:TC3XX_WDTCPU0_CON0
274+
movh.a %a15, hi:TC3X_WDTCPU0_CON0
275+
lea %a15, [%a15]lo:TC3X_WDTCPU0_CON0
276276
addsc.a %a15, %a15, %d4, 2
277277

278278
/* Password access with the inverted password bits 7:2, then the
@@ -307,7 +307,7 @@ tricore_virt_off:
307307
mov %d0, 0
308308
mtcr TRICORE_CPU_VCON0, %d0
309309
isync
310-
mov %d0, TC4XX_PSW_VIRT
310+
mov %d0, TC4X_PSW_VIRT
311311
mtcr TRICORE_CPU_PSW, %d0
312312
isync
313313
rfh

0 commit comments

Comments
 (0)