Skip to content

Commit

Permalink
Moved device_init for RPi2 to rpi2kernel.
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanMcMillan54 committed Aug 7, 2022
1 parent 3eb7212 commit 9e1131c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
9 changes: 9 additions & 0 deletions drivers/rpi/rpi2kernel/src/drivers/device.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
use rpi::Rpi2;

#[no_mangle]
pub extern "C" fn device_init() -> (Result<(), &'static str>, &'static str) {
let mut pi = Rpi2::new();
pi.init();

return (Ok(()), "RPi 2");
}
1 change: 1 addition & 0 deletions drivers/rpi/rpi2kernel/src/drivers/mod.rs
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
pub mod device;
pub mod fb;
8 changes: 0 additions & 8 deletions drivers/rpi/src/rpi2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,6 @@ pub mod registers;
pub mod mb;
pub mod uart;

#[no_mangle]
pub extern "C" fn device_init() -> (Result<(), &'static str>, &'static str) {
let mut pi = Rpi2::new();
pi.init();

return (Ok(()), "RPi 2");
}

extern "C" {
static mut BOARD: Board;
fn rpi2_kernel_init();
Expand Down

0 comments on commit 9e1131c

Please sign in to comment.