Re: I2C Driver Support

2016-04-19 Thread Chris Johns
On 20/04/2016 15:58, Sebastian Huber wrote: for I2C drivers we have basically the same problem as for the console drivers. Thank you for raising this. In time the old vs the new network stack will need the same review. Three I2C driver variants exist * no framework drivers, * libi2c driver

Re: BSP Console support (was Re: [PATCH] arm: mx6ulevk: Initial BSP support for i.MX 6UltraLite EVK board.)

2016-04-19 Thread Chris Johns
On 20/04/2016 16:01, Sebastian Huber wrote: Actually, there is something like a migration plan here: This is the reason to change, I do not see it as a plan that scopes the work and defines the effort needed. :) https://docs.rtems.org/doc-current/share/rtems/html/bsp_howto/Console-Driver-B

Re: BSP Console support (was Re: [PATCH] arm: mx6ulevk: Initial BSP support for i.MX 6UltraLite EVK board.)

2016-04-19 Thread Chris Johns
On 20/04/2016 15:50, Sebastian Huber wrote: Hello Chris, On 20/04/16 01:24, Chris Johns wrote: On 19/04/2016 19:31, Sebastian Huber wrote: Please don't use this console driver framework. Use rtems_termios_device_handler instead. I am not on board with saying we do this and I have a few reaso

Re: BSP Console support (was Re: [PATCH] arm: mx6ulevk: Initial BSP support for i.MX 6UltraLite EVK board.)

2016-04-19 Thread Sebastian Huber
On 20/04/16 07:50, Sebastian Huber wrote: Once a change like this is accepted into the project the project becomes responsible for updating any dependent BSPs. History shows this does not happen and that is understandable, the RTEMS Project has no direct funding to do this work and expectin

I2C Driver Support

2016-04-19 Thread Sebastian Huber
Hello, for I2C drivers we have basically the same problem as for the console drivers. Three I2C driver variants exist * no framework drivers, * libi2c drivers, and * drivers using the Linux compatible API (all new BSPs should use this framework). -- Sebastian Huber, embedded brains GmbH Ad

Re: BSP Console support (was Re: [PATCH] arm: mx6ulevk: Initial BSP support for i.MX 6UltraLite EVK board.)

2016-04-19 Thread Sebastian Huber
Hello Chris, On 20/04/16 01:24, Chris Johns wrote: On 19/04/2016 19:31, Sebastian Huber wrote: Please don't use this console driver framework. Use rtems_termios_device_handler instead. I am not on board with saying we do this and I have a few reasons which I would like to present and discuss

Re: [PATCH] arm: mx6ulevk: Initial BSP support for i.MX 6UltraLite EVK board.

2016-04-19 Thread Peng Fan
Thanks Joel and Gedare for the comments. For "Did you "clone and own" anything from another BSP? " If you are asking me to add the copyright back, I'll check to avoid discarding the copyrights. Thanks, Peng. 2016-04-19 23:47 GMT+08:00 Joel Sherrill : > > > On Tue, Apr 19, 2016 at 10:41 AM, Geda

BSP Console support (was Re: [PATCH] arm: mx6ulevk: Initial BSP support for i.MX 6UltraLite EVK board.)

2016-04-19 Thread Chris Johns
On 19/04/2016 19:31, Sebastian Huber wrote: Please don't use this console driver framework. Use rtems_termios_device_handler instead. I am not on board with saying we do this and I have a few reasons which I would like to present and discuss. The console support in BSPs is a mess and in gene

Re: [PATCH 13/20] score: Introduce _Thread_queue_Flush_critical()

2016-04-19 Thread Gedare Bloom
On Tue, Apr 19, 2016 at 9:12 AM, Sebastian Huber wrote: > Replace _Thread_queue_Flush() with _Thread_queue_Flush_critical() and > add a filter function for customization of the thread queue flush > operation. > > Update #2555. > --- > cpukit/rtems/src/semdelete.c | 2 +- >

Re: [PATCH] arm: mx6ulevk: Initial BSP support for i.MX 6UltraLite EVK board.

2016-04-19 Thread Joel Sherrill
On Tue, Apr 19, 2016 at 10:41 AM, Gedare Bloom wrote: > On Tue, Apr 19, 2016 at 9:59 AM, Joel Sherrill wrote: > > A few quick things. > > > > Add a bspimpl.h which is private to the bsp. Do not put anything in bsp.h > > which > > does not need to be public to the application. We have been exceed

Re: [PATCH] arm: mx6ulevk: Initial BSP support for i.MX 6UltraLite EVK board.

2016-04-19 Thread Gedare Bloom
On Tue, Apr 19, 2016 at 9:59 AM, Joel Sherrill wrote: > A few quick things. > > Add a bspimpl.h which is private to the bsp. Do not put anything in bsp.h > which > does not need to be public to the application. We have been exceedingly > uncaring about this in the past and the software tax to corr

Re: [PATCH] arm: mx6ulevk: Initial BSP support for i.MX 6UltraLite EVK board.

2016-04-19 Thread Joel Sherrill
A few quick things. Add a bspimpl.h which is private to the bsp. Do not put anything in bsp.h which does not need to be public to the application. We have been exceedingly uncaring about this in the past and the software tax to correct it is going to be painful. In general, the bsp.h probably does

Re: [PATCH] arm: mx6ulevk: Initial BSP support for i.MX 6UltraLite EVK board.

2016-04-19 Thread Peng Fan
Hi Sebastian 2016-04-19 17:31 GMT+08:00 Sebastian Huber < sebastian.hu...@embedded-brains.de>: > > > On 19/04/16 11:11, Peng Fan wrote: > >> +const console_fns imx_uart_fns = { >> >+ .deviceProbe = libchip_serial_default_probe, >> >+ .deviceFirstOpen = imx_uart_first_open, >> >+ .deviceLastClo

[PATCH 11/20] score: Add and use _CORE_mutex_Acquire_critical()

2016-04-19 Thread Sebastian Huber
Add and use _CORE_mutex_Release(). --- cpukit/score/include/rtems/score/coremuteximpl.h | 32 ++-- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/cpukit/score/include/rtems/score/coremuteximpl.h b/cpukit/score/include/rtems/score/coremuteximpl.h index e423d84..

[PATCH 08/20] score: Remove id parameter _CORE_mutex_Seize()

2016-04-19 Thread Sebastian Huber
Parameter was unused. --- cpukit/libnetworking/rtems/rtems_glue.c | 1 - cpukit/posix/src/mutexlocksupp.c | 1 - cpukit/rtems/src/semobtain.c | 1 - cpukit/score/include/rtems/score/coremuteximpl.h | 8 ++-- cpukit/score/src/apimutexlock.c

[PATCH 20/20] score: Rename _CORE_RWLock_Obtain()

2016-04-19 Thread Sebastian Huber
Rename _CORE_RWLock_Obtain_for_reading() into _CORE_RWLock_Seize_for_reading(). Rename _CORE_RWLock_Obtain_for_writing() into _CORE_RWLock_Seize_for_writing(). Rename _CORE_RWLock_Release() into _CORE_RWLock_Surrender(). This avoids confusion with the ISR lock acquire and release. --- cpukit/pos

[PATCH 09/20] posix: _POSIX_Condition_variables_Wait_support()

2016-04-19 Thread Sebastian Huber
Simplify _POSIX_Condition_variables_Wait_support(), since there is no need to validate the mutex twice. --- cpukit/posix/src/condwaitsupp.c | 18 +- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/cpukit/posix/src/condwaitsupp.c b/cpukit/posix/src/condwaitsupp.c inde

[PATCH 19/20] score: Rename _CORE_barrier_Wait()

2016-04-19 Thread Sebastian Huber
Rename _CORE_barrier_Wait() into _CORE_barrier_Seize(). Rename _CORE_barrier_Release() into _CORE_barrier_Surrender(). This avoids confusion with the ISR lock acquire and release. --- cpukit/posix/src/pbarrierwait.c| 2 +- cpukit/rtems/src/barrierrelease.c |

[PATCH 12/20] posix: Avoid Giant lock for mutexes

2016-04-19 Thread Sebastian Huber
Delete _POSIX_Mutex_Get(). Use _POSIX_Mutex_Get_interrupt_disable() instead. Update #2555. --- cpukit/posix/include/rtems/posix/muteximpl.h | 14 --- cpukit/posix/src/mutexdestroy.c | 56 +++- cpukit/posix/src/mutexget.c | 24 +---

[PATCH 13/20] score: Introduce _Thread_queue_Flush_critical()

2016-04-19 Thread Sebastian Huber
Replace _Thread_queue_Flush() with _Thread_queue_Flush_critical() and add a filter function for customization of the thread queue flush operation. Update #2555. --- cpukit/rtems/src/semdelete.c | 2 +- cpukit/rtems/src/semflush.c| 2 +- cpukit/score

[PATCH 18/20] score: Rename _MRSP_Obtain()

2016-04-19 Thread Sebastian Huber
Rename _MRSP_Obtain() into _MRSP_Seize(). Rename _MRSP_Release() into _MRSP_Surrender(). This avoids confusion with the ISR lock acquire and release. --- cpukit/rtems/src/semobtain.c| 2 +- cpukit/rtems/src/semrelease.c | 2 +- cpukit/score/include/rtems/score/mrspi

[PATCH 16/20] score: Optimize _Objects_Get_no_protection()

2016-04-19 Thread Sebastian Huber
Make the id the first parameter since usual callers get the object identifier as the first parameter themself. --- cpukit/posix/include/rtems/posix/keyimpl.h| 2 +- cpukit/rtems/include/rtems/rtems/regionimpl.h | 2 +- cpukit/sapi/include/rtems/extensionimpl.h | 2 +- cpukit/score/include/

[PATCH 07/20] score: Close semaphore object before flush

2016-04-19 Thread Sebastian Huber
This prevents use of the object after the flush on uni-processor configurations. --- cpukit/rtems/src/semdelete.c| 55 + cpukit/score/include/rtems/score/mrspimpl.h | 9 +++-- 2 files changed, 38 insertions(+), 26 deletions(-) diff --git a/cpukit/rtems

[PATCH 14/20] score: Simplify _Objects_Initialize_information()

2016-04-19 Thread Sebastian Huber
Remove unused supports_global parameter. Convert _Objects_Initialize_information() to a macro to avoid use of RTEMS_MULTIPROCESSING define for each caller. --- cpukit/posix/src/cond.c| 6 +-- cpukit/posix/src/key.c | 6 +-- cpukit/posix/src/mqueue

[PATCH 10/20] posix: Simplify _POSIX_Mutex_Get_interrupt_disable

2016-04-19 Thread Sebastian Huber
Remove superfluous location parameter. --- cpukit/posix/include/rtems/posix/muteximpl.h | 14 +++--- cpukit/posix/src/mutexget.c | 13 +++--- cpukit/posix/src/mutexlocksupp.c | 67 +--- cpukit/posix/src/mutexsetprioceiling.c | 55 -

[PATCH 01/20] score: Delete unused CORE_RWLock_Attributes

2016-04-19 Thread Sebastian Huber
--- cpukit/posix/src/prwlockinit.c| 10 +- cpukit/score/include/rtems/score/corerwlock.h | 14 -- cpukit/score/include/rtems/score/corerwlockimpl.h | 16 +--- cpukit/score/src/corerwlock.c | 8 +--- 4 files changed, 3

[PATCH 03/20] score: Simplify _CORE_message_queue_Close()

2016-04-19 Thread Sebastian Huber
Drop status parameter since each caller used CORE_MESSAGE_QUEUE_STATUS_WAS_DELETED. Remove superfluous _CORE_message_queue_Flush(). --- cpukit/posix/src/mqueuedeletesupp.c| 1 - cpukit/rtems/src/msgqdelete.c | 1 - cpukit/score/include/rtems/score/coremsgimpl.h | 11

[PATCH 17/20] score: Optimize _Objects_Get_local()

2016-04-19 Thread Sebastian Huber
Make the id the first parameter since usual callers get the object identifier as the first parameter themself. --- cpukit/posix/include/rtems/posix/spinlockimpl.h | 2 +- cpukit/posix/include/rtems/posix/timerimpl.h| 2 +- cpukit/rtems/include/rtems/rtems/ratemonimpl.h | 2 +- cpukit/rtems/in

[PATCH 04/20] score: Simplify _CORE_barrier_Flush()

2016-04-19 Thread Sebastian Huber
--- cpukit/rtems/src/barrierdelete.c | 8 +--- cpukit/score/include/rtems/score/corebarrierimpl.h | 3 +-- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/cpukit/rtems/src/barrierdelete.c b/cpukit/rtems/src/barrierdelete.c index 9ddfe01..7dab0c0 100644 --- a/cp

[PATCH 06/20] score: Fix _CORE_semaphore_Flush()

2016-04-19 Thread Sebastian Huber
Use proper CORE_semaphore_Status for _CORE_semaphore_Flush() and _CORE_semaphore_Destroy() operations. Close #2696. --- cpukit/posix/include/rtems/posix/semaphoreimpl.h | 1 - cpukit/posix/src/semaphorecreatesupp.c | 12 +++--- cpukit/posix/src/semaphoredeletesupp.c | 2 +-

[PATCH 15/20] score: Simplify _Objects_Get_next()

2016-04-19 Thread Sebastian Huber
Remove unused location parameter. --- cpukit/libcsupport/src/resource_snapshot.c| 4 +--- cpukit/libmisc/monitor/mon-manager.c | 3 +-- cpukit/score/include/rtems/score/objectimpl.h | 12 ++-- cpukit/score/src/objectgetnext.c | 15 --- testsuites/spt

[PATCH 05/20] score: Close barrier object before flush

2016-04-19 Thread Sebastian Huber
This prevents use of the object after the flush on uni-processor configurations. --- cpukit/rtems/src/barrierdelete.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpukit/rtems/src/barrierdelete.c b/cpukit/rtems/src/barrierdelete.c index 7dab0c0..5d87e63 100644 --- a/cpukit/r

[PATCH 02/20] score: Simplify _CORE_message_queue_Do_close()

2016-04-19 Thread Sebastian Huber
Remove superfluous _CORE_message_queue_Flush() since we completely re-initialize the structure in _CORE_message_queue_Initialize(). --- cpukit/score/src/coremsgclose.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/cpukit/score/src/coremsgclose.c b/cpukit/score/src/coremsgclose.c

[PATCH v2] [libatomic] Add RTEMS support

2016-04-19 Thread Sebastian Huber
v2: Do not use architecture configuration due to broken ARM libatomic support. gcc/ * config/rtems.h (LIB_SPEC): Add -latomic. libatomic/ * configure.tgt (*-*-rtems*): New supported target. * config/rtems/host-config.h: New file. * config/rtems/lock.c: Likewise.

Re: [PATCH] arm: mx6ulevk: Initial BSP support for i.MX 6UltraLite EVK board.

2016-04-19 Thread Sebastian Huber
On 19/04/16 11:11, Peng Fan wrote: +const console_fns imx_uart_fns = { >+ .deviceProbe = libchip_serial_default_probe, >+ .deviceFirstOpen = imx_uart_first_open, >+ .deviceLastClose = imx_uart_last_close, >+ .deviceRead = imx_uart_read_polled, >+ .deviceWrite = imx_uart_write_support_polle

Re: [PATCH] arm: mx6ulevk: Initial BSP support for i.MX 6UltraLite EVK board.

2016-04-19 Thread Peng Fan
Hi Gedare, Joel, Kindly ask, Do you any comments on this patch? Thanks, Peng. On Thu, Apr 14, 2016 at 05:49:43PM +0800, Peng Fan wrote: >Initial BSP support for i.MX 6UltraLite EVK board. >Add uart driver >Add gpt driver to service tick function > >The i.MX 6UltraLite is a high performance, ultr

[PATCH v2] Add RTEMS support for GCC libatomic

2016-04-19 Thread Sebastian Huber
Signed-off-by: Sebastian Huber --- newlib/libc/sys/rtems/crt0.c | 9 - newlib/libc/sys/rtems/include/machine/_libatomic.h | 46 ++ 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 newlib/libc/sys/rtems/include/machine/_libatomic.h

Re: [PATCH] Add RTEMS support for GCC libatomic

2016-04-19 Thread Sebastian Huber
Sorry, I forgot to add the symbols to crt0.c. I will send a v2 soon. -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.hu...@embedded-brains.de PGP : Public key available

[PATCH] score: Add libatomic support

2016-04-19 Thread Sebastian Huber
Close #2695. --- cpukit/score/Makefile.am| 1 + cpukit/score/cpu/sparc/Makefile.am | 1 - cpukit/score/cpu/sparc/sparcv8-atomic.c | 211 cpukit/score/src/libatomic.c| 79 4 files changed, 80 insertions(+), 212 dele

[PATCH] Add RTEMS support for GCC libatomic

2016-04-19 Thread Sebastian Huber
Signed-off-by: Sebastian Huber --- newlib/libc/sys/rtems/include/machine/_libatomic.h | 46 ++ 1 file changed, 46 insertions(+) create mode 100644 newlib/libc/sys/rtems/include/machine/_libatomic.h diff --git a/newlib/libc/sys/rtems/include/machine/_libatomic.h b/newlib/lib

[PATCH] [libatomic] Add RTEMS support

2016-04-19 Thread Sebastian Huber
gcc/ * config/rtems.h (LIB_SPEC): Add -latomic. libatomic/ * configure.tgt (*-*-rtems*): New supported target. * config/rtems/host-config.h: New file. * config/rtems/lock.c: Likewise. --- gcc/config/rtems.h | 2 +- libatomic/config/rtems/host-c