Skip to content

Commit d1ec9f0

Browse files
committed
Switch all platforms to the MctpSerial uart-service
Every platform drove its uart-service through `DefaultService::default_smbusespi` (SMBus/eSPI framing). Switch all five to `MctpSerialService::default_mctp_serial` so the EC link speaks DSP0253 serial (`MctpSerialMedium`) — the same framing the rest of the stack now uses — and retire the SMBus/eSPI path. `ec-test-cli` was updated to speak DSP0253 in odp-platform-common; bump `EC_TEST_CLI_REV` to that revision so the dev-qemu integration test exercises the unified wire format end to end. Assisted-by: GitHub Copilot:claude-opus-4.8
1 parent 73b0db1 commit d1ec9f0

6 files changed

Lines changed: 16 additions & 11 deletions

File tree

.github/workflows/check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ jobs:
333333
# if there are breaking changes in `ec-test-cli`
334334
#
335335
# We can update this commit when we want to pull in a new `ec-test-cli`
336-
EC_TEST_CLI_REV: d705cd4f
336+
EC_TEST_CLI_REV: 20347787
337337

338338
# Tag of the prebuilt QEMU image pulled from the odp-qemu-builder GHCR package
339339
ODP_QEMU_TAG: sha-7e461b3

platform/dev-imxrt/src/main.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ use static_cell::StaticCell;
1717
#[embassy_executor::task]
1818
async fn uart_service(uart: uart::Uart<'static, uart::Async>, relay: MockOdpRelayHandler) {
1919
info!("Starting uart service");
20-
static UART_SERVICE: StaticCell<uart_service::DefaultService<MockOdpRelayHandler>> = StaticCell::new();
21-
let uart_service = uart_service::DefaultService::default_smbusespi(relay).unwrap();
20+
static UART_SERVICE: StaticCell<uart_service::MctpSerialService<MockOdpRelayHandler>> = StaticCell::new();
21+
let uart_service =
22+
uart_service::MctpSerialService::default_mctp_serial(relay).expect("failed to init MctpSerial uart-service");
2223
let uart_service = UART_SERVICE.init(uart_service);
2324

2425
let Err(e) = uart_service::task::uart_service(uart_service, uart).await;

platform/dev-mcxa/src/main.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ use static_cell::StaticCell;
1717
#[embassy_executor::task]
1818
async fn uart_service(uart: lpuart::LpuartBbq, relay: MockOdpRelayHandler) {
1919
info!("Starting uart service");
20-
static UART_SERVICE: StaticCell<uart_service::DefaultService<MockOdpRelayHandler>> = StaticCell::new();
21-
let uart_service = uart_service::DefaultService::default_smbusespi(relay).unwrap();
20+
static UART_SERVICE: StaticCell<uart_service::MctpSerialService<MockOdpRelayHandler>> = StaticCell::new();
21+
let uart_service =
22+
uart_service::MctpSerialService::default_mctp_serial(relay).expect("failed to init MctpSerial uart-service");
2223
let uart_service = UART_SERVICE.init(uart_service);
2324

2425
let Err(e) = uart_service::task::uart_service(uart_service, uart).await;

platform/dev-mec/src/main.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ use static_cell::StaticCell;
1616
#[embassy_executor::task]
1717
async fn uart_service(uart: uart::Uart<'static, uart::Async>, relay: MockOdpRelayHandler) {
1818
info!("Starting uart service");
19-
static UART_SERVICE: StaticCell<uart_service::DefaultService<MockOdpRelayHandler>> = StaticCell::new();
20-
let uart_service = uart_service::DefaultService::default_smbusespi(relay).unwrap();
19+
static UART_SERVICE: StaticCell<uart_service::MctpSerialService<MockOdpRelayHandler>> = StaticCell::new();
20+
let uart_service =
21+
uart_service::MctpSerialService::default_mctp_serial(relay).expect("failed to init MctpSerial uart-service");
2122
let uart_service = UART_SERVICE.init(uart_service);
2223

2324
let Err(e) = uart_service::task::uart_service(uart_service, uart).await;

platform/dev-npcx/src/main.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ async fn uart_service(
1818
) {
1919
info!("Starting uart service");
2020

21-
static UART_SERVICE: StaticCell<uart_service::DefaultService<MockOdpRelayHandler>> = StaticCell::new();
22-
let uart_service = uart_service::DefaultService::default_smbusespi(relay).unwrap();
21+
static UART_SERVICE: StaticCell<uart_service::MctpSerialService<MockOdpRelayHandler>> = StaticCell::new();
22+
let uart_service =
23+
uart_service::MctpSerialService::default_mctp_serial(relay).expect("failed to init MctpSerial uart-service");
2324
let uart_service = UART_SERVICE.init(uart_service);
2425
let Err(e) = uart_service::task::uart_service(uart_service, uart).await;
2526
panic!("uart-service error: {:?}", e);

platform/dev-qemu/src/main.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ use static_cell::StaticCell;
1717
#[embassy_executor::task]
1818
async fn uart_service(uart: buffered::Uart<'static, Async>, relay: MockOdpRelayHandler) {
1919
info!("Starting uart service");
20-
static UART_SERVICE: StaticCell<uart_service::DefaultService<MockOdpRelayHandler>> = StaticCell::new();
21-
let uart_service = uart_service::DefaultService::default_smbusespi(relay).unwrap();
20+
static UART_SERVICE: StaticCell<uart_service::MctpSerialService<MockOdpRelayHandler>> = StaticCell::new();
21+
let uart_service =
22+
uart_service::MctpSerialService::default_mctp_serial(relay).expect("failed to init MctpSerial uart-service");
2223
let uart_service = UART_SERVICE.init(uart_service);
2324
let Err(e) = uart_service::task::uart_service(uart_service, uart).await;
2425
panic!("uart-service error: {:?}", e);

0 commit comments

Comments
 (0)