diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-12-20 13:26:03 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-12-20 15:35:59 +0100 |
commit | e51bc974be8dda9098762cc7e866673ca4c35558 (patch) | |
tree | bbe3ebb171bf8d72eeefd90cca4ed15448166d21 | |
parent | ftpd01: Add network shell commands (diff) | |
download | rtems-libbsd-e51bc974be8dda9098762cc7e866673ca4c35558.tar.bz2 |
Delete rtems_bsd_initialize_with_interrupt_server
Move interrupt server initialization to nexus_probe().
-rw-r--r-- | Makefile | 1 | ||||
-rwxr-xr-x | freebsd-to-rtems.py | 1 | ||||
-rw-r--r-- | rtemsbsd/include/rtems/bsd/bsd.h | 2 | ||||
-rw-r--r-- | rtemsbsd/rtems/rtems-bsd-init-with-irq.c | 64 | ||||
-rw-r--r-- | rtemsbsd/rtems/rtems-bsd-nexus.c | 11 | ||||
-rw-r--r-- | testsuite/include/rtems/bsd/test/default-init.h | 2 | ||||
-rw-r--r-- | testsuite/include/rtems/bsd/test/default-network-init.h | 2 | ||||
-rw-r--r-- | testsuite/usb01/init.c | 2 |
8 files changed, 14 insertions, 71 deletions
@@ -62,7 +62,6 @@ LIB_C_FILES += rtemsbsd/rtems/rtems-bsd-conf.c LIB_C_FILES += rtemsbsd/rtems/rtems-bsd-delay.c LIB_C_FILES += rtemsbsd/rtems/rtems-bsd-get-file.c LIB_C_FILES += rtemsbsd/rtems/rtems-bsd-init.c -LIB_C_FILES += rtemsbsd/rtems/rtems-bsd-init-with-irq.c LIB_C_FILES += rtemsbsd/rtems/rtems-bsd-jail.c LIB_C_FILES += rtemsbsd/rtems/rtems-bsd-kern_synch.c LIB_C_FILES += rtemsbsd/rtems/rtems-bsd-lock.c diff --git a/freebsd-to-rtems.py b/freebsd-to-rtems.py index ae2ed090..c58d5835 100755 --- a/freebsd-to-rtems.py +++ b/freebsd-to-rtems.py @@ -652,7 +652,6 @@ rtems.addRTEMSSourceFiles( 'rtems/rtems-bsd-delay.c', 'rtems/rtems-bsd-get-file.c', 'rtems/rtems-bsd-init.c', - 'rtems/rtems-bsd-init-with-irq.c', 'rtems/rtems-bsd-jail.c', 'rtems/rtems-bsd-kern_synch.c', 'rtems/rtems-bsd-lock.c', diff --git a/rtemsbsd/include/rtems/bsd/bsd.h b/rtemsbsd/include/rtems/bsd/bsd.h index 5e847118..71565457 100644 --- a/rtemsbsd/include/rtems/bsd/bsd.h +++ b/rtemsbsd/include/rtems/bsd/bsd.h @@ -70,8 +70,6 @@ extern const size_t rtems_bsd_nexus_device_count; rtems_status_code rtems_bsd_initialize(void); -rtems_status_code rtems_bsd_initialize_with_interrupt_server(void); - void rtems_bsd_shell_initialize(void); #ifdef __cplusplus diff --git a/rtemsbsd/rtems/rtems-bsd-init-with-irq.c b/rtemsbsd/rtems/rtems-bsd-init-with-irq.c deleted file mode 100644 index 0f472528..00000000 --- a/rtemsbsd/rtems/rtems-bsd-init-with-irq.c +++ /dev/null @@ -1,64 +0,0 @@ -/** - * @file - * - * @ingroup rtems_bsd_rtems - * - * @brief TODO. - */ - -/* - * Copyright (c) 2009-2013 embedded brains GmbH. All rights reserved. - * - * embedded brains GmbH - * Dornierstr. 4 - * 82178 Puchheim - * Germany - * <rtems@embedded-brains.de> - * - * 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 AUTHOR 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 AUTHOR 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 <machine/rtems-bsd-kernel-space.h> -#include <machine/rtems-bsd-thread.h> - -#include <rtems/irq-extension.h> - -#include <rtems/bsd/bsd.h> - -rtems_status_code -rtems_bsd_initialize_with_interrupt_server(void) -{ - rtems_status_code sc = RTEMS_SUCCESSFUL; - - sc = rtems_interrupt_server_initialize( - BSD_TASK_PRIORITY_INTERRUPT, - BSD_MINIMUM_TASK_STACK_SIZE, - RTEMS_DEFAULT_MODES, - RTEMS_DEFAULT_ATTRIBUTES, - NULL - ); - if (sc != RTEMS_SUCCESSFUL) { - return RTEMS_UNSATISFIED; - } - - return rtems_bsd_initialize(); -} diff --git a/rtemsbsd/rtems/rtems-bsd-nexus.c b/rtemsbsd/rtems/rtems-bsd-nexus.c index 12c5f360..1c41fa51 100644 --- a/rtemsbsd/rtems/rtems-bsd-nexus.c +++ b/rtemsbsd/rtems/rtems-bsd-nexus.c @@ -38,6 +38,7 @@ */ #include <machine/rtems-bsd-kernel-space.h> +#include <machine/rtems-bsd-thread.h> #include <rtems/bsd/sys/param.h> #include <rtems/bsd/sys/types.h> @@ -62,11 +63,21 @@ static struct rman irq_rman; static int nexus_probe(device_t dev) { + rtems_status_code status; int err; size_t i; device_set_desc(dev, "RTEMS Nexus device"); + status = rtems_interrupt_server_initialize( + BSD_TASK_PRIORITY_INTERRUPT, + BSD_MINIMUM_TASK_STACK_SIZE, + RTEMS_DEFAULT_MODES, + RTEMS_DEFAULT_ATTRIBUTES, + NULL + ); + BSD_ASSERT(status == RTEMS_SUCCESSFUL); + mem_rman.rm_start = 0; mem_rman.rm_end = ~0UL; mem_rman.rm_type = RMAN_ARRAY; diff --git a/testsuite/include/rtems/bsd/test/default-init.h b/testsuite/include/rtems/bsd/test/default-init.h index 8af4477a..6734a45f 100644 --- a/testsuite/include/rtems/bsd/test/default-init.h +++ b/testsuite/include/rtems/bsd/test/default-init.h @@ -51,7 +51,7 @@ rtems_task Init( /* Let other tasks run to complete background work */ default_set_self_prio( RTEMS_MAXIMUM_PRIORITY - 1 ); - rtems_bsd_initialize_with_interrupt_server(); + rtems_bsd_initialize(); /* Let the callout timer allocate its resources */ sc = rtems_task_wake_after( 2 ); diff --git a/testsuite/include/rtems/bsd/test/default-network-init.h b/testsuite/include/rtems/bsd/test/default-network-init.h index a937d90b..0b851df0 100644 --- a/testsuite/include/rtems/bsd/test/default-network-init.h +++ b/testsuite/include/rtems/bsd/test/default-network-init.h @@ -151,7 +151,7 @@ Init(rtems_task_argument arg) /* Let other tasks run to complete background work */ default_network_set_self_prio(RTEMS_MAXIMUM_PRIORITY - 1); - rtems_bsd_initialize_with_interrupt_server(); + rtems_bsd_initialize(); /* Let the callout timer allocate its resources */ sc = rtems_task_wake_after(2); diff --git a/testsuite/usb01/init.c b/testsuite/usb01/init.c index fb054ce0..84511359 100644 --- a/testsuite/usb01/init.c +++ b/testsuite/usb01/init.c @@ -259,7 +259,7 @@ static void Init(rtems_task_argument arg) sc = rtems_media_server_initialize(200, 32 * 1024, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES); ASSERT_SC(sc); - sc = rtems_bsd_initialize_with_interrupt_server(); + sc = rtems_bsd_initialize(); ASSERT_SC(sc); rtems_bsd_shell_initialize(); |