summaryrefslogtreecommitdiffstats
path: root/drivers/video/tegra/dc/dsi.c
diff options
context:
space:
mode:
authorMin-wuk Lee <mlee@nvidia.com>2014-07-02 05:34:30 -0400
committerDan Willemsen <dwillemsen@nvidia.com>2015-03-18 15:10:23 -0400
commitc332018112f933300f64a93d8f5344885fdfe26a (patch)
tree33e6190b3d26097d7279fb732d8671983ab0a7b9 /drivers/video/tegra/dc/dsi.c
parent70a7613efb1254fd01321f4ce6f8abd3ac37c69a (diff)
video: tegra: dc: fix dsi res parse
In case ganged mode is not set, dsi resource (start address and size) needs to be determined by dsi instance. - For dsi_instance_0, TEGRA_DSI_BASE - For dsi_instance_1, TEGRA_DSIB_BASE This change fix index for this case, so it can parse proper resources from device tree reg property. Bug 1371533 Change-Id: I79555512277d0558bc5f03ea6a2452b3ef810fe7 Signed-off-by: Min-wuk Lee <mlee@nvidia.com> Reviewed-on: http://git-master/r/433573 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Jon Mayo <jmayo@nvidia.com>
Diffstat (limited to 'drivers/video/tegra/dc/dsi.c')
-rw-r--r--drivers/video/tegra/dc/dsi.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/video/tegra/dc/dsi.c b/drivers/video/tegra/dc/dsi.c
index d238d1aa3..227ea51e5 100644
--- a/drivers/video/tegra/dc/dsi.c
+++ b/drivers/video/tegra/dc/dsi.c
@@ -4329,8 +4329,9 @@ static int _tegra_dc_dsi_init(struct tegra_dc *dc)
4329 struct clk *dsi_clk; 4329 struct clk *dsi_clk;
4330 struct clk *dsi_fixed_clk = NULL; 4330 struct clk *dsi_fixed_clk = NULL;
4331 struct clk *dsi_lp_clk = NULL; 4331 struct clk *dsi_lp_clk = NULL;
4332 struct tegra_dsi_out *dsi_pdata; 4332 struct tegra_dsi_out *dsi_pdata = NULL;
4333 int err = 0, i; 4333 int err = 0, i;
4334 int dsi_instance;
4334 char *ganged_reg_name[2] = {"ganged_dsia_regs", "ganged_dsib_regs"}; 4335 char *ganged_reg_name[2] = {"ganged_dsia_regs", "ganged_dsib_regs"};
4335 char *dsi_clk_name[2] = {"dsia", "dsib"}; 4336 char *dsi_clk_name[2] = {"dsia", "dsib"};
4336 char *dsi_lp_clk_name[2] = {"dsialp", "dsiblp"}; 4337 char *dsi_lp_clk_name[2] = {"dsialp", "dsiblp"};
@@ -4348,10 +4349,16 @@ static int _tegra_dc_dsi_init(struct tegra_dc *dc)
4348 } 4349 }
4349 4350
4350 dsi->max_instances = dc->out->dsi->ganged_type ? MAX_DSI_INSTANCE : 1; 4351 dsi->max_instances = dc->out->dsi->ganged_type ? MAX_DSI_INSTANCE : 1;
4352 dsi_instance = (int)dc->out->dsi->dsi_instance;
4351 for (i = 0; i < dsi->max_instances; i++) { 4353 for (i = 0; i < dsi->max_instances; i++) {
4352 if (np) { 4354 if (np) {
4353 if (np_dsi && of_device_is_available(np_dsi)) { 4355 if (np_dsi && of_device_is_available(np_dsi)) {
4354 of_address_to_resource(np_dsi, i, &dsi_res); 4356 if (!dc->out->dsi->ganged_type)
4357 of_address_to_resource(np_dsi,
4358 dsi_instance, &dsi_res);
4359 else /* ganged type */
4360 of_address_to_resource(np_dsi,
4361 i, &dsi_res);
4355 res = &dsi_res; 4362 res = &dsi_res;
4356 } else { 4363 } else {
4357 err = -EINVAL; 4364 err = -EINVAL;