1 /* linux/arch/arm/mach-s5pv310/setup-fimg2d.c
3 * Copyright (c) 2010 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com/
6 * Inki Dae <inki.dae@samsung.com>
8 * clock configuration for FIMG2D
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
16 #include <linux/clk.h>
17 #include <linux/err.h>
18 #include <linux/kernel.h>
19 #include <linux/types.h>
20 #include <linux/device.h>
22 int universal_fimg2d_setup_clock(const char *sclk_name, const char *pclk_name)
24 struct clk *sclk = NULL;
25 struct clk *pclk = NULL;
27 sclk = clk_get(NULL, sclk_name);
29 dev_err(NULL, "failed to get %s clock.\n", sclk_name);
33 pclk = clk_get(NULL, pclk_name);
35 dev_err(NULL, "failed to get %s clock.\n", pclk_name);
39 clk_set_parent(sclk, pclk);
41 dev_dbg(NULL, "set parent clock of %s to %s\n", sclk_name, pclk_name);