diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/video/tegra20/tegra-dc.c | 6 | ||||
| -rw-r--r-- | drivers/video/tegra20/tegra-dc.h | 3 | 
2 files changed, 9 insertions, 0 deletions
| diff --git a/drivers/video/tegra20/tegra-dc.c b/drivers/video/tegra20/tegra-dc.c index 5d8874f323a..0e94e665efc 100644 --- a/drivers/video/tegra20/tegra-dc.c +++ b/drivers/video/tegra20/tegra-dc.c @@ -45,6 +45,7 @@ struct tegra_lcd_priv {  	unsigned pixel_clock;		/* Pixel clock in Hz */  	int dc_clk[2];			/* Contains clk and its parent */  	bool rotation;			/* 180 degree panel turn */ +	bool pipe;			/* DC controller: 0 for A, 1 for B */  };  enum { @@ -406,6 +407,9 @@ static int tegra_lcd_of_to_plat(struct udevice *dev)  	priv->rotation = dev_read_bool(dev, "nvidia,180-rotation"); +	if (!strcmp(dev->name, TEGRA_DC_B)) +		priv->pipe = 1; +  	rgb = fdt_subnode_offset(blob, node, "rgb");  	if (rgb < 0) {  		debug("%s: Cannot find rgb subnode for '%s' (ret=%d)\n", @@ -431,12 +435,14 @@ static int tegra_lcd_of_to_plat(struct udevice *dev)  		return ret;  	} +	/* Fill the platform data for internal devices */  	if (!strcmp(priv->panel->name, TEGRA_DSI_A) ||  	    !strcmp(priv->panel->name, TEGRA_DSI_B)) {  		struct tegra_dc_plat *dc_plat = dev_get_plat(priv->panel);  		dc_plat->dev = dev;  		dc_plat->dc = priv->dc; +		dc_plat->pipe = priv->pipe;  	}  	ret = panel_get_display_timing(priv->panel, &priv->timing); diff --git a/drivers/video/tegra20/tegra-dc.h b/drivers/video/tegra20/tegra-dc.h index 5c05221038c..75fc0fa4de4 100644 --- a/drivers/video/tegra20/tegra-dc.h +++ b/drivers/video/tegra20/tegra-dc.h @@ -14,12 +14,15 @@  /* arch-tegra/dc exists only because T124 uses it */  #include <asm/arch-tegra/dc.h> +#define TEGRA_DC_A		"dc@54200000" +#define TEGRA_DC_B		"dc@54240000"  #define TEGRA_DSI_A		"dsi@54300000"  #define TEGRA_DSI_B		"dsi@54400000"  struct tegra_dc_plat {  	struct udevice *dev;		/* Display controller device */  	struct dc_ctlr *dc;		/* Display controller regmap */ +	bool pipe;			/* DC number: 0 for A, 1 for B */  };  /* This holds information about a window which can be displayed */ | 
