File tree 1 file changed +10
-8
lines changed
framework_lib/src/chromium_ec
1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -90,14 +90,6 @@ fn init() -> bool {
90
90
Initialized :: NotYet => { }
91
91
}
92
92
93
- // First try on MEC
94
- portio_mec:: init ( ) ;
95
- let ec_id = portio_mec:: transfer_read ( MEC_MEMMAP_OFFSET + EC_MEMMAP_ID , 2 ) ;
96
- if ec_id[ 0 ] == b'E' && ec_id[ 1 ] == b'C' {
97
- * init = Initialized :: SucceededMec ;
98
- return true ;
99
- }
100
-
101
93
// In Linux userspace has to first request access to ioports
102
94
// TODO: Close these again after we're done
103
95
#[ cfg( target_os = "linux" ) ]
@@ -106,6 +98,16 @@ fn init() -> bool {
106
98
* init = Initialized :: Failed ;
107
99
return false ;
108
100
}
101
+
102
+ // First try on MEC
103
+ portio_mec:: init ( ) ;
104
+ let ec_id = portio_mec:: transfer_read ( MEC_MEMMAP_OFFSET + EC_MEMMAP_ID , 2 ) ;
105
+ if ec_id[ 0 ] == b'E' && ec_id[ 1 ] == b'C' {
106
+ * init = Initialized :: SucceededMec ;
107
+ return true ;
108
+ } else {
109
+ }
110
+
109
111
#[ cfg( target_os = "linux" ) ]
110
112
unsafe {
111
113
// 8 for request/response header, 0xFF for response
You can’t perform that action at this time.
0 commit comments