Skip to content

Commit c382ba9

Browse files
committed
fixup clang-formatting
Signed-off-by: Sean Cross <[email protected]>
1 parent 0a7e240 commit c382ba9

File tree

2 files changed

+45
-44
lines changed

2 files changed

+45
-44
lines changed

src/target/cortexar.c

Lines changed: 44 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ static const uint16_t cortexar_spsr_encodings[5] = {
250250
(((opc1) << 21U) | ((crn) << 16U) | ((rt) << 12U) | ((coproc) << 8U) | ((opc2) << 5U) | (crm))
251251
/* Packs a CRn and CRm value for the coprocessor IO routines below to unpack */
252252
#define ENCODE_CP_REG(n, m, opc1, opc2) \
253-
((((n)&0xfU) << 4U) | ((m)&0xfU) | (((opc1)&0x7U) << 8U) | (((opc2)&0x7U) << 12U))
253+
((((n) & 0xfU) << 4U) | ((m) & 0xfU) | (((opc1) & 0x7U) << 8U) | (((opc2) & 0x7U) << 12U))
254254

255255
/*
256256
* Instruction encodings for coprocessor load/store
@@ -935,10 +935,10 @@ bool cortexr_probe(adiv5_access_port_s *const ap, const target_addr_t base_addre
935935
return false;
936936

937937
switch (target->designer_code) {
938-
/* TI omitted the designer code on TMS570 */
939-
case 0:
940-
PROBE(ti_tms570_probe);
941-
break;
938+
/* TI omitted the designer code on TMS570 */
939+
case 0:
940+
PROBE(ti_tms570_probe);
941+
break;
942942
}
943943

944944
#if CONFIG_BMDA == 0
@@ -1014,12 +1014,12 @@ static bool cortexar_check_error(target_s *const target)
10141014
{
10151015
cortexar_priv_s *const priv = (cortexar_priv_s *)target->priv;
10161016
const bool fault = priv->core_status & (CORTEXAR_STATUS_DATA_FAULT | CORTEXAR_STATUS_MMU_FAULT);
1017-
priv->core_status &= (uint8_t) ~(CORTEXAR_STATUS_DATA_FAULT | CORTEXAR_STATUS_MMU_FAULT);
1017+
priv->core_status &= (uint8_t)~(CORTEXAR_STATUS_DATA_FAULT | CORTEXAR_STATUS_MMU_FAULT);
10181018
return fault || cortex_check_error(target);
10191019
}
10201020

1021-
1022-
static inline uint32_t cortexar_endian_dp_read(target_s *const target, const uint16_t addr) {
1021+
static inline uint32_t cortexar_endian_dp_read(target_s *const target, const uint16_t addr)
1022+
{
10231023
cortexar_priv_s *const priv = (cortexar_priv_s *)target->priv;
10241024
uint32_t value = adiv5_dp_read(priv->base.ap->dp, addr);
10251025
if (target->target_options & TOPT_FLAVOUR_BE) {
@@ -1032,7 +1032,8 @@ static inline uint32_t cortexar_endian_dp_read(target_s *const target, const uin
10321032
return value;
10331033
}
10341034

1035-
static inline void cortexar_endian_dp_write(target_s *const target, const uint16_t addr, uint32_t value) {
1035+
static inline void cortexar_endian_dp_write(target_s *const target, const uint16_t addr, uint32_t value)
1036+
{
10361037
cortexar_priv_s *const priv = (cortexar_priv_s *)target->priv;
10371038

10381039
if (target->target_options & TOPT_FLAVOUR_BE) {
@@ -1429,24 +1430,24 @@ static size_t cortexar_reg_read(target_s *const target, const uint32_t reg, void
14291430
return 0;
14301431
/* Finally, copy the register data out and return the width */
14311432
switch (reg_width) {
1432-
case 4: {
1433-
uint32_t value;
1434-
if (target->target_options & TOPT_FLAVOUR_BE)
1435-
value = read_be4(reg_ptr, 0);
1436-
else
1437-
value = read_le4(reg_ptr, 0);
1438-
write_le4(data, 0, value);
1439-
break;
1440-
}
1441-
case 8: {
1442-
uint64_t value;
1443-
if (target->target_options & TOPT_FLAVOUR_BE)
1444-
value = read_be8(reg_ptr, 0);
1445-
else
1446-
value = read_le8(reg_ptr, 0);
1447-
write_le8(data, 0, value);
1448-
break;
1449-
}
1433+
case 4: {
1434+
uint32_t value;
1435+
if (target->target_options & TOPT_FLAVOUR_BE)
1436+
value = read_be4(reg_ptr, 0);
1437+
else
1438+
value = read_le4(reg_ptr, 0);
1439+
write_le4(data, 0, value);
1440+
break;
1441+
}
1442+
case 8: {
1443+
uint64_t value;
1444+
if (target->target_options & TOPT_FLAVOUR_BE)
1445+
value = read_be8(reg_ptr, 0);
1446+
else
1447+
value = read_le8(reg_ptr, 0);
1448+
write_le8(data, 0, value);
1449+
break;
1450+
}
14501451
}
14511452
return reg_width;
14521453
}
@@ -1463,22 +1464,22 @@ static size_t cortexar_reg_write(target_s *const target, const uint32_t reg, con
14631464
return 0;
14641465
/* Finally, copy the new register data in and return the width */
14651466
switch (reg_width) {
1466-
case 4: {
1467-
uint32_t value = read_le4(data, 0);
1468-
if (target->target_options & TOPT_FLAVOUR_BE) {
1469-
write_be4(reg_ptr, 0, value);
1470-
} else
1471-
write_le4(reg_ptr, 0, value);
1472-
break;
1473-
}
1474-
case 8: {
1475-
uint64_t value = read_le8(data, 0);
1476-
if (target->target_options & TOPT_FLAVOUR_BE)
1477-
write_be8(reg_ptr, 0, value);
1478-
else
1479-
write_le8(reg_ptr, 0, value);
1480-
break;
1481-
}
1467+
case 4: {
1468+
uint32_t value = read_le4(data, 0);
1469+
if (target->target_options & TOPT_FLAVOUR_BE) {
1470+
write_be4(reg_ptr, 0, value);
1471+
} else
1472+
write_le4(reg_ptr, 0, value);
1473+
break;
1474+
}
1475+
case 8: {
1476+
uint64_t value = read_le8(data, 0);
1477+
if (target->target_options & TOPT_FLAVOUR_BE)
1478+
write_be8(reg_ptr, 0, value);
1479+
else
1480+
write_le8(reg_ptr, 0, value);
1481+
break;
1482+
}
14821483
}
14831484
return reg_width;
14841485
}

src/target/ti_tms570.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ bool ti_tms570_probe(target_s *const target)
1919
{
2020
const uint32_t part_id = target_mem32_read32(target, TMS570_SYS_DEVID);
2121
if (!part_id || ((part_id & TMS570_SCM_DEVID_ID_MASK) != TMS570_SCM_REVID_ID_TMS570)) {
22-
DEBUG_ERROR("Part ID 0x%08"PRIx32" was unrecognized\n", part_id);
22+
DEBUG_ERROR("Part ID 0x%08" PRIx32 " was unrecognized\n", part_id);
2323
return false;
2424
}
2525

0 commit comments

Comments
 (0)