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

Commit 06d5054c authored by Can Guo's avatar Can Guo
Browse files

scsi: ufs: Remove UFS card support



UFS card support is removed from Kona, thus remove the changes specifically
introduced for UFS card.

Change-Id: I7a8e6907c3f323005d513bd3b2b370e6e44ba6de
Signed-off-by: default avatarCan Guo <cang@codeaurora.org>
parent 1ef2523a
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -92,8 +92,6 @@ config SCSI_UFS_QCOM
	tristate "QCOM specific hooks to UFS controller platform driver"
	depends on SCSI_UFSHCD_PLATFORM && ARCH_QCOM
	select PHY_QCOM_UFS
	select EXTCON
	select EXTCON_STORAGE_CD_GPIO
	help
	  This selects the QCOM specific additions to UFSHCD platform driver.
	  UFS host on QCOM needs some vendor specific configuration before
+0 −17
Original line number Diff line number Diff line
@@ -304,20 +304,6 @@ static int ufshcd_parse_pinctrl_info(struct ufs_hba *hba)
	return ret;
}

static int ufshcd_parse_extcon_info(struct ufs_hba *hba)
{
	struct extcon_dev *extcon;

	extcon = extcon_get_edev_by_phandle(hba->dev, 0);
	if (IS_ERR(extcon) && PTR_ERR(extcon) != -ENODEV)
		return PTR_ERR(extcon);

	if (!IS_ERR(extcon))
		hba->extcon = extcon;

	return 0;
}

static void ufshcd_parse_gear_limits(struct ufs_hba *hba)
{
	struct device *dev = hba->dev;
@@ -527,9 +513,6 @@ int ufshcd_pltfrm_init(struct platform_device *pdev,
	ufshcd_parse_gear_limits(hba);
	ufshcd_parse_cmd_timeout(hba);
	ufshcd_parse_force_g4_flag(hba);
	err = ufshcd_parse_extcon_info(hba);
	if (err)
		goto dealloc_host;

	if (!dev->dma_mask)
		dev->dma_mask = &dev->coherent_dma_mask;
+18 −411

File changed.

Preview size limit exceeded, changes collapsed.

+0 −43
Original line number Diff line number Diff line
@@ -711,13 +711,6 @@ struct ufshcd_cmd_log {
	u32 seq_num;
};

/* UFS card state - hotplug state */
enum ufshcd_card_state {
	UFS_CARD_STATE_UNKNOWN	= 0,
	UFS_CARD_STATE_ONLINE	= 1,
	UFS_CARD_STATE_OFFLINE	= 2,
};

/**
 * struct ufs_hba - per adapter private structure
 * @mmio_base: UFSHCI base register address
@@ -765,16 +758,6 @@ enum ufshcd_card_state {
 * @debugfs_files: debugfs files associated with the ufs stats
 * @ufshcd_dbg_print: Bitmask for enabling debug prints
 * @extcon: pointer to external connector device
 * @card_detect_nb: card detector notifier registered with @extcon
 * @card_detect_work: work to exectute the card detect function
 * @card_state: card state event, enum ufshcd_card_state defines possible states
 * @card_removal_in_prog: flag to track card removal progress
 * @pm_notify: used to register for PM events
 * @sdev_sema: semaphore to protect scsi devices from being removed
 * @card_mutex: mutex to serialize ON/OFF sequences of hba vregs and clocks
 * @card_rpm_paired: indicates whether runtime PM events are paired after card
 *  detection is finished
 * @card_detect_disabled: to enable/disable card detect
 * @vreg_info: UFS device voltage regulator information
 * @clk_list_head: UFS host controller clocks list node head
 * @pwr_info: holds current power mode
@@ -1009,17 +992,6 @@ struct ufs_hba {
	/* Bitmask for enabling debug prints */
	u32 ufshcd_dbg_print;

	struct extcon_dev *extcon;
	struct notifier_block card_detect_nb;
	struct delayed_work card_detect_work;
	atomic_t card_state;
	unsigned long card_removal_in_prog;
	struct notifier_block pm_notify;
	struct semaphore sdev_sema;
	struct mutex card_mutex;
	bool card_rpm_paired;
	bool card_detect_disabled;

	struct ufs_pa_layer_attr pwr_info;
	struct ufs_pwr_mode_info max_pwr_info;

@@ -1088,21 +1060,6 @@ struct ufs_hba {
	bool wb_enabled;
};

static inline void ufshcd_set_card_removal_ongoing(struct ufs_hba *hba)
{
	set_bit(0, &hba->card_removal_in_prog);
}

static inline void ufshcd_clear_card_removal_ongoing(struct ufs_hba *hba)
{
	clear_bit(0, &hba->card_removal_in_prog);
}

static inline bool ufshcd_is_card_removal_ongoing(struct ufs_hba *hba)
{
	return !!(test_bit(0, &hba->card_removal_in_prog));
}

static inline void ufshcd_mark_shutdown_ongoing(struct ufs_hba *hba)
{
	set_bit(0, &hba->shutdown_in_prog);