diff --git a/bsps/arm/raspberrypi/console/console-config.c b/bsps/arm/raspberrypi/console/console-config.c index 0af09e1361..2c2c993dc3 100644 --- a/bsps/arm/raspberrypi/console/console-config.c +++ b/bsps/arm/raspberrypi/console/console-config.c @@ -47,7 +47,8 @@ #define FBCONS "/dev/fbcons" arm_pl011_context pl011_context = { - .clock = 48000000 + .clock = 48000000, + .initial_baud = PL011_DEFAULT_BAUD, }; ns16550_context mini_uart_context; diff --git a/bsps/arm/raspberrypi/include/bsp/usart.h b/bsps/arm/raspberrypi/include/bsp/usart.h index 6af1844b3c..c054421367 100644 --- a/bsps/arm/raspberrypi/include/bsp/usart.h +++ b/bsps/arm/raspberrypi/include/bsp/usart.h @@ -32,8 +32,6 @@ extern "C" { #endif /* __cplusplus */ -#define PL011_DEFAULT_BAUD 115000 -#define MINI_UART_DEFAULT_BAUD 115200 #define BCM2835_PL011_BASE (RPI_PERIPHERAL_BASE + 0x201000) #ifdef __cplusplus diff --git a/spec/build/bsps/arm/raspberrypi/grp.yml b/spec/build/bsps/arm/raspberrypi/grp.yml index 489ec3f7a4..8f22ee9ae6 100644 --- a/spec/build/bsps/arm/raspberrypi/grp.yml +++ b/spec/build/bsps/arm/raspberrypi/grp.yml @@ -54,6 +54,10 @@ links: uid: ../../optfdtro - role: build-dependency uid: ../../optfdtuboot +- role: build-dependency + uid: optpl011baud +- role: build-dependency + uid: optminiuartbaud type: build use-after: [] use-before: [] diff --git a/spec/build/bsps/arm/raspberrypi/optminiuartbaud.yml b/spec/build/bsps/arm/raspberrypi/optminiuartbaud.yml new file mode 100644 index 0000000000..b9804110da --- /dev/null +++ b/spec/build/bsps/arm/raspberrypi/optminiuartbaud.yml @@ -0,0 +1,19 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +actions: +- get-integer: null +- assert-uint32: null +- env-assign: null +- format-and-define: null +build-type: option +copyrights: +- Copyright (C) 2025 Jacob Killelea +default: +- enabled-by: true + value: 115200 +description: | + Mini UART default baud rate +enabled-by: true +format: '{:#d}' +links: [] +name: MINI_UART_DEFAULT_BAUD +type: build diff --git a/spec/build/bsps/arm/raspberrypi/optpl011baud.yml b/spec/build/bsps/arm/raspberrypi/optpl011baud.yml new file mode 100644 index 0000000000..a9d8b9ad11 --- /dev/null +++ b/spec/build/bsps/arm/raspberrypi/optpl011baud.yml @@ -0,0 +1,19 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +actions: +- get-integer: null +- assert-uint32: null +- env-assign: null +- format-and-define: null +build-type: option +copyrights: +- Copyright (C) 2025 Jacob Killelea +default: +- enabled-by: true + value: 115200 +description: | + PL011 (main UART) default baud rate +enabled-by: true +format: '{:#d}' +links: [] +name: PL011_DEFAULT_BAUD +type: build