summaryrefslogtreecommitdiffstats
path: root/cpukit/sapi/src/io.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-07 14:50:37 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-10 12:37:40 +0200
commit263f4beceae0ec5602cb41e792c25ebe3ec49c97 (patch)
tree7941a5035b4834597e9cdb855e92b4a9d8b5ac27 /cpukit/sapi/src/io.c
parentdocumentation: Clarify (diff)
downloadrtems-263f4beceae0ec5602cb41e792c25ebe3ec49c97.tar.bz2
score: Statically initialize IO manager
This simplifies the RTEMS initialization and helps to avoid a memory overhead. The workspace demands of the IO manager were not included in the <rtems/confdefs.h> workspace size estimate. This is also fixed as a side-effect. Update documentation and move "Specifying Application Defined Device Driver Table" to the section end. This sub-section is not that important for the user. Mentioning this at the beginning may lead to confusion.
Diffstat (limited to 'cpukit/sapi/src/io.c')
-rw-r--r--cpukit/sapi/src/io.c56
1 files changed, 0 insertions, 56 deletions
diff --git a/cpukit/sapi/src/io.c b/cpukit/sapi/src/io.c
index 99da902ccf..c14f5e760e 100644
--- a/cpukit/sapi/src/io.c
+++ b/cpukit/sapi/src/io.c
@@ -19,63 +19,7 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/config.h>
#include <rtems/io.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.h>
-
-#include <string.h>
-
-void _IO_Manager_initialization(void)
-{
- uint32_t index;
- rtems_driver_address_table *driver_table;
- uint32_t drivers_in_table;
- uint32_t number_of_drivers;
-
- driver_table = rtems_configuration_get_device_driver_table();
- drivers_in_table = rtems_configuration_get_number_of_device_drivers();
- number_of_drivers = rtems_configuration_get_maximum_drivers();
-
- /*
- * If the user claims there are less drivers than are actually in
- * the table, then let's just go with the table's count.
- */
- if ( number_of_drivers <= drivers_in_table )
- number_of_drivers = drivers_in_table;
-
- /*
- * If the maximum number of driver is the same as the number in the
- * table, then we do not have to copy the driver table. They can't
- * register any dynamically.
- */
- if ( number_of_drivers == drivers_in_table ) {
- _IO_Driver_address_table = driver_table;
- _IO_Number_of_drivers = number_of_drivers;
- return;
- }
-
- /*
- * The application requested extra slots in the driver table, so we
- * have to allocate a new driver table and copy theirs to it.
- */
-
- _IO_Driver_address_table = (rtems_driver_address_table *)
- _Workspace_Allocate_or_fatal_error(
- sizeof( rtems_driver_address_table ) * ( number_of_drivers )
- );
- _IO_Number_of_drivers = number_of_drivers;
-
- memset(
- _IO_Driver_address_table, 0,
- sizeof( rtems_driver_address_table ) * ( number_of_drivers )
- );
-
- for ( index = 0 ; index < drivers_in_table ; index++ )
- _IO_Driver_address_table[index] = driver_table[index];
-}
void _IO_Initialize_all_drivers( void )
{