Lines Matching +full:r8a779f0 +full:- +full:ufs

1 // SPDX-License-Identifier: GPL-2.0 OR MIT
3 * Renesas UFS host controller driver
10 #include <linux/dma-mapping.h>
18 #include <ufs/ufshcd.h>
20 #include "ufshcd-pltfrm.h"
288 WARN_ON(p->index >= MAX_INDEX); in ufs_renesas_reg_control()
290 switch (p->mode) { in ufs_renesas_reg_control()
292 ufshcd_writel(hba, save[p->index], p->reg); in ufs_renesas_reg_control()
295 save[p->index] |= p->u.set; in ufs_renesas_reg_control()
298 save[p->index] = ufshcd_readl(hba, p->reg) & p->mask; in ufs_renesas_reg_control()
301 ret = readl_poll_timeout_atomic(hba->mmio_base + p->reg, in ufs_renesas_reg_control()
303 (val & p->mask) == p->u.expected, in ufs_renesas_reg_control()
306 dev_err(hba->dev, "%s: poll failed %d (%08x, %08x, %08x)\n", in ufs_renesas_reg_control()
307 __func__, ret, val, p->mask, p->u.expected); in ufs_renesas_reg_control()
310 if (p->u.delay_us > 1000) in ufs_renesas_reg_control()
311 mdelay(DIV_ROUND_UP(p->u.delay_us, 1000)); in ufs_renesas_reg_control()
313 udelay(p->u.delay_us); in ufs_renesas_reg_control()
316 ufshcd_writel(hba, p->u.val, p->reg); in ufs_renesas_reg_control()
337 if (priv->initialized) in ufs_renesas_hce_enable_notify()
343 priv->initialized = true; in ufs_renesas_hce_enable_notify()
352 pm_runtime_get_sync(hba->dev); in ufs_renesas_setup_clocks()
354 pm_runtime_put(hba->dev); in ufs_renesas_setup_clocks()
363 priv = devm_kzalloc(hba->dev, sizeof(*priv), GFP_KERNEL); in ufs_renesas_init()
365 return -ENOMEM; in ufs_renesas_init()
368 hba->quirks |= UFSHCD_QUIRK_HIBERN_FASTAUTO; in ufs_renesas_init()
375 return dma_set_mask_and_coherent(hba->dev, DMA_BIT_MASK(32)); in ufs_renesas_set_dma_mask()
388 { .compatible = "renesas,r8a779f0-ufs" },
411 .name = "ufshcd-renesas",
418 MODULE_DESCRIPTION("Renesas UFS host controller driver");