@@ -33,6 +33,11 @@ struct cqhci_slot {
33
33
#define CQHCI_HOST_OTHER BIT(4)
34
34
};
35
35
36
+ static bool cqhci_halted (struct cqhci_host * cq_host )
37
+ {
38
+ return cqhci_readl (cq_host , CQHCI_CTL ) & CQHCI_HALT ;
39
+ }
40
+
36
41
static inline u8 * get_desc (struct cqhci_host * cq_host , u8 tag )
37
42
{
38
43
return cq_host -> desc_base + (tag * cq_host -> slot_sz );
@@ -282,7 +287,7 @@ static void __cqhci_enable(struct cqhci_host *cq_host)
282
287
283
288
cqhci_writel (cq_host , cqcfg , CQHCI_CFG );
284
289
285
- if (cqhci_readl (cq_host , CQHCI_CTL ) & CQHCI_HALT )
290
+ if (cqhci_halted (cq_host ) )
286
291
cqhci_writel (cq_host , 0 , CQHCI_CTL );
287
292
288
293
mmc -> cqe_on = true;
@@ -617,7 +622,7 @@ static int cqhci_request(struct mmc_host *mmc, struct mmc_request *mrq)
617
622
cqhci_writel (cq_host , 0 , CQHCI_CTL );
618
623
mmc -> cqe_on = true;
619
624
pr_debug ("%s: cqhci: CQE on\n" , mmc_hostname (mmc ));
620
- if (cqhci_readl (cq_host , CQHCI_CTL ) & CQHCI_HALT ) {
625
+ if (cqhci_halted (cq_host ) ) {
621
626
pr_err ("%s: cqhci: CQE failed to exit halt state\n" ,
622
627
mmc_hostname (mmc ));
623
628
}
@@ -953,11 +958,6 @@ static bool cqhci_clear_all_tasks(struct mmc_host *mmc, unsigned int timeout)
953
958
return ret ;
954
959
}
955
960
956
- static bool cqhci_halted (struct cqhci_host * cq_host )
957
- {
958
- return cqhci_readl (cq_host , CQHCI_CTL ) & CQHCI_HALT ;
959
- }
960
-
961
961
static bool cqhci_halt (struct mmc_host * mmc , unsigned int timeout )
962
962
{
963
963
struct cqhci_host * cq_host = mmc -> cqe_private ;
0 commit comments