Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 18974369 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'clk' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm:
  ARM: 7131/1: clkdev: Add Common Macro for clk_lookup
  clk: spi-pl022: convert to clk_prepare()/clk_unprepare()
  clk: timer-sp: convert to clk_prepare()/clk_unprepare()
  clk: sa1111: convert to clk_prepare()/clk_unprepare()
  clk: mmci: convert to clk_prepare()/clk_unprepare()
  clk: amba-pl011: convert to clk_prepare()/clk_unprepare()
  clk: amba-pl010: convert to clk_prepare()/clk_unprepare()
  clk: amba-clcd: convert to clk_prepare()/clk_unprepare()
  clk: amba bus: convert to clk_prepare()/clk_unprepare()
  clk: provide prepare/unprepare functions
parents 7e0a6fd5 196a57c2
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -718,6 +718,10 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq)
		goto err_free;
	}

	ret = clk_prepare(sachip->clk);
	if (ret)
		goto err_clkput;

	spin_lock_init(&sachip->lock);

	sachip->dev = me;
@@ -733,7 +737,7 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq)
	sachip->base = ioremap(mem->start, PAGE_SIZE * 2);
	if (!sachip->base) {
		ret = -ENOMEM;
		goto err_clkput;
		goto err_clk_unprep;
	}

	/*
@@ -809,6 +813,8 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq)

 err_unmap:
	iounmap(sachip->base);
 err_clk_unprep:
	clk_unprepare(sachip->clk);
 err_clkput:
	clk_put(sachip->clk);
 err_free:
@@ -835,6 +841,7 @@ static void __sa1111_remove(struct sa1111 *sachip)
	sa1111_writel(0, irqbase + SA1111_WAKEEN1);

	clk_disable(sachip->clk);
	clk_unprepare(sachip->clk);

	if (sachip->irq != NO_IRQ) {
		irq_set_chained_handler(sachip->irq, NULL);
+9 −0
Original line number Diff line number Diff line
@@ -41,9 +41,17 @@ static long __init sp804_get_clock_rate(const char *name)
		return PTR_ERR(clk);
	}

	err = clk_prepare(clk);
	if (err) {
		pr_err("sp804: %s clock failed to prepare: %d\n", name, err);
		clk_put(clk);
		return err;
	}

	err = clk_enable(clk);
	if (err) {
		pr_err("sp804: %s clock failed to enable: %d\n", name, err);
		clk_unprepare(clk);
		clk_put(clk);
		return err;
	}
@@ -52,6 +60,7 @@ static long __init sp804_get_clock_rate(const char *name)
	if (rate < 0) {
		pr_err("sp804: %s clock failed to get rate: %ld\n", name, rate);
		clk_disable(clk);
		clk_unprepare(clk);
		clk_put(clk);
	}

+10 −1
Original line number Diff line number Diff line
@@ -460,9 +460,17 @@ static int amba_get_enable_pclk(struct amba_device *pcdev)
	if (IS_ERR(pclk))
		return PTR_ERR(pclk);

	ret = clk_prepare(pclk);
	if (ret) {
		clk_put(pclk);
		return ret;
	}

	ret = clk_enable(pclk);
	if (ret)
	if (ret) {
		clk_unprepare(pclk);
		clk_put(pclk);
	}

	return ret;
}
@@ -472,6 +480,7 @@ static void amba_put_disable_pclk(struct amba_device *pcdev)
	struct clk *pclk = pcdev->pclk;

	clk_disable(pclk);
	clk_unprepare(pclk);
	clk_put(pclk);
}

+8 −1
Original line number Diff line number Diff line
@@ -1160,10 +1160,14 @@ static int __devinit mmci_probe(struct amba_device *dev,
		goto host_free;
	}

	ret = clk_enable(host->clk);
	ret = clk_prepare(host->clk);
	if (ret)
		goto clk_free;

	ret = clk_enable(host->clk);
	if (ret)
		goto clk_unprep;

	host->plat = plat;
	host->variant = variant;
	host->mclk = clk_get_rate(host->clk);
@@ -1351,6 +1355,8 @@ static int __devinit mmci_probe(struct amba_device *dev,
	iounmap(host->base);
 clk_disable:
	clk_disable(host->clk);
 clk_unprep:
	clk_unprepare(host->clk);
 clk_free:
	clk_put(host->clk);
 host_free:
@@ -1398,6 +1404,7 @@ static int __devexit mmci_remove(struct amba_device *dev)

		iounmap(host->base);
		clk_disable(host->clk);
		clk_unprepare(host->clk);
		clk_put(host->clk);

		if (host->vcc)
+10 −0
Original line number Diff line number Diff line
@@ -2187,6 +2187,13 @@ pl022_probe(struct amba_device *adev, const struct amba_id *id)
		dev_err(&adev->dev, "could not retrieve SSP/SPI bus clock\n");
		goto err_no_clk;
	}

	status = clk_prepare(pl022->clk);
	if (status) {
		dev_err(&adev->dev, "could not prepare SSP/SPI bus clock\n");
		goto  err_clk_prep;
	}

	/* Disable SSP */
	writew((readw(SSP_CR1(pl022->virtbase)) & (~SSP_CR1_MASK_SSE)),
	       SSP_CR1(pl022->virtbase));
@@ -2238,6 +2245,8 @@ pl022_probe(struct amba_device *adev, const struct amba_id *id)
	pl022_dma_remove(pl022);
	free_irq(adev->irq[0], pl022);
 err_no_irq:
	clk_unprepare(pl022->clk);
 err_clk_prep:
	clk_put(pl022->clk);
 err_no_clk:
	iounmap(pl022->virtbase);
@@ -2271,6 +2280,7 @@ pl022_remove(struct amba_device *adev)
	pl022_dma_remove(pl022);
	free_irq(adev->irq[0], pl022);
	clk_disable(pl022->clk);
	clk_unprepare(pl022->clk);
	clk_put(pl022->clk);
	iounmap(pl022->virtbase);
	amba_release_regions(adev);
Loading