@@ -160,7 +160,7 @@ static int reset_pin_configure(void)
160
160
}
161
161
#endif /* USE_RESET_GPIO */
162
162
163
- static int init (void )
163
+ void board_late_init_hook (void )
164
164
{
165
165
int rc ;
166
166
@@ -170,7 +170,7 @@ static int init(void)
170
170
171
171
if (!device_is_ready (cfg -> gpio )) {
172
172
LOG_ERR ("%s is not ready" , cfg -> gpio -> name );
173
- return - ENODEV ;
173
+ return ;
174
174
}
175
175
176
176
flags |= (cfg -> on ? GPIO_OUTPUT_ACTIVE
@@ -188,7 +188,7 @@ static int init(void)
188
188
}
189
189
#endif
190
190
if (rc ) {
191
- return rc ;
191
+ return ;
192
192
}
193
193
}
194
194
@@ -201,21 +201,17 @@ static int init(void)
201
201
rc = reset_pin_configure ();
202
202
if (rc ) {
203
203
LOG_ERR ("Unable to configure reset pin, err %d" , rc );
204
- return - EIO ;
204
+ return ;
205
205
}
206
206
#endif
207
207
208
208
LOG_INF ("Board configured." );
209
-
210
- return 0 ;
211
209
}
212
210
213
- SYS_INIT (init , POST_KERNEL , CONFIG_KERNEL_INIT_PRIORITY_DEVICE );
214
-
215
211
#define EXT_MEM_CTRL DT_NODELABEL(external_flash_pins_routing)
216
- #if DT_NODE_EXISTS (EXT_MEM_CTRL )
217
212
218
- static int early_init (void )
213
+ #if DT_NODE_EXISTS (EXT_MEM_CTRL )
214
+ void board_early_init_hook (void )
219
215
{
220
216
/* As soon as possible after the system starts up, enable the analog
221
217
* switch that routes signals to the external flash. Otherwise, the
@@ -234,9 +230,5 @@ static int early_init(void)
234
230
nrf_gpio_pin_set (psel );
235
231
}
236
232
nrf_gpio_cfg_output (psel );
237
-
238
- return 0 ;
239
233
}
240
-
241
- SYS_INIT (early_init , PRE_KERNEL_1 , 0 );
242
234
#endif
0 commit comments