Compare commits

...

353 Commits

Author SHA1 Message Date
mazen Adel
4482d84c9b Merge branch 'sem-clock-wait' into 'main'
Draft: Add: sem_clockwait() support to RTEMS

See merge request rtems/rtos/rtems!669
2025-11-15 01:08:15 +00:00
Sepehr Ganji
bff18c05b9 libfs/fatfs: Add FatFS with tests
This adds FatFS wrapper layer to RTEMS
including tests as part of GSoC 2025.
2025-11-10 16:09:07 -07:00
Kinsey Moore
e3592620d7 cpukit/flashdev: Return error for missing callbacks
When a callback does not exist, the Flashdev API should return error
where possible instead of success. When the API returns success for
missing callbacks, the Flashdev API client code may end up using
uninitialized variables as if they were filled by the API.

Closes #5391
2025-11-10 12:29:32 -06:00
Kinsey Moore
54de3ac479 bsps/shared/xqspi_flash.c: Add support for sector information 2025-11-10 12:29:31 -06:00
Joel Sherrill
7ab332d86f bsps/shared/ofw/ofw.c: Correct comparisons of different signedness
The GCC warning -Wsign-compare flagged these instances of comparing
signed and unsigned types. A common pair was size_t and int.
2025-11-06 10:26:10 -06:00
Joel Sherrill
88bce4ee7f grlib/uart/apbuart_cons.c: Correct comparisons of different signedness
The GCC warning -Wsign-compare flagged these instances of comparing
signed and unsigned types. A common pair was size_t and int.
2025-11-06 10:25:50 -06:00
Joel Sherrill
a4333a4361 bsps/shared/dev/serial/*.c: Correct comparisons of different signedness
The GCC warning -Wsign-compare flagged these instances of comparing
signed and unsigned types. A common pair was size_t and int.
2025-11-06 10:22:51 -06:00
Joel Sherrill
38367143fe mcf5235/console/console.c: Correct comparisons of different signedness
The GCC warning -Wsign-compare flagged these instances of comparing
signed and unsigned types. A common pair was size_t and int.
2025-11-06 10:20:02 -06:00
Aaron Nyholm
0e20f50870 testsuites/fstests/fsclose01: Fix expected flags
close() now holds a reference to the IOP this changes the
expected flags in the test. This change reflects that.
Updates #5311
2025-11-05 19:50:46 +00:00
Thomas Wucher
af75447c1a bsps/powerpc: Fix ppc_exc_interrupt not saving r3 correctly
On SPE enabled builds the extended bits of r3 need to be saved
separately to the stack. Make ppc_exc_interrupt to do that correctly.

Fixes #5389
2025-11-04 13:37:25 +01:00
Kinsey Moore
2179cd2fee cpukit/libdebugger: Address clobbered warnings
Move variable assignments after the setjmp() call where possible and
move macros that contain setjmp into an if() clause since assigning the
return value to a variable is undefined.

Updates #5364
2025-11-02 21:26:43 -06:00
Aaron Nyholm
9340bf6bad bsps/xilinx-zynq/dev/spi/jedec_flash.h: Add MT25QL128ABA support
Added JEDEC ID table data for MT25QL128ABA and MT25QL128ABB
2025-10-31 17:08:01 +11:00
Sebastian Huber
e45e0d2e5b validation: Address unused parameter
Mark the parameter as unused in uniprocessor configurations.
2025-10-29 07:16:41 +00:00
Sebastian Huber
03ae1fa930 bsps/irq: Fix type limits warnings
Set BSP_INTERRUPT_VECTOR_COUNT to 1 to avoid type limits and array
bounds warnings.

Make sure all functions using the default interrupt controller
implementation return a status of RTEMS_UNSATISFIED.

Update #5298.
Close #5377.
2025-10-29 07:16:41 +00:00
Sebastian Huber
2770bed227 bsps/tqm8xx: Fix integer expression warnings
Make sure we work with unsigned integer interrupt numbers.

Update #5378.
2025-10-29 05:05:49 +01:00
Joel Sherrill
ed38fadfbe spec/build/cpukit/optwarn.yml: Warning flags to match current state
All but ~50 warnings have been fixed if you account for unmerged
MRs. These settings should give a warning free build given the
current state.

       Warnings by Type
=================================
   2 -Wshift-negative-value
   3 -Wenum-conversion
   7 -Wcast-function-type
   7 -Wmissing-field-initializers
   8 -Wclobbered
  32 -Wtype-limits
2025-10-28 19:58:06 +00:00
Sebastian Huber
b2ca47e5a1 validation: Address unused parameters
Address unused parameters in the code generator.
2025-10-28 19:54:03 +00:00
Sebastian Huber
ce741f81cb validation: Do not use reserved "ctx" name
The name "ctx" is reserved for the test context.
2025-10-28 19:54:03 +00:00
Sebastian Huber
82ad3746f9 validation: Remove unused parameters
Remove actually unused parameters which would have been flagged by a
warning.
2025-10-28 19:54:03 +00:00
Sebastian Huber
e66a33fd7a validation: Address -Wclobbered warnings
Use functions with const parameters and const local variables
to silence -Wclobbered warnings.

Updates #5364.
2025-10-28 19:52:56 +00:00
Joel Sherrill
c49cfbf9a9 testsuites/psxtests/*/init.c: Address type limit warnings
GCC generates type limit warnings when comparison is always true or
always false due to the limited range of the data type, This was in a
termios structure. For most of the cases in RTEMS, this was when
a variable of an unsigned type was compared to be < or <= 0.
2025-10-28 19:33:35 +00:00
Joel Sherrill
9e8a8dff2e bsps/shared/dev/gpio/gpio-support.c: Address type limit warnings
GCC generates type limit warnings when comparison is always true or
always false due to the limited range of the data type, This was in a
termios structure. For most of the cases in RTEMS, this was when
a variable of an unsigned type was compared to be < or <= 0.
2025-10-28 19:33:35 +00:00
Joel Sherrill
31de2b300d bsps/powerpc/shared/irq/openpic.c: Address type limit warnings
GCC generates type limit warnings when comparison is always true or
always false due to the limited range of the data type, This was in a
termios structure. For most of the cases in RTEMS, this was when
a variable of an unsigned type was compared to be < or <= 0.
2025-10-28 19:33:35 +00:00
Joel Sherrill
a555b7d292 ss555/dev/console-generic.c: Address missing field initializer warnings
This was in a termios structure. The initialization was changed to using
named fields.

Updates #5325.
2025-10-28 12:55:15 -05:00
Joel Sherrill
ebcfc3db27 powerpc/shared/.../uart.c: Address missing field initializer warnings
This was in a structure describing Flash memory configuration.
The initialization was changed to using named fields.

Updates #5325.
2025-10-28 12:55:15 -05:00
Joel Sherrill
6900b048d8 powerpc/shared/.../uart.c: Address missing field initializer warnings
These were in a uart driver configuration structure.
The initialization was changed to using named fields.

Updates #5325.
2025-10-28 12:55:15 -05:00
Joel Sherrill
0ff1ea4ab4 motorola_powerpc: Address missing field initializer warnings
These were in declarations of board information structure with
initialization.  The initialization was changed to using named
fields.

Updates #5325.
2025-10-28 12:55:15 -05:00
Joel Sherrill
2999ec8607 beatnik: Address missing field initializer warnings
This was in a structure describing Flash memory configuration.
The initialization was changed to using named fields.

Updates #5325.
2025-10-28 12:55:15 -05:00
Aaron Nyholm
190899ee61 bsps/shared/jffs2_flashdev.c: Fixed fatal heap error on failed mount
Removed double free of mount_data and instance.
Closes #5381
2025-10-28 15:15:08 +11:00
Kinsey Moore
2cb47d2010 bsps/jffs2_flashdev: Return correct value for OOB size
Return the actual out of bounds size per page instead of the ioctl
return status. JFFS2 will happily operate with an OOB size of 0 and
instead put cleanmarkers in the normal page space of the flash.
2025-10-23 15:31:57 -05:00
Joel Sherrill
cfc9ee2e60 libdebugger/rtems-debugger-*.c: Address ignored qualifier warnings
GCC generates a warning when the return type of a function has a type
qualifier such as 'const'.
2025-10-17 15:08:47 -05:00
Kinsey Moore
955d36ea47 bsps/qspi: Make flashdev control structure private
These structures are not required to be exposed to users for any
functionality and users of the API have no way to make use of them.
2025-10-16 11:26:52 -05:00
Joel Sherrill
62e0865bcc bsps/powerpc/shared/clock/p_clock.c: Fix compile error
The error was referencing a field in the rtems_irq_connect_data
structure which only existed when BSP_SHARED_HANDLER_SUPPORT is
enabled.

Updates #5325.
2025-10-15 14:34:39 +00:00
Joel Sherrill
363afebd67 spclock_todhook01/init.c: Address missing field initializer warning (tm)
These were struct tm declarations with initialization. The initialization
was changed to using named fields.

Updates #5325.
2025-10-14 14:39:20 -05:00
Joel Sherrill
5c24413f4d psxclassic01/init.c: Address missing field initializer warning (siginfo)
This one a siginfo_t declaration with initialization.  The initialization
was changed to using named fields.

Updates #5325.
2025-10-14 14:28:27 -05:00
Joel Sherrill
1d08df678b testsuites/*: Address missing field initializer warnings (extensions)
Address missing field initializer warnings.

These were rtems_extensions_table declarations with initialization.
The initialization was changed to using named fields.

Updates #5325.
2025-10-14 14:24:30 -05:00
Joel Sherrill
edba3942cc /utf8proc/utf8proc_data.c: Address missing field initializer warnings
Address missing field initializer warnings. Since this is third party
code and the structure initialization in question is large, the
warning was disabled.

Updates #5325.
2025-10-14 14:23:59 -05:00
Joel Sherrill
f6c6b309eb cpukit/libmisc/shell/main_pci.c: Add field in shell_pci_modifier table
This file had a table supporting the command line options.

Updates #5325.
2025-10-14 14:23:59 -05:00
Joel Sherrill
100d62d1ec rtems-debugger-cmd.c: Address missing field initializer warnings (shell)
Address missing field initializer warnings.

These were rtems_shell_cmd_t or rtems_shell_alias_t declarations
with initialization.  The initialization was changed to using named
fields.

Updates #5325.
2025-10-14 14:23:59 -05:00
Joel Sherrill
87f5aa145b testsuites/samples/fileio: Address missing field initializer warnings
Address missing field initializer warnings.

These were rtems_shell_cmd_t or rtems_shell_alias_t declarations
with initialization.  The initialization was changed to using named
fields.

Updates #5325.
2025-10-14 14:23:59 -05:00
Joel Sherrill
f519633d0d cpukit/.../shell: Address missing field initializer warnings
Address missing field initializer warnings.

These were all rtems_shell_cmd_t or rtems_shell_alias_t declarations
with initialization.  The initialization was changed to using named
fields.

Updates #5325.
2025-10-14 14:23:59 -05:00
Chris Johns
6269686dfb rtemscxx: Support building on Unix
This lets you develop unittests on Unix.
2025-10-14 14:43:26 +11:00
Aaron Nyholm
62bbd05a31 cpukit/close.c: Open flag corrected for busy closes
Fix closing while busy. Previously open flag in the iop would be unset despite
close returning EBUSY.
Updates #5311
2025-10-14 13:09:51 +11:00
Gedare Bloom
523b97ed40 cpukit/rtems: regenerate basedefs with fallthrough
Regenerate basedefs from specifications with RTEMS_FALL_THROUGH().
2025-10-13 19:02:19 +00:00
Joel Sherrill
f6e7b3bfbf bsps/powerpc: Address missing field initializer warnings
Address missing field initializer warnings.

These were all rtems_irq_connect_data declarations with initialization.
The initialization was changed to using named fields and specifying an
initializer for each field.
2025-10-12 11:33:47 -05:00
Joel Sherrill
d9e156f3a3 pc386/uart_bus_pci.c: Address missing field initializer warnings
Address missing field initializer warnings.

This code originated from FreeBSD and only some initializers are
missing the last field. It is best to avoid modifying the code so
the warning is disabled for this array initialization.
2025-10-12 10:42:37 -05:00
Joel Sherrill
243c25d191 bsps ACPI: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.

The ACPI change set includes two headers which define debug macros. When
not building for debug, the instantiated inline functions generate
unused parameter warnings from every file they are included in. The
warning was disabled around the macro instantiations.
2025-10-10 22:04:38 +00:00
Joel Sherrill
eb6af2871e bsps i386: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 22:03:23 +00:00
Joel Sherrill
a4319861c0 cpukit i386: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 22:03:23 +00:00
Joel Sherrill
0c97eb1d48 arm/xilinx-zynqmp-rpu: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 22:01:39 +00:00
Joel Sherrill
754b10289c arm/xilinx-zynqmp: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 22:01:39 +00:00
Joel Sherrill
d379aa996b arm/xilinx-zynq: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 22:01:39 +00:00
Joel Sherrill
8acbcad50c arm/tms570: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 22:01:39 +00:00
Joel Sherrill
dcde65029b arm/stm32u5: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 22:01:39 +00:00
Joel Sherrill
94475b3386 arm/stm32h7: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 22:01:39 +00:00
Joel Sherrill
004e3b7bbc arm/stm32f4: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 22:01:39 +00:00
Joel Sherrill
c9c04ebdea arm/smdk2410: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 22:01:39 +00:00
Joel Sherrill
2690e9335b arm/shared: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 22:01:39 +00:00
Joel Sherrill
b5c952e6b6 arm/rtl22xx: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 22:01:39 +00:00
Joel Sherrill
c9798a0f80 arm/realview-pbx-a9: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 22:01:39 +00:00
Joel Sherrill
6666bc0c33 arm/raspberrypi: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 22:01:39 +00:00
Joel Sherrill
6a3e1ff889 arm/lpc32xx: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 22:01:39 +00:00
Joel Sherrill
ef742b98c7 arm/lpc24xx: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 22:01:39 +00:00
Joel Sherrill
d8c188757d arm/lpc176x: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 22:01:39 +00:00
Joel Sherrill
b43936d848 arm/lm3s69xx: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 22:01:39 +00:00
Joel Sherrill
1600191ebd arm/imxrt: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 22:01:39 +00:00
Joel Sherrill
172c853ba9 arm/imx: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 22:01:39 +00:00
Joel Sherrill
c4fdd4c4cb arm/edb7312: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 22:01:39 +00:00
Joel Sherrill
b62ad8c061 arm fvp: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 22:01:39 +00:00
Joel Sherrill
07ad871a8c arm edb7312: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 22:01:39 +00:00
Joel Sherrill
d38f790263 arm mcux-sdk: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 22:01:39 +00:00
Joel Sherrill
e9f922fc2b arm/csb337: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 22:01:39 +00:00
Joel Sherrill
e2e825950a arm/csb336: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 22:01:39 +00:00
Joel Sherrill
20e2f4722a arm/beagle: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 22:01:39 +00:00
Joel Sherrill
dbff120b09 arm/atsam: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 22:01:39 +00:00
Joel Sherrill
ddceaeaacb arm/altera-cyclone-v: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 22:01:39 +00:00
Joel Sherrill
f63b5b6661 bsps shared arm: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 22:01:39 +00:00
Joel Sherrill
01cd6f74aa cpukit arm: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 22:01:39 +00:00
Joel Sherrill
34f9c5690d cpukit: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 21:59:38 +00:00
Joel Sherrill
a9a8c963e4 cpukit moxie: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 21:59:38 +00:00
Joel Sherrill
e96cc8be71 cpukit m68k: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 21:59:38 +00:00
Joel Sherrill
400fe1a119 cpukit powerpc: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 21:59:38 +00:00
Joel Sherrill
271495beca cpukit nios2: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 21:59:38 +00:00
Joel Sherrill
b42f8a9890 cpukit microblaze: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 21:59:38 +00:00
Joel Sherrill
0b37e327e4 cpukit mips: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 21:59:38 +00:00
Joel Sherrill
0bd0ff6b3c cpukit or1k: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 21:59:38 +00:00
Joel Sherrill
9b3cb64b13 cpukit x86_64: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 21:59:38 +00:00
Joel Sherrill
fa6157d66e cpukit riscv: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 21:59:38 +00:00
Joel Sherrill
3e951d059b bsps/aarch64: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 21:58:12 +00:00
Joel Sherrill
2b7cd2dd38 bsps/shared/aarch64: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 21:58:12 +00:00
Joel Sherrill
f89a27b40f cpukit aarch64: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 21:58:12 +00:00
Joel Sherrill
f23b320d58 bsps/microblaze: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 21:10:56 +00:00
Joel Sherrill
7c48bd9bb7 bsps/moxie: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:59:29 +00:00
Joel Sherrill
a0028bdf4a bsps/nios2: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:58:45 +00:00
Joel Sherrill
44b86391e1 bsps/or1k: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:58:07 +00:00
Joel Sherrill
ae0ac65278 bsps/m68k/mcf5329: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:57:02 +00:00
Joel Sherrill
dfdc80d8e1 bsps/m68k/mcf5235: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:57:02 +00:00
Joel Sherrill
4dfca8c238 bsps/m68k/genmcf548x: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:57:02 +00:00
Joel Sherrill
99e455e12d bsps/m68k/av5282: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:57:02 +00:00
Joel Sherrill
cff91451fe bsps/m68k/uC5282: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:57:02 +00:00
Joel Sherrill
47d1b0a074 bsps/m68k/shared : Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:57:02 +00:00
Joel Sherrill
ee6a90030a bsps/mips/rbtx4938: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:55:42 +00:00
Joel Sherrill
375b185c69 bsps/mips/rbtx4925: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:55:42 +00:00
Joel Sherrill
b5d863152a bsps/mips/malta: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:55:42 +00:00
Joel Sherrill
75ac5826f1 bsps/mips/jmr3904: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:55:42 +00:00
Joel Sherrill
ab125bc118 bsps/mips/hurricane: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:55:42 +00:00
Joel Sherrill
ef2367aec6 bsps/mips/csb350: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:55:42 +00:00
Joel Sherrill
0bc4def8ac bsps/mips/shared: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:55:42 +00:00
Joel Sherrill
c7b662e62b bsps/powerpc/virtex5: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:54:57 +00:00
Joel Sherrill
ca3c540231 bsps/powerpc/virtex4: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:54:57 +00:00
Joel Sherrill
3f70e6f0b3 bsps/powerpc/virtex: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:54:57 +00:00
Joel Sherrill
1d3333d9a0 bsps/powerpc/tqm8xx: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:54:57 +00:00
Joel Sherrill
3855872ae2 bsps/powerpc/t32mppc: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:54:57 +00:00
Joel Sherrill
aadad3fefb bsps/powerpc/ss555: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:54:57 +00:00
Joel Sherrill
4caf2c71c1 bsps/powerpc/qoriq: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:54:57 +00:00
Joel Sherrill
2543cb7d85 bsps/powerpc/qemuppc: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:54:57 +00:00
Joel Sherrill
890d9c445e bsps/powerpc/psim: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:54:57 +00:00
Joel Sherrill
e2b4aa0e7d bsps/powerpc/mvme3100: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:54:57 +00:00
Joel Sherrill
68e65bf5a6 bsps/powerpc/mpc8260ads: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:54:57 +00:00
Joel Sherrill
0aa3e14695 bsps/powerpc/mpc55xxevb: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:54:57 +00:00
Joel Sherrill
308fe52d68 bsps/powerpc/motorola_powerpc: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:54:57 +00:00
Joel Sherrill
c5ab69eaed bsps/powerpc/gen8x33: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:54:57 +00:00
Joel Sherrill
1f9b0b5805 bsps/powerpc/gen5200: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:54:57 +00:00
Joel Sherrill
6aab39a51d bsps/powerpc/beatnik: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:54:57 +00:00
Joel Sherrill
056a3ab365 bsps/powerpc/shared: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:54:57 +00:00
Joel Sherrill
8702ef9677 bsps/riscv/riscv: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:53:51 +00:00
Joel Sherrill
1cf1b039a6 bsps/riscv/noel: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:53:51 +00:00
Joel Sherrill
9e948edd67 bsps/riscv/niosv: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:53:51 +00:00
Joel Sherrill
42642dbcf6 bsps/riscv/griscv: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:53:51 +00:00
Joel Sherrill
bc959e983f bsps/shared/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:52:14 +00:00
Joel Sherrill
1339ef1b10 bsps/shared/grlib: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:52:14 +00:00
Joel Sherrill
883f06737b bsps/sparc/leon3: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:49:35 +00:00
Joel Sherrill
c7ba5f76d6 bsps/sparc/leon2: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:49:35 +00:00
Joel Sherrill
e6b5917018 bsps/sparc/erc32: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:49:35 +00:00
Joel Sherrill
05d09facc0 bsps/sparc/shared: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:49:35 +00:00
Joel Sherrill
abe86999de testsuites/smptests: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:48:23 +00:00
Joel Sherrill
d3370aa627 testsuites/mptests: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:48:23 +00:00
Joel Sherrill
474b034cca testsuites/psxtests: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:48:23 +00:00
Joel Sherrill
56805ae4be testsuites/libtests: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:48:23 +00:00
Joel Sherrill
0589d7291a testsuites/sptests: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:48:23 +00:00
Joel Sherrill
107c00a4a9 testsuites/samples: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 20:48:23 +00:00
Joel Sherrill
2230dd1ce3 bsps/x86_64: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
2025-10-10 14:27:01 -05:00
Aaron Nyholm
a347ce1048 cpukit/close.c: Fix reference counting under concurrent access.
Fixes issue with IOP being freed during close call.
2025-10-10 09:36:54 +11:00
Mazen Adel Elmessady
61c35cff46 Adds: sem_clockwait() support to RTEMS
This commit adds support for the sem_clockwait() system call.
It also refactors code to avoid duplicating by implementing
_Semaphore_Wait_timed_clock() used in
sem_clockwait() and sem_timedwait()

The MR includes tests.
Updates
rtems/programs/gsoc#69
rtems#24
2025-10-10 00:25:52 +03:00
Gedare Bloom
cec9935c33 testsuites/validation: fix setjmp UB
Storing the return value of setjmp to a local variable is
undefined behavior.

Fixes #5373.
2025-10-09 09:22:55 -06:00
Kinsey Moore
7ebcccf199 bsps/dev/spi/xqspipsu_flash_config.h: Make flash config table static
This is now used by multiple files and can cause a multiple definitions
error when linking. Make the structure static to avoid this problem.
2025-10-08 15:39:05 -05:00
Joel Sherrill
de8da59ba1 testsuites/benchmarks/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
    Found with GCC's warning -Wunused-paramter.
2025-10-08 16:48:32 +00:00
Joel Sherrill
89efbdda7c testsuites/fstests/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
    Found with GCC's warning -Wunused-paramter.
2025-10-08 16:48:32 +00:00
Joel Sherrill
6fc0e50f6c testsuites/libtests/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
    Found with GCC's warning -Wunused-paramter.
2025-10-08 16:48:32 +00:00
Joel Sherrill
5cd78b4330 testsuites/psxtmtests/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
    Found with GCC's warning -Wunused-paramter.
2025-10-08 16:48:32 +00:00
Joel Sherrill
60ed3d6ed2 testsuites/rhealstone/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
    Found with GCC's warning -Wunused-paramter.
2025-10-08 16:48:32 +00:00
Joel Sherrill
744c4791c5 testsuites/samples/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
    Found with GCC's warning -Wunused-paramter.
2025-10-08 16:48:32 +00:00
Joel Sherrill
7d4ae6a2fa testsuites/unix/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
    Found with GCC's warning -Wunused-paramter.
2025-10-08 16:48:32 +00:00
Kinsey Moore
df2304b7e7 spec/bsps/aarch64/xilinx-zynqmp: Add XQspiPsu flashdev backend 2025-10-08 16:45:03 +00:00
Kinsey Moore
ea7a756ea1 bsps/shared/dev/flash/jffs2: Add support for NAND
This adds support for NAND to the JFFS2 flashdev adapter.
2025-10-08 16:43:09 +00:00
Joel Sherrill
e91ace80f1 bsps/arm/*beagle*: Relicense Claas Zeimke to 2-BSD
Also updates SPDX annotation

Updates #3053.
2025-10-06 16:55:58 -05:00
Joel Sherrill
a2f8c18819 arm/gumstix: Clean up Yang Xi attributions
While doing relicensing, I noticed that Yang Xi's submissions were
inconsistent about including a copyright. This adds that and does
some associated clean up. If comments were in the
attribution/license comment, they were converted to the Doxygen
comment block. No attribution or license changes were made.

I have reached out to Yang Xi for relicensing but not heard back
but the need for this cleanup was noticed.

Updates #3053
2025-10-06 17:30:17 +00:00
Joel Sherrill
30752f5df4 testsuites/validation/tx-thread-queue.c: Address -Wclobbered warning
Code should not rely on the contents of local variables set before
setjmp() after the longjmp() returns. In this case, it was notpossible
to reset events after the return. But analysis determined that the
longjmp() should always returns to the same stack frame. Thus local
variables should be preserved. The warning was disabled.

This case was not addressed by adding the "returns_twice" attribute
to setjmp() in setjmp.h.

Updates #5364.
2025-10-03 16:38:17 -05:00
Joel Sherrill
96c2793709 testsuites/validation/tc-task-restart.c: Address -Wclobbered warning
Code should not rely on the contents of local variables set before
setjmp() after the longjmp() returns. In this case, it was possible
to set cpu_self after the return from setjmp().

This case was not addressed by adding the "returns_twice" attribute
to setjmp() in setjmp.h.

Updates #5364.
2025-10-03 16:38:00 -05:00
Kinsey Moore
f34f2e0bf9 cpukit/jffs2/gc.c: Prevent live lock for split reads
In some cases a file read is not completed in a single call into the
JFFS2 layer and the inode is left in the READING state. When this
happens, it's possible for a garbage collection pass to be initiated
before completion of the read. In some such cases, the garbage
collection pass is executed in a tight loop that expects granular
locking to allow forward progress of the read between collection passes.
With RTEMS monolithic locking of the JFFS2 layer, forward progress is
not possible in this situation since the monolithic lock is never
released inside the loop.

The solution is to have the garbage collection pass return failure when
no progress is possible due to a bad inode state. This allows the read
to complete and the collection pass can be attempted at a later time.
2025-10-02 19:15:04 -05:00
Kinsey Moore
38e8e5c286 cpukit/flashdev: Add full support for NAND devices
This extends the flashdev API to support the additional calls required
by NAND device backends. This also adds region-relative IOCTLs to
prevent reimplementation of offset logic in top-end flashdev/filesystem
adapters.
2025-10-02 20:12:51 -04:00
Matteo Concas
1e28f577d8 bsps/noelv: Align instruction in bsp_reset()
Closes #5366
2025-10-02 16:43:54 +02:00
Joel Sherrill
d8f2967b63 cpukit/libtrace/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
2025-09-26 22:38:34 +00:00
Joel Sherrill
ae1dd64548 cpukit/libtest/testparallel.c: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
2025-09-26 22:38:34 +00:00
Joel Sherrill
ba04473bd7 cpukit/libpci/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
2025-09-26 22:38:34 +00:00
Joel Sherrill
32170f83a8 cpukit/libmisc/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.

libmisc/shell was in a previous patch.
2025-09-26 22:38:34 +00:00
Joel Sherrill
128bee9104 cpukit/libi2c/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
2025-09-26 22:38:34 +00:00
Joel Sherrill
333adee723 cpukit/libfs/src/pipe/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
2025-09-26 22:38:34 +00:00
Joel Sherrill
d8977880ca cpukit/libdrvmgr/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
2025-09-26 22:38:34 +00:00
Joel Sherrill
c4698dfc0c cpukit/libdl/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
2025-09-26 22:38:34 +00:00
Joel Sherrill
b505b66866 cpukit/libblock/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
2025-09-26 22:38:34 +00:00
Joel Sherrill
10c239a583 cpukit/libfs/src/rfs/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
2025-09-26 22:38:34 +00:00
Joel Sherrill
fe1e9b673f cpukit/libfs/src/jffs2/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
2025-09-26 22:38:34 +00:00
Joel Sherrill
1e0eacccd8 cpukit/libfs/src/imfs/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
2025-09-26 22:38:34 +00:00
Joel Sherrill
f17dbb7d4b cpukit/libfs/src/ftpfs/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
2025-09-26 22:38:34 +00:00
Joel Sherrill
8f77869f6d cpukit/libfs/src/dosfs/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
2025-09-26 22:38:34 +00:00
Joel Sherrill
5cf1eec93b cpukit/libfs/src/defaults/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
2025-09-26 22:38:34 +00:00
Joel Sherrill
94d9749222 cpukit/libmisc/shell/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
2025-09-26 22:38:34 +00:00
Joel Sherrill
60458df1c2 cpukit/dev/can/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
2025-09-26 22:38:34 +00:00
Joel Sherrill
cce1823e40 contrib/cpukit/uuid/gen_uuid.c: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
2025-09-26 22:38:34 +00:00
Joel Sherrill
53d6794ea5 cpukit/libmisc/rtems-fdt/rtems-fdt-shell.c: Correct file header
The @file block was below the license and should have been above it.
2025-09-26 22:38:34 +00:00
Joel Sherrill
cf0a338520 cpukit/libcsupport/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
2025-09-26 22:38:34 +00:00
Joel Sherrill
3b5ecfc5ac cpukit/posix/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
2025-09-26 22:38:34 +00:00
Joel Sherrill
a96d3f6b49 cpukit/rtems/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
2025-09-26 22:38:34 +00:00
Joel Sherrill
af86ade836 cpukit/sapi/src/rbheap.c: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
2025-09-26 22:38:34 +00:00
Joel Sherrill
787e5a3a76 cpukit/score/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
2025-09-26 22:38:34 +00:00
Joel Sherrill
b7ec902ea8 sptests/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
2025-09-26 22:35:12 +00:00
Joel Sherrill
a8448ce123 tmtests/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
2025-09-26 22:32:49 +00:00
Joel Sherrill
fd0123a7ef cpukit/include/rtems/rtems/timerimpl.h: Used unsigned type for mask
This addresses an issue found by the GCC -Wsign-compare warning.
The code was using a signed type for a bit mask.
2025-09-26 22:29:56 +00:00
Joel Sherrill
bf949e0526 testsuites/psxtest/*: Address unused parameter warnings
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
2025-09-26 22:29:13 +00:00
Joel Sherrill
788f4ee4b8 cpukit/libmisc/shell/hexdump-parse.c: Fix fall through warning
The case did not have a break because it was calling a function
which should have been marked as "__dead". It was calling a
function which was marked "__dead". Apparently the analysis
did not see through the extra layer.
2025-09-26 16:43:25 -05:00
Joel Sherrill
d8737d61cd testsuites/.../*: Address unused parameter warnings
These files are included or compiled multiple times. Any warning
in these results in many warning instances. Found with GCC's warning
-Wunused-paramter.
2025-09-25 14:41:34 -05:00
Joel Sherrill
748758758b testsuites/validation/*: Address unused parameter warnings
Fixed many warnings for unused parameters. Some cases were
a simple matter of adding "(void) param" at the beginning
of the function, while others required ensuring that addition
was inside the proper conditional section. Found with GCC's
warning -Wunused-paramter.
2025-09-25 14:41:34 -05:00
Joel Sherrill
9c44cf0090 jffs2: Address unused parameter warnings
The files impacted by this change are part of the RTEMS specific
port and do not need to be conditional on RTEMS. Found with GCC's
warning -Wunused-paramter.
2025-09-25 14:41:34 -05:00
Joel Sherrill
81dd232071 bsps/include/acpi/acpica/acpixf.h: Address unused parameter warnings
This is a third party file and the debug macros create unused
parameter warnings when debugging is not enabled. There are
multiple macros with layers. Rather than attempt to unwind all
this, disabled the -Wunused-parameter GCC warning around the
short block of code causing these warnings.
2025-09-25 14:41:34 -05:00
Joel Sherrill
86f00b3183 cpukit/include/.../*.h: Address unused parameter warnings
These files are included multiple times and any warning in these
results in many warning instances. Found with GCC's warning
-Wunused-paramter.
2025-09-25 14:41:34 -05:00
Kinsey Moore
19151f01ae cpukit/jffs2: Resolve errors with debug enabled 2025-09-24 13:20:46 -05:00
Kinsey Moore
7da577f8e6 bsps/shared/dev/flash: Enforce maximum JFFS2 filesystem size
The maximum size of JFFS2 is 4GB minus the block size of the flash.
Enforce this limitation when setting up a filesystem on a flashdev
region that is larger than the maximum.

This also resolves some off-nominal memory leaks.
2025-09-22 15:52:43 -05:00
Chris Johns
f30157f988 libdebugger: Add SMP support for ARM
Make the aarch64 SMP support a separate file and share it between
aarch64 and arm.
2025-09-22 20:51:58 +00:00
Kinsey Moore
75e7f5cb80 cpukit/flashdev: Add unregister call and private data destructor
This adds an API call allowing for unregistration to include destruction
of private data that is not managed by the flashdev framework. This also
updates the existing consumers of flashdev to use the new private data
destructor callback.
2025-09-22 10:04:58 -05:00
Michal Lenc
e8de13e0c5 cpukit/dev/can/can-bittiming.c: remove calls to abs()
Using abs() on unsigned integers leads to GCC warning -Wabsolute-value.
This commit removes the calls to abs() and replaces them with ternary
conditional operator. This keeps the correct error calculation
previously ensured by abs() call.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-09-20 20:47:14 +02:00
Kinsey Moore
3b60c421ca bsps/arm/xilinx-zynq: Add Xilinx compatibility layer
This adds the Xilinx compatibility layer for use with various Xilinx
libraries. The first consumer of this will be lwIP support for the
Zynq7000 platform.
2025-09-20 09:48:31 +10:00
Jeremy Lorelli
d8ba01ec52 cpukit: Raise internal error if we cannot open stdin with fileno 0
If someone manages to open a file before rtems_libio_post_driver is run,
open() may allocate a file number other than 0 for stdin. This leads to
a silent failure of the logic in rtems_libio_post_driver, and confusing
behavior because your BSP behaves as if it doesn't have a console.

Instead of failing silently, raise an internal error if open() succeeds
but gives us an unexpected file number for stdin.
2025-09-20 08:57:16 +10:00
Jeremy Lorelli
897a8d3094 libchip/ds1375: Refactor to use i2c-rtc driver
Previously this RTC was using the file system-based i2c interface in
/dev. Since the RTC is initialized pretty early on during system init,
we call open() before stdin/stdout/stderr have been opened. RTEMS
assumes that stdin == 0, stdout == 1, etc., and fails when that isn't
the case. In particular, when stdin != 0, RTEMS assumes that it wasn't
configured with a console driver and skips opening stdout/stderr,
leading to confusing issues with the standard I/O streams.
2025-09-20 08:57:16 +10:00
Kinsey Moore
53c427773f cpukit/libfs/jffs2: Remove secondary stale version
The version referenced in the first sentence has become stale and
redundant. Remove it in favor of the version in the command below.
2025-09-20 08:10:08 +10:00
Joel Sherrill
e45ebbc5c1 bsps/*: Correct implicit fallthrough warnings
Use RTEMS_FALL_THROUGH() to annotate case statements which
intentionally do not have a break statement.
2025-09-19 19:02:25 +00:00
Joel Sherrill
106363b29d cpukit/*: Correct implicit fallthrough warnings
Use RTEMS_FALL_THROUGH() to annotate case statements which
intentionally do not have a break statement.
2025-09-19 19:02:25 +00:00
Joel Sherrill
fef5e18ada contrib/*/xz/xz_dec_stream.c: Correct implicit fallthrough warnings
Use RTEMS_FALL_THROUGH() to annotate case statements which
intentionally do not have a break statement.
2025-09-19 19:02:25 +00:00
Joel Sherrill
38c0f48f53 cpukit/include/rtems/score/basedefs.h: Add RTEMS_FALL_THROUGH()
The RTEMS_FALL_THROUGH macro was needed to provide a portable
way to annotate that a case in a switch statement intentionally
does not have a break statement. It is known as "falling through"
and a common bug.

Adding this macro enabled addressing -Wimplicit-fallthrough warnings.
2025-09-19 19:02:25 +00:00
Joel Sherrill
fa84f51442 testsuites/validation/tx-call-within-isr.c: Address dangling pointer
On the genmcf548x BSP variants, the "request" local variable was
flagged as having a pointer taken and passed to subroutines. GCC
is unable to detect that the "request" variable is removed from
the chain in an ISR. Disabled -Wdangling-pointer for the single
test function CallWithinISR().
2025-09-19 19:01:31 +00:00
Joel Sherrill
ad60ce8c2c bsps/*acpi*: Address unterminated string warnings
The ACPI source has multiple tables where a Name field is defined.
The name field is a character array with a length of 4. All of the
string initializers are four characters plus a NUL. The code is
careful to use strn*() functions and intentionally avoids assuming
there is space for the NUL. With lots of entries in the various
arrays, this was clearly a design decision to save space.

This was caught by GCC's -Wunterminated-string-initialization
warning. The solution used is to use the "nonstring" attribute
recommended by the GCC manual.

Closes #5329
2025-09-19 18:56:55 +00:00
Joel Sherrill
78e050f603 cpukit/score/src/kern_ntptime.c: Negative Shift Value Warning
The code in question was shifting a signed integer. This was
caught by the -Wshift-negative-value GCC warning.

Closes #5339.
2025-09-18 17:48:06 -05:00
Gedare Bloom
948bbec7f6 shell: add noreturn attribute to err.h 2025-09-18 14:14:15 -06:00
Joel Sherrill
fd9f54ed23 pipe support: Update attribution email and relicense to 2-BSD
Wei Shen gave permission to relicense and asked to change the
email address to match that used on GitHub.

Updates #3053.
2025-09-18 09:26:39 -05:00
Joel Sherrill
21a6957d18 testsuites/sptests/sp34/changepri.c: Remove include of tm27-default.h
The file tm27-default.h is considered an internal flag. Accidentally
copying and pasting this include in while fixing attribution headers
was a mistake. Removing the line.
2025-09-18 07:45:35 -05:00
Christian Mauderer
1bb370b644 cpukit/jffs2: Fix unaligned writes
The code in flashio.c had a special case for handling unaligned buffers
during writes. That code did roughly the following:

If the size or start address of the buffer is not aligned to a word:
* align the size up to the next word
* create a temp buffer on heap or stack with the new size
* copy the data from write buffer to this temp buffer
* write the temp buffer with the _new_ size to the flash
* tell the code above, that the original size has been written

That means, that in certain cases, one to three random bytes have been
written to the flash. That is definitively not correct.

The special cases that trigger the behaviour seem to happen quite often
when using the RTEMS functions to unpack a .tar.gz with files in the
range of a few megabytes stored on the JFFS2 file system to the same
file system.

The RTEMS interface for flash drivers doesn't define any alignment
requirements. Therefore that code is not necessary and can just be
removed to solve these issues.
2025-09-17 15:12:27 +02:00
Joel Sherrill
ba3acfd3d0 misc: Fix empty body warnings
Address the small number of cases where an empty body occurred in
an if, else, or do while.
2025-09-15 16:25:37 +00:00
Joel Sherrill
4728346362 testsuites/sptests/sp*: Update attribution per git history
These files were written by Joel Sherrill with some being based
on descriptions from user reports.
  testsuites/sptests/sp34/changepri.c
  testsuites/sptests/sp52/sp52impl.h
  testsuites/sptests/sp67/init.c

Updates #3053.
2025-09-15 16:24:50 +00:00
Joel Sherrill
76d37a714e libdebugger/rtems-debugger-arm.c: Fix using defined() in expansion
The definition of NEEDS_THUMB_SWITCH was not portable and flagged by
the GCC -Wexpansion-to-defined. It is not portable to expand a macro
which uses futher cpp directives.

Closes #5328.
2025-09-15 16:24:17 +00:00
Joel Sherrill
4beeafe1d7 m68k/genmcf548x: Add attribution for embedded brains
Per git commit history, these files were submitted by Thomas
Doerfler. They have given permission.

Update #3053.
2025-09-15 16:22:13 +00:00
Joel Sherrill
600b76286e arm/smdk2410: Add proper attribution
This change adds attribution as appropriate for Ray Xu, Jay Monkman,
and Philippe Simons. The attribution is based on git archeology and
current permissions to relicense. Some of the code given attribution
was from the gp32 BSP which required looking at the 4.8 branch to
get attribution.

  - Work by Ray Xu and Jay Monkman is now 2-BSD
  - Work by Philipe Simon is GPL 2.0 w/RTEMS exception

Updates #3053.
2025-09-12 09:46:03 -05:00
Joel Sherrill
3e7776db83 spedfsched03: Relicense to 2-BSD
This code was submitted by Petr Benes who has given permission
to relicense.

Updates #3053.
2025-09-11 10:04:52 -05:00
Mazen Adel Elmessady
f929bcba5b cpukit/posix: Added pthread clock functions
Added pthread_cond_clockwait(), pthread_mutex_clocklock()
pthread_rwlock_clockrdlock() and pthread_rwlock_clockwrlock()
that are new in POSIX Issue 8. Also added tests.
The implementation used the timed versions of these functions
as a reference.

Updates
rtems/programs/gsoc#69
2025-09-10 19:56:50 +00:00
Kinsey Moore
509ce2fde4 cpukit/flashdev: Remove unnecessary reinitialization 2025-09-10 18:56:24 +00:00
Joel Sherrill
c4b62666c7 m68k/av5282: Add license and attribution as appropriate
This change reflects adding attribution based on the initial
submitter per git history. Most files were from Eric Norum
and he has given permission to relicense to 2-BSD. One file
was from Mike Bertosh whom we are still trying to contact.
That file is assumed to have been submitted under the GPL
w/exception as was the norm when it was submitted.
2025-09-10 18:53:59 +00:00
Joel Sherrill
6dacc5bd9a testsuites/sptests/sp29/init.c: Add attribution and license
This file was added in 1999 by me per git history.
2025-09-10 18:52:51 +00:00
Joel Sherrill
2f0133e582 bsps/powerpc/gen5200/include/tm27.h: Add attriibution and 2-BSD
This file was mechanically split from bsp.h which was submitted
by Thomas Doerfler. Updating license and SPDX to reflect that.
2025-09-09 16:45:12 -05:00
Joel Sherrill
888e5a5d25 bsps/*: Correct spelling of copyright
Multiple files had this spelled incorrectly.
2025-09-09 11:43:24 -05:00
Joel Sherrill
f2bbe99804 cpukit/.../m68k/qsm.h, sim.h: Update to Two Paragraph BSD
John Gwynne gave permission to relicense his submissions to
Two Paragraph BSD.

Updates #3053.
2025-09-09 16:13:02 +00:00
Aaron Nyholm
f93f3b87c8 flashdev: Added missing copyright 2025-09-09 16:09:49 +00:00
Joel Sherrill
60e392e621 bsps/.../*/include/tm27.h: Add attribution to one-line implementations
Many tm27.h implementations were one line with no attribution.
Some were simply including a default non-functional implementation.
Others were including a header file giving an implementation based
on a standard counter/timer. This patch gives attribution based on
the split out being done by Sebastian Huber in 2017.
2025-09-08 20:02:56 +00:00
Joel Sherrill
c55cf81db1 sppagesize/init.c: Add SPDX annotation
Apparently this was missed in a previous commit.
2025-09-08 13:20:15 -05:00
Joel Sherrill
eb6cbbf997 arm, rtl22xx: Relicense Ray Xy contributions to 2-BSD
Permission granted to relicense.

Updates #3053.
2025-09-08 12:25:34 -05:00
Sebastian Huber
cfe232c935 validation: Rearrange storage-qualifier
Place _Thread_local after static to be in line with the rest of the
code.
2025-09-08 04:33:52 +02:00
Mazen Adel Elmessady
c6606de311 cpukit/posix: Add clock support to thread queue timeouts
Added new functions to thread queue infrastructure to support
clock-specific timeout operations, making it easier to integrate
POSIX Issue 8 clock functions.

Updates
rtems/programs/gsoc#69
rtems#24
2025-09-06 16:16:12 +00:00
Kinsey Moore
b898aa6203 cpukit/flashdev: Correct page/sector references 2025-09-05 13:13:19 -05:00
Sunil Hegde
ac67445c84 cpukit/libgnat/ada_intrsupp.c: Fixed formatting
Fixed formatting based on suggestions by format diff.
2025-09-04 19:06:13 -05:00
Sunil Hegde
ccef4b74d0 cpukit/libgnat/ada_intrsupp.c: removed uses of set_vector()
removed uses of set_vector in __gnat_interrupt_connect()
and __gnat_interrupt_set()

Updates #5215
2025-09-04 19:06:13 -05:00
Bhavya Shah
4646d614c3 cpukit/libfs/imfs: Fix the maximum file size calculation
Fixes #5319
2025-09-04 18:26:46 -05:00
Joel Sherrill
022dd54744 sptests/spcbssched*, spqreslib: Add header for Petr Benes
These files did not have copyright, license, or SPDX. Per git log
these files were authored by Petr Benes who has other code in the
RTEMS source base and given permission to use BSD-2.

Updates #3053
2025-09-04 18:13:31 -05:00
Kinsey Moore
7a36500b6b Revert "spec/build/cpukit/optwarn.yml: Add -Wcalloc-transposed-args"
This reverts commit 71670c9cb0.

This option is not available on GCC 13.
2025-09-04 17:30:35 -05:00
Martin Erik Werner
b19d1c49ed cpukit: Correct region documentation notes
Update the rtems_region_get_information() and
rtems_region_get_information() documentation with various more or less
minor wording fixes:

* "obtain a diagnostic information." ->
  "obtain diagnostic information."

* "This method forms am O(n)" ->
  "This directive performs an O(n)"

* "scan of the free in the region" ->
  "scan of the free blocks in the region"

* "many used blocks and a much smaller number of used blocks" ->
  "many used blocks and a much smaller number of free blocks"

These changes were generated from rtems-central.
2025-09-04 15:46:44 +00:00
Joel Sherrill
71670c9cb0 spec/build/cpukit/optwarn.yml: Add -Wcalloc-transposed-args
Add check for calls to calloc() having the size (sizeof) and
number of elements (int) swapped.
2025-09-04 15:43:45 +00:00
Joel Sherrill
017ec9440e cpukit/libmisc/regulator/regulator.c: Fix order of calloc() arguments
Address calls to calloc () which swap the number of elements and
size of each element argument.
2025-09-04 15:43:45 +00:00
Joel Sherrill
65cac69a1c cpukit/libblock/src/bdbuf.c: Fix order of calloc() arguments
Address calls to calloc () which swap the number of elements and
size of each element argument.
2025-09-04 15:43:45 +00:00
Joel Sherrill
c0fba626cb spec/build/cpukit/optwarncc.yml: Add -Wold-style-declaration
Newer C versions require that the storage-class specifier like
static or _Thread_Local be the first thing in a declaration. Adding
this warning to the default set to let us eliminate violations.
2025-09-03 09:15:17 -05:00
Joel Sherrill
0dc1f06dbc testsuites/*: Fix old style declaration
Newer C versions require that the storage-class specifier like
static or _Thread_Local be the first thing in a declaration.
2025-09-03 09:15:17 -05:00
Joel Sherrill
a162a5cdcf cpukit/include/*: Fix old style declaration
Newer C versions require that the storage-class specifier like
static or _Thread_Local be the first thing in a declaration.
2025-09-03 09:15:17 -05:00
Joel Sherrill
b960eaf405 bsps/x86_64/*: Fix old style declaration
Newer C versions require that the storage-class specifier like
static or _Thread_Local be the first thing in a declaration.
2025-09-03 09:15:17 -05:00
Joel Sherrill
72837b30d8 bsps/shared/*: Fix old style declaration
Newer C versions require that the storage-class specifier like
static or _Thread_Local be the first thing in a declaration.
2025-09-03 09:15:17 -05:00
Joel Sherrill
c4779c4b4e bsps/riscv/*: Fix old style declaration
Newer C versions require that the storage-class specifier like
static or _Thread_Local be the first thing in a declaration.
2025-09-03 09:15:17 -05:00
Joel Sherrill
817ddf0750 bsps/powerpc/*: Fix old style declaration
Newer C versions require that the storage-class specifier like
static or _Thread_Local be the first thing in a declaration.
2025-09-03 09:15:17 -05:00
Joel Sherrill
02fbe6e9b5 bsps/include: Fix old style declaration
Newer C versions require that the storage-class specifier like
static or _Thread_Local be the first thing in a declaration.
2025-09-03 09:15:17 -05:00
Joel Sherrill
d3a1757ac7 bsps/arm: Fix old style declaration
Newer C versions require that the storage-class specifier like
static or _Thread_Local be the first thing in a declaration.
2025-09-03 09:15:16 -05:00
Sebastian Huber
312ea98ed2 validation: Use Markdown formatting
This file is generated from specification items.  Use Markdown format.
2025-09-02 16:54:57 +00:00
Sebastian Huber
79ca48adcc rtems: Use single '`' for code phrases
These files are generated from specification items.  Use Markdown
format.
2025-09-02 16:54:57 +00:00
Sebastian Huber
33e3b09c16 rtems: Use '-' instead of '*' for Doxygen lists
These files are generated from specification items.  The Markdown
formatting tool used for the documentation sources requires the use
of '-' for lists instead of '*'.
2025-09-02 16:54:57 +00:00
Sebastian Huber
d07bf743a3 rtems: Add missing copyright
Add copyright for rtems_barrier_get_number_waiting().
2025-09-02 16:54:57 +00:00
Sebastian Huber
f691b48e4d appl-config: Replace reST role
Doxygen does not understand the :term: role.
2025-09-02 16:54:57 +00:00
Sebastian Huber
10bcc955d3 validation: Fix formatting
Remove double blank lines.
2025-09-02 16:54:57 +00:00
Shaunak Datar
02de8a383d bsp/arch64/raspberrypi: Add I2C TX interrupt support
Adds the interrupt support for TX in the I2C driver
2025-08-28 18:33:49 -05:00
Kinsey Moore
94251a25fb cpukit: Remove telnetd
The telnet server library is being moved from the primary RTEMS
repository to the rtems-net-services repository.

Updates #5290
2025-08-26 14:42:42 -04:00
Joel Sherrill
334fd1ce9e testsuites/fstests/*: Use llabs() not abs() on time_t variable
time_t is a 64-bit quanity so using abs() which is for int is not
a good idea since it can lead to truncation.
2025-08-22 16:05:56 -05:00
Gedare Bloom
f1f14b5307 rtems: update licenses to 2BSD
This is an update of remaining Cogent Computer Systems licenses
from the RTEMS License to the 2-BSD licence.

Updates #3053.
2025-08-22 10:03:43 -06:00
Joel Sherrill
fb9bfe4011 testsuites/*: Add SPDX for RTEMS legacy license
These may still be relicensed but adding SPDX is needed.

Updates #4805.
2025-08-22 10:15:47 -05:00
Joel Sherrill
0c0607d071 bsps/x86_64/*: Add SPDX for RTEMS legacy license
These may still be relicensed but adding SPDX is needed.

Updates #4805.
2025-08-22 10:14:12 -05:00
Joel Sherrill
3c201420e4 bsps/sparc/*: Add SPDX for RTEMS legacy license
These may still be relicensed but adding SPDX is needed.

Updates #4805.
2025-08-22 10:14:12 -05:00
Joel Sherrill
f665d19812 bsps/shared/*: Add SPDX for RTEMS legacy license
These may still be relicensed but adding SPDX is needed.

Updates #4805.
2025-08-22 10:14:12 -05:00
Joel Sherrill
8a9b574ed5 bsps/or1k/*: Add SPDX for RTEMS legacy license
These may still be relicensed but adding SPDX is needed.

Updates #4805.
2025-08-22 10:14:12 -05:00
Joel Sherrill
82de7c4daa bsps/powerpc/*: Add SPDX for RTEMS legacy license
These may still be relicensed but adding SPDX is needed.

Updates #4805.
2025-08-22 10:14:12 -05:00
Joel Sherrill
03503d13fb bsps/nio2/*: Add SPDX for RTEMS legacy license
These may still be relicensed but adding SPDX is needed.

Updates #4805.
2025-08-22 10:14:12 -05:00
Joel Sherrill
edd7f1d460 bsps/mips/*: Add SPDX for RTEMS legacy license
These may still be relicensed but adding SPDX is needed.

Updates #4805.
2025-08-22 10:14:12 -05:00
Joel Sherrill
376d435fb3 bsps/m68k/*: Add SPDX for RTEMS legacy license
These may still be relicensed but adding SPDX is needed.

Updates #4805.
2025-08-22 10:14:12 -05:00
Joel Sherrill
19aee5aaa8 bsps/include/*: Add SPDX for RTEMS legacy license
These may still be relicensed but adding SPDX is needed.

Updates #4805.
2025-08-22 10:14:12 -05:00
Joel Sherrill
75c2fb617c bsps/i386/*: Add SPDX for RTEMS legacy license
These may still be relicensed but adding SPDX is needed.

Updates #4805.
2025-08-22 10:14:12 -05:00
Joel Sherrill
cfbc95e993 bsps/arm/*: Add SPDX for RTEMS legacy license
These may still be relicensed but adding SPDX is needed.

Updates #4805.
2025-08-22 10:14:12 -05:00
Joel Sherrill
51a2ee5e33 cpukit/*: Add SPDX for RTEMS legacy license
These may still be relicensed but adding SPDX is needed.

Updates #4805.
2025-08-22 10:14:12 -05:00
Joel Sherrill
aa497f732d testsuites/*: Relicense files from Chirayu Desai to 2-BSD
These files were from Chirayu Desai <chirayudesai1@gmail.com>.
Also updated the email address.

Updates #3053.
2025-08-22 09:18:09 -05:00
Martin Erik Werner
cf388ecb03 cpukit: Reword chain get wait routine->directive
Based on discord comment from Sebastian Huber suggesting that directive
would be appropriate terminology for referring to an "RTEMS API
function".
2025-08-21 13:06:07 -05:00
Martin Erik Werner
cec22d9b66 cpukit: Correct rtems_chain_get_with_wait() doc.
The Doxygen documentation for rtems_chain_get_with_wait() appears to be
incorrect based on a copy-paste from rtems_chain_get_with_notification().

Correct the documentation to describe the get and wait mechanism.
2025-08-21 13:06:07 -05:00
Kinsey Moore
3e160df4aa spec/cpukit/optwarn: Add -Werror to the standard build flags
Now that RTEMS should be entirely warning free thanks largely to the
efforts of Joel, adding this flag should keep the codebase in a good
state for future compiler updates.

Closes #5317
2025-08-21 13:04:09 -05:00
Ranulfo Raphael
baa281a40f bsps/xilinx-zynq/spi: Fix trace header function name
This fixes the zqspi_transfer_trace() to call the correct trace header
function.
2025-08-21 17:40:53 +00:00
Joel Sherrill
d172ecaff9 spec/.../mcf5235: Missing GCC atomic helper
Provide missing GCC atomics helpers as part of BSPs where GCC
does not know how to provide it since the CPU's ISA has no
atomic instructions. The implementation provided in
bsps/shared/atomics/__atomic_test_and_set.c should work
on any single core CPU.
2025-08-21 17:40:01 +00:00
Sebastian Huber
6477324b4c rtems: Fix Doxygen comments
Use matching parameter names.
2025-08-21 17:16:10 +00:00
Joel Sherrill
dce430bb69 spec/*: Clean up fast idle configure option
The CLOCK_DRIVER_USE_FAST_IDLE configure option is implemented
in the shared clock driver implementation. Unfortunately, the spec
files scattered the yaml to enable it for a specific BSP. This
change adds the shared file spec/build/bsps/optclkfastidle.yml which
is now the only place the CLOCK_DRIVER_USE_FAST_IDLE is specified.
That file includes a master list of BSPs which are known to be able to
run on simulators that are slow enough to benefit from this option.

As a point of information, the entire riscv BSP family can run on
both spike and qemu. None had the option do use fast idle. With this
option enabled, the time taken for a full test run on spike for
rv32i and rv64imadfc dropped by ~45%.
2025-08-20 13:02:19 -05:00
Shaunak Datar
fb08c8cb8d bsp/aarch64/raspberrypi: Add support for DMA
Adds the support for DMA on the Raspberry Pi 4b
2025-08-20 12:40:01 +05:30
Sebastian Huber
8baae3ee09 bsps/arm: Fix discarded qualifiers warning
Move volatile qualifier to the register block structure.

Close #5320.
2025-08-18 03:03:16 +02:00
Sebastian Huber
8fd021bbb3 m68k: Do not assign to a linker symbol
The _VBR is a symbol defined by linker scripts.  You cannot change this
value at runtime.  The BSP initialization has to ensure that
m68k_set_vbr() is only set to _VBR.

Close #5210.
2025-08-14 07:02:01 +02:00
Shaunak Datar
c8e5f206b4 bsp/aarch64/raspberrypi: Add C++ header guards
Adds header guards to the installed headers in raspberrypi/include/bsp
2025-08-13 12:04:14 -05:00
Sunil Hegde
fee83ad4fb bsps/no_cpu/no_bsp/clock/ckinit.c: Fixed formatting
Fixed formatting as suggested by the format diff, no
functional changes were made.
2025-08-13 15:28:45 +00:00
Sunil Hegde
6f51e669ad bsps/no_cpu: removed set_vector uses and prototype in the bsp template
removed set_vector uses and protoptypes from the bsp template.
Replaced it with rtems_interrupt_entry_install()

Updates #5215
2025-08-13 15:28:45 +00:00
Sebastian Huber
00bef3226d bsps/irq: Fix array bounds warning
Use a one element array to prevent array subscript index is outside
array bounds warnings.

Close #5298.
2025-08-13 01:53:05 +02:00
Lucian Silistru
45b1495a8a record: Avoid dependency on object link order
For the application configuration option
CONFIGURE_RECORD_INTERRUPTS_ENABLED, define
bsp_interrupt_get_dispatch_table_slot() in the application configuration
to avoid issues with the object link order within the RTEMS libraries.

Enable this option in an associated test.

Close #5244.
2025-08-12 13:18:30 -05:00
Joel Sherrill
b68e31a200 psxsignal0[78]: Re-add copyright and end of comment block
These four files had a copyright block with no license text.
The script to move the SPDX line to the top of the file ended
up deleting a line which was the end of the comment block.
2025-08-12 12:34:59 -05:00
Sebastian Huber
16faa870a5 bsps/powerpc: Fix assembler warnings
Avoid arithmetic involving v0..v31 register names.
2025-08-12 16:51:45 +02:00
Sebastian Huber
e74e5e1644 bsps/powerpc: Fix assembler warnings
Use numeric value of cr0 to fix the following warnings:

ppc_exc_asm_macros.h: Assembler messages:
ppc_exc_asm_macros.h:242: Warning: invalid register expression
ppc_exc_asm_macros.h:730:  Info: macro invoked from here
ppc_exc.S:134:   Info: macro invoked from here
ppc_exc_asm_macros.h:242: Warning: invalid register expression
ppc_exc_asm_macros.h:730:  Info: macro invoked from here
ppc_exc.S:137:   Info: macro invoked from here
2025-08-12 16:51:34 +02:00
yang.zhang
a9e131706c bsp/zynqmp_qemu: dl06 fails expectedly 2025-08-11 19:07:34 +00:00
Joel Sherrill
24314434a8 testsuites/*: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
91e475687e psxhdrs: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
fdba64f306 bsps/aarch64: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
be6e30dff3 bsps/arm: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
b162f65fb1 bsps/include: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
a265d69094 bsps/riscv: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
4549be01e3 bsps/shared: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
3a51fd9e6f bsps/sparc: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
548cb8e07c bsps/x86_64: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
3470ea15f1 cpukit/include: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
c87131e192 cpukit/libcsupport: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
f33e7c9a0c cpukit/libdl: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
1d23476eb1 cpukit/libfs: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
ea86780bdf cpukit/libmisc: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
be89bf6be0 cpukit/libtrace: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
9d81cacf25 cpukit/sapi: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
7df3c45159 cpukit/posix: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
26aa9106af cpukit/rtems: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Joel Sherrill
e2d61770d9 cpukit/score: Move SPDX line to top of file
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
2025-08-11 19:06:32 +00:00
Sebastian Huber
eeaef74d07 bsps/arm/*: Relicense to 2-BSD
All files were written by Sebastian Huber who has previously given
permission to relicense.

Update #3053.
Close #5318.
2025-08-11 03:53:04 +02:00
Kinsey Moore
046ea144a9 cpukit/aarch64: Use correct stack for nested interrupts
When AArch64 exception support was first written, nested exceptions were
configured using the wrong stack. This happened to work since any
changes were unwound from the stack before dispatch occurred. This
implements correct behavior for all SP0 interrupt vectors.

Closes #5140
2025-08-06 10:41:10 -05:00
Kinsey Moore
f664b84280 cpukit/aarch64: Use correct exception targets
The sp0 IRQ and lel32 SError exception targets were left in a bad state
following the exception rework to avoid use of mutable code pages. The
lel32 SError exception is entirely unused by RTEMS. This points the two
erroneous exception vectors at the correct targets.
2025-08-06 10:41:10 -05:00
Joel Sherrill
4c9e41b060 cpukit/sapi/src/exinit.c: Address warning on all ARM builds
The block of embedded assembly language which creates a section
to add auto-loading of the Python pretty printing scripts was
getting this warning on all ARM BSPs.

/tmp/ccMGaqij.s: Assembler messages:
/tmp/ccMGaqij.s:19: missing merge / string entity size, 1 assumed

This was because the @ symbol is a comment on ARM. Changing to
a % as suggested on the binutils mailing list resolved the problem.
2025-08-06 15:33:15 +00:00
Kinsey Moore
e8c5bba5bf arm/imxrt: Resolve missing prototype
This resolves a missing prototype by making a file used in the arm/imx
BSP family shared so that it can be used by the arm/imxrt BSP family to
provide the missing prototypes.
2025-08-06 14:58:49 +00:00
Joel Sherrill
b9b572335e bsps/powerpc/include/mpc8xx.h: Disable zero length array
A padding array ends up with a size of 0 which is illegal in newer
versions of C -- at least C17 and later.
2025-08-05 13:53:38 -05:00
Joel Sherrill
47e4832f9a atsam/contrib/.../source/board_lowlevel.c: Fix comparison of two arrays
Casted both as uintptr_t to resolve this.
2025-08-05 09:01:33 -05:00
Kinsey Moore
2cc6af6188 bsps/aarch64: Fix warning on ILP32
ILP32 can't represent 4GB in uintptr_t. Avoid the warning that this
assignment generates and update MMU config processing to avoid overflow
when ILP32 is in use.
2025-08-05 13:43:53 +00:00
Joel Sherrill
b40fba2686 spec/build/*.yml: Add contrib/.../uuid and contrib/.../utf8proc
This addition is needed to account for utf8proc and uuid moving
from cpukit/include to contrib. Both include directories need
to stay globally available.
2025-08-05 13:42:49 +00:00
Joel Sherrill
6b89dc82e9 stm32h7/.../stm32h743i-eval/ext-mem-ctl.c: Add prototype
Fixed missing prototype for SystemInit_ExtMemCtl().  This file is
STM code and SystemInit_ExtMemCtl() is protyped for BSP use in
bsp.h. We do not want to include that in this file to avoid
potential conflicts.
2025-08-05 13:33:57 +00:00
Joel Sherrill
414181bf2c powerpc/beatnik/include/bsp.h: Disable inport_ and outport_
The inport_[byte|word|long] and outport_[byte|word|long] methods
assume that the port is an address. The Beatnick definitions just
pass through the offset into IO Space. These are broken until they
do that. They do not appear to be used in anything this BSP actually
uses so disabling them works. Code is disabled with a lengthy comment
added if someone needs them to work in the future.
2025-08-05 13:31:47 +00:00
Joel Sherrill
0e81a0653a arm/stm32h7/.../stm32h750b-dk/system_stm32h7xx.c: Fix indentation
Address GCC warning for misleading indentation.
2025-08-05 13:30:53 +00:00
Joel Sherrill
2f0abe10e3 arm/stm32f4/.../stm32f4xxxx_rcc.h: RCC_CFGR_PPRE2 multiply defined
RCC_CFGR_PPRE2 was defined three times. Deleted the second and
third definitions. The second appeared to be wrong and the third
looked to be an alternate way to express the first.
2025-08-05 13:26:57 +00:00
Joel Sherrill
347fe98fe4 arm/stm32f4/.../stm32f4.h: Duplicate definition of STM32F4_FLASH
STM32F4_FLASH was defined in two places. The first used a hard
coded full address while the second used a more appropriate
base address and offset. Kept the second.
2025-08-05 13:26:20 +00:00
Joel Sherrill
5fe179df8f arm/stm32h7/.../stm32h757i-eval/system_stm32h7xx.c: Fix indentation
Address GCC warning for misleading indentation.
2025-08-05 13:21:23 +00:00
Joel Sherrill
56c5c935b3 spec/build/bsps/arm/lm3s69xx/tstlm4f120.yml: Add psxaio0[4-6]
These tests were too large for this BSP.
2025-08-05 13:20:19 +00:00
Joel Sherrill
0183fa1766 bsps/arm/atsam/contrib/.../source/pmc.c: Fix misleading indentation
Added braces to help gcc interpret the code.
2025-08-05 13:19:36 +00:00
Joel Sherrill
2c24c8cb0c imxrt/mcux-sdk/.../fsl_mipi_dsi.c: Fix used before initialized warning
These were outputs from a called function. Initialized to 0 to
make GCC happy.
2025-08-05 13:18:45 +00:00
Amar Takhar
d709f8aac3 rtems-bsps: Add JSON output
Add a -j / --json flag to output BSP list in JSON.
2025-07-31 18:24:04 -05:00
Amar Takhar
a0ab18ed0d rtems-bsps: Run through yapf
I disabled yapf for the long list that was easier to read in its current form
the rest are trivial changes.

We want this as eventually we'll be doing yapf for CI.
2025-07-31 18:24:04 -05:00
Kinsey Moore
f18fc04657 bsps/shared/gpio: Fix array bounds warning
GCC currently has issues with false positive warnings about array bounds
violations when the value used as the index is a pointer. This slightly
reworks the code to make it cleaner and to avoid this warning.
2025-07-31 18:13:12 -05:00
Joel Sherrill
75312c1b9b bsps/include/grlib/ambapp.h: Fix warning for zero length array use
The use of an array of zero length at the end of a structure needs to
be careful to use RTEMS_ZERO_LENGTH_ARRAY since the accepted syntax
varies across C language versions.
2025-08-01 09:12:23 +10:00
Amar Takhar
5fa8c7b52d readme: Add source locations for RTEMS Shell
If you have any ideas about the missing ones let us know.

This also reformats other areas using mdformat since it was used for the tables.
2025-08-01 09:10:55 +10:00
Amar Takhar
eedfe4e47b contrib: Add utf8proc to README
This is the current source there is no repository so a release file was used the
next update will be from the repository which starts at 1.1.6
2025-07-31 18:07:34 -05:00
Amar Takhar
3fcf78156d cpukit: Remove utf8proc and add to build
This also moves the header from <utf8proc/utf8proc.h> to <utf8proc.h>  This
follows what the upstream project uses and keeps us from having to modify
upstream source to put it in a subdirectory.
2025-07-31 18:07:34 -05:00
Amar Takhar
52bee922c3 contrib: Remove modification to header location
Remove changing utf8proc.h to its own subdirectory.  Other operating systems
have it in include there is no sense in us carrying this change.

Unlike the situation with uuid which projects do have in a subdirectory this is
not.
2025-07-31 18:07:34 -05:00
Amar Takhar
b2499de3de contrib: Apply RTEMS changes to utf8proc
No modifications to this it is what we have been carrying.
2025-07-31 18:07:34 -05:00
Amar Takhar
d37b554bc5 contrib: Import utf8proc 1.1.5
URL
https://juliastrings.github.io/utf8proc/releases/

Hash
There is no repo until 1.1.6 the file archive used was utf8proc-v1.1.5.tar.gz
released on 2009-10-16 the sha512 is:

cd75a0aabdf7b331ce6cc210fe343e15804e5a097607e387ec0ab9c994ceecc\
f80aecbe25b06efb756d2989fd623b7a4d6de2c4d3416add20ac8692cf37912c6
2025-07-31 18:07:34 -05:00
Amar Takhar
4374d0ef8b contrib: Add uuid to README
We'll change to the newer upstream eventually.
2025-07-31 18:01:42 -05:00
Amar Takhar
e9870fa74f cpukit: Remove uuid and add to build
Did the best I could handling the location of uuid.h
2025-07-31 18:01:42 -05:00
Amar Takhar
88b7cd7660 contrib: Move uuid.h to uuid/uuid.h
I will eventually fix this to keep it in the upstream location.
2025-07-31 18:01:42 -05:00
Amar Takhar
e913a0cca0 contrib: Re-apply uuid changes
This all appear to be RTEMS-local changes I looked at some other revisions and
didn't see some of the ones that may have not been local.
2025-07-31 18:01:42 -05:00
Amar Takhar
5db1c64dd4 contrib: Import uuid from e2fsprogs 1.45.5
URL
https://github.com/tytso/e2fsprogs/tree/master/lib/uuid

Hash
1207e36d0a8674d6c627bb9b2759faf1e290e13e
2025-07-31 18:01:42 -05:00
Amar Takhar
6030917dc6 readme: Add note about source with no version
If we don't have a version with the source use <commit date>-<hash>
2025-07-31 17:51:28 -05:00
Amar Takhar
3d8ad5c50c cpukit: Delete xz and add to build
No special instructions.
2025-07-31 17:51:28 -05:00
Amar Takhar
2ee51f3176 contrib: Re-apply changes
This is from:

71943dd4d2

xz: Suppress attribute warnings
2025-07-31 17:51:28 -05:00
Amar Takhar
1bd3c6fbdf readme: Add xz-embedded
Add xz-embedded
2025-07-31 17:51:28 -05:00
3250 changed files with 28995 additions and 11630 deletions

View File

@@ -157,6 +157,10 @@ rtems_device_driver console_initialize(
void *arg
)
{
(void) major;
(void) minor;
(void) arg;
const raspberrypi_console_device* device = &devices[BSP_CONSOLE_PORT];
rtems_status_code status = raspberrypi_uart_init(BSP_CONSOLE_PORT);
if (status != RTEMS_SUCCESSFUL) {
@@ -173,4 +177,4 @@ rtems_device_driver console_initialize(
}
BSP_output_char_function_type BSP_output_char = output_char;
BSP_polling_getchar_function_type BSP_poll_char = poll_char;
BSP_polling_getchar_function_type BSP_poll_char = poll_char;

View File

@@ -0,0 +1,300 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64Raspberrypi4
*
* @brief Raspberry Pi specific DMA definitions.
*/
/*
* Copyright (C) 2025 Shaunak Datar
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <bsp/raspberrypi-dma.h>
#define DMA4_AD_SHIFT( addr ) ( addr >> 5 )
#define DMA4_AD_UNSHIFT( addr ) ( addr << 5 )
#define ADDRESS_LOW( addr ) ( (uintptr_t) ( addr ) & 0xFFFFFFFF )
#define ADDRESS_HIGH( addr ) ( ( (uintptr_t) ( addr ) >> 32 ) & 0xFF )
#define BUS_ADDR( addr ) ( ( ( addr ) & ~0xC0000000 ) | 0xC0000000 )
typedef struct {
uint32_t transfer_info; /**< Control register */
uint32_t source_addr; /**< Source address register */
uint32_t destination_addr; /**< Destination address register */
uint32_t transfer_length; /**< Transfer length register */
uint32_t mode_2d_stride; /**< Stride register */
uint32_t next_cb; /**< Next control block address register */
uint32_t reserved[ 2 ]; /**< Reserved */
} rpi_dma_control_block;
typedef struct {
uint32_t transfer_info; /**< Control register */
uint32_t source_addr; /**< Source address register */
uint32_t destination_addr; /**< Destination address register */
uint32_t transfer_length; /**< Transfer length register */
uint32_t reserved_bit; /**< Reserved */
uint32_t next_cb; /**< Next control block address register */
uint32_t reserved[ 2 ]; /**< Reserved */
} rpi_dma_lite_control_block;
typedef struct {
uint32_t transfer_info; /**< Control register */
uint32_t source_addr; /**< Source address register */
uint32_t source_info; /**< Source information */
uint32_t destination_addr; /**< Destination address register */
uint32_t destination_info; /**< Destination information */
uint32_t transfer_length; /**< Transfer length register */
uint32_t next_cb; /**< Next control block address register */
uint32_t reserved; /**< Reserved */
} rpi_dma4_control_block;
static const uint32_t dma_base_addresses[] = {
BCM2711_DMA0_BASE,
BCM2711_DMA1_BASE,
BCM2711_DMA2_BASE,
BCM2711_DMA3_BASE,
BCM2711_DMA4_BASE,
BCM2711_DMA5_BASE,
BCM2711_DMA6_BASE,
BCM2711_DMA7_BASE,
BCM2711_DMA8_BASE,
BCM2711_DMA9_BASE,
BCM2711_DMA10_BASE,
BCM2711_DMA11_BASE,
BCM2711_DMA12_BASE,
BCM2711_DMA13_BASE,
BCM2711_DMA14_BASE
};
static inline uint32_t get_base_address( rpi_dma_channel channel )
{
if ( channel >= 0 && channel <= DMA4_CHANNEL_14 ) {
return dma_base_addresses[ channel ];
}
return 0;
}
static rpi_dma_control_block *rpi_dma_init_cb(
void *source_address,
void *destination_address,
uint32_t transfer_length
)
{
rpi_dma_control_block *cb = (rpi_dma_control_block *)
rtems_heap_allocate_aligned_with_boundary(
sizeof( rpi_dma_control_block ),
CPU_CACHE_LINE_BYTES,
0
);
if ( cb == NULL ) {
return NULL;
}
cb->source_addr = BUS_ADDR( (uint32_t) (uintptr_t) source_address );
cb->destination_addr = BUS_ADDR( (uint32_t) (uintptr_t) destination_address );
cb->transfer_length = transfer_length;
cb->transfer_info = ( TI_DEST_INC | TI_SRC_INC );
cb->mode_2d_stride = 0;
cb->next_cb = 0;
cb->reserved[ 0 ] = 0;
cb->reserved[ 1 ] = 0;
return cb;
}
static rpi_dma_lite_control_block *rpi_dma_lite_init_cb(
void *source_address,
void *destination_address,
uint32_t transfer_length
)
{
rpi_dma_lite_control_block *cb = (rpi_dma_lite_control_block *)
rtems_heap_allocate_aligned_with_boundary(
sizeof( rpi_dma_control_block ),
CPU_CACHE_LINE_BYTES,
0
);
if ( cb == NULL ) {
return NULL;
}
cb->source_addr = BUS_ADDR( (uint32_t) (uintptr_t) source_address );
cb->destination_addr = BUS_ADDR( (uint32_t) (uintptr_t) destination_address );
cb->transfer_length = transfer_length;
cb->transfer_info = ( TI_DEST_INC | TI_SRC_INC );
cb->next_cb = 0;
cb->reserved_bit = 0;
cb->reserved[ 0 ] = 0;
cb->reserved[ 1 ] = 0;
return cb;
}
static rpi_dma4_control_block *rpi_dma4_init_cb(
void *source_address,
void *destination_address,
uint32_t transfer_length
)
{
rpi_dma4_control_block *cb = (rpi_dma4_control_block *)
rtems_heap_allocate_aligned_with_boundary(
sizeof( rpi_dma4_control_block ),
CPU_CACHE_LINE_BYTES,
0
);
if ( cb == NULL ) {
return NULL;
}
cb->source_addr = (uint32_t) ADDRESS_LOW( source_address );
cb->source_info = SI_SRC_INC | ADDRESS_HIGH( source_address );
cb->destination_addr = (uint32_t) ADDRESS_LOW( destination_address );
cb->destination_info = DI_DEST_INC | ADDRESS_HIGH( destination_address );
cb->transfer_length = transfer_length;
cb->transfer_info = 0;
cb->next_cb = 0;
cb->reserved = 0;
return cb;
}
static inline void rpi_dma_free_control_block(
rpi_dma_channel channel,
uint32_t base_address
)
{
uint32_t cb_ad_reg = BCM2835_REG( base_address + CONBLK_AD_OFFSET );
if ( cb_ad_reg == 0 ) {
return;
}
uintptr_t cb_addr;
if ( channel >= DMA4_CHANNEL_11 && channel <= DMA4_CHANNEL_14 ) {
cb_addr = DMA4_AD_UNSHIFT( cb_ad_reg );
} else {
cb_addr = (uintptr_t) cb_ad_reg;
}
if ( cb_addr != 0 ) {
void *cb = (void *) cb_addr;
free( cb );
BCM2835_REG( base_address + CONBLK_AD_OFFSET ) = 0;
}
}
rtems_status_code rpi_dma_start_transfer( rpi_dma_channel channel )
{
uint32_t base_address = get_base_address( channel );
if ( !base_address ) {
return RTEMS_INVALID_NUMBER;
}
BCM2835_REG( base_address + CS_OFFSET ) = CS_WAIT_FOR_OUTSTANDING_WRITES |
CS_PANIC_PRIORITY_SHIFT |
CS_PRIORITY_SHIFT;
BCM2835_REG( base_address + CS_OFFSET ) |= CS_ACTIVE;
return RTEMS_SUCCESSFUL;
}
rtems_status_code rpi_dma_wait( rpi_dma_channel channel )
{
uint32_t base_address = get_base_address( channel );
if ( !base_address ) {
return RTEMS_INVALID_NUMBER;
}
while (( BCM2835_REG( base_address + CS_OFFSET ) & CS_ACTIVE ));
rpi_dma_free_control_block( channel, base_address );
return RTEMS_SUCCESSFUL;
}
rtems_status_code rpi_dma_mem_to_mem_init(
rpi_dma_channel channel,
void *source_address,
void *destination_address,
uint32_t transfer_length
)
{
uint32_t base_address = get_base_address( channel );
if ( !base_address ) {
return RTEMS_INVALID_NUMBER;
}
if ( ( (uintptr_t) source_address % CPU_CACHE_LINE_BYTES ) != 0 ||
( (uintptr_t) destination_address % CPU_CACHE_LINE_BYTES ) != 0 ) {
return RTEMS_INVALID_ADDRESS;
}
void *control_block = NULL;
size_t cb_size = 0;
if ( channel < DMA_LITE_CHANNEL_7 ) {
control_block = rpi_dma_init_cb(
source_address,
destination_address,
transfer_length
);
cb_size = sizeof( rpi_dma_control_block );
} else if ( channel > DMA_CHANNEL_6 && channel < DMA4_CHANNEL_11 ) {
control_block = rpi_dma_lite_init_cb(
source_address,
destination_address,
transfer_length
);
cb_size = sizeof( rpi_dma_lite_control_block );
} else if ( channel > DMA_LITE_CHANNEL_10 && channel <= DMA4_CHANNEL_14 ) {
control_block = rpi_dma4_init_cb(
source_address,
destination_address,
transfer_length
);
cb_size = sizeof( rpi_dma4_control_block );
} else {
return RTEMS_INVALID_NUMBER;
}
if ( control_block == NULL ) {
return RTEMS_NO_MEMORY;
}
BCM2835_REG( base_address + CS_OFFSET ) = CS_RESET | CS_ABORT;
rtems_cache_flush_multiple_data_lines( control_block, cb_size );
rtems_cache_flush_multiple_data_lines( source_address, transfer_length );
rtems_cache_invalidate_multiple_data_lines(
destination_address,
transfer_length
);
if ( ( channel >= DMA4_CHANNEL_11 ) && ( channel <= DMA4_CHANNEL_14 ) ) {
uint32_t cb_addr = (uint32_t) (uintptr_t) control_block;
uint32_t dma4_cb_addr = DMA4_AD_SHIFT( cb_addr );
BCM2835_REG( base_address + CONBLK_AD_OFFSET ) = dma4_cb_addr;
} else {
BCM2835_REG( base_address + CONBLK_AD_OFFSET ) = (uint32_t) (uintptr_t
) control_block;
}
return RTEMS_SUCCESSFUL;
}

View File

@@ -65,6 +65,7 @@
typedef struct {
i2c_bus base;
rtems_binary_semaphore sem;
uint32_t input_clock;
uintptr_t base_address;
raspberrypi_bsc_masters device;
@@ -75,65 +76,54 @@ typedef struct {
bool read_transfer;
} raspberrypi_i2c_bus;
static int i2c_polling_read( raspberrypi_i2c_bus *bus )
static int rpi_i2c_bus_transfer( raspberrypi_i2c_bus *bus )
{
while ( !( S_REG( bus ) & S_DONE ) && ( bus->remaining_bytes > 0 ) ) {
while ( ( S_REG( bus ) & S_RXD ) && ( bus->remaining_bytes > 0 ) ) {
while ( bus->remaining_bytes > 0 ) {
if ( bus->read_transfer ) {
while ( ( S_REG( bus ) & ( S_RXD | S_CLKT ) ) == 0 ) {
}
if ( S_REG( bus ) & S_CLKT ) {
return -EIO;
}
*bus->current_buffer = BCM2835_REG(
bus->base_address + BCM2711_I2C_FIFO
) &
BCM2711_I2C_FIFO_MASK;
bus->current_buffer++;
bus->remaining_bytes--;
/* Check for errors */
if ( S_REG( bus ) & ( S_CLKT | S_ERR ) ) {
++bus->current_buffer;
if ( ( S_REG( bus ) & S_ERR ) || ( S_REG( bus ) & S_CLKT ) ) {
return -EIO;
}
} else {
#ifdef BSP_I2C_USE_INTERRUPTS
C_REG( bus ) |= C_INTT;
if ( rtems_binary_semaphore_wait_timed_ticks(
&bus->sem,
bus->base.timeout
) != RTEMS_SUCCESSFUL ) {
rtems_binary_semaphore_try_wait( &bus->sem );
return -ETIMEDOUT;
}
#else
while ( ( S_REG( bus ) & ( S_TXW | S_CLKT ) ) == 0 ) {
}
if ( S_REG( bus ) & S_CLKT ) {
return -EIO;
}
#endif
BCM2835_REG(
bus->base_address + BCM2711_I2C_FIFO
) = *bus->current_buffer;
++bus->current_buffer;
if ( ( S_REG( bus ) & S_ERR ) || ( S_REG( bus ) & S_CLKT ) ) {
return -EIO;
}
}
}
return 0;
}
static int i2c_polling_write( raspberrypi_i2c_bus *bus )
{
while ( !( S_REG( bus ) & S_DONE ) && ( bus->remaining_bytes > 0 ) ) {
while ( bus->remaining_bytes > 0 && ( S_REG( bus ) & S_TXD ) ) {
BCM2835_REG( bus->base_address + BCM2711_I2C_FIFO ) = *(
bus->current_buffer
);
bus->current_buffer++;
bus->remaining_bytes--;
/* Check for errors */
if ( S_REG( bus ) & ( S_CLKT | S_ERR ) ) {
return -EIO;
}
}
}
return 0;
}
static int rpi_i2c_bus_transfer( raspberrypi_i2c_bus *bus )
{
int rv;
if ( bus->read_transfer ) {
rv = i2c_polling_read( bus );
if ( rv < 0 ) {
return rv;
}
} else {
rv = i2c_polling_write( bus );
if ( rv < 0 ) {
return rv;
}
}
if ( ( S_REG( bus ) & S_ERR ) || ( S_REG( bus ) & S_CLKT ) ||
( bus->remaining_bytes != 0 ) ) {
return -EIO;
--bus->remaining_bytes;
}
S_REG( bus ) = S_DONE;
return 0;
}
@@ -172,9 +162,10 @@ static int rpi_i2c_setup_and_transfer( raspberrypi_i2c_bus *bus )
BCM2711_I2C_DLEN_MASK :
( bus->current_buffer_size & BCM2711_I2C_DLEN_MASK
);
BCM2835_REG( bus->base_address + BCM2711_I2C_DLEN ) = bus->remaining_bytes;
BCM2835_REG( bus->base_address + BCM2711_I2C_DLEN ) = bus->remaining_bytes;
/* Clear the error bits before starting new transfer */
S_REG( bus ) = S_ERROR;
S_REG( bus ) = S_ERROR;
C_REG( bus ) |= C_ST;
rv = rpi_i2c_bus_transfer( bus );
@@ -182,11 +173,41 @@ static int rpi_i2c_setup_and_transfer( raspberrypi_i2c_bus *bus )
return rv;
}
#ifdef BSP_I2C_USE_INTERRUPTS
C_REG( bus ) |= C_INTD;
if ( rtems_binary_semaphore_wait_timed_ticks(
&bus->sem,
bus->base.timeout
) != 0 ) {
rtems_binary_semaphore_try_wait( &bus->sem );
return -ETIMEDOUT;
}
#else
while ( ( S_REG( bus ) & ( S_DONE | S_CLKT ) ) == 0 ) {
}
if ( S_REG( bus ) & S_CLKT ) {
return -EIO;
}
#endif
--bus->remaining_transfers;
}
return 0;
}
#ifdef BSP_I2C_USE_INTERRUPTS
static void i2c_handler( void *args )
{
raspberrypi_i2c_bus *bus = (raspberrypi_i2c_bus *) args;
if ( C_REG( bus ) & C_INTT ) {
C_REG( bus ) &= ~C_INTT;
} else if ( C_REG( bus ) & C_INTD ) {
C_REG( bus ) &= ~C_INTD;
}
rtems_binary_semaphore_post( &bus->sem );
}
#endif
static int rpi_i2c_transfer( i2c_bus *base, i2c_msg *msgs, uint32_t msg_count )
{
raspberrypi_i2c_bus *bus = (raspberrypi_i2c_bus *) base;
@@ -231,10 +252,11 @@ static int rpi_i2c_transfer( i2c_bus *base, i2c_msg *msgs, uint32_t msg_count )
}
if ( msgs[ i ].flags & I2C_M_RD ) {
C_REG( bus ) |= C_CLEAR | C_READ | C_ST; // Read packet transfer
C_REG( bus ) |= C_CLEAR | C_READ;
bus->read_transfer = true;
} else {
C_REG( bus ) |= C_CLEAR | C_ST; // Write packet transfer
C_REG( bus ) |= C_CLEAR;
C_REG( bus ) &= ~C_READ;
bus->read_transfer = false;
}
/* Disable clock stretch timeout */
@@ -346,6 +368,20 @@ rtems_status_code rpi_i2c_init(
C_REG( bus ) = C_CLEAR;
C_REG( bus ) = C_I2CEN;
#ifdef BSP_I2C_USE_INTERRUPTS
sc = rtems_interrupt_handler_install(
BCM2711_IRQ_I2C,
"I2C",
RTEMS_INTERRUPT_SHARED,
(rtems_interrupt_handler) i2c_handler,
bus
);
rtems_binary_semaphore_init( &bus->sem, "RPII2C" );
if ( sc != RTEMS_SUCCESSFUL ) {
return -EIO;
}
#endif
sc = rpi_i2c_set_clock( &bus->base, bus_clock );
if ( sc != RTEMS_SUCCESSFUL ) {
i2c_bus_destroy_and_free( &bus->base );

View File

@@ -40,6 +40,10 @@
#include <bspopts.h>
#include <bsp/raspberrypi-uart.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define CONSOLE_DEVICES RASPBERRYPI_CONSOLE_DEVICES
#define CONSOLE_DEVICE_PORT2ENUM(port_no) UART##port_no
@@ -68,4 +72,8 @@ rtems_status_code raspberrypi_uart_init(
#undef CONSOLE_DEVICE_ENUM
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* LIBBSP_AARCH64_RASPBERRYPI_BSP_CONSOLE_H */

View File

@@ -43,8 +43,12 @@
#include <rtems.h>
#include <dev/irq/arm-gic-irq.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @defgroup raspberrypi_interrupt Interrrupt Support
* @defgroup raspberrypi_interrupt Interrupt Support
*
* @ingroup RTEMSBSPsARMRaspberryPi
*
@@ -67,6 +71,9 @@
/* Interrupt Vectors: SPI */
#define BCM2711_IRQ_SPI (BCM2711_IRQ_VC_PERIPHERAL_BASE + 54)
/* Interrupt Vectors: I2C */
#define BCM2711_IRQ_I2C ( BCM2711_IRQ_VC_PERIPHERAL_BASE + 53 )
/* Interrupt Vectors: Videocore */
#define BCM2711_IRQ_VC_PERIPHERAL_BASE 96
#define BCM2711_IRQ_AUX (BCM2711_IRQ_VC_PERIPHERAL_BASE + 29)
@@ -106,5 +113,9 @@
#define BSP_IRQ_COUNT (BCM2835_INTC_TOTAL_IRQ)
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* ASM */
#endif /* LIBBSP_ARM_RASPBERRYPI_IRQ_H */

View File

@@ -0,0 +1,133 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsAArch64Raspberrypi4
*
* @brief Raspberry Pi specific DMA definitions.
*/
/*
* Copyright (C) 2025 Shaunak Datar
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LIBBSP_AARCH64_RASPBERRYPI_DMA_H
#define LIBBSP_AARCH64_RASPBERRYPI_DMA_H
#include <bsp/raspberrypi.h>
#include <bsp/rpi-gpio.h>
#include <bsp/utility.h>
#include <rtems/malloc.h>
#include <rtems/rtems/cache.h>
#include <rtems/score/basedefs.h>
#include <rtems/score/cpu.h>
#include <stdlib.h>
#include <string.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief DMA channel identifiers for BCM2711 (06 full, 710 lite, 1114 DMA4).
*/
typedef enum {
DMA_CHANNEL_0,
DMA_CHANNEL_1,
DMA_CHANNEL_2,
DMA_CHANNEL_3,
DMA_CHANNEL_4,
DMA_CHANNEL_5,
DMA_CHANNEL_6,
DMA_LITE_CHANNEL_7,
DMA_LITE_CHANNEL_8,
DMA_LITE_CHANNEL_9,
DMA_LITE_CHANNEL_10,
DMA4_CHANNEL_11,
DMA4_CHANNEL_12,
DMA4_CHANNEL_13,
DMA4_CHANNEL_14,
} rpi_dma_channel;
/**
* @brief Start a previously initialized DMA transfer on @a channel.
*
* Expects the channel's CONBLK_AD to point to a valid
* control block. Sets ACTIVE and required priorities.
*
* @param channel DMA channel to start.
* @retval RTEMS_SUCCESSFUL on success.
* @retval RTEMS_INVALID_NUMBER if @a channel is invalid.
*/
rtems_status_code rpi_dma_start_transfer( rpi_dma_channel channel );
/**
* @brief Block until the current DMA transfer on @a channel completes.
*
* Busy-waits for ACTIVE to clear and frees the control block previously
* programmed into CONBLK_AD (including DMA4 address unshifting). Does **not**
* invalidate/flush user buffers beyond setup done by the init helpers.
*
* @param channel DMA channel to wait on.
* @retval RTEMS_SUCCESSFUL on success.
* @retval RTEMS_INVALID_NUMBER if @a channel is invalid.
* @retval RTEMS_UNSATISFIED if the channel reports an error.
*/
rtems_status_code rpi_dma_wait( rpi_dma_channel channel );
/**
* @brief Initialize a memcpy-style DMA transfer from @a source_address to
* @a destination_address of @a transfer_length bytes on @a channel.
*
* Allocates and prepares the channel-specific control block, performs required
* cache maintenance (flush control block and source; invalidate destination),
* issues CS reset/abort, and writes CONBLK_AD (with DMA4 address packing via
* DMA4_AD_SHIFT). This function does **not** start the transfer; call
* ::rpi_dma_start_transfer() and then ::rpi_dma_wait().
*
* @param channel DMA channel to use (06 noarmal DMA, 710 lite,
* 1114 DMA4).
* @param source_address Source buffer (must be CPU_CACHE_LINE_BYTES
* aligned).
* @param destination_address Destination buffer (must be CPU_CACHE_LINE_BYTES
* aligned).
* @param transfer_length Number of bytes to copy.
* @retval RTEMS_SUCCESSFUL on success.
* @retval RTEMS_INVALID_NUMBER if @a channel is invalid/unsupported or has
* no base address.
* @retval RTEMS_INVALID_ADDRESS if @a source_address or @a
* destination_address are misaligned.
* @retval RTEMS_NO_MEMORY if control block allocation failed.
*/
rtems_status_code rpi_dma_mem_to_mem_init(
rpi_dma_channel channel,
void *source_address,
void *destination_address,
uint32_t transfer_length
);
#ifdef __cplusplus
}
#endif
#endif /* LIBBSP_AARCH64_RASPBERRYPI_DMA_H */

View File

@@ -41,6 +41,10 @@
#include <bsp/utility.h>
#include <dev/i2c/i2c.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief I2C controller instances on Raspberry Pi 4.
*/
@@ -89,4 +93,8 @@ rtems_status_code rpi_i2c_init(
uint32_t bus_clock
);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* LIBBSP_AARCH64_RASPBERRYPI_I2C_H */

View File

@@ -40,6 +40,10 @@
#include "bsp/rpi-gpio.h"
#include "bsp/utility.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum { raspberrypi_pwm0, raspberrypi_pwm1 } raspberrypi_pwm_channel;
typedef enum {
@@ -107,4 +111,8 @@ rtems_status_code rpi_pwm_init(
uint32_t data
);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* LIBBSP_AARCH64_RASPBERRYPI_4_PWM_H */

View File

@@ -39,6 +39,10 @@
#include <bsp/utility.h>
#include <bsp/rpi-gpio.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct
{
uint32_t spics;
@@ -119,4 +123,8 @@ typedef enum {
*/
rtems_status_code raspberrypi_spi_init(raspberrypi_spi_device device);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* LIBBSP_AARCH64_RASPBERRYPI_4_SPI_H */

View File

@@ -42,6 +42,10 @@
#include <bsp/rpi-gpio.h>
#include <dev/serial/arm-pl011.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* This macro exists to serve as a common point of definition for the
* parameters of the UARTs present in the Raspberry Pi 4. It is used in
@@ -69,4 +73,9 @@
5, "/dev/ttyAMA4", BCM2711_UART5_BASE, BCM2711_UART5_SIZE, \
BSP_PL011_CLOCK_FREQ, BCM2711_IRQ_PL011_UART, arm_pl011_context, \
&arm_pl011_fns, arm_pl011_write_polled, 13, 12, GPIO_AF4)
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* LIBBSP_AARCH64_RASPBERRYPI_BSP_RASPBERRYPI_UART_H */

View File

@@ -42,6 +42,10 @@
#include <bspopts.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @defgroup raspberrypi_reg Register Definitions
*
@@ -340,6 +344,53 @@
#define BCM2711_10_BIT_ADDR_MASK 0x78
/** @} */
/**
* @name DMA Registers
*
* @{
*/
#define BCM2711_DMA0_BASE ( RPI_PERIPHERAL_BASE + 0x00007000 )
#define BCM2711_DMA1_BASE ( BCM2711_DMA0_BASE + 0x100 )
#define BCM2711_DMA2_BASE ( BCM2711_DMA0_BASE + 0x200 )
#define BCM2711_DMA3_BASE ( BCM2711_DMA0_BASE + 0x300 )
#define BCM2711_DMA4_BASE ( BCM2711_DMA0_BASE + 0x400 )
#define BCM2711_DMA5_BASE ( BCM2711_DMA0_BASE + 0x500 )
#define BCM2711_DMA6_BASE ( BCM2711_DMA0_BASE + 0x600 )
#define BCM2711_DMA7_BASE ( BCM2711_DMA0_BASE + 0x700 )
#define BCM2711_DMA8_BASE ( BCM2711_DMA0_BASE + 0x800 )
#define BCM2711_DMA9_BASE ( BCM2711_DMA0_BASE + 0x900 )
#define BCM2711_DMA10_BASE ( BCM2711_DMA0_BASE + 0xa00 )
#define BCM2711_DMA11_BASE ( BCM2711_DMA0_BASE + 0xb00 )
#define BCM2711_DMA12_BASE ( BCM2711_DMA0_BASE + 0xc00 )
#define BCM2711_DMA13_BASE ( BCM2711_DMA0_BASE + 0xd00 )
#define BCM2711_DMA14_BASE ( BCM2711_DMA0_BASE + 0xe00 )
#define ENABLE ( RPI_PERIPHERAL_BASE + 0x00007FF0 )
#define CS_OFFSET 0x00
#define CONBLK_AD_OFFSET 0x04
#define DEBUG_OFFSET 0x020
#define INT_STATUS_OFFSET 0xfe0
#define CS_RESET ( 1 << 31 )
#define CS_ABORT ( 1 << 30 )
#define CS_END ( 1 << 1 )
#define CS_WAIT_FOR_OUTSTANDING_WRITES ( 1 << 28 )
#define CS_PRIORITY_SHIFT ( 1 << 16 )
#define CS_PANIC_PRIORITY_SHIFT ( 15 << 20 )
#define CS_ACTIVE ( 1 << 0 )
#define CS_ERROR ( 1 << 8 )
#define TI_DEST_INC ( 1 << 4 )
#define TI_SRC_INC ( 1 << 8 )
#define TI_SRC_WIDTH ( 1 << 9 )
#define TI_DEST_WIDTH ( 1 << 5 )
#define TI_PERMAP( x ) ( ( x ) << 16 )
#define TI_SRC_DREQ ( 1 << 10 )
#define TI_DEST_DREQ ( 1 << 6 )
#define TI_WAIT_RESP ( 1 << 3 )
#define TI_NO_WIDE_BURSTS ( 1 << 26 )
#define SI_SRC_INC ( 1 << 12 )
#define DI_DEST_INC ( 1 << 12 )
/** @} */
/**
* @name Mailbox Registers
*
@@ -581,4 +632,8 @@
/** @} */
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* LIBBSP_ARM_RASPBERRYPI_RASPBERRYPI_H */

View File

@@ -39,6 +39,10 @@
#include <bspopts.h>
#include <rtems/rtems/status.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Raspberry Pi GPIO functions.
*/
@@ -115,4 +119,8 @@ rtems_status_code raspberrypi_gpio_set_pull(
const raspberrypi_gpio_pull value
);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* LIBBSP_AARCH64_RASPBERRYPI_BSP_RPI_GPIO_H */

View File

@@ -264,9 +264,9 @@ aarch64_mmu_set_translation_table_entries(
{
uint64_t max_mappable = 1LLU << aarch64_mmu_get_cpu_pa_bits();
/* Align to page boundaries */
uintptr_t begin = RTEMS_ALIGN_DOWN( config->begin, MMU_PAGE_SIZE );
uintptr_t end = RTEMS_ALIGN_UP( config->end, MMU_PAGE_SIZE );
uintptr_t size = end - begin;
uint64_t begin = RTEMS_ALIGN_DOWN( config->begin, MMU_PAGE_SIZE );
uint64_t end = RTEMS_ALIGN_UP( (uint64_t) config->end, MMU_PAGE_SIZE );
uint64_t size = end - begin;
if ( config->begin == config->end ) {
return RTEMS_SUCCESSFUL;

View File

@@ -45,5 +45,9 @@ rtems_status_code aarch64_mmu_map(
uint64_t flags
)
{
(void) addr;
(void) size;
(void) flags;
return RTEMS_SUCCESSFUL;
}

View File

@@ -40,6 +40,8 @@
static void bsp_inter_processor_interrupt( void *arg )
{
(void) arg;
_SMP_Inter_processor_interrupt_handler( _Per_CPU_Get() );
}
@@ -52,6 +54,8 @@ static rtems_interrupt_entry aarch64_ipi_entry;
void _CPU_SMP_Finalize_initialization( uint32_t cpu_count )
{
(void) cpu_count;
rtems_status_code sc;
rtems_interrupt_entry_initialize(

View File

@@ -69,6 +69,10 @@ rtems_status_code console_initialize(
void *arg
)
{
(void) major;
(void) minor;
(void) arg;
size_t i;
rtems_termios_initialize();

View File

@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/*
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (C) 2022 Chris Johns <chris@contemporary.software>
*
* Redistribution and use in source and binary forms, with or without
@@ -169,6 +169,9 @@ static bool versal_uart_first_open(
rtems_libio_open_close_args_t *args
)
{
(void) term;
(void) args;
#ifdef BSP_CONSOLE_USE_INTERRUPTS
versal_pl011_context *ctx = (versal_pl011_context *) base;
volatile arm_pl011_uart *regs = (volatile arm_pl011_uart *) ctx->pl011_ctx.regs;
@@ -210,6 +213,8 @@ static void versal_uart_last_close(
rtems_libio_open_close_args_t *args
)
{
(void) args;
versal_pl011_context *ctx = (versal_pl011_context *) base;
rtems_interrupt_handler_remove(ctx->pl011_ctx.irq, versal_uart_interrupt, tty);
}

View File

@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/*
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (C) 2022 Chris Johns <chris@contemporary.software>
* Copyright (C) 2014 embedded brains GmbH & Co. KG
*

View File

@@ -69,6 +69,10 @@ rtems_status_code console_initialize(
void *arg
)
{
(void) major;
(void) minor;
(void) arg;
size_t i;
rtems_termios_initialize();

View File

@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/*
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (C) 2021 On-Line Applications Research (OAR)
* Copyright (C) 2014 embedded brains GmbH & Co. KG
*

View File

@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/*
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (C) 2023 On-Line Applications Research Corporation (OAR)
*
* Redistribution and use in source and binary forms, with or without

View File

@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/*
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (C) 2023 On-Line Applications Research Corporation (OAR)
*
* Redistribution and use in source and binary forms, with or without

View File

@@ -54,7 +54,12 @@ aarch64_mmu_config_table[] = {
/* Map OCM space */
}, {
.begin = 0xfffc0000U,
.end = 0x100000000U,
/*
* This should be 4GB, but uintptr_t can't hold that for ILP32. This will be
* rounded up to MMU page alignment during initial setup and will end up
* being 4GB anyway.
*/
.end = 0xffffffffU,
.flags = AARCH64_MMU_DATA_RW
}, { /* DDRMC_region1_mem, if not used size is 0 and ignored */
.begin = (uintptr_t) bsp_r1_ram_base,

View File

@@ -45,6 +45,9 @@
#include <bsp/hwlib.h>
#include <bsp/alt_clock_manager.h>
#include <bsp/alt_mpu_registers.h>
#ifdef __rtems__
#include <rtems/score/basedefs.h>
#endif /* __rtems__ */
#define UINT12_MAX (4096)
@@ -4693,6 +4696,9 @@ ALT_STATUS_CODE alt_clk_freq_get(ALT_CLK_t clk, alt_freq_t* freq)
case ALT_CLK_NAND:
denom = 4;
// the absence of a break statement here is not a mistake
#ifdef __rtems__
RTEMS_FALL_THROUGH();
#endif /* __rtems__ */
case ALT_CLK_NAND_X:
temp = ALT_CLKMGR_PERPLL_SRC_NAND_GET(alt_read_word(ALT_CLKMGR_PERPLL_SRC_ADDR));
if (temp == ALT_CLKMGR_PERPLL_SRC_NAND_E_F2S_PERIPH_REF_CLK)

View File

@@ -97,6 +97,10 @@ ALT_STATUS_CODE alt_dma_program_init(ALT_DMA_PROGRAM_t * pgm)
ALT_STATUS_CODE alt_dma_program_uninit(ALT_DMA_PROGRAM_t * pgm)
{
#ifdef __rtems__
(void) pgm;
#endif
return ALT_E_SUCCESS;
}
@@ -111,6 +115,11 @@ ALT_STATUS_CODE alt_dma_program_clear(ALT_DMA_PROGRAM_t * pgm)
__attribute__((weak)) ALT_STATUS_CODE alt_cache_system_clean(void * address, size_t length)
{
#ifdef __rtems__
(void) address;
(void) length;
#endif
return ALT_E_SUCCESS;
}

View File

@@ -92,6 +92,9 @@ rtems_device_driver i2cdrv_initialize(
void *arg
)
{
(void) minor;
(void) arg;
rtems_status_code sc = RTEMS_SUCCESSFUL;
for ( size_t i = 0; i < CYCLONE_V_NO_I2C; ++i ) {
@@ -130,6 +133,9 @@ rtems_device_driver i2cdrv_open(
void *arg
)
{
(void) major;
(void) arg;
rtems_status_code sc = RTEMS_SUCCESSFUL;
i2cdrv_entry *e = &i2cdrv_table[minor];
@@ -143,6 +149,9 @@ rtems_device_driver i2cdrv_close(
void *arg
)
{
(void) major;
(void) arg;
rtems_status_code sc = RTEMS_SUCCESSFUL;
i2cdrv_entry *e = &i2cdrv_table[minor];
@@ -156,6 +165,8 @@ rtems_device_driver i2cdrv_read(
void *arg
)
{
(void) major;
rtems_status_code sc = RTEMS_SUCCESSFUL;
i2cdrv_entry *e = &i2cdrv_table[minor];
rtems_libio_rw_args_t *rw = arg;
@@ -178,6 +189,8 @@ rtems_device_driver i2cdrv_write(
void *arg
)
{
(void) major;
rtems_status_code sc = RTEMS_SUCCESSFUL;
i2cdrv_entry *e = &i2cdrv_table[minor];
rtems_libio_rw_args_t *rw = arg;
@@ -217,6 +230,8 @@ rtems_device_driver i2cdrv_ioctl(
void *arg
)
{
(void) major;
rtems_status_code sc = RTEMS_SUCCESSFUL;
i2cdrv_entry *e = &i2cdrv_table[minor];
rtems_libio_ioctl_args_t *args = arg;

View File

@@ -318,6 +318,7 @@ static rtems_status_code ds1339_write(uint8_t addr, void* buf, size_t size)
static void altera_cyclone_v_ds1339_initialize(int minor)
{
(void) minor;
rtems_status_code sc = RTEMS_SUCCESSFUL;
uint8_t status = 0;
@@ -349,6 +350,7 @@ static void altera_cyclone_v_ds1339_initialize(int minor)
static int altera_cyclone_v_ds1339_get_time(int minor, rtems_time_of_day* tod)
{
(void) minor;
ds1339_time_t time;
rtems_status_code sc = RTEMS_SUCCESSFUL;
@@ -377,6 +379,7 @@ static int altera_cyclone_v_ds1339_get_time(int minor, rtems_time_of_day* tod)
static int altera_cyclone_v_ds1339_set_time(int minor, const rtems_time_of_day* tod)
{
(void) minor;
ds1339_time_t time;
rtems_status_code sc = RTEMS_SUCCESSFUL;
@@ -398,6 +401,7 @@ static int altera_cyclone_v_ds1339_set_time(int minor, const rtems_time_of_day*
static bool altera_cyclone_v_ds1339_probe(int minor)
{
(void) minor;
rtems_status_code sc = RTEMS_SUCCESSFUL;
uint8_t buf;
@@ -701,6 +705,7 @@ static rtems_status_code m41st87_write(uint8_t addr, void* buf, size_t size)
static void altera_cyclone_v_m41st87_initialize(int minor)
{
(void) minor;
m41st87_time_t time;
rtems_status_code sc = RTEMS_SUCCESSFUL;
@@ -732,6 +737,7 @@ static void altera_cyclone_v_m41st87_initialize(int minor)
static int altera_cyclone_v_m41st87_get_time(int minor, rtems_time_of_day* tod)
{
(void) minor;
m41st87_time_t time;
rtems_status_code sc = RTEMS_SUCCESSFUL;
@@ -759,6 +765,7 @@ static int altera_cyclone_v_m41st87_get_time(int minor, rtems_time_of_day* tod)
static int altera_cyclone_v_m41st87_set_time(int minor, const rtems_time_of_day* tod)
{
(void) minor;
m41st87_time_t time;
rtems_status_code sc = RTEMS_SUCCESSFUL;
@@ -785,6 +792,7 @@ static int altera_cyclone_v_m41st87_set_time(int minor, const rtems_time_of_day
static bool altera_cyclone_v_m41st87_probe(int minor)
{
(void) minor;
rtems_status_code sc = RTEMS_SUCCESSFUL;
uint8_t buf;

View File

@@ -43,6 +43,8 @@
#ifdef BSP_FDT_IS_SUPPORTED
uint32_t bsp_fdt_map_intr(const uint32_t *intr, size_t icells)
{
(void) icells;
return intr[1] + 32;
}

View File

@@ -357,6 +357,8 @@ static bool atsam_uart_first_open(
rtems_libio_open_close_args_t *args
)
{
(void) args;
atsam_uart_context *ctx = (atsam_uart_context *) base;
Uart *regs = ctx->regs;
#ifdef ATSAM_CONSOLE_USE_INTERRUPTS
@@ -394,6 +396,8 @@ static void atsam_uart_last_close(
rtems_libio_open_close_args_t *args
)
{
(void) args;
atsam_uart_context *ctx = (atsam_uart_context *) base;
#ifdef ATSAM_CONSOLE_USE_INTERRUPTS
@@ -461,6 +465,8 @@ static int atsam_uart_ioctl(
void *buffer
)
{
(void) buffer;
atsam_uart_context *ctx = (atsam_uart_context *) base;
rtems_status_code sc;
@@ -501,6 +507,10 @@ rtems_status_code console_initialize(
void *arg
)
{
(void) major;
(void) minor;
(void) arg;
size_t i;
rtems_termios_initialize();

View File

@@ -352,7 +352,7 @@ void _SetupMemoryRegion(void)
((uintptr_t)atsam_memory_null_begin) |
MPU_REGION_VALID |
MPU_NULL_REGION;
if (atsam_memory_null_begin != atsam_memory_itcm_end) {
if ((uintptr_t) atsam_memory_null_begin != (uintptr_t) atsam_memory_itcm_end) {
dwRegionAttr =
MPU_AP_NO_ACCESS |
MPU_REGION_EXECUTE_NEVER |

View File

@@ -210,11 +210,23 @@ void PMC_EnableAllPeripherals(void)
{
PMC->PMC_PCER0 = MASK_STATUS0;
#ifndef __rtems__
while ((PMC->PMC_PCSR0 & MASK_STATUS0) != MASK_STATUS0);
#else
while ((PMC->PMC_PCSR0 & MASK_STATUS0) != MASK_STATUS0) {
;
}
#endif
PMC->PMC_PCER1 = MASK_STATUS1;
#ifndef __rtems__
while ((PMC->PMC_PCSR1 & MASK_STATUS1) != MASK_STATUS1);
#else
while ((PMC->PMC_PCSR1 & MASK_STATUS1) != MASK_STATUS1) {
;
}
#endif
TRACE_DEBUG("Enable all periph clocks\n\r");
}
@@ -226,11 +238,23 @@ void PMC_DisableAllPeripherals(void)
{
PMC->PMC_PCDR0 = MASK_STATUS0;
#ifndef __rtems__
while ((PMC->PMC_PCSR0 & MASK_STATUS0) != 0);
#else
while ((PMC->PMC_PCSR0 & MASK_STATUS0) != 0) {
;
}
#endif
PMC->PMC_PCDR1 = MASK_STATUS1;
#ifndef __rtems__
while ((PMC->PMC_PCSR1 & MASK_STATUS1) != 0);
#else
while ((PMC->PMC_PCSR1 & MASK_STATUS1) != 0) {
;
}
#endif
TRACE_DEBUG("Disable all periph clocks\n\r");
}

View File

@@ -1 +1,36 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsARMAtsam
*
* @brief This header file includes the generic tm27 support implementation.
*/
/*
* Copyright (C) 2017 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <rtems/tm27-default.h>

View File

@@ -57,6 +57,8 @@ void atsam_rtc_get_time(rtems_time_of_day *tod)
static void atsam_rtc_device_initialize(int minor)
{
(void) minor;
Rtc *rtc = RTC;
RTC_DisableIt(rtc, 0x1F);
@@ -64,6 +66,8 @@ static void atsam_rtc_device_initialize(int minor)
static int atsam_rtc_device_get_time(int minor, rtems_time_of_day *tod)
{
(void) minor;
atsam_rtc_get_time(tod);
return 0;
@@ -71,6 +75,8 @@ static int atsam_rtc_device_get_time(int minor, rtems_time_of_day *tod)
static int atsam_rtc_device_set_time(int minor, const rtems_time_of_day *tod)
{
(void) minor;
Rtc *rtc = RTC;
uint8_t hour;
uint8_t minute;
@@ -96,6 +102,8 @@ static int atsam_rtc_device_set_time(int minor, const rtems_time_of_day *tod)
static bool atsam_rtc_device_probe(int minor)
{
(void) minor;
return true;
}

View File

@@ -416,6 +416,8 @@ static void atsam_spi_setup_transfer(atsam_spi_bus *bus)
static void atsam_spi_dma_callback(uint32_t ch, void *arg, uint32_t status)
{
(void) ch;
atsam_spi_bus *bus;
uint32_t dma_errors;

View File

@@ -40,6 +40,8 @@ static void atsam_sc16i752_irqs_handler(void *arg)
static void atsam_sc16i752_interrupt(const Pin *pin, void *arg)
{
(void) pin;
atsam_sc16is752_spi_context *ctx = arg;
if(PIO_ItIsActive(&ctx->irq_pin)) {

View File

@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/*
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (C) 2019 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without

View File

@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0+-with-RTEMS-exception */
/**
* @file
*
@@ -185,6 +187,8 @@ omap3_frclock_init(void)
static uint32_t
beagle_clock_get_timecount(struct timecounter *tc)
{
(void) tc;
return mmio_read(fr_timer->base + fr_timer->regs->TCRR);
}

View File

@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
@@ -15,12 +17,29 @@
* Germany
* <claas.ziemke@gmx.net>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
*
* Modified by Ben Gras <beng@shrike-systems.com> to make
* interrupt-driven uart i/o work for beagleboards; beaglebone support added.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <libchip/serial.h>

View File

@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0+-with-RTEMS-exception */
/**
* @file
*
@@ -48,7 +50,7 @@ static const rtems_vector_number gpio_bank_vector[] =
AM335X_INT_GPIOINT3A };
/* Get the value of Base Register + Offset */
uint32_t static inline bbb_reg(uint32_t bank, uint32_t reg)
static inline uint32_t bbb_reg(uint32_t bank, uint32_t reg)
{
return (gpio_bank_addrs[bank] + reg);
}
@@ -111,6 +113,8 @@ rtems_status_code rtems_gpio_bsp_select_input(
uint32_t pin,
void *bsp_specific
) {
(void) bsp_specific;
return bbb_select_pin_function(bank, pin, BBB_DIGITAL_IN);
}
@@ -119,6 +123,8 @@ rtems_status_code rtems_gpio_bsp_select_output(
uint32_t pin,
void *bsp_specific
) {
(void) bsp_specific;
return bbb_select_pin_function(bank, pin, BBB_DIGITAL_OUT);
}
@@ -128,6 +134,11 @@ rtems_status_code rtems_gpio_bsp_select_specific_io(
uint32_t function,
void *pin_data
) {
(void) bank;
(void) pin;
(void) function;
(void) pin_data;
return RTEMS_NOT_DEFINED;
}
@@ -136,6 +147,10 @@ rtems_status_code rtems_gpio_bsp_set_resistor_mode(
uint32_t pin,
rtems_gpio_pull_mode mode
) {
(void) bank;
(void) pin;
(void) mode;
/* TODO: Add support for setting up resistor mode */
return RTEMS_NOT_DEFINED;
}
@@ -309,6 +324,12 @@ rtems_status_code rtems_gpio_bsp_specific_group_operation(
uint32_t pin_count,
void *arg
) {
(void) bank;
(void) pins;
(void) pin_count;
(void) arg;
return RTEMS_NOT_DEFINED;
}
@@ -324,31 +345,49 @@ rtems_status_code rtems_gpio_bsp_specific_group_operation(
rtems_status_code rtems_gpio_bsp_multi_set(uint32_t bank, uint32_t bitmask)
{
(void) bank;
(void) bitmask;
return RTEMS_NOT_DEFINED;
}
rtems_status_code rtems_gpio_bsp_multi_clear(uint32_t bank, uint32_t bitmask)
{
(void) bank;
(void) bitmask;
return RTEMS_NOT_DEFINED;
}
uint32_t rtems_gpio_bsp_multi_read(uint32_t bank, uint32_t bitmask)
{
(void) bank;
(void) bitmask;
return -1;
}
rtems_status_code rtems_gpio_bsp_set(uint32_t bank, uint32_t pin)
{
(void) bank;
(void) pin;
return RTEMS_NOT_DEFINED;
}
rtems_status_code rtems_gpio_bsp_clear(uint32_t bank, uint32_t pin)
{
(void) bank;
(void) pin;
return RTEMS_NOT_DEFINED;
}
uint32_t rtems_gpio_bsp_get_value(uint32_t bank, uint32_t pin)
{
(void) bank;
(void) pin;
return -1;
}
@@ -357,6 +396,10 @@ rtems_status_code rtems_gpio_bsp_select_input(
uint32_t pin,
void *bsp_specific
) {
(void) bank;
(void) pin;
(void) bsp_specific;
return RTEMS_NOT_DEFINED;
}
@@ -365,6 +408,10 @@ rtems_status_code rtems_gpio_bsp_select_output(
uint32_t pin,
void *bsp_specific
) {
(void) bank;
(void) pin;
(void) bsp_specific;
return RTEMS_NOT_DEFINED;
}
@@ -374,6 +421,11 @@ rtems_status_code rtems_gpio_bsp_select_specific_io(
uint32_t function,
void *pin_data
) {
(void) bank;
(void) pin;
(void) function;
(void) pin_data;
return RTEMS_NOT_DEFINED;
}
@@ -382,16 +434,24 @@ rtems_status_code rtems_gpio_bsp_set_resistor_mode(
uint32_t pin,
rtems_gpio_pull_mode mode
) {
(void) bank;
(void) pin;
(void) mode;
return RTEMS_NOT_DEFINED;
}
rtems_vector_number rtems_gpio_bsp_get_vector(uint32_t bank)
{
(void) bank;
return -1;
}
uint32_t rtems_gpio_bsp_interrupt_line(rtems_vector_number vector)
{
(void) vector;
return -1;
}
@@ -400,6 +460,10 @@ rtems_status_code rtems_gpio_bsp_enable_interrupt(
uint32_t pin,
rtems_gpio_interrupt interrupt
) {
(void) bank;
(void) pin;
(void) interrupt;
return RTEMS_NOT_DEFINED;
}
@@ -408,6 +472,10 @@ rtems_status_code rtems_gpio_bsp_disable_interrupt(
uint32_t pin,
rtems_gpio_interrupt interrupt
) {
(void) bank;
(void) pin;
(void) interrupt;
return RTEMS_NOT_DEFINED;
}
@@ -416,6 +484,10 @@ rtems_status_code rtems_gpio_bsp_multi_select(
uint32_t pin_count,
uint32_t select_bank
) {
(void) pins;
(void) pin_count;
(void) select_bank;
return RTEMS_NOT_DEFINED;
}
@@ -425,6 +497,11 @@ rtems_status_code rtems_gpio_bsp_specific_group_operation(
uint32_t pin_count,
void *arg
) {
(void) bank;
(void) pins;
(void) pin_count;;
(void) arg;
return RTEMS_NOT_DEFINED;
}

View File

@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0+-with-RTEMS-exception */
/**
* @file
*

View File

@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
@@ -15,13 +17,26 @@
* Germany
* <claas.ziemke@gmx.net>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Modified by Ben Gras <beng@shrike-systems.com> to add lots
* of beagleboard/beaglebone definitions, delete lpc32xx specific
* ones, and merge with some other header files.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LIBBSP_ARM_BEAGLE_BSP_H

View File

@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0+-with-RTEMS-exception */
/**
* @file
*

View File

@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
@@ -7,8 +9,6 @@
*/
/*
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2016 Punit Vara <punitvara@gmail.com>
*
* Redistribution and use in source and binary forms, with or without

View File

@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0+-with-RTEMS-exception */
/**
* @file
*

View File

@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
@@ -15,9 +17,26 @@
* Germany
* <claas.ziemke@gmx.net>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LIBBSP_ARM_BEAGLE_I2C_H

View File

@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
@@ -7,8 +9,6 @@
*/
/*
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2020, 2021 James Fitzsimons <james.fitzsimons@gmail.com>
*
* Redistribution and use in source and binary forms, with or without

View File

@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
@@ -7,8 +9,6 @@
*/
/*
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2020, 2021 James Fitzsimons <james.fitzsimons@gmail.com>
*
* Redistribution and use in source and binary forms, with or without

View File

@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0+-with-RTEMS-exception */
/**
* @file
*

View File

@@ -1 +1,36 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsARMBeagle
*
* @brief This header file includes the generic tm27 support implementation.
*/
/*
* Copyright (C) 2017 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <rtems/tm27-default.h>

View File

@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0+-with-RTEMS-exception */
/**
* @file
*
@@ -100,6 +102,9 @@ rtems_status_code bsp_interrupt_get_attributes(
rtems_interrupt_attributes *attributes
)
{
(void) vector;
(void) attributes;
return RTEMS_SUCCESSFUL;
}
@@ -108,6 +113,8 @@ rtems_status_code bsp_interrupt_is_pending(
bool *pending
)
{
(void) vector;
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
bsp_interrupt_assert(pending != NULL);
*pending = false;
@@ -116,12 +123,16 @@ rtems_status_code bsp_interrupt_is_pending(
rtems_status_code bsp_interrupt_raise(rtems_vector_number vector)
{
(void) vector;
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
return RTEMS_UNSATISFIED;
}
rtems_status_code bsp_interrupt_clear(rtems_vector_number vector)
{
(void) vector;
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
return RTEMS_UNSATISFIED;
}
@@ -131,6 +142,8 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
bool *enabled
)
{
(void) vector;
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
bsp_interrupt_assert(enabled != NULL);
*enabled = false;
@@ -168,6 +181,9 @@ rtems_status_code bsp_interrupt_set_priority(
uint32_t priority
)
{
(void) vector;
(void) priority;
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
return RTEMS_UNSATISFIED;
}
@@ -177,6 +193,9 @@ rtems_status_code bsp_interrupt_get_priority(
uint32_t *priority
)
{
(void) vector;
(void) priority;
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
bsp_interrupt_assert(priority != NULL);
return RTEMS_UNSATISFIED;

View File

@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
@@ -7,8 +9,6 @@
*/
/*
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2016 Punit Vara <punitvara@gmail.com>
*
* Redistribution and use in source and binary forms, with or without
@@ -392,26 +392,42 @@ bool beagle_pwmss_is_running(unsigned int pwmss_id)
*/
bool beagle_pwm_init(BBB_PWMSS pwmss_id)
{
(void) pwmss_id;
return false;
}
bool beagle_pwm_disable(BBB_PWMSS pwmid)
{
(void) pwmid;
return false;
}
bool beagle_pwm_enable(BBB_PWMSS pwmid)
{
(void) pwmid;
return false;
}
int beagle_pwm_configure(BBB_PWMSS pwm_id, float pwm_freq, float duty_a, float duty_b)
{
(void) pwm_id;
(void) pwm_freq;
(void) duty_a;
(void) duty_b;
return -1;
}
bool beagle_pwm_pinmux_setup(bbb_pwm_pin_t pin_no, BBB_PWMSS pwm_id)
{
(void) pin_no;
(void) pwm_id;
return false;
}
bool beagle_pwmss_is_running(unsigned int pwmss_id)
{
return false;
(void) pwmss_id;
return false;
}
#endif

View File

@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
@@ -7,8 +9,6 @@
*/
/*
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2020, 2021 James Fitzsimons <james.fitzsimons@gmail.com>
*
* Redistribution and use in source and binary forms, with or without

View File

@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
@@ -7,8 +9,6 @@
*/
/*
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2020, 2021 James Fitzsimons <james.fitzsimons@gmail.com>
*
* Redistribution and use in source and binary forms, with or without

View File

@@ -46,6 +46,8 @@ void am335x_rtc_debug(void);
*/
static bool am335x_rtc_probe (int minor)
{
(void) minor;
return true;
}
@@ -103,6 +105,8 @@ static void rtc_clk_init(void)
void rtc_init(int minor)
{
(void) minor;
uint32_t a = 0x0;
rtc_clk_init();

View File

@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0+-with-RTEMS-exception */
/**
* @file
*
@@ -414,6 +416,9 @@ static rtems_status_code bsp_spi_sel_addr
int rw /* 0=write,1=read */
)
{
(void) bh;
(void) rw;
if (addr != 0)
return RTEMS_NOT_IMPLEMENTED;
@@ -430,6 +435,8 @@ static rtems_status_code bsp_spi_send_start_dummy
rtems_libi2c_bus_t *bh /* bus specifier structure */
)
{
(void) bh;
#if defined(DEBUG)
printk("bsp_spi_send_start_dummy OK\r\n");
#endif
@@ -447,6 +454,8 @@ static rtems_status_code bsp_spi_send_stop
rtems_libi2c_bus_t *bh /* bus specifier structure */
)
{
(void) bh;
#if defined(DEBUG)
printk("bsp_spi_send_stop called... ");
#endif

View File

@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/*
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (C) 2019 Chris Johns <chrisj@rtems.org>. All rights reserved.
* Copyright (C) 2015, Dutch & Dutch. All rights reserved.
*

View File

@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/*
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (C) 2019 Chris Johns <chrisj@rtems.org>. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0+-with-RTEMS-exception */
/*
* Copyright (c) 2014 Ben Gras <beng@shrike-systems.com>. All rights reserved.
*

View File

@@ -71,6 +71,8 @@ void bsp_start(void)
uint32_t bsp_fdt_map_intr(const uint32_t *intr, size_t icells)
{
(void) icells;
return intr[0];
}

View File

@@ -1,17 +1,37 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
* @brief Cogent CSB336 Timer driver
* @file
*
* @brief Cogent CSB336 Timer driver
*
* This uses timer 2 for timing measurments.
*/
/*
* Copyright (c) 2004 Cogent Computer Systems
* Written by Jay Monkman <jtm@lopingdog.com>
* Copyright (C) 2004 Cogent Computer Systems
* Written by Jay Monkman <jtm@lopingdog.com>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <rtems.h>

View File

@@ -1,14 +1,35 @@
/*
* MC9328MXL clock specific using the System Timer
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @brief MC9328MXL clock specific using the System Timer
*/
/*
* Copyright (c) 2004 by Cogent Computer Systems
* Written by Jay Monkman <jtm@lopingdog.com>
* Copyright (C) 2004 Cogent Computer Systems
* Written by Jay Monkman <jtm@lopingdog.com>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <rtems.h>
@@ -88,6 +109,8 @@ rtems_irq_connect_data clock_isr_data = {
*/
static void clock_isr_on(const rtems_irq_connect_data *unused)
{
(void) unused;
MC9328MXL_TMR1_TCTL |= MC9328MXL_TMR_TCTL_IRQEN;
MC9328MXL_AITC_INTENNUM = MC9328MXL_INT_TIMER1;
}
@@ -99,6 +122,8 @@ static void clock_isr_on(const rtems_irq_connect_data *unused)
*/
static void clock_isr_off(const rtems_irq_connect_data *unused)
{
(void) unused;
MC9328MXL_TMR1_TCTL &= ~MC9328MXL_TMR_TCTL_IRQEN;
MC9328MXL_AITC_INTDISNUM = MC9328MXL_INT_TIMER1;
}
@@ -111,6 +136,8 @@ static void clock_isr_off(const rtems_irq_connect_data *unused)
*/
static int clock_isr_is_on(const rtems_irq_connect_data *irq)
{
(void) irq;
return MC9328MXL_TMR1_TCTL & MC9328MXL_TMR_TCTL_IRQEN;
}

View File

@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0+-with-RTEMS-exception */
/*
* Console driver for MC9328XML UARTs.
*
@@ -93,6 +95,9 @@ rtems_device_driver console_initialize(
void *arg
)
{
(void) minor;
(void) arg;
rtems_status_code status;
int i;
@@ -146,7 +151,10 @@ rtems_device_driver console_close(
void * arg
)
{
return rtems_termios_close(arg);
(void) major;
(void) minor;
return rtems_termios_close(arg);
}
rtems_device_driver console_read(
@@ -155,6 +163,9 @@ rtems_device_driver console_read(
void * arg
)
{
(void) major;
(void) minor;
return rtems_termios_read(arg);
}
@@ -164,6 +175,9 @@ rtems_device_driver console_write(
void * arg
)
{
(void) major;
(void) minor;
return rtems_termios_write(arg);
}
@@ -173,6 +187,9 @@ rtems_device_driver console_control(
void * arg
)
{
(void) major;
(void) minor;
return rtems_termios_ioctl(arg);
}
@@ -220,6 +237,8 @@ static void imx_uart_init(int minor)
static int imx_uart_first_open(int major, int minor, void *arg)
{
(void) major;
rtems_libio_open_close_args_t *args = arg;
rtems_status_code status = RTEMS_SUCCESSFUL;
@@ -255,6 +274,9 @@ static int imx_uart_first_open(int major, int minor, void *arg)
static int imx_uart_last_close(int major, int minor, void *arg)
{
#if USE_INTERRUPTS
(void) major;
(void) arg;
rtems_status_code status = RTEMS_SUCCESSFUL;
imx_uart_isr_off(imx_uart_name_transmit(minor));
@@ -272,6 +294,10 @@ static int imx_uart_last_close(int major, int minor, void *arg)
&imx_uart_data[minor]
);
assert(status == RTEMS_SUCCESSFUL);
#else
(void) major;
(void) minor;
(void) arg;
#endif
return 0;

View File

@@ -1,21 +1,41 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsARMCSB336
*
* @brief Global BSP definitions.
*
* BSP CSB336 header file
*/
/*
* BSP CSB336 header file
* Copyright (C) 2004 Cogent Computer Systems
* Written by Jay Monkman <jtm@lopingdog.com>
*
* Copyright (c) 2004 Cogent Computer Systems
* Written by Jay Monkman <jtm@lopingdog.com>
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
*/
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LIBBSP_ARM_CSB336_BSP_H
#define LIBBSP_ARM_CSB336_BSP_H

View File

@@ -1,13 +1,37 @@
/*
* Motorola MC9328MXL Register definitions
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* Copyright (c) 2003 by Cogent Computer Systems
* @brief Motorola MC9328MXL Register definitions
*/
/*
* Copyright (C) 2003 Cogent Computer Systems
* Written by Jay Monkman <jtm@lopingdog.com>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __MC9328MXL_H__
#define __MC9328MXL_H__

View File

@@ -1 +1,36 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsARMCSB336
*
* @brief This header file includes the generic tm27 support implementation.
*/
/*
* Copyright (C) 2017 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <rtems/tm27-default.h>

View File

@@ -49,6 +49,9 @@ rtems_status_code bsp_interrupt_get_attributes(
rtems_interrupt_attributes *attributes
)
{
(void) vector;
(void) attributes;
return RTEMS_SUCCESSFUL;
}
@@ -57,6 +60,8 @@ rtems_status_code bsp_interrupt_is_pending(
bool *pending
)
{
(void) vector;
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
bsp_interrupt_assert(pending != NULL);
*pending = false;
@@ -65,12 +70,16 @@ rtems_status_code bsp_interrupt_is_pending(
rtems_status_code bsp_interrupt_raise(rtems_vector_number vector)
{
(void) vector;
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
return RTEMS_UNSATISFIED;
}
rtems_status_code bsp_interrupt_clear(rtems_vector_number vector)
{
(void) vector;
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
return RTEMS_UNSATISFIED;
}
@@ -80,6 +89,8 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
bool *enabled
)
{
(void) vector;
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
bsp_interrupt_assert(enabled != NULL);
*enabled = false;
@@ -111,6 +122,9 @@ rtems_status_code bsp_interrupt_set_priority(
uint32_t priority
)
{
(void) vector;
(void) priority;
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
return RTEMS_UNSATISFIED;
}
@@ -120,6 +134,9 @@ rtems_status_code bsp_interrupt_get_priority(
uint32_t *priority
)
{
(void) vector;
(void) priority;
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
bsp_interrupt_assert(priority != NULL);
return RTEMS_UNSATISFIED;

View File

@@ -1,14 +1,35 @@
/*
* Cogent CSB336 - MC9328MXL SBC startup code
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @brief Cogent CSB336 - MC9328MXL SBC startup code
*/
/*
* Copyright (c) 2004 by Cogent Computer Systems
* Copyright (C) 2004 Cogent Computer Systems
* Written by Jay Monkman <jtm@lopingdog.com>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <bsp.h>

View File

@@ -1,13 +1,37 @@
/*
* CSB336 Memory Map
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* Copyright (c) 2004 by Cogent Computer Systems
* Written by Jay Monkman <jtm@lopingdog.com>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
* @brief CSB336 Memory Map
*/
/*
* Copyright (C) 2004 Cogent Computer Systems
* Written by Jay Monkman <jtm@lopingdog.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <rtems.h>
#include <libcpu/mmu.h>

View File

@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0+-with-RTEMS-exception */
/*
* Cogent CSB336 startup code
*

View File

@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0+-with-RTEMS-exception */
/**
* @file
* @brief Cogent CSB337 Timer driver

View File

@@ -1,15 +1,36 @@
/*
* AT91RM9200 clock specific using the System Timer
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @brief AT91RM9200 clock specific using the System Timer
*/
/*
* Copyright (c) 2003 by Cogent Computer Systems
* Written by Mike Kelly <mike@cogcomp.com>
* and Jay Monkman <jtm@lopingdog.com>
* Copyright (C) 2003 Cogent Computer Systems
* Written by Mike Kelly <mike@cogcomp.com>
* and Jay Monkman <jtm@lopingdog.com>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <rtems.h>
@@ -29,6 +50,8 @@
*/
static void clock_isr_on(const rtems_irq_connect_data *unused)
{
(void) unused;
/* enable timer interrupt */
ST_REG(ST_IER) = ST_SR_PITS;
}
@@ -40,6 +63,8 @@ static void clock_isr_on(const rtems_irq_connect_data *unused)
*/
static void clock_isr_off(const rtems_irq_connect_data *unused)
{
(void) unused;
/* disable timer interrupt */
ST_REG(ST_IDR) = ST_SR_PITS;
}
@@ -52,6 +77,8 @@ static void clock_isr_off(const rtems_irq_connect_data *unused)
*/
static int clock_isr_is_on(const rtems_irq_connect_data *irq)
{
(void) irq;
/* check timer interrupt */
return ST_REG(ST_IMR) & ST_SR_PITS;
}

View File

@@ -1,17 +1,41 @@
/*
* Console driver for AT91RM9200 DBGU port
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @brief Console driver for AT91RM9200 DBGU port
*
* This driver uses the shared console driver in
* ...../libbsp/shared/console.c
*
* Copyright (c) 2003 by Cogent Computer Systems
*/
/*
* Copyright (C) 2003 Cogent Computer Systems
* Written by Mike Kelly <mike@cogcomp.com>
* and Jay Monkman <jtm@lopingdog.com>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <bsp.h>
#include <rtems/libio.h>
#include <termios.h>
@@ -58,6 +82,10 @@ const console_fns dbgu_fns =
*/
static int dbgu_first_open(int major, int minor, void *arg)
{
(void) major;
(void) minor;
(void) arg;
return 0;
}
@@ -69,6 +97,10 @@ static int dbgu_first_open(int major, int minor, void *arg)
*/
static int dbgu_last_close(int major, int minor, void *arg)
{
(void) major;
(void) minor;
(void) arg;
return 0;
}
@@ -185,6 +217,9 @@ static void dbgu_write_polled(int minor, char c)
/* This is for setting baud rate, bits, etc. */
static int dbgu_set_attributes(int minor, const struct termios *t)
{
(void) minor;
(void) t;
return 0;
}

View File

@@ -1,21 +1,44 @@
/*
* Console driver for for KIT637_V6 (CSB637)
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @brief Console driver for for KIT637_V6 (CSB637)
*
* This driver uses the shared console driver in
* ...../libbsp/shared/console.c
*
* Copyright (c) 2003 by Cogent Computer Systems
*/
/*
* Copyright (C) 2003 Cogent Computer Systems
* Written by Jay Monkman <jtm@lopingdog.com>
*
* Modified by Fernando Nicodemos <fgnicodemos@terra.com.br>
* from NCB - Sistemas Embarcados Ltda. (Brazil)
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
*
* Modified and FrameBuffer Console Device Support added by
* Joel Sherrill, 2009.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <bsp.h>

View File

@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0+-with-RTEMS-exception */
/*
* Driver for AT91RM9200 USART ports
*/
@@ -78,6 +80,9 @@ at91rm9200_usart_regs_t *usart_get_base(int minor)
*/
static int usart_first_open(int major, int minor, void *arg)
{
(void) major;
(void) arg;
at91rm9200_usart_regs_t *usart;
usart = usart_get_base(minor);
@@ -98,6 +103,9 @@ static int usart_first_open(int major, int minor, void *arg)
*/
static int usart_last_close(int major, int minor, void *arg)
{
(void) major;
(void) arg;
at91rm9200_usart_regs_t *usart;
usart = usart_get_base(minor);

View File

@@ -1,25 +1,42 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup csb337_at91rm9200
*
* @brief Atmel AT91RM9200 Register Definitions
*
* Atmel AT91RM9200 Register definitions, used in KIT637_V6 (CSB637)
*/
/*
* Atmel AT91RM9200 Register definitions, used in KIT637_V6 (CSB637)
*
* Copyright (c) 2003 by Cogent Computer Systems
* Written by Mike Kelly <mike@cogcomp.com>
*
* Modified by Fernando Nicodemos <fgnicodemos@terra.com.br>
* from NCB - Sistemas Embarcados Ltda. (Brazil)
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
*/
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __AT91RM9200_H__
#define __AT91RM9200_H__

View File

@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
@@ -7,15 +9,31 @@
*/
/*
* Atmel AT91RM9200_DBGU Register definitions
*
* Copyright (c) 2003 by Cogent Computer Systems
* Copyright (C) 2003 Cogent Computer Systems
* Written by Mike Kelly <mike@cogcomp.com>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __AT91RM9200_DBGU_H__
#define __AT91RM9200_DBGU_H__

View File

@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
@@ -7,15 +9,31 @@
*/
/*
* Atmel AT91RM9200 EMAC Register definitions
*
* Copyright (c) 2003 by Cogent Computer Systems
* Copyright (C) 2003 Cogent Computer Systems
* Written by Mike Kelly <mike@cogcomp.com>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __AT91RM9200_EMAC_H__
#define __AT91RM9200_EMAC_H__

View File

@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
@@ -7,15 +9,31 @@
*/
/*
* AT91RM9200 GPIO definitions
*
* Copyright (c) 2002 by Cogent Computer Systems
* Copyright (C) 2002 Cogent Computer Systems
* Written by Mike Kelly <mike@cogcomp.com>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef AT91RM9200_GPIO_H
#define AT91RM9200_GPIO_H

View File

@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
@@ -7,15 +9,31 @@
*/
/*
* AT91RM9200 Memory Controller definitions
*
* Copyright (c) 2002 by Cogent Computer Systems
* Copyright (C) 2002 Cogent Computer Systems
* Written by Mike Kelly <mike@cogcomp.com>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef AT91RM9200_MEM_H
#define AT91RM9200_MEM_H

View File

@@ -1,21 +1,41 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup csb337_at91rm9200
*
* @brief AT91RM9200 Power Management and Clock definitions
*
* AT91RM9200 Power Management and Clock definitions
*/
/*
* AT91RM9200 Power Management and Clock definitions
*
* Copyright (c) 2002 by Cogent Computer Systems
* Copyright (C) 2002 Cogent Computer Systems
* Written by Mike Kelly <mike@cogcomp.com>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __AT91RM9200_PMC_H__
#define __AT91RM9200_PMC_H__

View File

@@ -1,24 +1,43 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup csb337_at91rm9200
*
* @brief Atmel AT91RM9200_USART Register definitions
*
* Atmel AT91RM9200_USART Register definitions, used in KIT637_V6 (CSB637)
*/
/*
* Atmel AT91RM9200_USART Register definitions, used in KIT637_V6 (CSB637)
*
* Copyright (c) 2003 by Cogent Computer Systems
* Copyright (C) 2003 Cogent Computer Systems
* Written by Mike Kelly <mike@cogcomp.com>
*
* Modified by Fernando Nicodemos <fgnicodemos@terra.com.br>
* from NCB - Sistemas Embarcados Ltda. (Brazil)
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
*/
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __AT91RM9200_USART_H__
#define __AT91RM9200_USART_H__

View File

@@ -1,22 +1,39 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
*@file
* @file
*
*@ingroup csb337_bits
*
*@brief Contains Defined Bits.
* @ingroup csb337_bits
*
* @brief Contains bit position definitions.
*/
/*
* Bit position definitions
*
* Copyright (c) 2002 by Cogent Computer Systems
* Copyright (C) 2002 Cogent Computer Systems
* Written by Mike Kelly <mike@cogcomp.com>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __BITS_H__
#define __BITS_H__

View File

@@ -1,21 +1,41 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsARMCSB337
*
* @brief Global BSP definitions.
*
* CSB337 BSP header file
*/
/*
* CSB337 BSP header file
* Copyright (C) 2004 Cogent Computer Systems
* Written by Jay Monkman <jtm@lopingdog.com>
*
* Copyright (c) 2004 by Cogent Computer Systems
* Writtent by Jay Monkman <jtm@lopingdog.com>
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LIBBSP_ARM_CSB337_BSP_H
#define LIBBSP_ARM_CSB337_BSP_H

View File

@@ -50,6 +50,9 @@ rtems_status_code bsp_interrupt_get_attributes(
rtems_interrupt_attributes *attributes
)
{
(void) vector;
(void) attributes;
return RTEMS_SUCCESSFUL;
}
@@ -58,6 +61,8 @@ rtems_status_code bsp_interrupt_is_pending(
bool *pending
)
{
(void) vector;
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
bsp_interrupt_assert(pending != NULL);
*pending = false;
@@ -66,12 +71,16 @@ rtems_status_code bsp_interrupt_is_pending(
rtems_status_code bsp_interrupt_raise(rtems_vector_number vector)
{
(void) vector;
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
return RTEMS_UNSATISFIED;
}
rtems_status_code bsp_interrupt_clear(rtems_vector_number vector)
{
(void) vector;
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
return RTEMS_UNSATISFIED;
}
@@ -81,6 +90,8 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
bool *enabled
)
{
(void) vector;
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
bsp_interrupt_assert(enabled != NULL);
*enabled = false;
@@ -106,6 +117,9 @@ rtems_status_code bsp_interrupt_set_priority(
uint32_t priority
)
{
(void) vector;
(void) priority;
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
return RTEMS_UNSATISFIED;
}
@@ -115,6 +129,9 @@ rtems_status_code bsp_interrupt_get_priority(
uint32_t *priority
)
{
(void) vector;
(void) priority;
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
bsp_interrupt_assert(priority != NULL);
return RTEMS_UNSATISFIED;

View File

@@ -1,15 +1,37 @@
/*
* Cogent CSB337 - AT91RM9200 Startup code
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @brief Cogent CSB337 - AT91RM9200 Startup code
*/
/*
* Copyright (c) 2004 by Cogent Computer Systems
* Copyright (C) 2004 Cogent Computer Systems
* Written by Jay Monkman <jtm@lopingdog.com>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
*/
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <bsp.h>
#include <bsp/bootcard.h>
#include <at91rm9200.h>

View File

@@ -1,17 +1,39 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @brief Cogent CSB337 - AT91RM9200 Startup code
*/
/*
* Cogent CSB337 - AT91RM9200 Startup Code
* Copyright (C) 2004 Cogent Computer Systems
* Written by Jay Monkman <jtm@lopingdog.com>
* Modified by Joel Sherill
* from OAR Corporation and
* Fernando Nicodemos <fgnicodemos@terra.com.br>
* from NCB - Sistemas Embarcados Ltda. (Brazil)
*
* Copyright (c) 2004 by Cogent Computer Systems
* Written by Jay Monkman <jtm@lopingdog.com>
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Modified by Joel Sherill
* from OAR Corporation and
* Fernando Nicodemos <fgnicodemos@terra.com.br>
* from NCB - Sistemas Embarcados Ltda. (Brazil)
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <bsp.h>

View File

@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0+-with-RTEMS-exception */
/*
* CSB337 and CSB637 (KIT637_V6) Memory map
*

View File

@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0+-with-RTEMS-exception */
/*
* Atmel AT91RM9200 PMC functions
*

View File

@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0+-with-RTEMS-exception */
/*
* Cogent CSB337 startup code
*

View File

@@ -46,6 +46,9 @@
#define _INSIDE_MONLIB
#include <umon/monlib.h>
#ifdef __rtems__
#include <rtems/score/basedefs.h>
#endif /* __rtems__ */
static int (*_tfsseek)(int,int,int);
static int (*_tfsgetline)(int,char *,int);
static int (*_tfsipmod)(char *,char *,int,int);
@@ -386,6 +389,9 @@ monUnlock(void)
break;
case 2:
ignorelock--;
#ifdef __rtems__
RTEMS_FALL_THROUGH();
#endif
default:
_monunlock();
break;

View File

@@ -109,6 +109,8 @@ static int rtems_tfs_mount_me(
const void *data
)
{
(void) data;
char *root_path = strdup("/");
if (root_path == NULL) {
@@ -268,6 +270,8 @@ static int rtems_tfs_open_worker(
mode_t mode
)
{
(void) iop;
static int beenhere = 0;
long flagmode;
int tfdidx, tfd;
@@ -447,6 +451,8 @@ static int rtems_tfs_open(
mode_t mode
)
{
(void) new_name;
char *full_path_name;
int err;
@@ -611,6 +617,8 @@ static int rtems_tfs_ioctl(
void *buf
)
{
(void) iop;
int ret;
ret = mon_tfsctrl(cmd,(long)buf,0);

View File

@@ -69,6 +69,10 @@ const console_fns umoncons_fns =
*/
static int umoncons_first_open(int major, int minor, void *arg)
{
(void) major;
(void) minor;
(void) arg;
return 0;
}
@@ -80,6 +84,10 @@ static int umoncons_first_open(int major, int minor, void *arg)
*/
static int umoncons_last_close(int major, int minor, void *arg)
{
(void) major;
(void) minor;
(void) arg;
return 0;
}
@@ -92,6 +100,8 @@ static int umoncons_last_close(int major, int minor, void *arg)
*/
static int umoncons_read(int minor)
{
(void) minor;
if ( !mon_gotachar() )
return -1;
return mon_getchar();
@@ -105,6 +115,8 @@ static int umoncons_read(int minor)
*/
static ssize_t umoncons_write(int minor, const char *buf, size_t len)
{
(void) minor;
size_t i;
for ( i=0 ; i<len ; i++ )
@@ -117,18 +129,25 @@ static ssize_t umoncons_write(int minor, const char *buf, size_t len)
/* Set up the uMon driver. */
static void umoncons_init(int minor)
{
(void) minor;
rtems_umon_connect();
}
/* This is used for putchark support */
static void umoncons_write_polled(int minor, char c)
{
(void) minor;
mon_putchar( c );
}
/* This is for setting baud rate, bits, etc. */
static int umoncons_set_attributes(int minor, const struct termios *t)
{
(void) minor;
(void) t;
return 0;
}
@@ -144,6 +163,8 @@ static int umoncons_set_attributes(int minor, const struct termios *t)
*/
int umoncons_poll_read(int minor)
{
(void) minor;
if (!mon_gotachar())
return -1;
return mon_getchar();

View File

@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0+-with-RTEMS-exception */
/*
* Cirrus EP7312 Timer driver
*

View File

@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0+-with-RTEMS-exception */
/*
* Cirrus EP7312 Clock driver
*

View File

@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0+-with-RTEMS-exception */
/*
* Cirrus EP7312 Console Driver
*
@@ -63,8 +65,24 @@ console_tbl Console_Configuration_Ports[] = {
0 /* ulIntVector */
}};
static int uart_first_open(int major, int minor, void *arg) {return 0;}
static int uart_last_close(int major, int minor, void *arg) {return 0;}
static int uart_first_open(int major, int minor, void *arg)
{
(void) major;
(void) minor;
(void) arg;
return 0;
}
static int uart_last_close(int major, int minor, void *arg)
{
(void) major;
(void) minor;
(void) arg;
return 0;
}
static int uart_read(int minor)
{
return uart_poll_read(minor);
@@ -77,6 +95,9 @@ static void uart_write_polled(int minor, char c)
static int uart_set_attributes(int minor, const struct termios *t)
{
(void) minor;
(void) t;
return 0;
}

View File

@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0+-with-RTEMS-exception */
/**
* @file
* @ingroup RTEMSBSPsARMEDB7312

View File

@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0+-with-RTEMS-exception */
/**
* @file
* @ingroup edb7312_interrupt

View File

@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0+-with-RTEMS-exception */
/**
* @file
* @ingroup edb7312_registers

View File

@@ -1 +1,36 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
*
* @ingroup RTEMSBSPsARMEDB7312
*
* @brief This header file includes the generic tm27 support implementation.
*/
/*
* Copyright (C) 2017 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <rtems/tm27-default.h>

View File

@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0+-with-RTEMS-exception */
/**
* @file
*
@@ -9,7 +11,7 @@
/*
* This software is Copyright (C) 1998 by T.sqware - all rights limited
* It is provided in to the public domain "as is", can be freely modified
* as far as this copyight notice is kept unchanged, but does not imply
* as far as this copyright notice is kept unchanged, but does not imply
* an endorsement by T.sqware of the product in which it is included.
*
* Copyright (c) Canon Research France SA.]

Some files were not shown because too many files have changed in this diff Show More