Home
last modified time | relevance | path

Searched refs:hba (Results 1 – 10 of 10) sorted by relevance

/rk3399_rockchip-uboot/drivers/ufs/
H A Dufs.c71 static inline bool ufshcd_is_hba_active(struct ufs_hba *hba);
72 static inline void ufshcd_hba_stop(struct ufs_hba *hba);
73 static int ufshcd_hba_enable(struct ufs_hba *hba);
78 static int ufshcd_wait_for_register(struct ufs_hba *hba, u32 reg, u32 mask, in ufshcd_wait_for_register() argument
87 while ((ufshcd_readl(hba, reg) & mask) != val) { in ufshcd_wait_for_register()
89 if ((ufshcd_readl(hba, reg) & mask) != val) in ufshcd_wait_for_register()
102 static void ufshcd_init_pwr_info(struct ufs_hba *hba) in ufshcd_init_pwr_info() argument
104 hba->pwr_info.gear_rx = UFS_PWM_G1; in ufshcd_init_pwr_info()
105 hba->pwr_info.gear_tx = UFS_PWM_G1; in ufshcd_init_pwr_info()
106 hba->pwr_info.lane_rx = 1; in ufshcd_init_pwr_info()
[all …]
H A Dufs-rockchip.c21 extern int ufshcd_dme_enable(struct ufs_hba *hba);
23 static int ufs_rockchip_hce_enable_notify(struct ufs_hba *hba, in ufs_rockchip_hce_enable_notify() argument
29 ufshcd_dme_reset(hba); in ufs_rockchip_hce_enable_notify()
30 ufshcd_dme_enable(hba); in ufs_rockchip_hce_enable_notify()
32 if (hba->ops->phy_initialization) { in ufs_rockchip_hce_enable_notify()
33 err = hba->ops->phy_initialization(hba); in ufs_rockchip_hce_enable_notify()
35 dev_err(hba->dev, "Phy setup failed (%d)\n", err); in ufs_rockchip_hce_enable_notify()
43 static int ufs_rockchip_startup_notify(struct ufs_hba *hba, in ufs_rockchip_startup_notify() argument
49 if (hba->ops->phy_parameter_initialization) { in ufs_rockchip_startup_notify()
50 err = hba->ops->phy_parameter_initialization(hba); in ufs_rockchip_startup_notify()
[all …]
H A Dufs-rockchip-usbplug.c30 int _ufs_start(struct ufs_hba *hba);
122 static int ufs_get_configuration_desc(struct ufs_hba *hba, struct ufs_configuration_descriptor *c_d… in ufs_get_configuration_desc() argument
126 int length = hba->desc_size.conf_desc; in ufs_get_configuration_desc()
129 if (CONFIGURATION_DESC_V31_LENGTH == hba->desc_size.conf_desc) { in ufs_get_configuration_desc()
131 } else if(CONFIGURATION_DESC_V22_LENGTH != hba->desc_size.conf_desc && in ufs_get_configuration_desc()
132 CONFIGURATION_DESC_V30_LENGTH != hba->desc_size.conf_desc) { in ufs_get_configuration_desc()
136 err = ufshcd_read_desc_param(hba, QUERY_DESC_IDN_CONFIGURATION, 0, 0, buf, length); in ufs_get_configuration_desc()
138 dev_err(hba->dev, "%s: Failed reading configuration Desc. err = %d\n", in ufs_get_configuration_desc()
143 if (CONFIGURATION_DESC_V22_LENGTH == hba->desc_size.conf_desc) { in ufs_get_configuration_desc()
152 if (CONFIGURATION_DESC_V30_LENGTH == hba->desc_size.conf_desc) { in ufs_get_configuration_desc()
[all …]
H A Dufshcd-dwc.c16 int ufshcd_dwc_dme_set_attrs(struct ufs_hba *hba, in ufshcd_dwc_dme_set_attrs() argument
23 ret = ufshcd_dme_set_attr(hba, v[attr_node].attr_sel, in ufshcd_dwc_dme_set_attrs()
42 static void ufshcd_dwc_program_clk_div(struct ufs_hba *hba, u32 divider_val) in ufshcd_dwc_program_clk_div() argument
44 ufshcd_writel(hba, divider_val, DWC_UFS_REG_HCLKDIV); in ufshcd_dwc_program_clk_div()
54 static int ufshcd_dwc_link_is_up(struct ufs_hba *hba) in ufshcd_dwc_link_is_up() argument
58 ufshcd_dme_get(hba, UIC_ARG_MIB(VS_POWERSTATE), &dme_result); in ufshcd_dwc_link_is_up()
79 static int ufshcd_dwc_connection_setup(struct ufs_hba *hba) in ufshcd_dwc_connection_setup() argument
102 return ufshcd_dwc_dme_set_attrs(hba, setup_attrs, ARRAY_SIZE(setup_attrs)); in ufshcd_dwc_connection_setup()
113 int ufshcd_dwc_link_startup_notify(struct ufs_hba *hba, in ufshcd_dwc_link_startup_notify() argument
119 ufshcd_dwc_program_clk_div(hba, DWC_UFS_REG_HCLKDIV_DIV_125); in ufshcd_dwc_link_startup_notify()
[all …]
H A Dcdns-platform.c23 static int cdns_ufs_link_startup_notify(struct ufs_hba *hba, in cdns_ufs_link_startup_notify() argument
26 hba->quirks |= UFSHCD_QUIRK_BROKEN_LCC; in cdns_ufs_link_startup_notify()
29 return ufshcd_dme_set(hba, in cdns_ufs_link_startup_notify()
39 static int cdns_ufs_set_hclkdiv(struct ufs_hba *hba) in cdns_ufs_set_hclkdiv() argument
46 ret = clk_get_by_name(hba->dev, "core_clk", &clk); in cdns_ufs_set_hclkdiv()
48 dev_err(hba->dev, "failed to get core_clk clock\n"); in cdns_ufs_set_hclkdiv()
54 dev_err(hba->dev, "%s: unable to find core_clk rate\n", in cdns_ufs_set_hclkdiv()
60 ufshcd_writel(hba, core_clk_div, CDNS_UFS_REG_HCLKDIV); in cdns_ufs_set_hclkdiv()
65 static int cdns_ufs_hce_enable_notify(struct ufs_hba *hba, in cdns_ufs_hce_enable_notify() argument
70 return cdns_ufs_set_hclkdiv(hba); in cdns_ufs_hce_enable_notify()
[all …]
H A Dufs.h667 int ufshcd_dme_set_attr(struct ufs_hba *hba, u32 attr_sel,
669 int ufshcd_dme_get_attr(struct ufs_hba *hba, u32 attr_sel,
672 static inline int ufshcd_dme_set(struct ufs_hba *hba, u32 attr_sel, in ufshcd_dme_set() argument
675 return ufshcd_dme_set_attr(hba, attr_sel, ATTR_SET_NOR, in ufshcd_dme_set()
679 static inline int ufshcd_dme_get(struct ufs_hba *hba, in ufshcd_dme_get() argument
682 return ufshcd_dme_get_attr(hba, attr_sel, mib_val, DME_LOCAL); in ufshcd_dme_get()
685 static inline int ufshcd_dme_peer_get(struct ufs_hba *hba, in ufshcd_dme_peer_get() argument
688 return ufshcd_dme_get_attr(hba, attr_sel, mib_val, DME_PEER); in ufshcd_dme_peer_get()
691 static inline int ufshcd_dme_peer_set(struct ufs_hba *hba, u32 attr_sel, in ufshcd_dme_peer_set() argument
694 return ufshcd_dme_set_attr(hba, attr_sel, ATTR_SET_NOR, in ufshcd_dme_peer_set()
[all …]
H A Dufshcd-dwc.h19 int ufshcd_dwc_link_startup_notify(struct ufs_hba *hba,
21 int ufshcd_dwc_dme_set_attrs(struct ufs_hba *hba,
H A Dufs-rockchip-rpmb.c27 extern int ufs_send_scsi_cmd(struct ufs_hba *hba, struct scsi_cmd *pccb);
72 static int hba_test(struct ufs_hba *hba) in hba_test() argument
74 if (!hba) { in hba_test()
129 static int rpmb_send_scsi_cmd(struct ufs_hba *hba, uint32_t opcode, int dma_dir, int lun, in rpmb_send_scsi_cmd() argument
151 return ufs_send_scsi_cmd(hba, pccb); in rpmb_send_scsi_cmd()
215 dev_err(hba->dev, "%s: Failed reading RPMB Desc. err = %d\n", __func__, ret); in prepare_rpmb_lu()
562 static int ufs_read_desc(struct ufs_hba *hba, enum desc_idn desc_id, in ufs_read_desc() argument
565 return ufshcd_read_desc_param(hba, desc_id, desc_index, 0, buf, size); in ufs_read_desc()
654 int ufs_rpmb_init(struct ufs_hba *hba) in ufs_rpmb_init() argument
656 rpmb_hba = hba; in ufs_rpmb_init()
H A Dufs-rockchip.h52 struct ufs_hba *hba; member
H A Dufs-rockchip-rpmb.h76 int ufs_rpmb_init(struct ufs_hba *hba);