• Home
  • Raw
  • Download

Lines Matching refs:meson_dw_hdmi

124 struct meson_dw_hdmi;
127 unsigned int (*top_read)(struct meson_dw_hdmi *dw_hdmi,
129 void (*top_write)(struct meson_dw_hdmi *dw_hdmi,
131 unsigned int (*dwc_read)(struct meson_dw_hdmi *dw_hdmi,
133 void (*dwc_write)(struct meson_dw_hdmi *dw_hdmi,
139 struct meson_dw_hdmi { struct
153 static inline int dw_hdmi_is_compatible(struct meson_dw_hdmi *dw_hdmi, in dw_hdmi_is_compatible() argument
161 static unsigned int dw_hdmi_top_read(struct meson_dw_hdmi *dw_hdmi, in dw_hdmi_top_read()
182 static unsigned int dw_hdmi_g12a_top_read(struct meson_dw_hdmi *dw_hdmi, in dw_hdmi_g12a_top_read()
188 static inline void dw_hdmi_top_write(struct meson_dw_hdmi *dw_hdmi, in dw_hdmi_top_write()
205 static inline void dw_hdmi_g12a_top_write(struct meson_dw_hdmi *dw_hdmi, in dw_hdmi_g12a_top_write()
212 static inline void dw_hdmi_top_write_bits(struct meson_dw_hdmi *dw_hdmi, in dw_hdmi_top_write_bits()
225 static unsigned int dw_hdmi_dwc_read(struct meson_dw_hdmi *dw_hdmi, in dw_hdmi_dwc_read()
246 static unsigned int dw_hdmi_g12a_dwc_read(struct meson_dw_hdmi *dw_hdmi, in dw_hdmi_g12a_dwc_read()
252 static inline void dw_hdmi_dwc_write(struct meson_dw_hdmi *dw_hdmi, in dw_hdmi_dwc_write()
269 static inline void dw_hdmi_g12a_dwc_write(struct meson_dw_hdmi *dw_hdmi, in dw_hdmi_g12a_dwc_write()
276 static inline void dw_hdmi_dwc_write_bits(struct meson_dw_hdmi *dw_hdmi, in dw_hdmi_dwc_write_bits()
292 static void meson_hdmi_phy_setup_mode(struct meson_dw_hdmi *dw_hdmi, in meson_hdmi_phy_setup_mode()
357 static inline void meson_dw_hdmi_phy_reset(struct meson_dw_hdmi *dw_hdmi) in meson_dw_hdmi_phy_reset()
376 struct meson_dw_hdmi *dw_hdmi = (struct meson_dw_hdmi *)data; in dw_hdmi_phy_init()
460 struct meson_dw_hdmi *dw_hdmi = (struct meson_dw_hdmi *)data; in dw_hdmi_phy_disable()
473 struct meson_dw_hdmi *dw_hdmi = (struct meson_dw_hdmi *)data; in dw_hdmi_read_hpd()
482 struct meson_dw_hdmi *dw_hdmi = (struct meson_dw_hdmi *)data; in dw_hdmi_setup_hpd()
507 struct meson_dw_hdmi *dw_hdmi = dev_id; in dw_hdmi_top_irq()
531 struct meson_dw_hdmi *dw_hdmi = dev_id; in dw_hdmi_top_thread_irq()
558 struct meson_dw_hdmi *dw_hdmi = context; in meson_dw_hdmi_reg_read()
569 struct meson_dw_hdmi *dw_hdmi = context; in meson_dw_hdmi_reg_write()
612 static void meson_dw_hdmi_init(struct meson_dw_hdmi *meson_dw_hdmi) in meson_dw_hdmi_init() argument
614 struct meson_drm *priv = meson_dw_hdmi->priv; in meson_dw_hdmi_init()
623 reset_control_reset(meson_dw_hdmi->hdmitx_apb); in meson_dw_hdmi_init()
624 reset_control_reset(meson_dw_hdmi->hdmitx_ctrl); in meson_dw_hdmi_init()
625 reset_control_reset(meson_dw_hdmi->hdmitx_phy); in meson_dw_hdmi_init()
630 meson_dw_hdmi->hdmitx + HDMITX_TOP_CTRL_REG); in meson_dw_hdmi_init()
632 meson_dw_hdmi->hdmitx + HDMITX_DWC_CTRL_REG); in meson_dw_hdmi_init()
636 meson_dw_hdmi->data->top_write(meson_dw_hdmi, in meson_dw_hdmi_init()
641 meson_dw_hdmi->data->top_write(meson_dw_hdmi, in meson_dw_hdmi_init()
645 meson_dw_hdmi->data->top_write(meson_dw_hdmi, HDMITX_TOP_BIST_CNTL, BIT(12)); in meson_dw_hdmi_init()
648 regmap_write(priv->hhi, HHI_HDMI_PHY_CNTL1, meson_dw_hdmi->data->cntl1_init); in meson_dw_hdmi_init()
649 regmap_write(priv->hhi, HHI_HDMI_PHY_CNTL0, meson_dw_hdmi->data->cntl0_init); in meson_dw_hdmi_init()
652 meson_dw_hdmi->data->top_write(meson_dw_hdmi, HDMITX_TOP_INTR_STAT_CLR, in meson_dw_hdmi_init()
655 meson_dw_hdmi->data->top_write(meson_dw_hdmi, HDMITX_TOP_INTR_MASKN, in meson_dw_hdmi_init()
688 struct meson_dw_hdmi *meson_dw_hdmi; in meson_dw_hdmi_bind() local
703 meson_dw_hdmi = devm_kzalloc(dev, sizeof(*meson_dw_hdmi), in meson_dw_hdmi_bind()
705 if (!meson_dw_hdmi) in meson_dw_hdmi_bind()
708 meson_dw_hdmi->priv = priv; in meson_dw_hdmi_bind()
709 meson_dw_hdmi->dev = dev; in meson_dw_hdmi_bind()
710 meson_dw_hdmi->data = match; in meson_dw_hdmi_bind()
711 dw_plat_data = &meson_dw_hdmi->dw_plat_data; in meson_dw_hdmi_bind()
717 meson_dw_hdmi->hdmitx_apb = devm_reset_control_get_exclusive(dev, in meson_dw_hdmi_bind()
719 if (IS_ERR(meson_dw_hdmi->hdmitx_apb)) { in meson_dw_hdmi_bind()
721 return PTR_ERR(meson_dw_hdmi->hdmitx_apb); in meson_dw_hdmi_bind()
724 meson_dw_hdmi->hdmitx_ctrl = devm_reset_control_get_exclusive(dev, in meson_dw_hdmi_bind()
726 if (IS_ERR(meson_dw_hdmi->hdmitx_ctrl)) { in meson_dw_hdmi_bind()
728 return PTR_ERR(meson_dw_hdmi->hdmitx_ctrl); in meson_dw_hdmi_bind()
731 meson_dw_hdmi->hdmitx_phy = devm_reset_control_get_exclusive(dev, in meson_dw_hdmi_bind()
733 if (IS_ERR(meson_dw_hdmi->hdmitx_phy)) { in meson_dw_hdmi_bind()
735 return PTR_ERR(meson_dw_hdmi->hdmitx_phy); in meson_dw_hdmi_bind()
738 meson_dw_hdmi->hdmitx = devm_platform_ioremap_resource(pdev, 0); in meson_dw_hdmi_bind()
739 if (IS_ERR(meson_dw_hdmi->hdmitx)) in meson_dw_hdmi_bind()
740 return PTR_ERR(meson_dw_hdmi->hdmitx); in meson_dw_hdmi_bind()
754 dw_plat_data->regm = devm_regmap_init(dev, NULL, meson_dw_hdmi, in meson_dw_hdmi_bind()
765 "dw_hdmi_top_irq", meson_dw_hdmi); in meson_dw_hdmi_bind()
771 meson_dw_hdmi_init(meson_dw_hdmi); in meson_dw_hdmi_bind()
775 dw_plat_data->priv_data = meson_dw_hdmi; in meson_dw_hdmi_bind()
778 dw_plat_data->phy_data = meson_dw_hdmi; in meson_dw_hdmi_bind()
784 if (dw_hdmi_is_compatible(meson_dw_hdmi, "amlogic,meson-gxl-dw-hdmi") || in meson_dw_hdmi_bind()
785 dw_hdmi_is_compatible(meson_dw_hdmi, "amlogic,meson-gxm-dw-hdmi") || in meson_dw_hdmi_bind()
786 dw_hdmi_is_compatible(meson_dw_hdmi, "amlogic,meson-g12a-dw-hdmi")) in meson_dw_hdmi_bind()
789 platform_set_drvdata(pdev, meson_dw_hdmi); in meson_dw_hdmi_bind()
791 meson_dw_hdmi->hdmi = dw_hdmi_probe(pdev, &meson_dw_hdmi->dw_plat_data); in meson_dw_hdmi_bind()
792 if (IS_ERR(meson_dw_hdmi->hdmi)) in meson_dw_hdmi_bind()
793 return PTR_ERR(meson_dw_hdmi->hdmi); in meson_dw_hdmi_bind()
795 meson_dw_hdmi->bridge = of_drm_find_bridge(pdev->dev.of_node); in meson_dw_hdmi_bind()
805 struct meson_dw_hdmi *meson_dw_hdmi = dev_get_drvdata(dev); in meson_dw_hdmi_unbind() local
807 dw_hdmi_unbind(meson_dw_hdmi->hdmi); in meson_dw_hdmi_unbind()
817 struct meson_dw_hdmi *meson_dw_hdmi = dev_get_drvdata(dev); in meson_dw_hdmi_pm_suspend() local
819 if (!meson_dw_hdmi) in meson_dw_hdmi_pm_suspend()
823 meson_dw_hdmi->data->top_write(meson_dw_hdmi, in meson_dw_hdmi_pm_suspend()
831 struct meson_dw_hdmi *meson_dw_hdmi = dev_get_drvdata(dev); in meson_dw_hdmi_pm_resume() local
833 if (!meson_dw_hdmi) in meson_dw_hdmi_pm_resume()
836 meson_dw_hdmi_init(meson_dw_hdmi); in meson_dw_hdmi_pm_resume()
838 dw_hdmi_resume(meson_dw_hdmi->hdmi); in meson_dw_hdmi_pm_resume()