bsp/mpc55xx: PR2077: Add BSP_DEFAULT_BAUD_RATE

This commit is contained in:
Peter Dufault
2012-10-01 15:43:22 +02:00
committed by Sebastian Huber
parent 6527d879b7
commit 52c8df84ca
4 changed files with 10 additions and 3 deletions

View File

@@ -44,6 +44,10 @@ RTEMS_BSPOPTS_SET([MPC55XX_CONSOLE_MINOR],[*],[0])
RTEMS_BSPOPTS_HELP([MPC55XX_CONSOLE_MINOR],
[determines which serial device will be registered as /dev/console])
RTEMS_BSPOPTS_SET([BSP_DEFAULT_BAUD_RATE],[*],[115200])
RTEMS_BSPOPTS_HELP([BSP_DEFAULT_BAUD_RATE],
[default console baud])
RTEMS_BSPOPTS_SET([MPC55XX_ESCI_USE_INTERRUPTS],[*],[1])
RTEMS_BSPOPTS_HELP([MPC55XX_ESCI_USE_INTERRUPTS],
[define to zero or one to disable or enable interrupts for the eSCI devices])

View File

@@ -266,7 +266,7 @@ static int mpc55xx_esci_first_open(int major, int minor, void *arg)
self->tty = tty;
rv = rtems_termios_set_initial_baud(tty, 115200);
rv = rtems_termios_set_initial_baud(tty, BSP_DEFAULT_BAUD_RATE);
if (rv != 0) {
rtems_fatal_error_occurred(0xdeadbeef);
}

View File

@@ -18,12 +18,15 @@
* http://www.rtems.com/license/LICENSE.
*/
#include <sys/cdefs.h>
#include <bsp.h>
#include <bsp/console-generic.h>
#include <rtems/console.h>
static const struct termios console_generic_termios = {
.c_cflag = CS8 | CREAD | CLOCAL | B115200
.c_cflag = CS8 | CREAD | CLOCAL | __CONCAT(B, BSP_DEFAULT_BAUD_RATE)
};
static void console_generic_char_out(char c)

View File

@@ -259,7 +259,7 @@ static int mpc55xx_linflex_first_open(int major, int minor, void *arg)
pcr.B.PA = self->tx_pa_value;
self->tx_pcr_register->R = pcr.R;
rv = rtems_termios_set_initial_baud(tty, 115200);
rv = rtems_termios_set_initial_baud(tty, BSP_DEFAULT_BAUD_RATE);
if (rv != 0) {
rtems_fatal_error_occurred(0xdeadbeef);
}