]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/blobdiff - drivers/video/tegra/dc/dp.c
Revert "video: tegra: dc: make SOR instance configurable"
[sojka/nv-tegra/linux-3.10.git] / drivers / video / tegra / dc / dp.c
index 89faf8bb092d6d11d31c8878eed12e2c3b5694ad..f0145befac69d5346809e3e84b1676969662a188 100644 (file)
@@ -1200,8 +1200,8 @@ static void tegra_dpaux_enable(struct tegra_dc_dp_data *dp)
                DPAUX_HYBRID_PADCTL_AUX_INPUT_RCV_ENABLE);
 
        tegra_dpaux_pad_power(dp->dc,
-               tegra_dc_which_sor(dp->dc) ? TEGRA_DPAUX_INSTANCE_1 :
-               TEGRA_DPAUX_INSTANCE_0, true);
+               dp->dc->ndev->id == 0 ? TEGRA_DPAUX_INSTANCE_0 :
+               TEGRA_DPAUX_INSTANCE_1, true);
 }
 
 static int tegra_dp_panel_power_state(struct tegra_dc_dp_data *dp, u8 state)
@@ -1741,7 +1741,7 @@ static void tegra_dpaux_init(struct tegra_dc_dp_data *dp)
 {
        BUG_ON(!dp->dc || !dp);
 
-       tegra_set_dpaux_addr(dp->aux_base, tegra_dc_which_sor(dp->dc));
+       tegra_set_dpaux_addr(dp->aux_base, dp->dc->ndev->id);
 
        _tegra_dpaux_init(dp);
 
@@ -1777,9 +1777,9 @@ static int tegra_dc_dp_init(struct tegra_dc *dc)
        int err;
        u32 irq;
        struct device_node *np = dc->ndev->dev.of_node;
-       int dp_num = tegra_dc_which_sor(dc);
+
        struct device_node *np_dp =
-               dp_num ? of_find_node_by_path(DPAUX1_NODE)
+               (dc->ndev->id) ? of_find_node_by_path(DPAUX1_NODE)
                : of_find_node_by_path(DPAUX_NODE);
        struct device_node *np_panel = NULL;
 
@@ -1845,9 +1845,9 @@ static int tegra_dc_dp_init(struct tegra_dc *dc)
 
 
 #ifdef CONFIG_TEGRA_NVDISPLAY
-       clk = clk_get(NULL, dp_num ? "dpaux1" : "dpaux");
+       clk = clk_get(NULL, dc->ndev->id ? "dpaux1" : "dpaux");
 #else
-       clk = clk_get_sys(dp_num ? "dpaux1" : "dpaux", NULL);
+       clk = clk_get_sys(dc->ndev->id ? "dpaux1" : "dpaux", NULL);
 #endif
        if (IS_ERR_OR_NULL(clk)) {
                dev_err(&dc->ndev->dev, "dp: dc clock %s.edp unavailable\n",
@@ -2271,7 +2271,7 @@ void tegra_dc_dp_enable_link(struct tegra_dc_dp_data *dp)
 static void tegra_dc_dp_destroy(struct tegra_dc *dc)
 {
        struct device_node *np_dp =
-               tegra_dc_which_sor(dc) ? of_find_node_by_path(DPAUX1_NODE) :
+               (dc->ndev->id) ? of_find_node_by_path(DPAUX1_NODE) :
                of_find_node_by_path(DPAUX_NODE);
        struct tegra_dc_dp_data *dp = tegra_dc_get_outdata(dc);