diff --git a/include/arch/arc/arc_addr_types.h b/include/arch/arc/arc_addr_types.h new file mode 100644 index 00000000000..a6073cdd4b8 --- /dev/null +++ b/include/arch/arc/arc_addr_types.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2021 Synopsys. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#ifndef ZEPHYR_INCLUDE_ARCH_ARC_ADDR_TYPES_H_ +#define ZEPHYR_INCLUDE_ARCH_ARC_ADDR_TYPES_H_ +#ifndef _ASMLANGUAGE + +/* + * MWDT provides paddr_t type and it conflicts witn Zephyr definition: + * - Zephyr defines paddr_t as a uintptr_t + * - MWDT defines paddr_t as a unsigned long + * This causes extra warnings. However we can safely define + * paddr_t as a unsigned long for the case when MWDT toolchain is used as + * they are both unsighned, have same size and aligning. + */ +#ifdef __CCAC__ +typedef unsigned long paddr_t; +typedef void *vaddr_t; +#else +#include +#endif + +#endif /* _ASMLANGUAGE */ +#endif /* ZEPHYR_INCLUDE_ARCH_ARC_ADDR_TYPES_H_ */ diff --git a/include/arch/arc/arch.h b/include/arch/arc/arch.h index b94ece4db02..79b8ee139db 100644 --- a/include/arch/arc/arch.h +++ b/include/arch/arc/arch.h @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #ifdef CONFIG_ARC_CONNECT