mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
ARM: etm: Don't require clock control
If clk_get fail, assume the etb does not need a separate clock. Change-Id: Ia0bf3f5391e94a60ea45876aa7afc8a88a7ec3bf Signed-off-by: Arve Hjønnevåg <arve@android.com>
This commit is contained in:
committed by
Colin Cross
parent
bbcda3b9e1
commit
875e2e1140
@@ -361,13 +361,12 @@ static int __devinit etb_probe(struct amba_device *dev, const struct amba_id *id
|
||||
if (ret)
|
||||
goto out_unmap;
|
||||
|
||||
/* Get optional clock. Currently used to select clock source on omap3 */
|
||||
t->emu_clk = clk_get(&dev->dev, "emu_src_ck");
|
||||
if (IS_ERR(t->emu_clk)) {
|
||||
if (IS_ERR(t->emu_clk))
|
||||
dev_dbg(&dev->dev, "Failed to obtain emu_src_ck.\n");
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
clk_enable(t->emu_clk);
|
||||
else
|
||||
clk_enable(t->emu_clk);
|
||||
|
||||
etb_unlock(t);
|
||||
t->etb_bufsz = etb_readl(t, ETBR_DEPTH);
|
||||
@@ -402,8 +401,10 @@ static int etb_remove(struct amba_device *dev)
|
||||
iounmap(t->etb_regs);
|
||||
t->etb_regs = NULL;
|
||||
|
||||
clk_disable(t->emu_clk);
|
||||
clk_put(t->emu_clk);
|
||||
if (!IS_ERR(t->emu_clk)) {
|
||||
clk_disable(t->emu_clk);
|
||||
clk_put(t->emu_clk);
|
||||
}
|
||||
|
||||
amba_release_regions(dev);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user