Loading drivers/scsi/ufs/ufs-qcom.c +9 −4 Original line number Diff line number Diff line /* * Copyright (c) 2013-2018, Linux Foundation. All rights reserved. * Copyright (c) 2013-2019, Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -1321,11 +1321,16 @@ static void ufs_qcom_dev_ref_clk_ctrl(struct ufs_qcom_host *host, bool enable) /* * If we call hibern8 exit after this, we need to make sure that * device ref_clk is stable for at least 1us before the hibern8 * device ref_clk is stable for a given time before the hibern8 * exit command. */ if (enable) if (enable) { if (host->hba->dev_info.quirks & UFS_DEVICE_QUIRK_WAIT_AFTER_REF_CLK_UNGATE) usleep_range(50, 60); else udelay(1); } host->is_dev_ref_clk_enabled = enable; } Loading drivers/scsi/ufs/ufs_quirks.c +3 −1 Original line number Diff line number Diff line /* * Copyright (c) 2013-2017, The Linux Foundation. All rights reserved. * Copyright (c) 2013-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -28,6 +28,8 @@ static struct ufs_card_fix ufs_fixups[] = { UFS_FIX(UFS_VENDOR_SKHYNIX, UFS_ANY_MODEL, UFS_DEVICE_QUIRK_HOST_PA_SAVECONFIGTIME), UFS_FIX(UFS_VENDOR_SKHYNIX, UFS_ANY_MODEL, UFS_DEVICE_NO_VCCQ), UFS_FIX(UFS_VENDOR_SKHYNIX, UFS_ANY_MODEL, UFS_DEVICE_QUIRK_WAIT_AFTER_REF_CLK_UNGATE), UFS_FIX(UFS_VENDOR_SKHYNIX, "hB8aL1", UFS_DEVICE_QUIRK_HS_G1_TO_HS_G3_SWITCH), UFS_FIX(UFS_VENDOR_SKHYNIX, "hC8aL1", Loading drivers/scsi/ufs/ufs_quirks.h +8 −1 Original line number Diff line number Diff line /* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2014-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -138,6 +138,13 @@ struct ufs_card_fix { */ #define UFS_DEVICE_QUIRK_HS_G1_TO_HS_G3_SWITCH (1 << 8) /* * Some UFS devices need more delay after device reference clk is turned on * but before initiation of the state transition to STALL from a LS-MODE or * from the HIBERN8 state. Enable this quirk to give UFS devices 50us delay * instead of the default delay. */ #define UFS_DEVICE_QUIRK_WAIT_AFTER_REF_CLK_UNGATE (1 << 9) struct ufs_hba; void ufs_advertise_fixup_device(struct ufs_hba *hba); Loading Loading
drivers/scsi/ufs/ufs-qcom.c +9 −4 Original line number Diff line number Diff line /* * Copyright (c) 2013-2018, Linux Foundation. All rights reserved. * Copyright (c) 2013-2019, Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -1321,11 +1321,16 @@ static void ufs_qcom_dev_ref_clk_ctrl(struct ufs_qcom_host *host, bool enable) /* * If we call hibern8 exit after this, we need to make sure that * device ref_clk is stable for at least 1us before the hibern8 * device ref_clk is stable for a given time before the hibern8 * exit command. */ if (enable) if (enable) { if (host->hba->dev_info.quirks & UFS_DEVICE_QUIRK_WAIT_AFTER_REF_CLK_UNGATE) usleep_range(50, 60); else udelay(1); } host->is_dev_ref_clk_enabled = enable; } Loading
drivers/scsi/ufs/ufs_quirks.c +3 −1 Original line number Diff line number Diff line /* * Copyright (c) 2013-2017, The Linux Foundation. All rights reserved. * Copyright (c) 2013-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -28,6 +28,8 @@ static struct ufs_card_fix ufs_fixups[] = { UFS_FIX(UFS_VENDOR_SKHYNIX, UFS_ANY_MODEL, UFS_DEVICE_QUIRK_HOST_PA_SAVECONFIGTIME), UFS_FIX(UFS_VENDOR_SKHYNIX, UFS_ANY_MODEL, UFS_DEVICE_NO_VCCQ), UFS_FIX(UFS_VENDOR_SKHYNIX, UFS_ANY_MODEL, UFS_DEVICE_QUIRK_WAIT_AFTER_REF_CLK_UNGATE), UFS_FIX(UFS_VENDOR_SKHYNIX, "hB8aL1", UFS_DEVICE_QUIRK_HS_G1_TO_HS_G3_SWITCH), UFS_FIX(UFS_VENDOR_SKHYNIX, "hC8aL1", Loading
drivers/scsi/ufs/ufs_quirks.h +8 −1 Original line number Diff line number Diff line /* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2014-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -138,6 +138,13 @@ struct ufs_card_fix { */ #define UFS_DEVICE_QUIRK_HS_G1_TO_HS_G3_SWITCH (1 << 8) /* * Some UFS devices need more delay after device reference clk is turned on * but before initiation of the state transition to STALL from a LS-MODE or * from the HIBERN8 state. Enable this quirk to give UFS devices 50us delay * instead of the default delay. */ #define UFS_DEVICE_QUIRK_WAIT_AFTER_REF_CLK_UNGATE (1 << 9) struct ufs_hba; void ufs_advertise_fixup_device(struct ufs_hba *hba); Loading