@@ -195,6 +195,10 @@ static void tmio_mmc_reset(struct tmio_mmc_host *host)
195
195
sd_ctrl_write32_as_16_and_16 (host , CTL_IRQ_MASK , host -> sdcard_irq_mask_all );
196
196
host -> sdcard_irq_mask = host -> sdcard_irq_mask_all ;
197
197
198
+ if (host -> native_hotplug )
199
+ tmio_mmc_enable_mmc_irqs (host ,
200
+ TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT );
201
+
198
202
tmio_mmc_set_bus_width (host , host -> mmc -> ios .bus_width );
199
203
200
204
if (host -> pdata -> flags & TMIO_MMC_SDIO_IRQ ) {
@@ -956,8 +960,15 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
956
960
case MMC_POWER_OFF :
957
961
tmio_mmc_power_off (host );
958
962
/* For R-Car Gen2+, we need to reset SDHI specific SCC */
959
- if (host -> pdata -> flags & TMIO_MMC_MIN_RCAR2 )
963
+ if (host -> pdata -> flags & TMIO_MMC_MIN_RCAR2 ) {
960
964
host -> reset (host );
965
+
966
+ if (host -> native_hotplug )
967
+ tmio_mmc_enable_mmc_irqs (host ,
968
+ TMIO_STAT_CARD_REMOVE |
969
+ TMIO_STAT_CARD_INSERT );
970
+ }
971
+
961
972
host -> set_clock (host , 0 );
962
973
break ;
963
974
case MMC_POWER_UP :
@@ -1185,10 +1196,6 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host)
1185
1196
_host -> set_clock (_host , 0 );
1186
1197
tmio_mmc_reset (_host );
1187
1198
1188
- if (_host -> native_hotplug )
1189
- tmio_mmc_enable_mmc_irqs (_host ,
1190
- TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT );
1191
-
1192
1199
spin_lock_init (& _host -> lock );
1193
1200
mutex_init (& _host -> ios_lock );
1194
1201
0 commit comments