mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-14 13:15:21 +08:00
Delete rtems_bsd_initialize_with_interrupt_server
Move interrupt server initialization to nexus_probe().
This commit is contained in:
1
Makefile
1
Makefile
@@ -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
|
||||
|
@@ -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',
|
||||
|
@@ -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
|
||||
|
@@ -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();
|
||||
}
|
@@ -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;
|
||||
|
@@ -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 );
|
||||
|
@@ -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);
|
||||
|
@@ -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();
|
||||
|
Reference in New Issue
Block a user