mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 12:57:06 +09:00
ARM: tegra: Add emc_clk_rate field to dc platform data
If passed in, use the required emc_clk_rate passed in from the board file. If no value set use ULONG_MAX as before. Change-Id: I301f9fea8bf7297722b5e91e34c0dc7796c6095f Signed-off-by: James Wylder <james.wylder@motorola.com>
This commit is contained in:
committed by
Todd Poynor
parent
5a5d5e35a9
commit
c32a73b4fc
@@ -154,6 +154,7 @@ struct tegra_fb_data {
|
||||
|
||||
struct tegra_dc_platform_data {
|
||||
unsigned long flags;
|
||||
unsigned long emc_clk_rate;
|
||||
struct tegra_dc_out *default_out;
|
||||
struct tegra_fb_data *fb;
|
||||
};
|
||||
|
||||
@@ -1041,6 +1041,7 @@ static int tegra_dc_probe(struct nvhost_device *ndev)
|
||||
void __iomem *base;
|
||||
int irq;
|
||||
int i;
|
||||
unsigned long emc_clk_rate;
|
||||
|
||||
if (!ndev->dev.platform_data) {
|
||||
dev_err(&ndev->dev, "no platform data\n");
|
||||
@@ -1097,13 +1098,6 @@ static int tegra_dc_probe(struct nvhost_device *ndev)
|
||||
goto err_put_clk;
|
||||
}
|
||||
|
||||
/*
|
||||
* The emc is a shared clock, it will be set to the highest
|
||||
* requested rate from any user. Set the rate to ULONG_MAX to
|
||||
* always request the max rate whenever this request is enabled
|
||||
*/
|
||||
clk_set_rate(emc_clk, ULONG_MAX);
|
||||
|
||||
dc->clk = clk;
|
||||
dc->emc_clk = emc_clk;
|
||||
dc->base_res = base_res;
|
||||
@@ -1112,6 +1106,13 @@ static int tegra_dc_probe(struct nvhost_device *ndev)
|
||||
dc->ndev = ndev;
|
||||
dc->pdata = ndev->dev.platform_data;
|
||||
|
||||
/*
|
||||
* The emc is a shared clock, it will be set based on
|
||||
* the requirements for each user on the bus.
|
||||
*/
|
||||
emc_clk_rate = dc->pdata->emc_clk_rate;
|
||||
clk_set_rate(emc_clk, emc_clk_rate ? emc_clk_rate : ULONG_MAX);
|
||||
|
||||
if (dc->pdata->flags & TEGRA_DC_FLAG_ENABLED)
|
||||
dc->enabled = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user