summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Dufault <dufault@hda.com>2021-04-27 13:48:46 -0400
committerVijay Kumar Banerjee <vijay@rtems.org>2021-04-27 16:46:48 -0600
commit9c13e528a003028af27365b6894af85836d804a1 (patch)
treef1ec6b8ab12805fa4c8091ec00c4b30b676453a4
parentReturn status code for _Thread_Start() (diff)
downloadrtems-9c13e528a003028af27365b6894af85836d804a1.tar.bz2
powerpc/shared/console: Make console baud rate configurable.
The "powerpc/shared/console" code has the start-up console value fixed at 9600 baud. This changes the hard-wired constant "9600" in the code to the configuration setting "BSP_CONSOLE_BAUD" and adds configuration support in both the "waf" and the legacy configuration systems. Note that the VME BSPs beatnik, mvme3100, and mve5100 can be improved by adding a "mvmexxxx" BSP family. This configuration change, as well as future configuration changes, could then be made in a "grp.yml" file.
-rw-r--r--bsps/powerpc/shared/console/console.c4
-rw-r--r--bsps/powerpc/shared/console/uart.c2
-rw-r--r--c/src/lib/libbsp/powerpc/beatnik/configure.ac4
-rw-r--r--c/src/lib/libbsp/powerpc/haleakala/configure.ac4
-rw-r--r--c/src/lib/libbsp/powerpc/motorola_powerpc/configure.ac4
-rw-r--r--c/src/lib/libbsp/powerpc/mvme3100/configure.ac4
-rw-r--r--c/src/lib/libbsp/powerpc/mvme5500/configure.ac4
-rw-r--r--spec/build/bsps/optconsolebaud.yml5
-rw-r--r--spec/build/bsps/powerpc/beatnik/bspbeatnik.yml2
-rw-r--r--spec/build/bsps/powerpc/haleakala/bsphaleakala.yml2
-rw-r--r--spec/build/bsps/powerpc/motorola_powerpc/obj.yml4
-rw-r--r--spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml2
-rw-r--r--spec/build/bsps/powerpc/mvme5500/bspmvme5500.yml2
13 files changed, 39 insertions, 4 deletions
diff --git a/bsps/powerpc/shared/console/console.c b/bsps/powerpc/shared/console/console.c
index f275683cc2..f6c802135a 100644
--- a/bsps/powerpc/shared/console/console.c
+++ b/bsps/powerpc/shared/console/console.c
@@ -153,8 +153,8 @@ static int console_first_open(int major, int minor, void *arg)
/* must not open a minor device we have no ISR for */
assert( minor>=0 && minor < sizeof(ttyS)/sizeof(ttyS[0]) && ttyS[minor].isr );
- /* 9600-8-N-1 */
- BSP_uart_init(minor, 9600, 0);
+ /* BSP_CONSOLE_BAUD-8-N-1 */
+ BSP_uart_init(minor, BSP_CONSOLE_BAUD, 0);
status = BSP_uart_install_isr(minor, ttyS[minor].isr);
if (!status) {
printk("Error installing serial console interrupt handler for '%s'!\n",
diff --git a/bsps/powerpc/shared/console/uart.c b/bsps/powerpc/shared/console/uart.c
index 62212b98db..41db52f8ff 100644
--- a/bsps/powerpc/shared/console/uart.c
+++ b/bsps/powerpc/shared/console/uart.c
@@ -160,7 +160,7 @@ BSP_uart_init(int uart, int baud, int hwFlow)
if ( (int)BSPBaseBaud <= 0 ) {
/* Use current divisor assuming BSPBaseBaud gives us the current speed */
- BSPBaseBaud = BSPBaseBaud ? -BSPBaseBaud : 9600;
+ BSPBaseBaud = BSPBaseBaud ? -BSPBaseBaud : BSP_CONSOLE_BAUD;
BSPBaseBaud *= ((uread(uart, DLM) << 8) | uread(uart, DLL));
}
diff --git a/c/src/lib/libbsp/powerpc/beatnik/configure.ac b/c/src/lib/libbsp/powerpc/beatnik/configure.ac
index b332aaaffc..584072d002 100644
--- a/c/src/lib/libbsp/powerpc/beatnik/configure.ac
+++ b/c/src/lib/libbsp/powerpc/beatnik/configure.ac
@@ -34,6 +34,10 @@ Note that the policy can still be defined by the application
CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK this feature is removed
and a little memory is saved.])
+RTEMS_BSPOPTS_SET([BSP_CONSOLE_BAUD],[*],[9600])
+RTEMS_BSPOPTS_HELP([BSP_CONSOLE_BAUD],
+[default console baud])
+
AC_DEFINE(__ppc_generic, 1, [PowerPC model option])
# Explicitly list all Makefiles here
diff --git a/c/src/lib/libbsp/powerpc/haleakala/configure.ac b/c/src/lib/libbsp/powerpc/haleakala/configure.ac
index cf3a552939..627625b95c 100644
--- a/c/src/lib/libbsp/powerpc/haleakala/configure.ac
+++ b/c/src/lib/libbsp/powerpc/haleakala/configure.ac
@@ -25,6 +25,10 @@ RTEMS_BSPOPTS_HELP([PPC_VECTOR_FILE_BASE],
[This defines the base address of the exception table.
NOTE: Vectors are actually at 0xFFF00000 but file starts at offset.])
+RTEMS_BSPOPTS_SET([BSP_CONSOLE_BAUD],[*],[9600])
+RTEMS_BSPOPTS_HELP([BSP_CONSOLE_BAUD],
+[default console baud])
+
AC_DEFINE(ppc405, 1, [PowerPC model option])
RTEMS_BSP_CLEANUP_OPTIONS
diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/configure.ac b/c/src/lib/libbsp/powerpc/motorola_powerpc/configure.ac
index 8b79309abd..56d550c65a 100644
--- a/c/src/lib/libbsp/powerpc/motorola_powerpc/configure.ac
+++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/configure.ac
@@ -33,6 +33,10 @@ Note that the policy can still be defined by the application
CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK this feature is removed
and a little memory is saved.])
+RTEMS_BSPOPTS_SET([BSP_CONSOLE_BAUD],[*],[9600])
+RTEMS_BSPOPTS_HELP([BSP_CONSOLE_BAUD],
+[default console baud])
+
RTEMS_BSPOPTS_SET([mvme2100],[mvme2100],[1])
RTEMS_BSPOPTS_SET([mvme2100],[*],[])
RTEMS_BSPOPTS_HELP([mvme2100],
diff --git a/c/src/lib/libbsp/powerpc/mvme3100/configure.ac b/c/src/lib/libbsp/powerpc/mvme3100/configure.ac
index 8b9a04f096..cf35fd1ee6 100644
--- a/c/src/lib/libbsp/powerpc/mvme3100/configure.ac
+++ b/c/src/lib/libbsp/powerpc/mvme3100/configure.ac
@@ -33,6 +33,10 @@ Note that the policy can still be defined by the application
CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK this feature is removed
and a little memory is saved.])
+RTEMS_BSPOPTS_SET([BSP_CONSOLE_BAUD],[*],[9600])
+RTEMS_BSPOPTS_HELP([BSP_CONSOLE_BAUD],
+[default console baud])
+
AC_DEFINE(__ppc_generic, 1, [PowerPC model option])
RTEMS_BSP_CLEANUP_OPTIONS
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/configure.ac b/c/src/lib/libbsp/powerpc/mvme5500/configure.ac
index a1910ca562..76ce4057e8 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/configure.ac
+++ b/c/src/lib/libbsp/powerpc/mvme5500/configure.ac
@@ -33,6 +33,10 @@ Note that the policy can still be defined by the application
CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK this feature is removed
and a little memory is saved.])
+RTEMS_BSPOPTS_SET([BSP_CONSOLE_BAUD],[*],[9600])
+RTEMS_BSPOPTS_HELP([BSP_CONSOLE_BAUD],
+[default console baud])
+
AC_DEFINE(mpc7455, 1, [PowerPC model option])
RTEMS_BSP_CLEANUP_OPTIONS
diff --git a/spec/build/bsps/optconsolebaud.yml b/spec/build/bsps/optconsolebaud.yml
index 3fe1eeec24..684c820ab3 100644
--- a/spec/build/bsps/optconsolebaud.yml
+++ b/spec/build/bsps/optconsolebaud.yml
@@ -11,6 +11,11 @@ default-by-variant:
variants:
- m68k/m5484FireEngine
- powerpc/hsc_cm01
+ - powerpc/beatnik
+ - powerpc/haleakala
+ - powerpc/motorola_powerpc
+ - powerpc/mvme3100
+ - powerpc/mvme5500
- value: 19200
variants:
- m68k/COBRA5475
diff --git a/spec/build/bsps/powerpc/beatnik/bspbeatnik.yml b/spec/build/bsps/powerpc/beatnik/bspbeatnik.yml
index 6949ddb3f0..417d972f1c 100644
--- a/spec/build/bsps/powerpc/beatnik/bspbeatnik.yml
+++ b/spec/build/bsps/powerpc/beatnik/bspbeatnik.yml
@@ -43,6 +43,8 @@ links:
- role: build-dependency
uid: abi
- role: build-dependency
+ uid: ../../optconsolebaud
+- role: build-dependency
uid: optsbrk
- role: build-dependency
uid: ../crti
diff --git a/spec/build/bsps/powerpc/haleakala/bsphaleakala.yml b/spec/build/bsps/powerpc/haleakala/bsphaleakala.yml
index 66e3b057dd..b45da019b2 100644
--- a/spec/build/bsps/powerpc/haleakala/bsphaleakala.yml
+++ b/spec/build/bsps/powerpc/haleakala/bsphaleakala.yml
@@ -37,6 +37,8 @@ links:
- role: build-dependency
uid: abi
- role: build-dependency
+ uid: ../../optconsolebaud
+- role: build-dependency
uid: optsprg
- role: build-dependency
uid: optvecbase
diff --git a/spec/build/bsps/powerpc/motorola_powerpc/obj.yml b/spec/build/bsps/powerpc/motorola_powerpc/obj.yml
index e278c1106a..d81ded31b8 100644
--- a/spec/build/bsps/powerpc/motorola_powerpc/obj.yml
+++ b/spec/build/bsps/powerpc/motorola_powerpc/obj.yml
@@ -20,7 +20,9 @@ install:
source:
- bsps/powerpc/motorola_powerpc/start/linkcmds
- bsps/powerpc/shared/start/linkcmds.share
-links: []
+links:
+- role: build-dependency
+ uid: ../../optconsolebaud
source:
- bsps/powerpc/motorola_powerpc/console/polled_io.c
- bsps/powerpc/motorola_powerpc/start/bspreset.c
diff --git a/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml b/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml
index 3ae4aa6052..66fe09aa5c 100644
--- a/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml
+++ b/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml
@@ -40,6 +40,8 @@ links:
- role: build-dependency
uid: abi
- role: build-dependency
+ uid: ../../optconsolebaud
+- role: build-dependency
uid: optsbrk
- role: build-dependency
uid: start
diff --git a/spec/build/bsps/powerpc/mvme5500/bspmvme5500.yml b/spec/build/bsps/powerpc/mvme5500/bspmvme5500.yml
index 8a3375aaac..bac1cf1632 100644
--- a/spec/build/bsps/powerpc/mvme5500/bspmvme5500.yml
+++ b/spec/build/bsps/powerpc/mvme5500/bspmvme5500.yml
@@ -48,6 +48,8 @@ links:
- role: build-dependency
uid: abi
- role: build-dependency
+ uid: ../../optconsolebaud
+- role: build-dependency
uid: optsbrk
- role: build-dependency
uid: start