summaryrefslogtreecommitdiff
path: root/firmware/target/hosted/samsungypr/ypr0/system-ypr0.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/hosted/samsungypr/ypr0/system-ypr0.c')
-rw-r--r--firmware/target/hosted/samsungypr/ypr0/system-ypr0.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/firmware/target/hosted/samsungypr/ypr0/system-ypr0.c b/firmware/target/hosted/samsungypr/ypr0/system-ypr0.c
index 893c710861..e36fbed145 100644
--- a/firmware/target/hosted/samsungypr/ypr0/system-ypr0.c
+++ b/firmware/target/hosted/samsungypr/ypr0/system-ypr0.c
@@ -71,6 +71,7 @@ void system_exception_wait(void)
71 system_reboot(); 71 system_reboot();
72} 72}
73 73
74#ifdef HAVE_MULTIDRIVE
74/* MicroSD card removal / insertion management */ 75/* MicroSD card removal / insertion management */
75 76
76bool hostfs_removable(IF_MD_NONVOID(int drive)) 77bool hostfs_removable(IF_MD_NONVOID(int drive))
@@ -209,17 +210,21 @@ static void NORETURN_ATTR sd_thread(void)
209 210
210#endif 211#endif
211 212
213#endif /* HAVE_MULTIDRIVE */
214
212void hostfs_init(void) 215void hostfs_init(void)
213{ 216{
214 /* Setup GPIO pin for microSD sense, copied from OF */ 217 /* Setup GPIO pin for microSD sense, copied from OF */
215 gpio_control(DEV_CTRL_GPIO_SET_MUX, GPIO_SD_SENSE, CONFIG_DEFAULT, 0); 218 gpio_control(DEV_CTRL_GPIO_SET_MUX, GPIO_SD_SENSE, CONFIG_DEFAULT, 0);
216 gpio_control(DEV_CTRL_GPIO_SET_INPUT, GPIO_SD_SENSE, CONFIG_DEFAULT, 0); 219 gpio_control(DEV_CTRL_GPIO_SET_INPUT, GPIO_SD_SENSE, CONFIG_DEFAULT, 0);
220#ifdef HAVE_MULTIDRIVE
217 if (storage_present(IF_MD(1))) 221 if (storage_present(IF_MD(1)))
218 mount_sd(); 222 mount_sd();
219#ifdef HAVE_HOTSWAP 223#ifdef HAVE_HOTSWAP
220 create_thread(sd_thread, sd_thread_stack, sizeof(sd_thread_stack), 0, 224 create_thread(sd_thread, sd_thread_stack, sizeof(sd_thread_stack), 0,
221 "sd thread" IF_PRIO(, PRIORITY_BACKGROUND) IF_COP(, CPU)); 225 "sd thread" IF_PRIO(, PRIORITY_BACKGROUND) IF_COP(, CPU));
222#endif 226#endif
227#endif
223} 228}
224 229
225int hostfs_flush(void) 230int hostfs_flush(void)