Lines Matching full:hba
34 * @hba: per adapter instance
37 static void cdns_ufs_get_l4_attr(struct ufs_hba *hba) in cdns_ufs_get_l4_attr() argument
39 struct cdns_ufs_host *host = ufshcd_get_variant(hba); in cdns_ufs_get_l4_attr()
41 ufshcd_dme_get(hba, UIC_ARG_MIB(T_PEERDEVICEID), in cdns_ufs_get_l4_attr()
43 ufshcd_dme_get(hba, UIC_ARG_MIB(T_PEERCPORTID), in cdns_ufs_get_l4_attr()
45 ufshcd_dme_get(hba, UIC_ARG_MIB(T_TRAFFICCLASS), in cdns_ufs_get_l4_attr()
47 ufshcd_dme_get(hba, UIC_ARG_MIB(T_PROTOCOLID), in cdns_ufs_get_l4_attr()
49 ufshcd_dme_get(hba, UIC_ARG_MIB(T_CPORTFLAGS), in cdns_ufs_get_l4_attr()
51 ufshcd_dme_get(hba, UIC_ARG_MIB(T_TXTOKENVALUE), in cdns_ufs_get_l4_attr()
53 ufshcd_dme_get(hba, UIC_ARG_MIB(T_RXTOKENVALUE), in cdns_ufs_get_l4_attr()
55 ufshcd_dme_get(hba, UIC_ARG_MIB(T_LOCALBUFFERSPACE), in cdns_ufs_get_l4_attr()
57 ufshcd_dme_get(hba, UIC_ARG_MIB(T_PEERBUFFERSPACE), in cdns_ufs_get_l4_attr()
59 ufshcd_dme_get(hba, UIC_ARG_MIB(T_CREDITSTOSEND), in cdns_ufs_get_l4_attr()
61 ufshcd_dme_get(hba, UIC_ARG_MIB(T_CPORTMODE), in cdns_ufs_get_l4_attr()
63 ufshcd_dme_get(hba, UIC_ARG_MIB(T_CONNECTIONSTATE), in cdns_ufs_get_l4_attr()
69 * @hba: per adapter instance
72 static void cdns_ufs_set_l4_attr(struct ufs_hba *hba) in cdns_ufs_set_l4_attr() argument
74 struct cdns_ufs_host *host = ufshcd_get_variant(hba); in cdns_ufs_set_l4_attr()
76 ufshcd_dme_set(hba, UIC_ARG_MIB(T_CONNECTIONSTATE), 0); in cdns_ufs_set_l4_attr()
77 ufshcd_dme_set(hba, UIC_ARG_MIB(T_PEERDEVICEID), in cdns_ufs_set_l4_attr()
79 ufshcd_dme_set(hba, UIC_ARG_MIB(T_PEERCPORTID), in cdns_ufs_set_l4_attr()
81 ufshcd_dme_set(hba, UIC_ARG_MIB(T_TRAFFICCLASS), in cdns_ufs_set_l4_attr()
83 ufshcd_dme_set(hba, UIC_ARG_MIB(T_PROTOCOLID), in cdns_ufs_set_l4_attr()
85 ufshcd_dme_set(hba, UIC_ARG_MIB(T_CPORTFLAGS), in cdns_ufs_set_l4_attr()
87 ufshcd_dme_set(hba, UIC_ARG_MIB(T_TXTOKENVALUE), in cdns_ufs_set_l4_attr()
89 ufshcd_dme_set(hba, UIC_ARG_MIB(T_RXTOKENVALUE), in cdns_ufs_set_l4_attr()
91 ufshcd_dme_set(hba, UIC_ARG_MIB(T_LOCALBUFFERSPACE), in cdns_ufs_set_l4_attr()
93 ufshcd_dme_set(hba, UIC_ARG_MIB(T_PEERBUFFERSPACE), in cdns_ufs_set_l4_attr()
95 ufshcd_dme_set(hba, UIC_ARG_MIB(T_CREDITSTOSEND), in cdns_ufs_set_l4_attr()
97 ufshcd_dme_set(hba, UIC_ARG_MIB(T_CPORTMODE), in cdns_ufs_set_l4_attr()
99 ufshcd_dme_set(hba, UIC_ARG_MIB(T_CONNECTIONSTATE), in cdns_ufs_set_l4_attr()
106 * @hba: host controller instance
110 static int cdns_ufs_set_hclkdiv(struct ufs_hba *hba) in cdns_ufs_set_hclkdiv() argument
113 struct list_head *head = &hba->clk_list_head; in cdns_ufs_set_hclkdiv()
128 dev_err(hba->dev, "%s: unable to find core_clk rate\n", in cdns_ufs_set_hclkdiv()
135 ufshcd_writel(hba, core_clk_div, CDNS_UFS_REG_HCLKDIV); in cdns_ufs_set_hclkdiv()
148 * @hba: host controller instance
153 static int cdns_ufs_hce_enable_notify(struct ufs_hba *hba, in cdns_ufs_hce_enable_notify() argument
159 return cdns_ufs_set_hclkdiv(hba); in cdns_ufs_hce_enable_notify()
165 * @hba: host controller instance
170 static void cdns_ufs_hibern8_notify(struct ufs_hba *hba, enum uic_cmd_dme cmd, in cdns_ufs_hibern8_notify() argument
174 cdns_ufs_get_l4_attr(hba); in cdns_ufs_hibern8_notify()
176 cdns_ufs_set_l4_attr(hba); in cdns_ufs_hibern8_notify()
182 * @hba: host controller instance
187 static int cdns_ufs_link_startup_notify(struct ufs_hba *hba, in cdns_ufs_link_startup_notify() argument
200 ufshcd_disable_host_tx_lcc(hba); in cdns_ufs_link_startup_notify()
206 hba->ahit = 0; in cdns_ufs_link_startup_notify()
213 * @hba: host controller instance
217 static int cdns_ufs_init(struct ufs_hba *hba) in cdns_ufs_init() argument
221 struct device *dev = hba->dev; in cdns_ufs_init()
227 ufshcd_set_variant(hba, host); in cdns_ufs_init()
229 status = ufshcd_vops_phy_initialization(hba); in cdns_ufs_init()
236 * @hba: host controller instance
240 static int cdns_ufs_m31_16nm_phy_initialization(struct ufs_hba *hba) in cdns_ufs_m31_16nm_phy_initialization() argument
245 data = ufshcd_readl(hba, CDNS_UFS_REG_PHY_XCFGD1); in cdns_ufs_m31_16nm_phy_initialization()
247 ufshcd_writel(hba, data, CDNS_UFS_REG_PHY_XCFGD1); in cdns_ufs_m31_16nm_phy_initialization()
315 struct ufs_hba *hba = platform_get_drvdata(pdev); in cdns_ufs_pltfrm_remove() local
317 ufshcd_remove(hba); in cdns_ufs_pltfrm_remove()