Commit Graph

28268 Commits

Author SHA1 Message Date
Ketul Shah
151e53feab Beagle: GPIO support (for BBB)
GPIO Driver Development for BeagleBone Black based on the generic GPIO API
2015-08-18 17:05:55 +02:00
Andre Marques
b09a578e8a Closes ticket #2390, and also updates the RPI implementation.
makes rtems_gpio_bsp_get_value return uint32_t.  Motivation: simplify
beagle gpio implementation for common gpio apio.
2015-08-18 02:26:48 +02:00
Andre Marques
61e7c698a4 Raspberry Pi implementation for the RTEMS GPIO API.
Added support for the new RTEMS GPIO API functions.

Test cases can be found in https://github.com/asuol/RTEMS_rpi_testing/tree/master/GPIO
2015-08-06 10:53:46 -04:00
Andre Marques
87f8b01f58 RTEMS GPIO API definition and implementation.
Changes relative to the previous patch set:

- Moved GPIO pin interrupts to rtems chains, instead of a local linked list;
- Restructured the pin tracking structure, separating the interrupt information for each pin meaning that a pin without any interrupt enabled only requires 8 bytes, while keeping interrupt information (handling information, handler chain control, ...) requires 24 additional bytes (total of 32 bytes per pin with interrupts enabled);
-  Added support for 'parallel' pin function assignment, allowing the function assignment to be set for multiple pins in a single GPIO hardware call. If a BSP does not support this feature it becomes a sequence of individual calls per pin. Also added support for GPIO pin groupings, allowing to write and read byte data to a series of pins which behave as a single entity;
- Added bank tracking structure to maintain the bank lock and bank level interrupt information (threaded/normal handling, interrupt counter);
- Changed GPIO settings to BSP defined constants, reducing dynamic memory allocation;
- Switched interrupt tasks for a rtems interrupt server, with the possibility of using normal interrupts (user handlers being called within ISR context).
2015-08-06 10:53:37 -04:00
Nick Withers
040ddd23b5 Respect 2^32 - 1 B NFSv2 maximum file size
closes #2384
2015-08-06 10:49:37 -04:00
Joel Sherrill
add0e494ef user/c_user.texi: Correct info index entry
closes #2380.
2015-08-03 09:34:40 -07:00
Joel Sherrill
d138a22b54 ada-tests/support/init.c: Fix compile errors and warnings
closes #2379.
2015-08-02 08:31:09 -07:00
Jan Sommer
7e798b4758 Add __synch_synchronize function for arm
Fixes link failure when linking Ada programs on the raspberry pi
2015-08-01 10:19:40 -07:00
Nick Withers
f8cf567095 ampolish3: Use env to find perl more reliably
Fixes breakage on at least FreeBSD.

closes #2379.
2015-08-01 09:58:56 -07:00
Sebastian Huber
d0733bb871 bsps/arm: Do not use __ARM_ARCH_7A__
This would lead to link-time errors in case less specialized compiler
machine options are used, e.g. to run the GCC test suite.
2015-07-31 09:58:48 +02:00
Sebastian Huber
9e9e61d27d score: Add self-contained condition implementation 2015-07-30 09:11:18 +02:00
Sebastian Huber
a1b4af4bba score: Add scheduler <sys/lock.h> support 2015-07-30 09:11:18 +02:00
Sebastian Huber
40188718f2 score: Add self-contained futex implementation 2015-07-30 09:11:18 +02:00
Sebastian Huber
7237b3e076 score: Add self-contained semaphore implementation 2015-07-30 09:11:18 +02:00
Sebastian Huber
214d8edd18 score: Add self-contained mutex implementation
This mutex implementation uses a thread priority queue with a simple
priority inheritance mechanism (similar to the object based mutexes).
The storage space must be supplied by the user (16 bytes on 32-bit
targets).
2015-07-30 09:11:18 +02:00
Sebastian Huber
12f93fbb13 score: Add thread queue for self-contained objects 2015-07-30 09:11:17 +02:00
Sebastian Huber
0e3c59d65c score: Use a plain ticket lock for thread locks
This enables external libraries to use thread locks since they are
independent of the actual RTEMS build configuration, e.g. profiling
enabled or disabled.
2015-07-30 09:11:13 +02:00
Sebastian Huber
10e32a2634 score: Add potpourri lock statistics
These SMP lock statistics are used for all lock objects that lack a
storage space for the statistics.  Examples are lock objects used in
external libraries which are independent of the actual RTEMS build
configuration.
2015-07-30 08:06:01 +02:00
Sebastian Huber
e421936bbb score: Provide struct _Thread_queue_Heads
Use a leading underscore in the structure name to allow forward
declarations in standard header files provided by Newlib and GCC.
2015-07-30 08:06:01 +02:00
Sebastian Huber
48274706a7 score: Rename struct Thread_Control
Add a leading underscore to the structure name to allow forward
declarations in standard header files provided by Newlib and GCC.
2015-07-30 08:06:00 +02:00
Michael Davidsaver
74ef2c101a tftpDriver: close() false error
closes #2376.
2015-07-29 10:56:14 -05:00
Sebastian Huber
21789a2117 score: Rename _POSIX_Absolute_timeout_to_ticks()
Rename _POSIX_Absolute_timeout_to_ticks() to
_TOD_Absolute_timeout_to_ticks() and move it to the score directory.
Delete empty <rtems/posix/time.h>.
2015-07-28 14:54:51 +02:00
Sebastian Huber
f7d95581c8 m68k: Include proper header file 2015-07-24 10:47:25 +02:00
Sebastian Huber
9c53910190 score: Add comment 2015-07-24 09:13:31 +02:00
Sebastian Huber
9780fa937c monitor: Sort alphabetically 2015-07-24 09:09:18 +02:00
Sebastian Huber
d70f530842 monitor: Add current CPU of thread 2015-07-24 09:09:18 +02:00
Sebastian Huber
0910e9d438 monitor: Print the wait queue to ease debugging 2015-07-24 09:09:18 +02:00
Sebastian Huber
1f199799b2 monitor: Print addresses like identifiers
This avoids the "0x0xabc" output and is more compact.
2015-07-24 09:09:18 +02:00
Sebastian Huber
975e19187d monitor: Remove notepad support 2015-07-24 09:09:18 +02:00
Sebastian Huber
98a41f419c arm: Include proper header file 2015-07-23 20:34:19 +02:00
Sebastian Huber
08135c85d8 i2c: Fix return status of i2c dev read/write 2015-07-23 09:00:31 +02:00
Sebastian Huber
19078dc6e6 doc: Add SMP section to CPU Arch Supplement 2015-07-23 08:36:30 +02:00
Sebastian Huber
e709aa8522 score: Move wait flag update to tq extract
This makes it possible to use _Thread_queue_Extract_locked() for barrier
operations which extract all threads on the queue in one critical
section.
2015-07-23 08:01:14 +02:00
Sebastian Huber
d7665823b2 score: Introduce Thread_queue_Heads
Move the storage for the thread queue heads to the threads.  Each thread
provides a set of thread queue heads allocated from a dedicated memory
pool.  In case a thread blocks on a queue, then it lends its heads to
the queue.  In case the thread unblocks, then it takes a free set of
threads from the queue.  Since a thread can block on at most one queue
this works.  This mechanism is used in FreeBSD.  The motivation for this
change is to reduce the memory demands of the synchronization objects.
On a 32-bit uni-processor configuration the Thread_queue_Control size is
now 8 bytes, compared to 64 bytes in RTEMS 4.10 (other changes reduced
the size as well).
2015-07-23 08:01:13 +02:00
Sebastian Huber
e273501233 score: Introduce Thread_queue_Queue
Separate the thread queue heads and lock from the operations.  This
enables the support for light weight objects which only support one
queuing discipline.
2015-07-23 08:00:19 +02:00
Sebastian Huber
579f16efd7 bsps/arm: Update due to API changes 2015-07-21 09:29:56 +02:00
Premysl Houdek
b2c252b5ca bsp/tms570 Use bitfields instead of hard-coded values
Signed-off-by: Premysl Houdek <kom541000@gmail.com>
2015-07-20 20:45:40 +10:00
Premysl Houdek
d6c67ad526 bsp/tms570: skipped 32bit field definitions and corrected single bit fields
there is no need to define access macros for field covering
whole registers. In addition, BSP_FLD32 does not work right
for field 32bit length.

Signed-off-by: Premysl Houdek <kom541000@gmail.com>
2015-07-20 20:45:26 +10:00
Joel Sherrill
3f923fd22e Update date 2015-07-17 09:42:35 -05:00
Sebastian Huber
9154c3f99a doc: Add thread dispatch details for SMP 2015-07-17 11:57:38 +02:00
Sebastian Huber
3bb342ca92 doc: Clarify interrupts disable problems on SMP 2015-07-17 11:57:08 +02:00
Sebastian Huber
b56ddbbd84 doc: Fix SMP task variables section 2015-07-17 09:21:46 +02:00
Sebastian Huber
e5a79e54d9 bsp/mpc83xx: Update due to header guard change
Close #2373.
2015-07-17 07:59:35 +02:00
Joel Sherrill
db01d0cc61 sparc64/rtems/score/cpu.h: Delete dead declaration 2015-07-16 11:15:53 -07:00
Joel Sherrill
7e14385b46 sh/shared/startup/bspstart.c: Add include of percpu.h 2015-07-16 11:15:52 -07:00
Premysl Houdek
069560a5f9 bsp/tms570: source changes reflecting new headers.
Signed-off-by: Premysl Houdek <kom541000@gmail.com>
2015-07-16 11:15:52 -07:00
Pavel Pisa
602e395b4d bsp/tms570: fix get time resolution after infrastructure change to timecounter.
The update fixes breakage of TMS570 support after Alexander Krutwig
switch of RTEMS time read to timecounter mechanism

bsps: Convert clock drivers to use a timecounter

Mechanism to specify odd (non 1 Mhz) time base update frequencies
implemented after objections of  Martin Galvan.

Code is adjusted to convert RTEMS configuration parameter
microseconds_per_tick to such odd base if
TMS570_PREFERRED_TC_FREQUENCY is specified appropriately.

Signed-off-by: Premysl Houdek <kom541000@gmail.com>
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
2015-07-16 09:31:09 -07:00
Premysl Houdek
bea49c9477 bsp/tms570: New/generated header files for TMS570 SoC peripherals registers.
The header files are generated by script make_header.py.
Current script's version can be found at:

https://github.com/AoLaD/rtems-tms570-utils/tree/headers/headers/python

Registers offsets and fields have been extracted from reference manual.

Signed-off-by: Premysl Houdek <kom541000@gmail.com>
2015-07-16 09:31:09 -07:00
Joel Sherrill
4784214a6a remaining bsp.h: Fix by hand to LIBBSP_@CPU@_@BSP_FAMILY@_BSP_H
These files were left after running the script in the previous patch.
2015-07-16 08:43:51 -07:00
Joel Sherrill
9cff822a26 Most bsp.h: Switch to LIBBSP_@CPU@_@BSP_FAMILY@_H for guard
This was done by the following script run from libbsp:

find * -name bsp.h | xargs -e grep -l "#ifndef.*_BSP_H" | while read b
do
  echo $b
  cpu=`echo $b | cut -d'/' -f1 | tr '[:lower:]' '[:upper:]' `
  bsp=`echo $b | cut -d'/' -f2 | tr '[:lower:]' '[:upper:]' `
  g="LIBBSP_${cpu}_${bsp}_BSP_H"
  # echo $g
  sed -e "s/ifndef _BSP_H/ifndef ${g}/" \
      -e "s/define _BSP_H/define ${g}/" \
  -i $b

done
2015-07-16 08:40:05 -07:00