diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-09-16 12:58:06 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-09-19 07:52:33 +0200 |
commit | 55e0be36069942e0343e406615a3b1744cf7d6b3 (patch) | |
tree | a260825ed4914c1e96683924bfaa04a00bc50e8b /c/src/lib/libbsp/arm/atsam/console/console.c | |
parent | libtests/devfs: Use printk() (diff) | |
download | rtems-55e0be36069942e0343e406615a3b1744cf7d6b3.tar.bz2 |
termios: Use IMFS nodes for new Termios devices
This makes the new Termios devices independent of device major/minor
numbers. It enables BSP independent Termios device drivers which may
reside in the cpukit domain. These drivers require an IMFS and do not
work with the device file system. However, the device file system
should go away in the future.
Diffstat (limited to 'c/src/lib/libbsp/arm/atsam/console/console.c')
-rw-r--r-- | c/src/lib/libbsp/arm/atsam/console/console.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/c/src/lib/libbsp/arm/atsam/console/console.c b/c/src/lib/libbsp/arm/atsam/console/console.c index ef75e8c7e8..ebf284b9ac 100644 --- a/c/src/lib/libbsp/arm/atsam/console/console.c +++ b/c/src/lib/libbsp/arm/atsam/console/console.c @@ -21,6 +21,8 @@ #include <chip.h> +#include <unistd.h> + typedef struct { rtems_termios_device_context base; Usart *regs; @@ -488,8 +490,6 @@ rtems_status_code console_initialize( usart[sizeof(usart) - 2] = (char) ('0' + i); rtems_termios_device_install( &usart[0], - major, - minor, &atsam_usart_handler, NULL, &atsam_usart_instances[i].base @@ -498,11 +498,9 @@ rtems_status_code console_initialize( #if ATSAM_CONSOLE_DEVICE_TYPE == 0 if (i == ATSAM_CONSOLE_DEVICE_INDEX) { atsam_usart_instances[i].console = true; - rtems_io_register_name(CONSOLE_DEVICE_NAME, major, minor); + link(&usart[0], CONSOLE_DEVICE_NAME); } #endif - - ++minor; } for (i = 0; i < RTEMS_ARRAY_SIZE(atsam_uart_instances); ++i) { @@ -511,8 +509,6 @@ rtems_status_code console_initialize( uart[sizeof(uart) - 2] = (char) ('0' + i); rtems_termios_device_install( &uart[0], - major, - minor, &atsam_uart_handler, NULL, &atsam_uart_instances[i].base @@ -521,11 +517,9 @@ rtems_status_code console_initialize( #if ATSAM_CONSOLE_DEVICE_TYPE == 1 if (i == ATSAM_CONSOLE_DEVICE_INDEX) { atsam_uart_instances[i].console = true; - rtems_io_register_name(CONSOLE_DEVICE_NAME, major, minor); + link(&usart[0], CONSOLE_DEVICE_NAME); } #endif - - ++minor; } return RTEMS_SUCCESSFUL; |