drm/pl111: Register the clock divider and use it.

This is required for the panel to work on bcm911360, where CLCDCLK is
the fixed 200Mhz AXI41 clock.  The rate set is still passed up to the
CLCDCLK, for platforms that have a settable rate on that one.

v2: Set SET_RATE_PARENT (caught by Linus Walleij), depend on
    COMMON_CLK.
v3: Mark the clk_ops static (caught by Stephen).

Signed-off-by: Eric Anholt <eric@anholt.net>
Link: http://patchwork.freedesktop.org/patch/msgid/20170508193348.30236-1-eric@anholt.net
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
This commit is contained in:
Eric Anholt
2017-05-08 12:33:48 -07:00
parent 2098105ec6
commit 032838f9cb
5 changed files with 163 additions and 24 deletions

View File

@@ -50,8 +50,8 @@
* - Read back hardware state at boot to skip reprogramming the
* hardware when doing a no-op modeset.
*
* - Use the internal clock divisor to reduce power consumption by
* using HCLK (apb_pclk) when appropriate.
* - Use the CLKSEL bit to support switching between the two external
* clock parents.
*/
#include <linux/amba/bus.h>
@@ -195,13 +195,6 @@ static int pl111_amba_probe(struct amba_device *amba_dev,
priv->drm = drm;
drm->dev_private = priv;
priv->clk = devm_clk_get(dev, "clcdclk");
if (IS_ERR(priv->clk)) {
dev_err(dev, "CLCD: unable to get clk.\n");
ret = PTR_ERR(priv->clk);
goto dev_unref;
}
priv->regs = devm_ioremap_resource(dev, &amba_dev->res);
if (!priv->regs) {
dev_err(dev, "%s failed mmio\n", __func__);