Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup headers #339

Merged
merged 3 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion arch/armv7a/reboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@

#include <sys/reboot.h>
#include <sys/platform.h>
#include <phoenix/arch/imx6ull.h>
#if defined(__CPU_ZYNQ7000)
#include <phoenix/arch/armv7a/zynq7000/zynq7000.h>
#elif defined(__CPU_IMX6ULL)
#include <phoenix/arch/armv7a/imx6ull/imx6ull.h>
#else
#error "Unsupported TARGET"
#endif


int reboot(int magic)
Expand Down
10 changes: 6 additions & 4 deletions arch/armv7m/reboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@
#include <sys/platform.h>

#if defined(__CPU_STM32L4X6)
#include <phoenix/arch/stm32l4.h>
#include <phoenix/arch/armv7m/stm32/l4/stm32l4.h>
#elif defined(__CPU_IMXRT117X)
#include <phoenix/arch/imxrt1170.h>
#include <phoenix/arch/armv7m/imxrt/11xx/imxrt1170.h>
#elif defined(__CPU_IMXRT105X) || defined(__CPU_IMXRT106X)
#include <phoenix/arch/armv7m/imxrt/10xx/imxrt10xx.h>
#else
#include <phoenix/arch/imxrt.h>
#error "Unsupported TARGET"
#endif


Expand All @@ -31,7 +33,7 @@ int reboot(int magic)
.action = pctl_set,
.type = pctl_reboot,
.reboot = {
.magic = magic
.magic = magic,
}
};

Expand Down
2 changes: 1 addition & 1 deletion arch/ia32/reboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include <sys/reboot.h>
#include <sys/platform.h>
#include <phoenix/arch/ia32.h>
#include <phoenix/arch/ia32/ia32.h>


int reboot(int magic)
Expand Down
8 changes: 5 additions & 3 deletions arch/sparcv8leon3/reboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* reboot.c
*
* Copyright 2022 Phoenix Systems
* Copyright 2022, 2024 Phoenix Systems
* Author: Lukasz Leczkowski
*
* This file is part of Phoenix-RTOS.
Expand All @@ -18,9 +18,11 @@
#include <sys/platform.h>

#if defined(__CPU_GR716)
#include <phoenix/arch/gr716.h>
#include <phoenix/arch/sparcv8leon3/gr716/gr716.h>
#elif defined(__CPU_GR712RC)
#include <phoenix/arch/gr712rc.h>
#include <phoenix/arch/sparcv8leon3/gr712rc/gr712rc.h>
#else
#error "Unsupported TARGET"
#endif
agkaminski marked this conversation as resolved.
Show resolved Hide resolved


Expand Down
1 change: 0 additions & 1 deletion include/arch/armv7a/arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

#define __ARCH_STDINT <arch/armv7a/stdint.h>
#define __ARCH_LIMITS <arch/armv7a/limits.h>
#define __ARCH_SYS_TYPES <arch/armv7a/types.h>

#define __MEMCPY
#define __MEMCMP
Expand Down
72 changes: 16 additions & 56 deletions include/arch/armv7a/stdint.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
*
* Architecture dependent part of stdint (arch/armv7a)
*
* Copyright 2019-2021 Phoenix Systems
* Author: Andrzej Glowinski, Daniel Sawka
* Copyright 2019-2021, 2024 Phoenix Systems
* Author: Andrzej Glowinski, Daniel Sawka, Lukasz Leczkowski
*
* This file is part of Phoenix-RTOS.
*
Expand All @@ -16,75 +16,35 @@
#ifndef _LIBPHOENIX_ARCH_ARMV7A_STDINT_H_
#define _LIBPHOENIX_ARCH_ARMV7A_STDINT_H_

/* The following sections refer to ISO/IEC 9899:1999 */

/* 7.18.1.1 Exact-width integer types */

typedef signed char int8_t;
typedef short int16_t;
typedef int int32_t;
typedef long long int64_t;

typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
typedef unsigned long long uint64_t;

/* 7.18.1.2 Minimum-width integer types */

typedef int8_t int_least8_t;
typedef int16_t int_least16_t;
typedef int32_t int_least32_t;
typedef int64_t int_least64_t;
#include <phoenix/arch/armv7a/stdtypes.h>

Check failure on line 19 in include/arch/armv7a/stdint.h

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a7-imx6ull-evk)

phoenix/arch/armv7a/stdtypes.h: No such file or directory

Check failure on line 19 in include/arch/armv7a/stdint.h

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a7-imx6ull-evk)

phoenix/arch/armv7a/stdtypes.h: No such file or directory

Check failure on line 19 in include/arch/armv7a/stdint.h

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a7-imx6ull-evk)

phoenix/arch/armv7a/stdtypes.h: No such file or directory

Check failure on line 19 in include/arch/armv7a/stdint.h

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-zedboard)

phoenix/arch/armv7a/stdtypes.h: No such file or directory

Check failure on line 19 in include/arch/armv7a/stdint.h

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-zedboard)

phoenix/arch/armv7a/stdtypes.h: No such file or directory

typedef uint8_t uint_least8_t;
typedef uint16_t uint_least16_t;
typedef uint32_t uint_least32_t;
typedef uint64_t uint_least64_t;
/* The following sections refer to ISO/IEC 9899:1999 */

/* 7.18.1.3 Fastest minimum-width integer types */

typedef int32_t int_fast8_t;
typedef int32_t int_fast16_t;
typedef int32_t int_fast32_t;
typedef int64_t int_fast64_t;

typedef uint32_t uint_fast8_t;
typedef uint32_t uint_fast16_t;
typedef uint32_t uint_fast32_t;
typedef uint64_t uint_fast64_t;
typedef __s32 int_fast8_t;
typedef __s32 int_fast16_t;
typedef __s32 int_fast32_t;
typedef __s64 int_fast64_t;

typedef __u32 uint_fast8_t;
typedef __u32 uint_fast16_t;
typedef __u32 uint_fast32_t;
typedef __u64 uint_fast64_t;

/* Define other fixed types along with defines/macros */

#define _USE_STANDARD_TYPES_STDINT

/* 7.18.1.4 Integer types capable of holding object pointers */

typedef int32_t intptr_t;
typedef uint32_t uintptr_t;
typedef __s32 intptr_t;
typedef __u32 uintptr_t;

/* 7.18.1.5 Greatest-width integer types */

typedef int64_t intmax_t;
typedef uint64_t uintmax_t;

/* 7.18.2.2 Limits of minimum-width integer types */

#define INT_LEAST8_MIN INT8_MIN
#define INT_LEAST16_MIN INT16_MIN
#define INT_LEAST32_MIN INT32_MIN
#define INT_LEAST64_MIN INT64_MIN

#define INT_LEAST8_MAX INT8_MAX
#define INT_LEAST16_MAX INT16_MAX
#define INT_LEAST32_MAX INT32_MAX
#define INT_LEAST64_MAX INT64_MAX

#define UINT_LEAST8_MAX UINT8_MAX
#define UINT_LEAST16_MAX UINT16_MAX
#define UINT_LEAST32_MAX UINT32_MAX
#define UINT_LEAST64_MAX UINT64_MAX
typedef __s64 intmax_t;
typedef __u64 uintmax_t;

/* 7.18.2.3 Limits of fastest minimum-width integer types */

Expand Down
36 changes: 0 additions & 36 deletions include/arch/armv7a/types.h

This file was deleted.

1 change: 0 additions & 1 deletion include/arch/armv7m/arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

#define __ARCH_STDINT <arch/armv7m/stdint.h>
#define __ARCH_LIMITS <arch/armv7m/limits.h>
#define __ARCH_SYS_TYPES <arch/armv7m/types.h>

#define __MEMCPY
#define __MEMCMP
Expand Down
71 changes: 16 additions & 55 deletions include/arch/armv7m/stdint.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
*
* Architecture dependent part of stdint (arch/armv7m)
*
* Copyright 2019-2021 Phoenix Systems
* Author: Andrzej Glowinski, Daniel Sawka
* Copyright 2019-2021, 2024 Phoenix Systems
* Author: Andrzej Glowinski, Daniel Sawka, Lukasz Leczkowski
*
* This file is part of Phoenix-RTOS.
*
Expand All @@ -16,43 +16,21 @@
#ifndef _LIBPHOENIX_ARCH_ARMV7M_STDINT_H_
#define _LIBPHOENIX_ARCH_ARMV7M_STDINT_H_

/* The following sections refer to ISO/IEC 9899:1999 */

/* 7.18.1.1 Exact-width integer types */

typedef signed char int8_t;
typedef short int16_t;
typedef int int32_t;
typedef long long int64_t;

typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
typedef unsigned long long uint64_t;

/* 7.18.1.2 Minimum-width integer types */

typedef int8_t int_least8_t;
typedef int16_t int_least16_t;
typedef int32_t int_least32_t;
typedef int64_t int_least64_t;
#include <phoenix/arch/armv7m/stdtypes.h>

Check failure on line 19 in include/arch/armv7m/stdint.h

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m4-stm32l4x6-nucleo)

phoenix/arch/armv7m/stdtypes.h: No such file or directory

Check failure on line 19 in include/arch/armv7m/stdint.h

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m4-stm32l4x6-nucleo)

phoenix/arch/armv7m/stdtypes.h: No such file or directory

Check failure on line 19 in include/arch/armv7m/stdint.h

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m4-stm32l4x6-nucleo)

phoenix/arch/armv7m/stdtypes.h: No such file or directory

Check failure on line 19 in include/arch/armv7m/stdint.h

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m4-stm32l4x6-nucleo)

phoenix/arch/armv7m/stdtypes.h: No such file or directory

Check failure on line 19 in include/arch/armv7m/stdint.h

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt106x-evk)

phoenix/arch/armv7m/stdtypes.h: No such file or directory

Check failure on line 19 in include/arch/armv7m/stdint.h

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt106x-evk)

phoenix/arch/armv7m/stdtypes.h: No such file or directory

Check failure on line 19 in include/arch/armv7m/stdint.h

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt117x-evk)

phoenix/arch/armv7m/stdtypes.h: No such file or directory

Check failure on line 19 in include/arch/armv7m/stdint.h

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt117x-evk)

phoenix/arch/armv7m/stdtypes.h: No such file or directory

Check failure on line 19 in include/arch/armv7m/stdint.h

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt117x-evk)

phoenix/arch/armv7m/stdtypes.h: No such file or directory

Check failure on line 19 in include/arch/armv7m/stdint.h

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt117x-evk)

phoenix/arch/armv7m/stdtypes.h: No such file or directory

typedef uint8_t uint_least8_t;
typedef uint16_t uint_least16_t;
typedef uint32_t uint_least32_t;
typedef uint64_t uint_least64_t;
/* The following sections refer to ISO/IEC 9899:1999 */

/* 7.18.1.3 Fastest minimum-width integer types */

typedef int32_t int_fast8_t;
typedef int32_t int_fast16_t;
typedef int32_t int_fast32_t;
typedef int64_t int_fast64_t;
typedef __s32 int_fast8_t;
typedef __s32 int_fast16_t;
typedef __s32 int_fast32_t;
typedef __s64 int_fast64_t;

typedef uint32_t uint_fast8_t;
typedef uint32_t uint_fast16_t;
typedef uint32_t uint_fast32_t;
typedef uint64_t uint_fast64_t;
typedef __u32 uint_fast8_t;
typedef __u32 uint_fast16_t;
typedef __u32 uint_fast32_t;
typedef __u64 uint_fast64_t;


/* Define other fixed types along with defines/macros */
Expand All @@ -61,30 +39,13 @@

/* 7.18.1.4 Integer types capable of holding object pointers */

typedef int32_t intptr_t;
typedef uint32_t uintptr_t;
typedef __s32 intptr_t;
typedef __u32 uintptr_t;

/* 7.18.1.5 Greatest-width integer types */

typedef int64_t intmax_t;
typedef uint64_t uintmax_t;

/* 7.18.2.2 Limits of minimum-width integer types */

#define INT_LEAST8_MIN INT8_MIN
#define INT_LEAST16_MIN INT16_MIN
#define INT_LEAST32_MIN INT32_MIN
#define INT_LEAST64_MIN INT64_MIN

#define INT_LEAST8_MAX INT8_MAX
#define INT_LEAST16_MAX INT16_MAX
#define INT_LEAST32_MAX INT32_MAX
#define INT_LEAST64_MAX INT64_MAX

#define UINT_LEAST8_MAX UINT8_MAX
#define UINT_LEAST16_MAX UINT16_MAX
#define UINT_LEAST32_MAX UINT32_MAX
#define UINT_LEAST64_MAX UINT64_MAX
typedef __s64 intmax_t;
typedef __u64 uintmax_t;

/* 7.18.2.3 Limits of fastest minimum-width integer types */

Expand Down
36 changes: 0 additions & 36 deletions include/arch/armv7m/types.h

This file was deleted.

1 change: 0 additions & 1 deletion include/arch/ia32/arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

#define __ARCH_STDINT <arch/ia32/stdint.h>
#define __ARCH_LIMITS <arch/ia32/limits.h>
#define __ARCH_SYS_TYPES <arch/ia32/types.h>
#define __ARCH_SYS_IO <arch/ia32/io.h>

#define __MEMCPY
Expand Down
Loading
Loading