Commit f2921d8c authored by Hoegeun Kwon's avatar Hoegeun Kwon Committed by Inki Dae

drm/exynos: dsi: Fix the parse_dt function

The dsi + panel is a parental relationship, so OF grpah is not needed.
Therefore, the current dsi_parse_dt function will throw an error,
because there is no linked OF graph for the case fimd + dsi + panel.

Parse the Pll burst and esc clock frequency properties in dsi_parse_dt()
and create a bridge_node only if there is an OF graph associated with dsi.
Signed-off-by: default avatarHoegeun Kwon <hoegeun.kwon@samsung.com>
Reviewed-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
Reviewed-by: default avatarAndi Shyti <andi.shyti@samsung.com>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent 4013ef48
...@@ -1633,7 +1633,6 @@ static int exynos_dsi_parse_dt(struct exynos_dsi *dsi) ...@@ -1633,7 +1633,6 @@ static int exynos_dsi_parse_dt(struct exynos_dsi *dsi)
{ {
struct device *dev = dsi->dev; struct device *dev = dsi->dev;
struct device_node *node = dev->of_node; struct device_node *node = dev->of_node;
struct device_node *ep;
int ret; int ret;
ret = exynos_dsi_of_read_u32(node, "samsung,pll-clock-frequency", ret = exynos_dsi_of_read_u32(node, "samsung,pll-clock-frequency",
...@@ -1641,32 +1640,21 @@ static int exynos_dsi_parse_dt(struct exynos_dsi *dsi) ...@@ -1641,32 +1640,21 @@ static int exynos_dsi_parse_dt(struct exynos_dsi *dsi)
if (ret < 0) if (ret < 0)
return ret; return ret;
ep = of_graph_get_endpoint_by_regs(node, DSI_PORT_OUT, 0); ret = exynos_dsi_of_read_u32(node, "samsung,burst-clock-frequency",
if (!ep) {
dev_err(dev, "no output port with endpoint specified\n");
return -EINVAL;
}
ret = exynos_dsi_of_read_u32(ep, "samsung,burst-clock-frequency",
&dsi->burst_clk_rate); &dsi->burst_clk_rate);
if (ret < 0) if (ret < 0)
goto end; return ret;
ret = exynos_dsi_of_read_u32(ep, "samsung,esc-clock-frequency", ret = exynos_dsi_of_read_u32(node, "samsung,esc-clock-frequency",
&dsi->esc_clk_rate); &dsi->esc_clk_rate);
if (ret < 0) if (ret < 0)
goto end; return ret;
of_node_put(ep);
dsi->bridge_node = of_graph_get_remote_node(node, DSI_PORT_OUT, 0); dsi->bridge_node = of_graph_get_remote_node(node, DSI_PORT_OUT, 0);
if (!dsi->bridge_node) if (!dsi->bridge_node)
return -EINVAL; return -EINVAL;
end: return 0;
of_node_put(ep);
return ret;
} }
static int exynos_dsi_bind(struct device *dev, struct device *master, static int exynos_dsi_bind(struct device *dev, struct device *master,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment