Skip to content

Commit 497027e

Browse files
ahunter6martinkpetersen
authored andcommitted
scsi: ufs: core: Move ufshcd_enable_intr() and ufshcd_disable_intr()
Move ufshcd_enable_intr() and ufshcd_disable_intr() so they can be called in subsequent patches without forward declarations. No functional change. Signed-off-by: Adrian Hunter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 28a60bb commit 497027e

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

drivers/ufs/core/ufshcd.c

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,32 @@ void ufshcd_disable_irq(struct ufs_hba *hba)
364364
}
365365
EXPORT_SYMBOL_GPL(ufshcd_disable_irq);
366366

367+
/**
368+
* ufshcd_enable_intr - enable interrupts
369+
* @hba: per adapter instance
370+
* @intrs: interrupt bits
371+
*/
372+
static void ufshcd_enable_intr(struct ufs_hba *hba, u32 intrs)
373+
{
374+
u32 set = ufshcd_readl(hba, REG_INTERRUPT_ENABLE);
375+
376+
set |= intrs;
377+
ufshcd_writel(hba, set, REG_INTERRUPT_ENABLE);
378+
}
379+
380+
/**
381+
* ufshcd_disable_intr - disable interrupts
382+
* @hba: per adapter instance
383+
* @intrs: interrupt bits
384+
*/
385+
static void ufshcd_disable_intr(struct ufs_hba *hba, u32 intrs)
386+
{
387+
u32 set = ufshcd_readl(hba, REG_INTERRUPT_ENABLE);
388+
389+
set &= ~intrs;
390+
ufshcd_writel(hba, set, REG_INTERRUPT_ENABLE);
391+
}
392+
367393
static void ufshcd_configure_wb(struct ufs_hba *hba)
368394
{
369395
if (!ufshcd_is_wb_allowed(hba))
@@ -2681,32 +2707,6 @@ static int ufshcd_map_sg(struct ufs_hba *hba, struct ufshcd_lrb *lrbp)
26812707
return ufshcd_crypto_fill_prdt(hba, lrbp);
26822708
}
26832709

2684-
/**
2685-
* ufshcd_enable_intr - enable interrupts
2686-
* @hba: per adapter instance
2687-
* @intrs: interrupt bits
2688-
*/
2689-
static void ufshcd_enable_intr(struct ufs_hba *hba, u32 intrs)
2690-
{
2691-
u32 set = ufshcd_readl(hba, REG_INTERRUPT_ENABLE);
2692-
2693-
set |= intrs;
2694-
ufshcd_writel(hba, set, REG_INTERRUPT_ENABLE);
2695-
}
2696-
2697-
/**
2698-
* ufshcd_disable_intr - disable interrupts
2699-
* @hba: per adapter instance
2700-
* @intrs: interrupt bits
2701-
*/
2702-
static void ufshcd_disable_intr(struct ufs_hba *hba, u32 intrs)
2703-
{
2704-
u32 set = ufshcd_readl(hba, REG_INTERRUPT_ENABLE);
2705-
2706-
set &= ~intrs;
2707-
ufshcd_writel(hba, set, REG_INTERRUPT_ENABLE);
2708-
}
2709-
27102710
/**
27112711
* ufshcd_prepare_req_desc_hdr - Fill UTP Transfer request descriptor header according to request
27122712
* descriptor according to request

0 commit comments

Comments
 (0)