soc/xtensa: Misc. checkpatch fixups

Code style fixes.  Kept separate from the original changes to permit
easier rebasing.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
Andy Ross 2020-10-06 11:39:48 -07:00 committed by Anas Nashif
commit a8d5437799
17 changed files with 33 additions and 31 deletions

View file

@ -2,6 +2,7 @@
# #
# Copyright (c) 2020 Intel Corporation # Copyright (c) 2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
import sys import sys
import time import time
import struct import struct
@ -73,8 +74,8 @@ while True:
break break
msgbytes.append(b) msgbytes.append(b)
msg = bytearray(len(msgbytes)) msg = bytearray(len(msgbytes))
for i in range(len(msgbytes)): for i, elem in enumerate(msgbytes):
msg[i] = msgbytes[i] msg[i] = elem
sys.stdout.write(msg.decode(encoding="utf-8", errors="ignore")) sys.stdout.write(msg.decode(encoding="utf-8", errors="ignore"))
next_slot = int((next_slot + 1) % (MAP_SIZE / SLOT_SIZE)) next_slot = int((next_slot + 1) % (MAP_SIZE / SLOT_SIZE))

View file

@ -33,7 +33,6 @@
}; };
soc { soc {
core_intc: core_intc@0 { core_intc: core_intc@0 {
compatible = "xtensa,core-intc"; compatible = "xtensa,core-intc";
reg = <0x00 0x400>; reg = <0x00 0x400>;

View file

@ -567,7 +567,8 @@ char *z_setup_new_thread(struct k_thread *new_thread,
#ifdef KERNEL_COHERENCE #ifdef KERNEL_COHERENCE
/* Check that the thread object is safe, but that the stack is /* Check that the thread object is safe, but that the stack is
* still cached! */ * still cached!
*/
__ASSERT_NO_MSG(arch_mem_coherent(new_thread)); __ASSERT_NO_MSG(arch_mem_coherent(new_thread));
__ASSERT_NO_MSG(!arch_mem_coherent(stack)); __ASSERT_NO_MSG(!arch_mem_coherent(stack));
#endif #endif

View file

@ -213,7 +213,8 @@
/* SRAM window 0 FW "registers" */ /* SRAM window 0 FW "registers" */
#define SRAM_REG_FW_TRACEP_SLAVE_CORE_BASE 0x14 #define SRAM_REG_FW_TRACEP_SLAVE_CORE_BASE 0x14
#define SRAM_REG_FW_END \ #define SRAM_REG_FW_END \
(SRAM_REG_FW_TRACEP_SLAVE_CORE_BASE + (PLATFORM_CORE_COUNT - 1) * 0x4) (SRAM_REG_FW_TRACEP_SLAVE_CORE_BASE + \
(PLATFORM_CORE_COUNT - 1) * 0x4)
/* Host page size */ /* Host page size */
#define HOST_PAGE_SIZE 4096 #define HOST_PAGE_SIZE 4096

View file

@ -1,5 +1,4 @@
/* SPDX-License-Identifier: Apache-2.0 /* SPDX-License-Identifier: Apache-2.0
* *
* Copyright(c) 2017 Intel Corporation. All rights reserved. * Copyright(c) 2017 Intel Corporation. All rights reserved.
* *

View file

@ -1,4 +1,4 @@
s/* /*
* Copyright (c) 2019 Intel Corporation * Copyright (c) 2019 Intel Corporation
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
@ -213,7 +213,8 @@ s/*
/* SRAM window 0 FW "registers" */ /* SRAM window 0 FW "registers" */
#define SRAM_REG_FW_TRACEP_SLAVE_CORE_BASE 0x14 #define SRAM_REG_FW_TRACEP_SLAVE_CORE_BASE 0x14
#define SRAM_REG_FW_END \ #define SRAM_REG_FW_END \
(SRAM_REG_FW_TRACEP_SLAVE_CORE_BASE + (PLATFORM_CORE_COUNT - 1) * 0x4) (SRAM_REG_FW_TRACEP_SLAVE_CORE_BASE + \
(PLATFORM_CORE_COUNT - 1) * 0x4)
/* Host page size */ /* Host page size */
#define HOST_PAGE_SIZE 4096 #define HOST_PAGE_SIZE 4096

View file

@ -195,7 +195,7 @@ static int32_t hp_sram_pm_banks(uint32_t banks)
ebb_avail_mask0 = (uint32_t)GENMASK(EBB_SEGMENT_SIZE - 1, 0); ebb_avail_mask0 = (uint32_t)GENMASK(EBB_SEGMENT_SIZE - 1, 0);
ebb_avail_mask1 = (uint32_t)GENMASK(total_banks_count - ebb_avail_mask1 = (uint32_t)GENMASK(total_banks_count -
EBB_SEGMENT_SIZE - 1, 0); EBB_SEGMENT_SIZE - 1, 0);
} else{ } else {
ebb_avail_mask0 = (uint32_t)GENMASK(total_banks_count - 1, ebb_avail_mask0 = (uint32_t)GENMASK(total_banks_count - 1,
0); 0);
ebb_avail_mask1 = 0; ebb_avail_mask1 = 0;
@ -206,7 +206,7 @@ static int32_t hp_sram_pm_banks(uint32_t banks)
ebb_mask0 = (uint32_t)GENMASK(EBB_SEGMENT_SIZE - 1, 0); ebb_mask0 = (uint32_t)GENMASK(EBB_SEGMENT_SIZE - 1, 0);
ebb_mask1 = (uint32_t)GENMASK(banks - EBB_SEGMENT_SIZE - 1, ebb_mask1 = (uint32_t)GENMASK(banks - EBB_SEGMENT_SIZE - 1,
0); 0);
} else{ } else {
/* assumption that ebb_in_use is > 0 */ /* assumption that ebb_in_use is > 0 */
ebb_mask0 = (uint32_t)GENMASK(banks - 1, 0); ebb_mask0 = (uint32_t)GENMASK(banks - 1, 0);
ebb_mask1 = 0; ebb_mask1 = 0;

View file

@ -32,7 +32,7 @@ with open(elffile, "rb") as fd:
elf = ELFFile(fd) elf = ELFFile(fd)
for s in elf.iter_sections(): for s in elf.iter_sections():
addr = s.header.sh_addr addr = s.header.sh_addr
if addr >= 0x80000000 and addr < 0xa0000000: if 0x80000000 <= addr < 0xa0000000:
print(f"fix_elf_addrs.py: Moving section {s.name} to cached SRAM region") print(f"fix_elf_addrs.py: Moving section {s.name} to cached SRAM region")
fixup.append(s.name) fixup.append(s.name)

View file

@ -30,7 +30,7 @@
/* Translates a SRAM pointer into an address of the same memory in the /* Translates a SRAM pointer into an address of the same memory in the
* uncached region from 0x80000000-0x9fffffff * uncached region from 0x80000000-0x9fffffff
*/ */
#define UNCACHED_PTR(p) ((void*)(((int)p) & ~0x20000000)) #define UNCACHED_PTR(p) ((void *)(((int)p) & ~0x20000000))
struct slot_hdr { struct slot_hdr {
uint16_t magic; uint16_t magic;