File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -371,10 +371,11 @@ EXPORT_SYMBOL_GPL(ufshcd_disable_irq);
371
371
*/
372
372
static void ufshcd_enable_intr (struct ufs_hba * hba , u32 intrs )
373
373
{
374
- u32 set = ufshcd_readl (hba , REG_INTERRUPT_ENABLE );
374
+ u32 old_val = ufshcd_readl (hba , REG_INTERRUPT_ENABLE );
375
+ u32 new_val = old_val | intrs ;
375
376
376
- set |= intrs ;
377
- ufshcd_writel (hba , set , REG_INTERRUPT_ENABLE );
377
+ if ( new_val != old_val )
378
+ ufshcd_writel (hba , new_val , REG_INTERRUPT_ENABLE );
378
379
}
379
380
380
381
/**
@@ -384,10 +385,11 @@ static void ufshcd_enable_intr(struct ufs_hba *hba, u32 intrs)
384
385
*/
385
386
static void ufshcd_disable_intr (struct ufs_hba * hba , u32 intrs )
386
387
{
387
- u32 set = ufshcd_readl (hba , REG_INTERRUPT_ENABLE );
388
+ u32 old_val = ufshcd_readl (hba , REG_INTERRUPT_ENABLE );
389
+ u32 new_val = old_val & ~intrs ;
388
390
389
- set &= ~ intrs ;
390
- ufshcd_writel (hba , set , REG_INTERRUPT_ENABLE );
391
+ if ( new_val != old_val )
392
+ ufshcd_writel (hba , new_val , REG_INTERRUPT_ENABLE );
391
393
}
392
394
393
395
static void ufshcd_configure_wb (struct ufs_hba * hba )
You can’t perform that action at this time.
0 commit comments