Re-export drivers and update dependencies
If the peripheral access crate and a project uses different versions of
the same drivers, it causes build time a conflict. In order to avoid
this, the PAC exports the drivers so projects can use them without
adding the drivers as project dependencies.
Signed-off-by: Imre Kis <imre.kis@arm.com>
Change-Id: I10b53053962e751d5e7c86dddd26b8ab07a18dc9
diff --git a/Cargo.lock b/Cargo.lock
index 54fa4c0..8f49c08 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -16,16 +16,18 @@
[[package]]
name = "arm-gic"
version = "0.1.0"
-source = "git+https://git.trustedfirmware.org/rust-spmc/arm-gic.git#9eeb9c9e7cbc0b986c3c8666e0b7dca6a6871add"
+source = "git+https://git.trustedfirmware.org/rust-spmc/arm-gic.git#3e1263014caabe1ba6189b7693ac4f0466d6e19f"
dependencies = [
"bitflags",
+ "safe-mmio",
+ "zerocopy",
]
[[package]]
name = "arm-pl011-uart"
-version = "0.2.0"
+version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4fc2d83c175765fcbec10238b309ebe937247e938d3a9efcb32a96e69502a04e"
+checksum = "bed01fb1be86080a2e9d93ae75e485837712a497f6e729e8ea329151a982e032"
dependencies = [
"bitflags",
"embedded-hal-nb",
@@ -38,16 +40,18 @@
[[package]]
name = "arm-sp805"
version = "0.1.0"
-source = "git+https://git.trustedfirmware.org/rust-spmc/arm-sp805.git#ae5c740a85de29a9672cc6da28c2f0d4305afad6"
+source = "git+https://git.trustedfirmware.org/rust-spmc/arm-sp805.git#826b861f78f36fd3e51a199b1d6969b5e5d48a5b"
dependencies = [
"bitflags",
+ "safe-mmio",
+ "zerocopy",
]
[[package]]
name = "bitflags"
-version = "2.8.0"
+version = "2.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36"
+checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd"
[[package]]
name = "embedded-hal"
@@ -79,27 +83,30 @@
[[package]]
name = "proc-macro2"
-version = "1.0.93"
+version = "1.0.94"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99"
+checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
-version = "1.0.38"
+version = "1.0.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
+checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
dependencies = [
"proc-macro2",
]
[[package]]
name = "safe-mmio"
-version = "0.1.0"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "30075950f15d2083592cdb9b5b175d48d332dacdc481c17546910e0c1e9cc4b1"
+checksum = "3bc59a975d8faa0b4475145266e9f9eac01f0b3f393d0e5eecc8b88646ca2d29"
+dependencies = [
+ "zerocopy",
+]
[[package]]
name = "spin"
@@ -109,9 +116,9 @@
[[package]]
name = "syn"
-version = "2.0.98"
+version = "2.0.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1"
+checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0"
dependencies = [
"proc-macro2",
"quote",
@@ -120,18 +127,18 @@
[[package]]
name = "thiserror"
-version = "2.0.11"
+version = "2.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc"
+checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
-version = "2.0.11"
+version = "2.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2"
+checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d"
dependencies = [
"proc-macro2",
"quote",
@@ -140,24 +147,24 @@
[[package]]
name = "unicode-ident"
-version = "1.0.16"
+version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a210d160f08b701c8721ba1c726c11662f877ea6b7094007e1ca9a1041945034"
+checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
[[package]]
name = "zerocopy"
-version = "0.8.17"
+version = "0.8.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "aa91407dacce3a68c56de03abe2760159582b846c6a4acd2f456618087f12713"
+checksum = "fd97444d05a4328b90e75e503a34bad781f14e28a823ad3557f0750df1ebcbc6"
dependencies = [
"zerocopy-derive",
]
[[package]]
name = "zerocopy-derive"
-version = "0.8.17"
+version = "0.8.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "06718a168365cad3d5ff0bb133aad346959a2074bd4a85c121255a11304a8626"
+checksum = "6352c01d0edd5db859a63e2605f4ea3183ddbd15e2c4a9e7d32184df75e4f154"
dependencies = [
"proc-macro2",
"quote",
diff --git a/Cargo.toml b/Cargo.toml
index c275498..20eb5c9 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -16,7 +16,7 @@
[dependencies]
arm-gic = { git = "https://git.trustedfirmware.org/rust-spmc/arm-gic.git" }
-arm-pl011-uart = "0.2.0"
+arm-pl011-uart = "0.3"
arm-sp805 = { git = "https://git.trustedfirmware.org/rust-spmc/arm-sp805.git" }
-safe-mmio = "0.1.0"
+safe-mmio = "0.2"
spin = { version = "0.9", default-features = false, features = ["spin_mutex"] }
diff --git a/src/lib.rs b/src/lib.rs
index f1d02d9..185ab21 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2023-2024 Arm Limited and/or its affiliates <open-source-office@arm.com>
+// SPDX-FileCopyrightText: Copyright 2023-2025 Arm Limited and/or its affiliates <open-source-office@arm.com>
// SPDX-License-Identifier: MIT OR Apache-2.0
//! # Peripheral Access Crate fro Arm Fixed Virtual Platform
@@ -7,12 +7,16 @@
#![no_std]
-use core::fmt::Debug;
+// Re-export peripheral drivers and common safe-mmio types
+pub use arm_gic;
+pub use arm_pl011_uart;
+pub use arm_sp805;
+pub use safe_mmio::{PhysicalInstance, UniqueMmioPointer};
use arm_gic::GICDRegisters;
use arm_pl011_uart::PL011Registers;
use arm_sp805::SP805Registers;
-pub use safe_mmio::PhysicalInstance;
+use core::fmt::Debug;
use spin::mutex::Mutex;
static PERIPHERALS_TAKEN: Mutex<bool> = Mutex::new(false);