Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b89d97ac authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "scsi: ufshcd: Move to ufshcd core"

parents 77b4d787 5dcd3204
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@ CONFIG_I2C_RTC6226_QCA=m
CONFIG_SCSI_UFSHCD_QTI=y
CONFIG_SCSI_UFS_BSG=y
CONFIG_MSM_EXT_DISPLAY=y
# CONFIG_SCSI_UFSHCD is not set
CONFIG_SCSI_UFSHCD=y
# CONFIG_RADIO_SI470X is not set
# CONFIG_RADIO_SI4713 is not set
# CONFIG_USB_MR800 is not set
+2 −2
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ config SCSI_UFSHCD

config SCSI_UFSHCD_QTI
	tristate "Universal Flash Storage Controller Driver Core QTI"
	depends on SCSI && SCSI_DMA && QGKI && !SCSI_UFSHCD
	depends on SCSI && SCSI_DMA && QGKI && SCSI_UFSHCD
	select PM_DEVFREQ
	select DEVFREQ_GOV_SIMPLE_ONDEMAND
	select NLS
@@ -171,7 +171,7 @@ config SCSI_UFS_BSG

config SCSI_UFS_CRYPTO
	bool "UFS Crypto Engine Support"
	depends on (SCSI_UFSHCD || SCSI_UFSHCD_QTI) && BLK_INLINE_ENCRYPTION
	depends on SCSI_UFSHCD && BLK_INLINE_ENCRYPTION
	help
	  Enable Crypto Engine Support in UFS.
	  Enabling this makes it possible for the kernel to use the crypto
+0 −4
Original line number Diff line number Diff line
@@ -11,9 +11,5 @@ obj-$(CONFIG_SCSI_UFSHCD_PCI) += ufshcd-pci.o
obj-$(CONFIG_SCSI_UFSHCD_PLATFORM) += ufshcd-pltfrm.o
obj-$(CONFIG_SCSI_UFS_HISI) += ufs-hisi.o
obj-$(CONFIG_SCSI_UFS_MEDIATEK) += ufs-mediatek.o
obj-$(CONFIG_SCSI_UFSHCD_QTI) += ufshcd-qti-core.o
ufshcd-qti-core-y		+= ufshcd-qti.o ufs-sysfs.o
ufshcd-qti-core-$(CONFIG_SCSI_UFS_BSG)	+= ufs_bsg.o
ufshcd-core-$(CONFIG_SCSI_UFS_CRYPTO) += ufshcd-crypto.o
ufshcd-qti-core-$(CONFIG_SCSI_UFS_CRYPTO) += ufshcd-crypto.o
obj-$(CONFIG_SCSI_UFS_CRYPTO_QTI) += ufshcd-crypto-qti.o
+2 −1
Original line number Diff line number Diff line
@@ -8214,7 +8214,8 @@ static int ufshcd_probe_hba(struct ufs_hba *hba)
	int ret;
	ktime_t start = ktime_get();

	dev_err(hba->dev, "*** This is %s ***\n", __FILE__);
	dev_err(hba->dev, "Using %s: Move to upstream ufs core --\n", __FILE__);
	return -EPERM;

	ret = ufshcd_link_startup(hba);
	if (ret)
+21 −3
Original line number Diff line number Diff line
@@ -2062,6 +2062,8 @@ ufshcd_dispatch_uic_cmd(struct ufs_hba *hba, struct uic_command *uic_cmd)
	/* Write UIC Cmd */
	ufshcd_writel(hba, uic_cmd->command & COMMAND_OPCODE_MASK,
		      REG_UIC_COMMAND);
	/* Ensure that the command is written */
	wmb();
}

/**
@@ -7153,11 +7155,8 @@ static int ufshcd_device_params_init(struct ufs_hba *hba)
			__func__, ret);
		goto out;
	}

	ufs_fixup_device_setup(hba);

	/* Clear any previous UFS device information */
	memset(&hba->dev_info, 0, sizeof(hba->dev_info));
	if (!ufshcd_query_flag_retry(hba, UPIU_QUERY_OPCODE_READ_FLAG,
			QUERY_FLAG_IDN_PWR_ON_WPE, &flag))
		hba->dev_info.f_power_on_wp_en = flag;
@@ -7219,6 +7218,7 @@ static int ufshcd_probe_hba(struct ufs_hba *hba, bool async)
	int ret;
	ktime_t start = ktime_get();

	dev_err(hba->dev, "*** This is %s ***\n", __FILE__);
	ret = ufshcd_link_startup(hba);
	if (ret)
		goto out;
@@ -8026,6 +8026,23 @@ static int ufshcd_vreg_set_hpm(struct ufs_hba *hba)
	return ret;
}

#if defined(CONFIG_SCSI_UFSHCD_QTI)
static void ufshcd_hba_vreg_set_lpm(struct ufs_hba *hba)
{
	if (ufshcd_is_link_off(hba) ||
	    (ufshcd_is_link_hibern8(hba)
	     && ufshcd_is_power_collapse_during_hibern8_allowed(hba)))
		ufshcd_setup_hba_vreg(hba, false);
}

static void ufshcd_hba_vreg_set_hpm(struct ufs_hba *hba)
{
	if (ufshcd_is_link_off(hba) ||
	    (ufshcd_is_link_hibern8(hba)
	     && ufshcd_is_power_collapse_during_hibern8_allowed(hba)))
		ufshcd_setup_hba_vreg(hba, true);
}
#else
static void ufshcd_hba_vreg_set_lpm(struct ufs_hba *hba)
{
	if (ufshcd_is_link_off(hba))
@@ -8037,6 +8054,7 @@ static void ufshcd_hba_vreg_set_hpm(struct ufs_hba *hba)
	if (ufshcd_is_link_off(hba))
		ufshcd_setup_hba_vreg(hba, true);
}
#endif

/**
 * ufshcd_suspend - helper function for suspend operations
Loading