Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 1 Feb 2019 07:22:57 +0000 (23:22 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 1 Feb 2019 07:22:57 +0000 (23:22 -0800)
Pull clk fixes from Stephen Boyd:
 "Mostly driver fixes, but there's a core framework fix in here too:

   - Revert the commits that introduce clk management for the SP clk on
     MMP2 SoCs (used for OLPC). Turns out it wasn't a good idea and
     there isn't any need to manage this clk, it just causes more
     headaches.

   - A performance regression that went unnoticed for many years where
     we would traverse the entire clk tree looking for a clk by name
     when we already have the pointer to said clk that we're looking for

   - A parent linkage fix for the qcom SDM845 clk driver

   - An i.MX clk driver rate miscalculation fix where order of
     operations were messed up

   - One error handling fix from the static checkers"

* tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
  clk: qcom: gcc: Use active only source for CPUSS clocks
  clk: ti: Fix error handling in ti_clk_parse_divider_data()
  clk: imx: Fix fractional clock set rate computation
  clk: Remove global clk traversal on fetch parent index
  Revert "dt-bindings: marvell,mmp2: Add clock id for the SP clock"
  Revert "clk: mmp2: add SP clock"
  Revert "Input: olpc_apsp - enable the SP clock"

1  2 
drivers/input/serio/olpc_apsp.c

index bae08226e3d95de0e9d2001090b09a4bae29a861,698003309d2c8077c2a73476da4eb60cb5085514..a7cfab3db9ee4b344f5e4c64316d8baaf6c6522a
@@@ -23,7 -23,6 +23,6 @@@
  #include <linux/of.h>
  #include <linux/slab.h>
  #include <linux/delay.h>
- #include <linux/clk.h>
  
  /*
   * The OLPC XO-1.75 and XO-4 laptops do not have a hardware PS/2 controller.
@@@ -75,7 -74,6 +74,6 @@@ struct olpc_apsp 
        struct serio *kbio;
        struct serio *padio;
        void __iomem *base;
-       struct clk *clk;
        int open_count;
        int irq;
  };
@@@ -148,17 -146,11 +146,11 @@@ static int olpc_apsp_open(struct serio 
        struct olpc_apsp *priv = port->port_data;
        unsigned int tmp;
        unsigned long l;
-       int error;
  
        if (priv->open_count++ == 0) {
-               error = clk_prepare_enable(priv->clk);
-               if (error)
-                       return error;
                l = readl(priv->base + COMMAND_FIFO_STATUS);
                if (!(l & CMD_STS_MASK)) {
                        dev_err(priv->dev, "SP cannot accept commands.\n");
-                       clk_disable_unprepare(priv->clk);
                        return -EIO;
                }
  
@@@ -179,8 -171,6 +171,6 @@@ static void olpc_apsp_close(struct seri
                /* Disable interrupt 0 */
                tmp = readl(priv->base + PJ_INTERRUPT_MASK);
                writel(tmp | INT_0, priv->base + PJ_INTERRUPT_MASK);
-               clk_disable_unprepare(priv->clk);
        }
  }
  
@@@ -195,8 -185,6 +185,8 @@@ static int olpc_apsp_probe(struct platf
        if (!priv)
                return -ENOMEM;
  
 +      priv->dev = &pdev->dev;
 +
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        priv->base = devm_ioremap_resource(&pdev->dev, res);
        if (IS_ERR(priv->base)) {
        if (priv->irq < 0)
                return priv->irq;
  
-       priv->clk = devm_clk_get(&pdev->dev, "sp");
-       if (IS_ERR(priv->clk))
-               return PTR_ERR(priv->clk);
        /* KEYBOARD */
        kb_serio = kzalloc(sizeof(struct serio), GFP_KERNEL);
        if (!kb_serio)
                goto err_irq;
        }
  
 -      priv->dev = &pdev->dev;
        device_init_wakeup(priv->dev, 1);
        platform_set_drvdata(pdev, priv);