2012-03-10 05:51:24 +08:00
|
|
|
/*
|
2012-03-10 06:19:10 +08:00
|
|
|
* Copyright (c) 2010-2012 Samsung Electronics Co., Ltd.
|
2011-02-14 15:08:04 +08:00
|
|
|
* http://www.samsung.com
|
2010-07-27 16:52:39 +08:00
|
|
|
*
|
2011-02-14 15:08:04 +08:00
|
|
|
* EXYNOS4 - Clock support
|
2010-07-27 16:52:39 +08:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/err.h>
|
|
|
|
#include <linux/io.h>
|
2011-08-24 20:52:45 +08:00
|
|
|
#include <linux/syscore_ops.h>
|
2010-07-27 16:52:39 +08:00
|
|
|
|
|
|
|
#include <plat/cpu-freq.h>
|
|
|
|
#include <plat/clock.h>
|
|
|
|
#include <plat/cpu.h>
|
|
|
|
#include <plat/pll.h>
|
|
|
|
#include <plat/s5p-clock.h>
|
|
|
|
#include <plat/clock-clksrc.h>
|
2011-08-24 20:52:45 +08:00
|
|
|
#include <plat/pm.h>
|
2010-07-27 16:52:39 +08:00
|
|
|
|
|
|
|
#include <mach/map.h>
|
|
|
|
#include <mach/regs-clock.h>
|
2011-03-07 08:10:24 +08:00
|
|
|
#include <mach/sysmmu.h>
|
2010-07-27 16:52:39 +08:00
|
|
|
|
2011-12-27 15:18:36 +08:00
|
|
|
#include "common.h"
|
2012-03-10 05:51:24 +08:00
|
|
|
#include "clock-exynos4.h"
|
2011-12-27 15:18:36 +08:00
|
|
|
|
2012-01-27 13:56:17 +08:00
|
|
|
#ifdef CONFIG_PM_SLEEP
|
2011-08-24 20:52:45 +08:00
|
|
|
static struct sleep_save exynos4_clock_save[] = {
|
2012-03-10 06:19:10 +08:00
|
|
|
SAVE_ITEM(EXYNOS4_CLKDIV_LEFTBUS),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKGATE_IP_LEFTBUS),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKDIV_RIGHTBUS),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKGATE_IP_RIGHTBUS),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKSRC_TOP0),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKSRC_TOP1),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKSRC_CAM),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKSRC_TV),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKSRC_MFC),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKSRC_G3D),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKSRC_LCD0),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKSRC_MAUDIO),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKSRC_FSYS),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKSRC_PERIL0),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKSRC_PERIL1),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKDIV_CAM),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKDIV_TV),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKDIV_MFC),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKDIV_G3D),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKDIV_LCD0),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKDIV_MAUDIO),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKDIV_FSYS0),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKDIV_FSYS1),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKDIV_FSYS2),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKDIV_FSYS3),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKDIV_PERIL0),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKDIV_PERIL1),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKDIV_PERIL2),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKDIV_PERIL3),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKDIV_PERIL4),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKDIV_PERIL5),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKDIV_TOP),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKSRC_MASK_TOP),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKSRC_MASK_CAM),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKSRC_MASK_TV),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKSRC_MASK_LCD0),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKSRC_MASK_MAUDIO),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKSRC_MASK_FSYS),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKSRC_MASK_PERIL0),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKSRC_MASK_PERIL1),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKDIV2_RATIO),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKGATE_SCLKCAM),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKGATE_IP_CAM),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKGATE_IP_TV),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKGATE_IP_MFC),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKGATE_IP_G3D),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKGATE_IP_LCD0),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKGATE_IP_FSYS),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKGATE_IP_GPS),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKGATE_IP_PERIL),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKGATE_BLOCK),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKSRC_MASK_DMC),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKSRC_DMC),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKDIV_DMC0),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKDIV_DMC1),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKGATE_IP_DMC),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKSRC_CPU),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKDIV_CPU),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKDIV_CPU + 0x4),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKGATE_SCLKCPU),
|
|
|
|
SAVE_ITEM(EXYNOS4_CLKGATE_IP_CPU),
|
2011-08-24 20:52:45 +08:00
|
|
|
};
|
2012-01-27 13:56:17 +08:00
|
|
|
#endif
|
2011-08-24 20:52:45 +08:00
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clk exynos4_clk_sclk_hdmi27m = {
|
2010-07-27 16:52:39 +08:00
|
|
|
.name = "sclk_hdmi27m",
|
|
|
|
.rate = 27000000,
|
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clk exynos4_clk_sclk_hdmiphy = {
|
2010-08-18 21:16:45 +08:00
|
|
|
.name = "sclk_hdmiphy",
|
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clk exynos4_clk_sclk_usbphy0 = {
|
2010-08-18 21:16:45 +08:00
|
|
|
.name = "sclk_usbphy0",
|
|
|
|
.rate = 27000000,
|
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clk exynos4_clk_sclk_usbphy1 = {
|
2010-08-18 21:16:45 +08:00
|
|
|
.name = "sclk_usbphy1",
|
|
|
|
};
|
|
|
|
|
2011-09-02 08:44:36 +08:00
|
|
|
static struct clk dummy_apb_pclk = {
|
|
|
|
.name = "apb_pclk",
|
|
|
|
.id = -1,
|
|
|
|
};
|
|
|
|
|
2011-02-14 15:08:04 +08:00
|
|
|
static int exynos4_clksrc_mask_top_ctrl(struct clk *clk, int enable)
|
2010-08-18 21:33:43 +08:00
|
|
|
{
|
2012-03-10 06:19:10 +08:00
|
|
|
return s5p_gatectrl(EXYNOS4_CLKSRC_MASK_TOP, clk, enable);
|
2010-08-18 21:33:43 +08:00
|
|
|
}
|
|
|
|
|
2011-02-14 15:08:04 +08:00
|
|
|
static int exynos4_clksrc_mask_cam_ctrl(struct clk *clk, int enable)
|
2010-08-18 21:54:48 +08:00
|
|
|
{
|
2012-03-10 06:19:10 +08:00
|
|
|
return s5p_gatectrl(EXYNOS4_CLKSRC_MASK_CAM, clk, enable);
|
2010-08-18 21:54:48 +08:00
|
|
|
}
|
|
|
|
|
2011-02-14 15:08:04 +08:00
|
|
|
static int exynos4_clksrc_mask_lcd0_ctrl(struct clk *clk, int enable)
|
2010-08-18 21:54:48 +08:00
|
|
|
{
|
2012-03-10 06:19:10 +08:00
|
|
|
return s5p_gatectrl(EXYNOS4_CLKSRC_MASK_LCD0, clk, enable);
|
2010-08-18 21:54:48 +08:00
|
|
|
}
|
|
|
|
|
2011-08-24 16:25:09 +08:00
|
|
|
int exynos4_clksrc_mask_fsys_ctrl(struct clk *clk, int enable)
|
2010-08-18 21:39:26 +08:00
|
|
|
{
|
2012-03-10 06:19:10 +08:00
|
|
|
return s5p_gatectrl(EXYNOS4_CLKSRC_MASK_FSYS, clk, enable);
|
2010-08-18 21:39:26 +08:00
|
|
|
}
|
|
|
|
|
2011-02-14 15:08:04 +08:00
|
|
|
static int exynos4_clksrc_mask_peril0_ctrl(struct clk *clk, int enable)
|
2010-08-27 16:53:26 +08:00
|
|
|
{
|
2012-03-10 06:19:10 +08:00
|
|
|
return s5p_gatectrl(EXYNOS4_CLKSRC_MASK_PERIL0, clk, enable);
|
2010-08-27 16:53:26 +08:00
|
|
|
}
|
|
|
|
|
2011-02-14 15:08:04 +08:00
|
|
|
static int exynos4_clksrc_mask_peril1_ctrl(struct clk *clk, int enable)
|
2010-08-18 21:54:48 +08:00
|
|
|
{
|
2012-03-10 06:19:10 +08:00
|
|
|
return s5p_gatectrl(EXYNOS4_CLKSRC_MASK_PERIL1, clk, enable);
|
2010-08-18 21:54:48 +08:00
|
|
|
}
|
|
|
|
|
2011-03-07 08:10:24 +08:00
|
|
|
static int exynos4_clk_ip_mfc_ctrl(struct clk *clk, int enable)
|
|
|
|
{
|
2012-03-10 06:19:10 +08:00
|
|
|
return s5p_gatectrl(EXYNOS4_CLKGATE_IP_MFC, clk, enable);
|
2011-03-07 08:10:24 +08:00
|
|
|
}
|
|
|
|
|
2011-09-19 15:44:42 +08:00
|
|
|
static int exynos4_clksrc_mask_tv_ctrl(struct clk *clk, int enable)
|
|
|
|
{
|
2012-03-10 06:19:10 +08:00
|
|
|
return s5p_gatectrl(EXYNOS4_CLKSRC_MASK_TV, clk, enable);
|
2011-09-19 15:44:42 +08:00
|
|
|
}
|
|
|
|
|
2011-02-14 15:08:04 +08:00
|
|
|
static int exynos4_clk_ip_cam_ctrl(struct clk *clk, int enable)
|
2010-08-18 21:49:24 +08:00
|
|
|
{
|
2012-03-10 06:19:10 +08:00
|
|
|
return s5p_gatectrl(EXYNOS4_CLKGATE_IP_CAM, clk, enable);
|
2010-08-18 21:49:24 +08:00
|
|
|
}
|
|
|
|
|
2011-03-07 08:10:24 +08:00
|
|
|
static int exynos4_clk_ip_tv_ctrl(struct clk *clk, int enable)
|
|
|
|
{
|
2012-03-10 06:19:10 +08:00
|
|
|
return s5p_gatectrl(EXYNOS4_CLKGATE_IP_TV, clk, enable);
|
2011-03-07 08:10:24 +08:00
|
|
|
}
|
|
|
|
|
2011-02-14 15:08:04 +08:00
|
|
|
static int exynos4_clk_ip_image_ctrl(struct clk *clk, int enable)
|
2010-08-18 21:49:24 +08:00
|
|
|
{
|
2012-03-10 06:19:10 +08:00
|
|
|
return s5p_gatectrl(EXYNOS4_CLKGATE_IP_IMAGE, clk, enable);
|
2010-08-18 21:49:24 +08:00
|
|
|
}
|
|
|
|
|
2011-02-14 15:08:04 +08:00
|
|
|
static int exynos4_clk_ip_lcd0_ctrl(struct clk *clk, int enable)
|
2010-08-18 21:49:24 +08:00
|
|
|
{
|
2012-03-10 06:19:10 +08:00
|
|
|
return s5p_gatectrl(EXYNOS4_CLKGATE_IP_LCD0, clk, enable);
|
2010-08-18 21:49:24 +08:00
|
|
|
}
|
|
|
|
|
2011-08-24 16:25:09 +08:00
|
|
|
int exynos4_clk_ip_lcd1_ctrl(struct clk *clk, int enable)
|
2010-08-18 21:49:24 +08:00
|
|
|
{
|
2012-03-10 06:19:10 +08:00
|
|
|
return s5p_gatectrl(EXYNOS4210_CLKGATE_IP_LCD1, clk, enable);
|
2010-08-18 21:49:24 +08:00
|
|
|
}
|
|
|
|
|
2011-08-24 16:25:09 +08:00
|
|
|
int exynos4_clk_ip_fsys_ctrl(struct clk *clk, int enable)
|
2010-08-18 21:39:26 +08:00
|
|
|
{
|
2012-03-10 06:19:10 +08:00
|
|
|
return s5p_gatectrl(EXYNOS4_CLKGATE_IP_FSYS, clk, enable);
|
2010-08-18 21:39:26 +08:00
|
|
|
}
|
|
|
|
|
2011-02-14 15:08:04 +08:00
|
|
|
static int exynos4_clk_ip_peril_ctrl(struct clk *clk, int enable)
|
2010-08-27 15:50:47 +08:00
|
|
|
{
|
2012-03-10 06:19:10 +08:00
|
|
|
return s5p_gatectrl(EXYNOS4_CLKGATE_IP_PERIL, clk, enable);
|
2010-08-27 15:50:47 +08:00
|
|
|
}
|
|
|
|
|
2011-02-14 15:08:04 +08:00
|
|
|
static int exynos4_clk_ip_perir_ctrl(struct clk *clk, int enable)
|
2010-08-18 21:49:24 +08:00
|
|
|
{
|
2012-03-10 06:19:10 +08:00
|
|
|
return s5p_gatectrl(EXYNOS4_CLKGATE_IP_PERIR, clk, enable);
|
2010-08-18 21:49:24 +08:00
|
|
|
}
|
|
|
|
|
2011-09-19 15:44:42 +08:00
|
|
|
static int exynos4_clk_hdmiphy_ctrl(struct clk *clk, int enable)
|
|
|
|
{
|
|
|
|
return s5p_gatectrl(S5P_HDMI_PHY_CONTROL, clk, enable);
|
|
|
|
}
|
|
|
|
|
|
|
|
static int exynos4_clk_dac_ctrl(struct clk *clk, int enable)
|
|
|
|
{
|
|
|
|
return s5p_gatectrl(S5P_DAC_PHY_CONTROL, clk, enable);
|
|
|
|
}
|
|
|
|
|
2010-07-27 16:52:39 +08:00
|
|
|
/* Core list of CMU_CPU side */
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_mout_apll = {
|
2010-07-27 16:52:39 +08:00
|
|
|
.clk = {
|
|
|
|
.name = "mout_apll",
|
|
|
|
},
|
2012-03-10 05:51:24 +08:00
|
|
|
.sources = &clk_src_apll,
|
2012-03-10 06:19:10 +08:00
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_CPU, .shift = 0, .size = 1 },
|
2010-08-18 21:20:31 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_sclk_apll = {
|
2010-08-18 21:20:31 +08:00
|
|
|
.clk = {
|
|
|
|
.name = "sclk_apll",
|
2012-03-10 06:19:10 +08:00
|
|
|
.parent = &exynos4_clk_mout_apll.clk,
|
2010-08-18 21:20:31 +08:00
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_CPU, .shift = 24, .size = 3 },
|
2010-07-27 16:52:39 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_mout_epll = {
|
2010-07-27 16:52:39 +08:00
|
|
|
.clk = {
|
|
|
|
.name = "mout_epll",
|
|
|
|
},
|
2012-03-10 05:51:24 +08:00
|
|
|
.sources = &clk_src_epll,
|
2012-03-10 06:19:10 +08:00
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_TOP0, .shift = 4, .size = 1 },
|
2010-07-27 16:52:39 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
struct clksrc_clk exynos4_clk_mout_mpll = {
|
2012-03-10 05:51:24 +08:00
|
|
|
.clk = {
|
2010-07-27 16:52:39 +08:00
|
|
|
.name = "mout_mpll",
|
|
|
|
},
|
2012-03-10 05:51:24 +08:00
|
|
|
.sources = &clk_src_mpll,
|
2011-08-24 16:25:09 +08:00
|
|
|
|
|
|
|
/* reg_src will be added in each SoCs' clock */
|
2010-07-27 16:52:39 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clk *exynos4_clkset_moutcore_list[] = {
|
|
|
|
[0] = &exynos4_clk_mout_apll.clk,
|
|
|
|
[1] = &exynos4_clk_mout_mpll.clk,
|
2010-07-27 16:52:39 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_sources exynos4_clkset_moutcore = {
|
|
|
|
.sources = exynos4_clkset_moutcore_list,
|
|
|
|
.nr_sources = ARRAY_SIZE(exynos4_clkset_moutcore_list),
|
2010-07-27 16:52:39 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_moutcore = {
|
2010-07-27 16:52:39 +08:00
|
|
|
.clk = {
|
|
|
|
.name = "moutcore",
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_moutcore,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_CPU, .shift = 16, .size = 1 },
|
2010-07-27 16:52:39 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_coreclk = {
|
2010-07-27 16:52:39 +08:00
|
|
|
.clk = {
|
|
|
|
.name = "core_clk",
|
2012-03-10 06:19:10 +08:00
|
|
|
.parent = &exynos4_clk_moutcore.clk,
|
2010-07-27 16:52:39 +08:00
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_CPU, .shift = 0, .size = 3 },
|
2010-07-27 16:52:39 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_armclk = {
|
2010-07-27 16:52:39 +08:00
|
|
|
.clk = {
|
|
|
|
.name = "armclk",
|
2012-03-10 06:19:10 +08:00
|
|
|
.parent = &exynos4_clk_coreclk.clk,
|
2010-07-27 16:52:39 +08:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_aclk_corem0 = {
|
2010-07-27 16:52:39 +08:00
|
|
|
.clk = {
|
|
|
|
.name = "aclk_corem0",
|
2012-03-10 06:19:10 +08:00
|
|
|
.parent = &exynos4_clk_coreclk.clk,
|
2010-07-27 16:52:39 +08:00
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_CPU, .shift = 4, .size = 3 },
|
2010-07-27 16:52:39 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_aclk_cores = {
|
2010-07-27 16:52:39 +08:00
|
|
|
.clk = {
|
|
|
|
.name = "aclk_cores",
|
2012-03-10 06:19:10 +08:00
|
|
|
.parent = &exynos4_clk_coreclk.clk,
|
2010-07-27 16:52:39 +08:00
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_CPU, .shift = 4, .size = 3 },
|
2010-07-27 16:52:39 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_aclk_corem1 = {
|
2010-07-27 16:52:39 +08:00
|
|
|
.clk = {
|
|
|
|
.name = "aclk_corem1",
|
2012-03-10 06:19:10 +08:00
|
|
|
.parent = &exynos4_clk_coreclk.clk,
|
2010-07-27 16:52:39 +08:00
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_CPU, .shift = 8, .size = 3 },
|
2010-07-27 16:52:39 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_periphclk = {
|
2010-07-27 16:52:39 +08:00
|
|
|
.clk = {
|
|
|
|
.name = "periphclk",
|
2012-03-10 06:19:10 +08:00
|
|
|
.parent = &exynos4_clk_coreclk.clk,
|
2010-07-27 16:52:39 +08:00
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_CPU, .shift = 12, .size = 3 },
|
2010-07-27 16:52:39 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Core list of CMU_CORE side */
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clk *exynos4_clkset_corebus_list[] = {
|
|
|
|
[0] = &exynos4_clk_mout_mpll.clk,
|
|
|
|
[1] = &exynos4_clk_sclk_apll.clk,
|
2010-07-27 16:52:39 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
struct clksrc_sources exynos4_clkset_mout_corebus = {
|
|
|
|
.sources = exynos4_clkset_corebus_list,
|
|
|
|
.nr_sources = ARRAY_SIZE(exynos4_clkset_corebus_list),
|
2010-07-27 16:52:39 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_mout_corebus = {
|
2010-07-27 16:52:39 +08:00
|
|
|
.clk = {
|
|
|
|
.name = "mout_corebus",
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_mout_corebus,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_DMC, .shift = 4, .size = 1 },
|
2010-07-27 16:52:39 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_sclk_dmc = {
|
2010-07-27 16:52:39 +08:00
|
|
|
.clk = {
|
|
|
|
.name = "sclk_dmc",
|
2012-03-10 06:19:10 +08:00
|
|
|
.parent = &exynos4_clk_mout_corebus.clk,
|
2010-07-27 16:52:39 +08:00
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_DMC0, .shift = 12, .size = 3 },
|
2010-07-27 16:52:39 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_aclk_cored = {
|
2010-07-27 16:52:39 +08:00
|
|
|
.clk = {
|
|
|
|
.name = "aclk_cored",
|
2012-03-10 06:19:10 +08:00
|
|
|
.parent = &exynos4_clk_sclk_dmc.clk,
|
2010-07-27 16:52:39 +08:00
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_DMC0, .shift = 16, .size = 3 },
|
2010-07-27 16:52:39 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_aclk_corep = {
|
2010-07-27 16:52:39 +08:00
|
|
|
.clk = {
|
|
|
|
.name = "aclk_corep",
|
2012-03-10 06:19:10 +08:00
|
|
|
.parent = &exynos4_clk_aclk_cored.clk,
|
2010-07-27 16:52:39 +08:00
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_DMC0, .shift = 20, .size = 3 },
|
2010-07-27 16:52:39 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_aclk_acp = {
|
2010-07-27 16:52:39 +08:00
|
|
|
.clk = {
|
|
|
|
.name = "aclk_acp",
|
2012-03-10 06:19:10 +08:00
|
|
|
.parent = &exynos4_clk_mout_corebus.clk,
|
2010-07-27 16:52:39 +08:00
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_DMC0, .shift = 0, .size = 3 },
|
2010-07-27 16:52:39 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_pclk_acp = {
|
2010-07-27 16:52:39 +08:00
|
|
|
.clk = {
|
|
|
|
.name = "pclk_acp",
|
2012-03-10 06:19:10 +08:00
|
|
|
.parent = &exynos4_clk_aclk_acp.clk,
|
2010-07-27 16:52:39 +08:00
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_DMC0, .shift = 4, .size = 3 },
|
2010-07-27 16:52:39 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Core list of CMU_TOP side */
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
struct clk *exynos4_clkset_aclk_top_list[] = {
|
|
|
|
[0] = &exynos4_clk_mout_mpll.clk,
|
|
|
|
[1] = &exynos4_clk_sclk_apll.clk,
|
2010-07-27 16:52:39 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_sources exynos4_clkset_aclk = {
|
|
|
|
.sources = exynos4_clkset_aclk_top_list,
|
|
|
|
.nr_sources = ARRAY_SIZE(exynos4_clkset_aclk_top_list),
|
2010-07-27 16:52:39 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_aclk_200 = {
|
2010-07-27 16:52:39 +08:00
|
|
|
.clk = {
|
|
|
|
.name = "aclk_200",
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_aclk,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_TOP0, .shift = 12, .size = 1 },
|
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_TOP, .shift = 0, .size = 3 },
|
2010-07-27 16:52:39 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_aclk_100 = {
|
2010-07-27 16:52:39 +08:00
|
|
|
.clk = {
|
|
|
|
.name = "aclk_100",
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_aclk,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_TOP0, .shift = 16, .size = 1 },
|
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_TOP, .shift = 4, .size = 4 },
|
2010-07-27 16:52:39 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_aclk_160 = {
|
2010-07-27 16:52:39 +08:00
|
|
|
.clk = {
|
|
|
|
.name = "aclk_160",
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_aclk,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_TOP0, .shift = 20, .size = 1 },
|
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_TOP, .shift = 8, .size = 3 },
|
2010-07-27 16:52:39 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
struct clksrc_clk exynos4_clk_aclk_133 = {
|
2010-07-27 16:52:39 +08:00
|
|
|
.clk = {
|
|
|
|
.name = "aclk_133",
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_aclk,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_TOP0, .shift = 24, .size = 1 },
|
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_TOP, .shift = 12, .size = 3 },
|
2010-07-27 16:52:39 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clk *exynos4_clkset_vpllsrc_list[] = {
|
2010-07-27 16:52:39 +08:00
|
|
|
[0] = &clk_fin_vpll,
|
2012-03-10 06:19:10 +08:00
|
|
|
[1] = &exynos4_clk_sclk_hdmi27m,
|
2010-07-27 16:52:39 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_sources exynos4_clkset_vpllsrc = {
|
|
|
|
.sources = exynos4_clkset_vpllsrc_list,
|
|
|
|
.nr_sources = ARRAY_SIZE(exynos4_clkset_vpllsrc_list),
|
2010-07-27 16:52:39 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_vpllsrc = {
|
2010-07-27 16:52:39 +08:00
|
|
|
.clk = {
|
|
|
|
.name = "vpll_src",
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clksrc_mask_top_ctrl,
|
2010-08-18 21:33:43 +08:00
|
|
|
.ctrlbit = (1 << 0),
|
2010-07-27 16:52:39 +08:00
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_vpllsrc,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_TOP1, .shift = 0, .size = 1 },
|
2010-07-27 16:52:39 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clk *exynos4_clkset_sclk_vpll_list[] = {
|
|
|
|
[0] = &exynos4_clk_vpllsrc.clk,
|
2010-07-27 16:52:39 +08:00
|
|
|
[1] = &clk_fout_vpll,
|
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_sources exynos4_clkset_sclk_vpll = {
|
|
|
|
.sources = exynos4_clkset_sclk_vpll_list,
|
|
|
|
.nr_sources = ARRAY_SIZE(exynos4_clkset_sclk_vpll_list),
|
2010-07-27 16:52:39 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_sclk_vpll = {
|
2010-07-27 16:52:39 +08:00
|
|
|
.clk = {
|
|
|
|
.name = "sclk_vpll",
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_sclk_vpll,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_TOP0, .shift = 8, .size = 1 },
|
2010-07-27 16:52:39 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clk exynos4_init_clocks_off[] = {
|
2010-07-27 16:52:39 +08:00
|
|
|
{
|
|
|
|
.name = "timers",
|
2012-03-10 06:19:10 +08:00
|
|
|
.parent = &exynos4_clk_aclk_100.clk,
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_peril_ctrl,
|
2010-07-27 16:52:39 +08:00
|
|
|
.ctrlbit = (1<<24),
|
2010-08-18 21:49:24 +08:00
|
|
|
}, {
|
|
|
|
.name = "csis",
|
2011-06-14 18:12:27 +08:00
|
|
|
.devname = "s5p-mipi-csis.0",
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_cam_ctrl,
|
2010-08-18 21:49:24 +08:00
|
|
|
.ctrlbit = (1 << 4),
|
|
|
|
}, {
|
|
|
|
.name = "csis",
|
2011-06-14 18:12:27 +08:00
|
|
|
.devname = "s5p-mipi-csis.1",
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_cam_ctrl,
|
2010-08-18 21:49:24 +08:00
|
|
|
.ctrlbit = (1 << 5),
|
2012-03-16 05:22:00 +08:00
|
|
|
}, {
|
|
|
|
.name = "jpeg",
|
|
|
|
.id = 0,
|
|
|
|
.enable = exynos4_clk_ip_cam_ctrl,
|
|
|
|
.ctrlbit = (1 << 6),
|
2010-08-18 21:49:24 +08:00
|
|
|
}, {
|
|
|
|
.name = "fimc",
|
2011-06-14 18:12:27 +08:00
|
|
|
.devname = "exynos4-fimc.0",
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_cam_ctrl,
|
2010-08-18 21:49:24 +08:00
|
|
|
.ctrlbit = (1 << 0),
|
|
|
|
}, {
|
|
|
|
.name = "fimc",
|
2011-06-14 18:12:27 +08:00
|
|
|
.devname = "exynos4-fimc.1",
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_cam_ctrl,
|
2010-08-18 21:49:24 +08:00
|
|
|
.ctrlbit = (1 << 1),
|
|
|
|
}, {
|
|
|
|
.name = "fimc",
|
2011-06-14 18:12:27 +08:00
|
|
|
.devname = "exynos4-fimc.2",
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_cam_ctrl,
|
2010-08-18 21:49:24 +08:00
|
|
|
.ctrlbit = (1 << 2),
|
|
|
|
}, {
|
|
|
|
.name = "fimc",
|
2011-06-14 18:12:27 +08:00
|
|
|
.devname = "exynos4-fimc.3",
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_cam_ctrl,
|
2010-08-18 21:49:24 +08:00
|
|
|
.ctrlbit = (1 << 3),
|
2010-08-18 21:39:26 +08:00
|
|
|
}, {
|
|
|
|
.name = "hsmmc",
|
2011-06-14 18:12:27 +08:00
|
|
|
.devname = "s3c-sdhci.0",
|
2012-03-10 06:19:10 +08:00
|
|
|
.parent = &exynos4_clk_aclk_133.clk,
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_fsys_ctrl,
|
2010-08-18 21:39:26 +08:00
|
|
|
.ctrlbit = (1 << 5),
|
|
|
|
}, {
|
|
|
|
.name = "hsmmc",
|
2011-06-14 18:12:27 +08:00
|
|
|
.devname = "s3c-sdhci.1",
|
2012-03-10 06:19:10 +08:00
|
|
|
.parent = &exynos4_clk_aclk_133.clk,
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_fsys_ctrl,
|
2010-08-18 21:39:26 +08:00
|
|
|
.ctrlbit = (1 << 6),
|
|
|
|
}, {
|
|
|
|
.name = "hsmmc",
|
2011-06-14 18:12:27 +08:00
|
|
|
.devname = "s3c-sdhci.2",
|
2012-03-10 06:19:10 +08:00
|
|
|
.parent = &exynos4_clk_aclk_133.clk,
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_fsys_ctrl,
|
2010-08-18 21:39:26 +08:00
|
|
|
.ctrlbit = (1 << 7),
|
|
|
|
}, {
|
|
|
|
.name = "hsmmc",
|
2011-06-14 18:12:27 +08:00
|
|
|
.devname = "s3c-sdhci.3",
|
2012-03-10 06:19:10 +08:00
|
|
|
.parent = &exynos4_clk_aclk_133.clk,
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_fsys_ctrl,
|
2010-08-18 21:39:26 +08:00
|
|
|
.ctrlbit = (1 << 8),
|
|
|
|
}, {
|
2011-06-14 18:12:27 +08:00
|
|
|
.name = "dwmmc",
|
2012-03-10 06:19:10 +08:00
|
|
|
.parent = &exynos4_clk_aclk_133.clk,
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_fsys_ctrl,
|
2010-08-18 21:39:26 +08:00
|
|
|
.ctrlbit = (1 << 9),
|
2010-12-21 08:54:35 +08:00
|
|
|
}, {
|
2011-09-19 15:44:42 +08:00
|
|
|
.name = "dac",
|
|
|
|
.devname = "s5p-sdo",
|
|
|
|
.enable = exynos4_clk_ip_tv_ctrl,
|
|
|
|
.ctrlbit = (1 << 2),
|
|
|
|
}, {
|
|
|
|
.name = "mixer",
|
|
|
|
.devname = "s5p-mixer",
|
|
|
|
.enable = exynos4_clk_ip_tv_ctrl,
|
|
|
|
.ctrlbit = (1 << 1),
|
|
|
|
}, {
|
|
|
|
.name = "vp",
|
|
|
|
.devname = "s5p-mixer",
|
|
|
|
.enable = exynos4_clk_ip_tv_ctrl,
|
|
|
|
.ctrlbit = (1 << 0),
|
|
|
|
}, {
|
|
|
|
.name = "hdmi",
|
|
|
|
.devname = "exynos4-hdmi",
|
|
|
|
.enable = exynos4_clk_ip_tv_ctrl,
|
|
|
|
.ctrlbit = (1 << 3),
|
|
|
|
}, {
|
|
|
|
.name = "hdmiphy",
|
|
|
|
.devname = "exynos4-hdmi",
|
|
|
|
.enable = exynos4_clk_hdmiphy_ctrl,
|
|
|
|
.ctrlbit = (1 << 0),
|
|
|
|
}, {
|
|
|
|
.name = "dacphy",
|
|
|
|
.devname = "s5p-sdo",
|
|
|
|
.enable = exynos4_clk_dac_ctrl,
|
|
|
|
.ctrlbit = (1 << 0),
|
2010-08-18 21:49:24 +08:00
|
|
|
}, {
|
|
|
|
.name = "adc",
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_peril_ctrl,
|
2010-08-18 21:49:24 +08:00
|
|
|
.ctrlbit = (1 << 15),
|
2011-02-22 16:13:42 +08:00
|
|
|
}, {
|
|
|
|
.name = "keypad",
|
|
|
|
.enable = exynos4_clk_ip_perir_ctrl,
|
|
|
|
.ctrlbit = (1 << 16),
|
2010-09-20 14:25:51 +08:00
|
|
|
}, {
|
|
|
|
.name = "rtc",
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_perir_ctrl,
|
2010-09-20 14:25:51 +08:00
|
|
|
.ctrlbit = (1 << 15),
|
2010-08-18 21:49:24 +08:00
|
|
|
}, {
|
|
|
|
.name = "watchdog",
|
2012-03-10 06:19:10 +08:00
|
|
|
.parent = &exynos4_clk_aclk_100.clk,
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_perir_ctrl,
|
2010-08-18 21:49:24 +08:00
|
|
|
.ctrlbit = (1 << 14),
|
|
|
|
}, {
|
|
|
|
.name = "usbhost",
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_fsys_ctrl ,
|
2010-08-18 21:49:24 +08:00
|
|
|
.ctrlbit = (1 << 12),
|
|
|
|
}, {
|
|
|
|
.name = "otg",
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_fsys_ctrl,
|
2010-08-18 21:49:24 +08:00
|
|
|
.ctrlbit = (1 << 13),
|
|
|
|
}, {
|
|
|
|
.name = "spi",
|
2011-06-14 18:12:27 +08:00
|
|
|
.devname = "s3c64xx-spi.0",
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_peril_ctrl,
|
2010-08-18 21:49:24 +08:00
|
|
|
.ctrlbit = (1 << 16),
|
|
|
|
}, {
|
|
|
|
.name = "spi",
|
2011-06-14 18:12:27 +08:00
|
|
|
.devname = "s3c64xx-spi.1",
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_peril_ctrl,
|
2010-08-18 21:49:24 +08:00
|
|
|
.ctrlbit = (1 << 17),
|
|
|
|
}, {
|
|
|
|
.name = "spi",
|
2011-06-14 18:12:27 +08:00
|
|
|
.devname = "s3c64xx-spi.2",
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_peril_ctrl,
|
2010-08-18 21:49:24 +08:00
|
|
|
.ctrlbit = (1 << 18),
|
2010-12-21 08:57:03 +08:00
|
|
|
}, {
|
|
|
|
.name = "iis",
|
2011-06-14 18:12:27 +08:00
|
|
|
.devname = "samsung-i2s.0",
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_peril_ctrl,
|
2010-12-21 08:57:03 +08:00
|
|
|
.ctrlbit = (1 << 19),
|
|
|
|
}, {
|
|
|
|
.name = "iis",
|
2011-06-14 18:12:27 +08:00
|
|
|
.devname = "samsung-i2s.1",
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_peril_ctrl,
|
2010-12-21 08:57:03 +08:00
|
|
|
.ctrlbit = (1 << 20),
|
|
|
|
}, {
|
|
|
|
.name = "iis",
|
2011-06-14 18:12:27 +08:00
|
|
|
.devname = "samsung-i2s.2",
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_peril_ctrl,
|
2010-12-21 08:57:03 +08:00
|
|
|
.ctrlbit = (1 << 21),
|
2010-12-21 08:54:57 +08:00
|
|
|
}, {
|
|
|
|
.name = "ac97",
|
2011-08-12 17:15:42 +08:00
|
|
|
.devname = "samsung-ac97",
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_peril_ctrl,
|
2010-12-21 08:54:57 +08:00
|
|
|
.ctrlbit = (1 << 27),
|
2010-08-18 21:49:24 +08:00
|
|
|
}, {
|
|
|
|
.name = "fimg2d",
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_image_ctrl,
|
2010-08-18 21:49:24 +08:00
|
|
|
.ctrlbit = (1 << 0),
|
2011-07-21 15:42:30 +08:00
|
|
|
}, {
|
|
|
|
.name = "mfc",
|
|
|
|
.devname = "s5p-mfc",
|
|
|
|
.enable = exynos4_clk_ip_mfc_ctrl,
|
|
|
|
.ctrlbit = (1 << 0),
|
2010-08-18 21:49:24 +08:00
|
|
|
}, {
|
|
|
|
.name = "i2c",
|
2011-06-14 18:12:27 +08:00
|
|
|
.devname = "s3c2440-i2c.0",
|
2012-03-10 06:19:10 +08:00
|
|
|
.parent = &exynos4_clk_aclk_100.clk,
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_peril_ctrl,
|
2010-08-18 21:49:24 +08:00
|
|
|
.ctrlbit = (1 << 6),
|
|
|
|
}, {
|
|
|
|
.name = "i2c",
|
2011-06-14 18:12:27 +08:00
|
|
|
.devname = "s3c2440-i2c.1",
|
2012-03-10 06:19:10 +08:00
|
|
|
.parent = &exynos4_clk_aclk_100.clk,
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_peril_ctrl,
|
2010-08-18 21:49:24 +08:00
|
|
|
.ctrlbit = (1 << 7),
|
|
|
|
}, {
|
|
|
|
.name = "i2c",
|
2011-06-14 18:12:27 +08:00
|
|
|
.devname = "s3c2440-i2c.2",
|
2012-03-10 06:19:10 +08:00
|
|
|
.parent = &exynos4_clk_aclk_100.clk,
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_peril_ctrl,
|
2010-08-18 21:49:24 +08:00
|
|
|
.ctrlbit = (1 << 8),
|
|
|
|
}, {
|
|
|
|
.name = "i2c",
|
2011-06-14 18:12:27 +08:00
|
|
|
.devname = "s3c2440-i2c.3",
|
2012-03-10 06:19:10 +08:00
|
|
|
.parent = &exynos4_clk_aclk_100.clk,
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_peril_ctrl,
|
2010-08-18 21:49:24 +08:00
|
|
|
.ctrlbit = (1 << 9),
|
|
|
|
}, {
|
|
|
|
.name = "i2c",
|
2011-06-14 18:12:27 +08:00
|
|
|
.devname = "s3c2440-i2c.4",
|
2012-03-10 06:19:10 +08:00
|
|
|
.parent = &exynos4_clk_aclk_100.clk,
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_peril_ctrl,
|
2010-08-18 21:49:24 +08:00
|
|
|
.ctrlbit = (1 << 10),
|
|
|
|
}, {
|
|
|
|
.name = "i2c",
|
2011-06-14 18:12:27 +08:00
|
|
|
.devname = "s3c2440-i2c.5",
|
2012-03-10 06:19:10 +08:00
|
|
|
.parent = &exynos4_clk_aclk_100.clk,
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_peril_ctrl,
|
2010-08-18 21:49:24 +08:00
|
|
|
.ctrlbit = (1 << 11),
|
|
|
|
}, {
|
|
|
|
.name = "i2c",
|
2011-06-14 18:12:27 +08:00
|
|
|
.devname = "s3c2440-i2c.6",
|
2012-03-10 06:19:10 +08:00
|
|
|
.parent = &exynos4_clk_aclk_100.clk,
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_peril_ctrl,
|
2010-08-18 21:49:24 +08:00
|
|
|
.ctrlbit = (1 << 12),
|
|
|
|
}, {
|
|
|
|
.name = "i2c",
|
2011-06-14 18:12:27 +08:00
|
|
|
.devname = "s3c2440-i2c.7",
|
2012-03-10 06:19:10 +08:00
|
|
|
.parent = &exynos4_clk_aclk_100.clk,
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_peril_ctrl,
|
2010-08-18 21:49:24 +08:00
|
|
|
.ctrlbit = (1 << 13),
|
2011-09-16 17:44:36 +08:00
|
|
|
}, {
|
|
|
|
.name = "i2c",
|
|
|
|
.devname = "s3c2440-hdmiphy-i2c",
|
2012-03-10 06:19:10 +08:00
|
|
|
.parent = &exynos4_clk_aclk_100.clk,
|
2011-09-16 17:44:36 +08:00
|
|
|
.enable = exynos4_clk_ip_peril_ctrl,
|
|
|
|
.ctrlbit = (1 << 14),
|
2011-03-07 08:10:24 +08:00
|
|
|
}, {
|
|
|
|
.name = "SYSMMU_MDMA",
|
|
|
|
.enable = exynos4_clk_ip_image_ctrl,
|
|
|
|
.ctrlbit = (1 << 5),
|
|
|
|
}, {
|
|
|
|
.name = "SYSMMU_FIMC0",
|
|
|
|
.enable = exynos4_clk_ip_cam_ctrl,
|
|
|
|
.ctrlbit = (1 << 7),
|
|
|
|
}, {
|
|
|
|
.name = "SYSMMU_FIMC1",
|
|
|
|
.enable = exynos4_clk_ip_cam_ctrl,
|
|
|
|
.ctrlbit = (1 << 8),
|
|
|
|
}, {
|
|
|
|
.name = "SYSMMU_FIMC2",
|
|
|
|
.enable = exynos4_clk_ip_cam_ctrl,
|
|
|
|
.ctrlbit = (1 << 9),
|
|
|
|
}, {
|
|
|
|
.name = "SYSMMU_FIMC3",
|
|
|
|
.enable = exynos4_clk_ip_cam_ctrl,
|
|
|
|
.ctrlbit = (1 << 10),
|
|
|
|
}, {
|
|
|
|
.name = "SYSMMU_JPEG",
|
|
|
|
.enable = exynos4_clk_ip_cam_ctrl,
|
|
|
|
.ctrlbit = (1 << 11),
|
|
|
|
}, {
|
|
|
|
.name = "SYSMMU_FIMD0",
|
|
|
|
.enable = exynos4_clk_ip_lcd0_ctrl,
|
|
|
|
.ctrlbit = (1 << 4),
|
|
|
|
}, {
|
|
|
|
.name = "SYSMMU_FIMD1",
|
|
|
|
.enable = exynos4_clk_ip_lcd1_ctrl,
|
|
|
|
.ctrlbit = (1 << 4),
|
|
|
|
}, {
|
|
|
|
.name = "SYSMMU_PCIe",
|
|
|
|
.enable = exynos4_clk_ip_fsys_ctrl,
|
|
|
|
.ctrlbit = (1 << 18),
|
|
|
|
}, {
|
|
|
|
.name = "SYSMMU_G2D",
|
|
|
|
.enable = exynos4_clk_ip_image_ctrl,
|
|
|
|
.ctrlbit = (1 << 3),
|
|
|
|
}, {
|
|
|
|
.name = "SYSMMU_ROTATOR",
|
|
|
|
.enable = exynos4_clk_ip_image_ctrl,
|
|
|
|
.ctrlbit = (1 << 4),
|
|
|
|
}, {
|
|
|
|
.name = "SYSMMU_TV",
|
|
|
|
.enable = exynos4_clk_ip_tv_ctrl,
|
|
|
|
.ctrlbit = (1 << 4),
|
|
|
|
}, {
|
|
|
|
.name = "SYSMMU_MFC_L",
|
|
|
|
.enable = exynos4_clk_ip_mfc_ctrl,
|
|
|
|
.ctrlbit = (1 << 1),
|
|
|
|
}, {
|
|
|
|
.name = "SYSMMU_MFC_R",
|
|
|
|
.enable = exynos4_clk_ip_mfc_ctrl,
|
|
|
|
.ctrlbit = (1 << 2),
|
|
|
|
}
|
2010-07-27 16:52:39 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clk exynos4_init_clocks_on[] = {
|
2010-08-27 15:50:47 +08:00
|
|
|
{
|
|
|
|
.name = "uart",
|
2011-06-14 18:12:27 +08:00
|
|
|
.devname = "s5pv210-uart.0",
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_peril_ctrl,
|
2010-08-27 15:50:47 +08:00
|
|
|
.ctrlbit = (1 << 0),
|
|
|
|
}, {
|
|
|
|
.name = "uart",
|
2011-06-14 18:12:27 +08:00
|
|
|
.devname = "s5pv210-uart.1",
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_peril_ctrl,
|
2010-08-27 15:50:47 +08:00
|
|
|
.ctrlbit = (1 << 1),
|
|
|
|
}, {
|
|
|
|
.name = "uart",
|
2011-06-14 18:12:27 +08:00
|
|
|
.devname = "s5pv210-uart.2",
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_peril_ctrl,
|
2010-08-27 15:50:47 +08:00
|
|
|
.ctrlbit = (1 << 2),
|
|
|
|
}, {
|
|
|
|
.name = "uart",
|
2011-06-14 18:12:27 +08:00
|
|
|
.devname = "s5pv210-uart.3",
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_peril_ctrl,
|
2010-08-27 15:50:47 +08:00
|
|
|
.ctrlbit = (1 << 3),
|
|
|
|
}, {
|
|
|
|
.name = "uart",
|
2011-06-14 18:12:27 +08:00
|
|
|
.devname = "s5pv210-uart.4",
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_peril_ctrl,
|
2010-08-27 15:50:47 +08:00
|
|
|
.ctrlbit = (1 << 4),
|
|
|
|
}, {
|
|
|
|
.name = "uart",
|
2011-06-14 18:12:27 +08:00
|
|
|
.devname = "s5pv210-uart.5",
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clk_ip_peril_ctrl,
|
2010-08-27 15:50:47 +08:00
|
|
|
.ctrlbit = (1 << 5),
|
|
|
|
}
|
2010-07-27 16:52:39 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clk exynos4_clk_pdma0 = {
|
2011-10-24 20:01:03 +08:00
|
|
|
.name = "dma",
|
|
|
|
.devname = "dma-pl330.0",
|
|
|
|
.enable = exynos4_clk_ip_fsys_ctrl,
|
|
|
|
.ctrlbit = (1 << 0),
|
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clk exynos4_clk_pdma1 = {
|
2011-10-24 20:01:03 +08:00
|
|
|
.name = "dma",
|
|
|
|
.devname = "dma-pl330.1",
|
|
|
|
.enable = exynos4_clk_ip_fsys_ctrl,
|
|
|
|
.ctrlbit = (1 << 1),
|
|
|
|
};
|
|
|
|
|
2012-02-15 12:15:12 +08:00
|
|
|
static struct clk exynos4_clk_mdma1 = {
|
|
|
|
.name = "dma",
|
|
|
|
.devname = "dma-pl330.2",
|
|
|
|
.enable = exynos4_clk_ip_image_ctrl,
|
|
|
|
.ctrlbit = ((1 << 8) | (1 << 5) | (1 << 2)),
|
|
|
|
};
|
|
|
|
|
2012-03-13 12:17:02 +08:00
|
|
|
static struct clk exynos4_clk_fimd0 = {
|
|
|
|
.name = "fimd",
|
|
|
|
.devname = "exynos4-fb.0",
|
|
|
|
.enable = exynos4_clk_ip_lcd0_ctrl,
|
|
|
|
.ctrlbit = (1 << 0),
|
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
struct clk *exynos4_clkset_group_list[] = {
|
2010-07-27 16:52:39 +08:00
|
|
|
[0] = &clk_ext_xtal_mux,
|
|
|
|
[1] = &clk_xusbxti,
|
2012-03-10 06:19:10 +08:00
|
|
|
[2] = &exynos4_clk_sclk_hdmi27m,
|
|
|
|
[3] = &exynos4_clk_sclk_usbphy0,
|
|
|
|
[4] = &exynos4_clk_sclk_usbphy1,
|
|
|
|
[5] = &exynos4_clk_sclk_hdmiphy,
|
|
|
|
[6] = &exynos4_clk_mout_mpll.clk,
|
|
|
|
[7] = &exynos4_clk_mout_epll.clk,
|
|
|
|
[8] = &exynos4_clk_sclk_vpll.clk,
|
2010-07-27 16:52:39 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
struct clksrc_sources exynos4_clkset_group = {
|
|
|
|
.sources = exynos4_clkset_group_list,
|
|
|
|
.nr_sources = ARRAY_SIZE(exynos4_clkset_group_list),
|
2010-07-27 16:52:39 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clk *exynos4_clkset_mout_g2d0_list[] = {
|
|
|
|
[0] = &exynos4_clk_mout_mpll.clk,
|
|
|
|
[1] = &exynos4_clk_sclk_apll.clk,
|
2010-08-18 21:51:23 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_sources exynos4_clkset_mout_g2d0 = {
|
|
|
|
.sources = exynos4_clkset_mout_g2d0_list,
|
|
|
|
.nr_sources = ARRAY_SIZE(exynos4_clkset_mout_g2d0_list),
|
2010-08-18 21:51:23 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_mout_g2d0 = {
|
2010-08-18 21:51:23 +08:00
|
|
|
.clk = {
|
|
|
|
.name = "mout_g2d0",
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_mout_g2d0,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_IMAGE, .shift = 0, .size = 1 },
|
2010-08-18 21:51:23 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clk *exynos4_clkset_mout_g2d1_list[] = {
|
|
|
|
[0] = &exynos4_clk_mout_epll.clk,
|
|
|
|
[1] = &exynos4_clk_sclk_vpll.clk,
|
2010-08-18 21:51:23 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_sources exynos4_clkset_mout_g2d1 = {
|
|
|
|
.sources = exynos4_clkset_mout_g2d1_list,
|
|
|
|
.nr_sources = ARRAY_SIZE(exynos4_clkset_mout_g2d1_list),
|
2010-08-18 21:51:23 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_mout_g2d1 = {
|
2010-08-18 21:51:23 +08:00
|
|
|
.clk = {
|
|
|
|
.name = "mout_g2d1",
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_mout_g2d1,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_IMAGE, .shift = 4, .size = 1 },
|
2010-08-18 21:51:23 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clk *exynos4_clkset_mout_g2d_list[] = {
|
|
|
|
[0] = &exynos4_clk_mout_g2d0.clk,
|
|
|
|
[1] = &exynos4_clk_mout_g2d1.clk,
|
2010-08-18 21:51:23 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_sources exynos4_clkset_mout_g2d = {
|
|
|
|
.sources = exynos4_clkset_mout_g2d_list,
|
|
|
|
.nr_sources = ARRAY_SIZE(exynos4_clkset_mout_g2d_list),
|
2010-08-18 21:51:23 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clk *exynos4_clkset_mout_mfc0_list[] = {
|
|
|
|
[0] = &exynos4_clk_mout_mpll.clk,
|
|
|
|
[1] = &exynos4_clk_sclk_apll.clk,
|
2011-07-21 15:42:30 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_sources exynos4_clkset_mout_mfc0 = {
|
|
|
|
.sources = exynos4_clkset_mout_mfc0_list,
|
|
|
|
.nr_sources = ARRAY_SIZE(exynos4_clkset_mout_mfc0_list),
|
2011-07-21 15:42:30 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_mout_mfc0 = {
|
2011-07-21 15:42:30 +08:00
|
|
|
.clk = {
|
|
|
|
.name = "mout_mfc0",
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_mout_mfc0,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_MFC, .shift = 0, .size = 1 },
|
2011-07-21 15:42:30 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clk *exynos4_clkset_mout_mfc1_list[] = {
|
|
|
|
[0] = &exynos4_clk_mout_epll.clk,
|
|
|
|
[1] = &exynos4_clk_sclk_vpll.clk,
|
2011-07-21 15:42:30 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_sources exynos4_clkset_mout_mfc1 = {
|
|
|
|
.sources = exynos4_clkset_mout_mfc1_list,
|
|
|
|
.nr_sources = ARRAY_SIZE(exynos4_clkset_mout_mfc1_list),
|
2011-07-21 15:42:30 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_mout_mfc1 = {
|
2011-07-21 15:42:30 +08:00
|
|
|
.clk = {
|
|
|
|
.name = "mout_mfc1",
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_mout_mfc1,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_MFC, .shift = 4, .size = 1 },
|
2011-07-21 15:42:30 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clk *exynos4_clkset_mout_mfc_list[] = {
|
|
|
|
[0] = &exynos4_clk_mout_mfc0.clk,
|
|
|
|
[1] = &exynos4_clk_mout_mfc1.clk,
|
2011-07-21 15:42:30 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_sources exynos4_clkset_mout_mfc = {
|
|
|
|
.sources = exynos4_clkset_mout_mfc_list,
|
|
|
|
.nr_sources = ARRAY_SIZE(exynos4_clkset_mout_mfc_list),
|
2011-07-21 15:42:30 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clk *exynos4_clkset_sclk_dac_list[] = {
|
|
|
|
[0] = &exynos4_clk_sclk_vpll.clk,
|
|
|
|
[1] = &exynos4_clk_sclk_hdmiphy,
|
2011-09-19 15:44:42 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_sources exynos4_clkset_sclk_dac = {
|
|
|
|
.sources = exynos4_clkset_sclk_dac_list,
|
|
|
|
.nr_sources = ARRAY_SIZE(exynos4_clkset_sclk_dac_list),
|
2011-09-19 15:44:42 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_sclk_dac = {
|
2011-09-19 15:44:42 +08:00
|
|
|
.clk = {
|
|
|
|
.name = "sclk_dac",
|
|
|
|
.enable = exynos4_clksrc_mask_tv_ctrl,
|
|
|
|
.ctrlbit = (1 << 8),
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_sclk_dac,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_TV, .shift = 8, .size = 1 },
|
2011-09-19 15:44:42 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_sclk_pixel = {
|
2011-09-19 15:44:42 +08:00
|
|
|
.clk = {
|
|
|
|
.name = "sclk_pixel",
|
2012-03-10 06:19:10 +08:00
|
|
|
.parent = &exynos4_clk_sclk_vpll.clk,
|
2011-09-19 15:44:42 +08:00
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_TV, .shift = 0, .size = 4 },
|
2011-09-19 15:44:42 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clk *exynos4_clkset_sclk_hdmi_list[] = {
|
|
|
|
[0] = &exynos4_clk_sclk_pixel.clk,
|
|
|
|
[1] = &exynos4_clk_sclk_hdmiphy,
|
2011-09-19 15:44:42 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_sources exynos4_clkset_sclk_hdmi = {
|
|
|
|
.sources = exynos4_clkset_sclk_hdmi_list,
|
|
|
|
.nr_sources = ARRAY_SIZE(exynos4_clkset_sclk_hdmi_list),
|
2011-09-19 15:44:42 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_sclk_hdmi = {
|
2011-09-19 15:44:42 +08:00
|
|
|
.clk = {
|
|
|
|
.name = "sclk_hdmi",
|
|
|
|
.enable = exynos4_clksrc_mask_tv_ctrl,
|
|
|
|
.ctrlbit = (1 << 0),
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_sclk_hdmi,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_TV, .shift = 0, .size = 1 },
|
2011-09-19 15:44:42 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clk *exynos4_clkset_sclk_mixer_list[] = {
|
|
|
|
[0] = &exynos4_clk_sclk_dac.clk,
|
|
|
|
[1] = &exynos4_clk_sclk_hdmi.clk,
|
2011-09-19 15:44:42 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_sources exynos4_clkset_sclk_mixer = {
|
|
|
|
.sources = exynos4_clkset_sclk_mixer_list,
|
|
|
|
.nr_sources = ARRAY_SIZE(exynos4_clkset_sclk_mixer_list),
|
2011-09-19 15:44:42 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_sclk_mixer = {
|
2012-03-10 05:51:24 +08:00
|
|
|
.clk = {
|
2011-09-19 15:44:42 +08:00
|
|
|
.name = "sclk_mixer",
|
|
|
|
.enable = exynos4_clksrc_mask_tv_ctrl,
|
|
|
|
.ctrlbit = (1 << 4),
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_sclk_mixer,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_TV, .shift = 4, .size = 1 },
|
2011-09-19 15:44:42 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk *exynos4_sclk_tv[] = {
|
|
|
|
&exynos4_clk_sclk_dac,
|
|
|
|
&exynos4_clk_sclk_pixel,
|
|
|
|
&exynos4_clk_sclk_hdmi,
|
|
|
|
&exynos4_clk_sclk_mixer,
|
2011-09-19 15:44:42 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_dout_mmc0 = {
|
2012-03-10 05:51:24 +08:00
|
|
|
.clk = {
|
2010-08-18 21:39:26 +08:00
|
|
|
.name = "dout_mmc0",
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_group,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_FSYS, .shift = 0, .size = 4 },
|
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_FSYS1, .shift = 0, .size = 4 },
|
2010-08-18 21:39:26 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_dout_mmc1 = {
|
2012-03-10 05:51:24 +08:00
|
|
|
.clk = {
|
2010-08-18 21:39:26 +08:00
|
|
|
.name = "dout_mmc1",
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_group,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_FSYS, .shift = 4, .size = 4 },
|
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_FSYS1, .shift = 16, .size = 4 },
|
2010-08-18 21:39:26 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_dout_mmc2 = {
|
2012-03-10 05:51:24 +08:00
|
|
|
.clk = {
|
2010-08-18 21:39:26 +08:00
|
|
|
.name = "dout_mmc2",
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_group,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_FSYS, .shift = 8, .size = 4 },
|
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_FSYS2, .shift = 0, .size = 4 },
|
2010-08-18 21:39:26 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_dout_mmc3 = {
|
2012-03-10 05:51:24 +08:00
|
|
|
.clk = {
|
2010-08-18 21:39:26 +08:00
|
|
|
.name = "dout_mmc3",
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_group,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_FSYS, .shift = 12, .size = 4 },
|
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_FSYS2, .shift = 16, .size = 4 },
|
2010-08-18 21:39:26 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_dout_mmc4 = {
|
2010-08-18 21:39:26 +08:00
|
|
|
.clk = {
|
|
|
|
.name = "dout_mmc4",
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_group,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_FSYS, .shift = 16, .size = 4 },
|
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_FSYS3, .shift = 0, .size = 4 },
|
2010-08-18 21:39:26 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clksrcs[] = {
|
2010-07-27 16:52:39 +08:00
|
|
|
{
|
2012-03-10 05:51:24 +08:00
|
|
|
.clk = {
|
2010-07-27 16:52:39 +08:00
|
|
|
.name = "sclk_pwm",
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clksrc_mask_peril0_ctrl,
|
2010-07-27 16:52:39 +08:00
|
|
|
.ctrlbit = (1 << 24),
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_group,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_PERIL0, .shift = 24, .size = 4 },
|
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_PERIL3, .shift = 0, .size = 4 },
|
2010-08-18 21:54:48 +08:00
|
|
|
}, {
|
2012-03-10 05:51:24 +08:00
|
|
|
.clk = {
|
2010-08-18 21:54:48 +08:00
|
|
|
.name = "sclk_csis",
|
2011-06-14 18:12:27 +08:00
|
|
|
.devname = "s5p-mipi-csis.0",
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clksrc_mask_cam_ctrl,
|
2010-08-18 21:54:48 +08:00
|
|
|
.ctrlbit = (1 << 24),
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_group,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_CAM, .shift = 24, .size = 4 },
|
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_CAM, .shift = 24, .size = 4 },
|
2010-08-18 21:54:48 +08:00
|
|
|
}, {
|
2012-03-10 05:51:24 +08:00
|
|
|
.clk = {
|
2010-08-18 21:54:48 +08:00
|
|
|
.name = "sclk_csis",
|
2011-06-14 18:12:27 +08:00
|
|
|
.devname = "s5p-mipi-csis.1",
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clksrc_mask_cam_ctrl,
|
2010-08-18 21:54:48 +08:00
|
|
|
.ctrlbit = (1 << 28),
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_group,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_CAM, .shift = 28, .size = 4 },
|
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_CAM, .shift = 28, .size = 4 },
|
2010-08-18 21:54:48 +08:00
|
|
|
}, {
|
2012-03-10 05:51:24 +08:00
|
|
|
.clk = {
|
2011-09-27 06:00:59 +08:00
|
|
|
.name = "sclk_cam0",
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clksrc_mask_cam_ctrl,
|
2010-08-18 21:54:48 +08:00
|
|
|
.ctrlbit = (1 << 16),
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_group,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_CAM, .shift = 16, .size = 4 },
|
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_CAM, .shift = 16, .size = 4 },
|
2010-08-18 21:54:48 +08:00
|
|
|
}, {
|
2012-03-10 05:51:24 +08:00
|
|
|
.clk = {
|
2011-09-27 06:00:59 +08:00
|
|
|
.name = "sclk_cam1",
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clksrc_mask_cam_ctrl,
|
2010-08-18 21:54:48 +08:00
|
|
|
.ctrlbit = (1 << 20),
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_group,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_CAM, .shift = 20, .size = 4 },
|
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_CAM, .shift = 20, .size = 4 },
|
2010-08-18 21:54:48 +08:00
|
|
|
}, {
|
2012-03-10 05:51:24 +08:00
|
|
|
.clk = {
|
2010-08-18 21:54:48 +08:00
|
|
|
.name = "sclk_fimc",
|
2011-06-14 18:12:27 +08:00
|
|
|
.devname = "exynos4-fimc.0",
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clksrc_mask_cam_ctrl,
|
2010-08-18 21:54:48 +08:00
|
|
|
.ctrlbit = (1 << 0),
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_group,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_CAM, .shift = 0, .size = 4 },
|
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_CAM, .shift = 0, .size = 4 },
|
2010-08-18 21:54:48 +08:00
|
|
|
}, {
|
2012-03-10 05:51:24 +08:00
|
|
|
.clk = {
|
2010-08-18 21:54:48 +08:00
|
|
|
.name = "sclk_fimc",
|
2011-06-14 18:12:27 +08:00
|
|
|
.devname = "exynos4-fimc.1",
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clksrc_mask_cam_ctrl,
|
2010-08-18 21:54:48 +08:00
|
|
|
.ctrlbit = (1 << 4),
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_group,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_CAM, .shift = 4, .size = 4 },
|
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_CAM, .shift = 4, .size = 4 },
|
2010-08-18 21:54:48 +08:00
|
|
|
}, {
|
2012-03-10 05:51:24 +08:00
|
|
|
.clk = {
|
2010-08-18 21:54:48 +08:00
|
|
|
.name = "sclk_fimc",
|
2011-06-14 18:12:27 +08:00
|
|
|
.devname = "exynos4-fimc.2",
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clksrc_mask_cam_ctrl,
|
2010-08-18 21:54:48 +08:00
|
|
|
.ctrlbit = (1 << 8),
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_group,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_CAM, .shift = 8, .size = 4 },
|
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_CAM, .shift = 8, .size = 4 },
|
2010-08-18 21:54:48 +08:00
|
|
|
}, {
|
2012-03-10 05:51:24 +08:00
|
|
|
.clk = {
|
2010-08-18 21:54:48 +08:00
|
|
|
.name = "sclk_fimc",
|
2011-06-14 18:12:27 +08:00
|
|
|
.devname = "exynos4-fimc.3",
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clksrc_mask_cam_ctrl,
|
2010-08-18 21:54:48 +08:00
|
|
|
.ctrlbit = (1 << 12),
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_group,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_CAM, .shift = 12, .size = 4 },
|
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_CAM, .shift = 12, .size = 4 },
|
2010-08-18 21:54:48 +08:00
|
|
|
}, {
|
2012-03-10 05:51:24 +08:00
|
|
|
.clk = {
|
2010-08-18 21:54:48 +08:00
|
|
|
.name = "sclk_fimd",
|
2011-07-21 14:42:38 +08:00
|
|
|
.devname = "exynos4-fb.0",
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clksrc_mask_lcd0_ctrl,
|
2010-08-18 21:54:48 +08:00
|
|
|
.ctrlbit = (1 << 0),
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_group,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_LCD0, .shift = 0, .size = 4 },
|
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_LCD0, .shift = 0, .size = 4 },
|
2010-08-18 21:54:48 +08:00
|
|
|
}, {
|
2012-03-10 05:51:24 +08:00
|
|
|
.clk = {
|
2010-08-18 21:54:48 +08:00
|
|
|
.name = "sclk_fimg2d",
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_mout_g2d,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_IMAGE, .shift = 8, .size = 1 },
|
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_IMAGE, .shift = 0, .size = 4 },
|
2011-07-21 15:42:30 +08:00
|
|
|
}, {
|
2012-03-10 05:51:24 +08:00
|
|
|
.clk = {
|
2011-07-21 15:42:30 +08:00
|
|
|
.name = "sclk_mfc",
|
|
|
|
.devname = "s5p-mfc",
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_mout_mfc,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_MFC, .shift = 8, .size = 1 },
|
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_MFC, .shift = 0, .size = 4 },
|
2010-08-18 21:39:26 +08:00
|
|
|
}, {
|
2012-03-10 05:51:24 +08:00
|
|
|
.clk = {
|
2011-06-14 18:12:27 +08:00
|
|
|
.name = "sclk_dwmmc",
|
2012-03-10 06:19:10 +08:00
|
|
|
.parent = &exynos4_clk_dout_mmc4.clk,
|
2011-02-14 15:08:04 +08:00
|
|
|
.enable = exynos4_clksrc_mask_fsys_ctrl,
|
2010-08-18 21:39:26 +08:00
|
|
|
.ctrlbit = (1 << 16),
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_FSYS3, .shift = 8, .size = 8 },
|
2010-08-18 21:39:26 +08:00
|
|
|
}
|
2010-07-27 16:52:39 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_sclk_uart0 = {
|
2011-10-24 18:08:42 +08:00
|
|
|
.clk = {
|
|
|
|
.name = "uclk1",
|
|
|
|
.devname = "exynos4210-uart.0",
|
|
|
|
.enable = exynos4_clksrc_mask_peril0_ctrl,
|
|
|
|
.ctrlbit = (1 << 0),
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_group,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_PERIL0, .shift = 0, .size = 4 },
|
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_PERIL0, .shift = 0, .size = 4 },
|
2011-10-24 18:08:42 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_sclk_uart1 = {
|
2012-03-10 05:51:24 +08:00
|
|
|
.clk = {
|
2011-10-24 18:08:42 +08:00
|
|
|
.name = "uclk1",
|
|
|
|
.devname = "exynos4210-uart.1",
|
|
|
|
.enable = exynos4_clksrc_mask_peril0_ctrl,
|
|
|
|
.ctrlbit = (1 << 4),
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_group,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_PERIL0, .shift = 4, .size = 4 },
|
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_PERIL0, .shift = 4, .size = 4 },
|
2011-10-24 18:08:42 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_sclk_uart2 = {
|
2012-03-10 05:51:24 +08:00
|
|
|
.clk = {
|
2011-10-24 18:08:42 +08:00
|
|
|
.name = "uclk1",
|
|
|
|
.devname = "exynos4210-uart.2",
|
|
|
|
.enable = exynos4_clksrc_mask_peril0_ctrl,
|
|
|
|
.ctrlbit = (1 << 8),
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_group,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_PERIL0, .shift = 8, .size = 4 },
|
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_PERIL0, .shift = 8, .size = 4 },
|
2011-10-24 18:08:42 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_sclk_uart3 = {
|
2012-03-10 05:51:24 +08:00
|
|
|
.clk = {
|
2011-10-24 18:08:42 +08:00
|
|
|
.name = "uclk1",
|
|
|
|
.devname = "exynos4210-uart.3",
|
|
|
|
.enable = exynos4_clksrc_mask_peril0_ctrl,
|
|
|
|
.ctrlbit = (1 << 12),
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_group,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_PERIL0, .shift = 12, .size = 4 },
|
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_PERIL0, .shift = 12, .size = 4 },
|
2011-10-24 18:08:42 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_sclk_mmc0 = {
|
2012-03-10 05:51:24 +08:00
|
|
|
.clk = {
|
2011-10-24 23:05:58 +08:00
|
|
|
.name = "sclk_mmc",
|
|
|
|
.devname = "s3c-sdhci.0",
|
2012-03-10 06:19:10 +08:00
|
|
|
.parent = &exynos4_clk_dout_mmc0.clk,
|
2011-10-24 23:05:58 +08:00
|
|
|
.enable = exynos4_clksrc_mask_fsys_ctrl,
|
|
|
|
.ctrlbit = (1 << 0),
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_FSYS1, .shift = 8, .size = 8 },
|
2011-10-24 23:05:58 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_sclk_mmc1 = {
|
2012-03-10 05:51:24 +08:00
|
|
|
.clk = {
|
2011-10-24 23:05:58 +08:00
|
|
|
.name = "sclk_mmc",
|
|
|
|
.devname = "s3c-sdhci.1",
|
2012-03-10 06:19:10 +08:00
|
|
|
.parent = &exynos4_clk_dout_mmc1.clk,
|
2011-10-24 23:05:58 +08:00
|
|
|
.enable = exynos4_clksrc_mask_fsys_ctrl,
|
|
|
|
.ctrlbit = (1 << 4),
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_FSYS1, .shift = 24, .size = 8 },
|
2011-10-24 23:05:58 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_sclk_mmc2 = {
|
2012-03-10 05:51:24 +08:00
|
|
|
.clk = {
|
2011-10-24 23:05:58 +08:00
|
|
|
.name = "sclk_mmc",
|
|
|
|
.devname = "s3c-sdhci.2",
|
2012-03-10 06:19:10 +08:00
|
|
|
.parent = &exynos4_clk_dout_mmc2.clk,
|
2011-10-24 23:05:58 +08:00
|
|
|
.enable = exynos4_clksrc_mask_fsys_ctrl,
|
|
|
|
.ctrlbit = (1 << 8),
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_FSYS2, .shift = 8, .size = 8 },
|
2011-10-24 23:05:58 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_sclk_mmc3 = {
|
2012-03-10 05:51:24 +08:00
|
|
|
.clk = {
|
2011-10-24 23:05:58 +08:00
|
|
|
.name = "sclk_mmc",
|
|
|
|
.devname = "s3c-sdhci.3",
|
2012-03-10 06:19:10 +08:00
|
|
|
.parent = &exynos4_clk_dout_mmc3.clk,
|
2011-10-24 23:05:58 +08:00
|
|
|
.enable = exynos4_clksrc_mask_fsys_ctrl,
|
|
|
|
.ctrlbit = (1 << 12),
|
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_FSYS2, .shift = 24, .size = 8 },
|
2011-10-24 23:05:58 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_sclk_spi0 = {
|
2012-03-10 05:51:24 +08:00
|
|
|
.clk = {
|
2011-12-26 15:42:15 +08:00
|
|
|
.name = "sclk_spi",
|
2012-03-10 05:51:24 +08:00
|
|
|
.devname = "s3c64xx-spi.0",
|
2011-12-26 15:42:15 +08:00
|
|
|
.enable = exynos4_clksrc_mask_peril1_ctrl,
|
2012-03-10 05:51:24 +08:00
|
|
|
.ctrlbit = (1 << 16),
|
2011-12-26 15:42:15 +08:00
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_group,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_PERIL1, .shift = 16, .size = 4 },
|
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_PERIL1, .shift = 0, .size = 4 },
|
2011-12-26 15:42:15 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_sclk_spi1 = {
|
2012-03-10 05:51:24 +08:00
|
|
|
.clk = {
|
2011-12-26 15:42:15 +08:00
|
|
|
.name = "sclk_spi",
|
2012-03-10 05:51:24 +08:00
|
|
|
.devname = "s3c64xx-spi.1",
|
2011-12-26 15:42:15 +08:00
|
|
|
.enable = exynos4_clksrc_mask_peril1_ctrl,
|
2012-03-10 05:51:24 +08:00
|
|
|
.ctrlbit = (1 << 20),
|
2011-12-26 15:42:15 +08:00
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_group,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_PERIL1, .shift = 20, .size = 4 },
|
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_PERIL1, .shift = 16, .size = 4 },
|
2011-12-26 15:42:15 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk exynos4_clk_sclk_spi2 = {
|
2012-03-10 05:51:24 +08:00
|
|
|
.clk = {
|
2011-12-26 15:42:15 +08:00
|
|
|
.name = "sclk_spi",
|
2012-03-10 05:51:24 +08:00
|
|
|
.devname = "s3c64xx-spi.2",
|
2011-12-26 15:42:15 +08:00
|
|
|
.enable = exynos4_clksrc_mask_peril1_ctrl,
|
2012-03-10 05:51:24 +08:00
|
|
|
.ctrlbit = (1 << 24),
|
2011-12-26 15:42:15 +08:00
|
|
|
},
|
2012-03-10 06:19:10 +08:00
|
|
|
.sources = &exynos4_clkset_group,
|
|
|
|
.reg_src = { .reg = EXYNOS4_CLKSRC_PERIL1, .shift = 24, .size = 4 },
|
|
|
|
.reg_div = { .reg = EXYNOS4_CLKDIV_PERIL2, .shift = 0, .size = 4 },
|
2011-12-26 15:42:15 +08:00
|
|
|
};
|
|
|
|
|
2010-07-27 16:52:39 +08:00
|
|
|
/* Clock initialization code */
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clksrc_clk *exynos4_sysclks[] = {
|
|
|
|
&exynos4_clk_mout_apll,
|
|
|
|
&exynos4_clk_sclk_apll,
|
|
|
|
&exynos4_clk_mout_epll,
|
|
|
|
&exynos4_clk_mout_mpll,
|
|
|
|
&exynos4_clk_moutcore,
|
|
|
|
&exynos4_clk_coreclk,
|
|
|
|
&exynos4_clk_armclk,
|
|
|
|
&exynos4_clk_aclk_corem0,
|
|
|
|
&exynos4_clk_aclk_cores,
|
|
|
|
&exynos4_clk_aclk_corem1,
|
|
|
|
&exynos4_clk_periphclk,
|
|
|
|
&exynos4_clk_mout_corebus,
|
|
|
|
&exynos4_clk_sclk_dmc,
|
|
|
|
&exynos4_clk_aclk_cored,
|
|
|
|
&exynos4_clk_aclk_corep,
|
|
|
|
&exynos4_clk_aclk_acp,
|
|
|
|
&exynos4_clk_pclk_acp,
|
|
|
|
&exynos4_clk_vpllsrc,
|
|
|
|
&exynos4_clk_sclk_vpll,
|
|
|
|
&exynos4_clk_aclk_200,
|
|
|
|
&exynos4_clk_aclk_100,
|
|
|
|
&exynos4_clk_aclk_160,
|
|
|
|
&exynos4_clk_aclk_133,
|
|
|
|
&exynos4_clk_dout_mmc0,
|
|
|
|
&exynos4_clk_dout_mmc1,
|
|
|
|
&exynos4_clk_dout_mmc2,
|
|
|
|
&exynos4_clk_dout_mmc3,
|
|
|
|
&exynos4_clk_dout_mmc4,
|
|
|
|
&exynos4_clk_mout_mfc0,
|
|
|
|
&exynos4_clk_mout_mfc1,
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct clk *exynos4_clk_cdev[] = {
|
|
|
|
&exynos4_clk_pdma0,
|
|
|
|
&exynos4_clk_pdma1,
|
2012-02-15 12:15:12 +08:00
|
|
|
&exynos4_clk_mdma1,
|
2012-03-13 12:17:02 +08:00
|
|
|
&exynos4_clk_fimd0,
|
2012-03-10 06:19:10 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
static struct clksrc_clk *exynos4_clksrc_cdev[] = {
|
|
|
|
&exynos4_clk_sclk_uart0,
|
|
|
|
&exynos4_clk_sclk_uart1,
|
|
|
|
&exynos4_clk_sclk_uart2,
|
|
|
|
&exynos4_clk_sclk_uart3,
|
|
|
|
&exynos4_clk_sclk_mmc0,
|
|
|
|
&exynos4_clk_sclk_mmc1,
|
|
|
|
&exynos4_clk_sclk_mmc2,
|
|
|
|
&exynos4_clk_sclk_mmc3,
|
|
|
|
&exynos4_clk_sclk_spi0,
|
|
|
|
&exynos4_clk_sclk_spi1,
|
|
|
|
&exynos4_clk_sclk_spi2,
|
2011-12-26 15:42:15 +08:00
|
|
|
|
2011-10-24 18:08:42 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
static struct clk_lookup exynos4_clk_lookup[] = {
|
2012-03-10 06:19:10 +08:00
|
|
|
CLKDEV_INIT("exynos4210-uart.0", "clk_uart_baud0", &exynos4_clk_sclk_uart0.clk),
|
|
|
|
CLKDEV_INIT("exynos4210-uart.1", "clk_uart_baud0", &exynos4_clk_sclk_uart1.clk),
|
|
|
|
CLKDEV_INIT("exynos4210-uart.2", "clk_uart_baud0", &exynos4_clk_sclk_uart2.clk),
|
|
|
|
CLKDEV_INIT("exynos4210-uart.3", "clk_uart_baud0", &exynos4_clk_sclk_uart3.clk),
|
|
|
|
CLKDEV_INIT("s3c-sdhci.0", "mmc_busclk.2", &exynos4_clk_sclk_mmc0.clk),
|
|
|
|
CLKDEV_INIT("s3c-sdhci.1", "mmc_busclk.2", &exynos4_clk_sclk_mmc1.clk),
|
|
|
|
CLKDEV_INIT("s3c-sdhci.2", "mmc_busclk.2", &exynos4_clk_sclk_mmc2.clk),
|
|
|
|
CLKDEV_INIT("s3c-sdhci.3", "mmc_busclk.2", &exynos4_clk_sclk_mmc3.clk),
|
2012-03-13 12:17:02 +08:00
|
|
|
CLKDEV_INIT("exynos4-fb.0", "lcd", &exynos4_clk_fimd0),
|
2012-03-10 06:19:10 +08:00
|
|
|
CLKDEV_INIT("dma-pl330.0", "apb_pclk", &exynos4_clk_pdma0),
|
|
|
|
CLKDEV_INIT("dma-pl330.1", "apb_pclk", &exynos4_clk_pdma1),
|
2011-12-27 13:42:50 +08:00
|
|
|
CLKDEV_INIT("dma-pl330.2", "apb_pclk", &exynos4_clk_mdma1),
|
2012-03-10 06:19:10 +08:00
|
|
|
CLKDEV_INIT("s3c64xx-spi.0", "spi_busclk0", &exynos4_clk_sclk_spi0.clk),
|
|
|
|
CLKDEV_INIT("s3c64xx-spi.1", "spi_busclk0", &exynos4_clk_sclk_spi1.clk),
|
|
|
|
CLKDEV_INIT("s3c64xx-spi.2", "spi_busclk0", &exynos4_clk_sclk_spi2.clk),
|
2011-10-24 18:08:42 +08:00
|
|
|
};
|
|
|
|
|
2010-12-23 13:25:31 +08:00
|
|
|
static int xtal_rate;
|
|
|
|
|
2011-02-14 15:08:04 +08:00
|
|
|
static unsigned long exynos4_fout_apll_get_rate(struct clk *clk)
|
2010-12-23 13:25:31 +08:00
|
|
|
{
|
2011-08-24 16:25:09 +08:00
|
|
|
if (soc_is_exynos4210())
|
2012-03-10 06:19:10 +08:00
|
|
|
return s5p_get_pll45xx(xtal_rate, __raw_readl(EXYNOS4_APLL_CON0),
|
2011-08-24 16:25:09 +08:00
|
|
|
pll_4508);
|
2011-10-04 16:08:56 +08:00
|
|
|
else if (soc_is_exynos4212() || soc_is_exynos4412())
|
2012-03-10 06:19:10 +08:00
|
|
|
return s5p_get_pll35xx(xtal_rate, __raw_readl(EXYNOS4_APLL_CON0));
|
2011-08-24 16:25:09 +08:00
|
|
|
else
|
|
|
|
return 0;
|
2010-12-23 13:25:31 +08:00
|
|
|
}
|
|
|
|
|
2011-02-14 15:08:04 +08:00
|
|
|
static struct clk_ops exynos4_fout_apll_ops = {
|
|
|
|
.get_rate = exynos4_fout_apll_get_rate,
|
2010-12-23 13:25:31 +08:00
|
|
|
};
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static u32 exynos4_vpll_div[][8] = {
|
2011-09-19 15:44:42 +08:00
|
|
|
{ 54000000, 3, 53, 3, 1024, 0, 17, 0 },
|
|
|
|
{ 108000000, 3, 53, 2, 1024, 0, 17, 0 },
|
|
|
|
};
|
|
|
|
|
|
|
|
static unsigned long exynos4_vpll_get_rate(struct clk *clk)
|
|
|
|
{
|
|
|
|
return clk->rate;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int exynos4_vpll_set_rate(struct clk *clk, unsigned long rate)
|
|
|
|
{
|
|
|
|
unsigned int vpll_con0, vpll_con1 = 0;
|
|
|
|
unsigned int i;
|
|
|
|
|
|
|
|
/* Return if nothing changed */
|
|
|
|
if (clk->rate == rate)
|
|
|
|
return 0;
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
vpll_con0 = __raw_readl(EXYNOS4_VPLL_CON0);
|
2011-09-19 15:44:42 +08:00
|
|
|
vpll_con0 &= ~(0x1 << 27 | \
|
|
|
|
PLL90XX_MDIV_MASK << PLL46XX_MDIV_SHIFT | \
|
|
|
|
PLL90XX_PDIV_MASK << PLL46XX_PDIV_SHIFT | \
|
|
|
|
PLL90XX_SDIV_MASK << PLL46XX_SDIV_SHIFT);
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
vpll_con1 = __raw_readl(EXYNOS4_VPLL_CON1);
|
2011-09-19 15:44:42 +08:00
|
|
|
vpll_con1 &= ~(PLL46XX_MRR_MASK << PLL46XX_MRR_SHIFT | \
|
|
|
|
PLL46XX_MFR_MASK << PLL46XX_MFR_SHIFT | \
|
|
|
|
PLL4650C_KDIV_MASK << PLL46XX_KDIV_SHIFT);
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
for (i = 0; i < ARRAY_SIZE(exynos4_vpll_div); i++) {
|
|
|
|
if (exynos4_vpll_div[i][0] == rate) {
|
|
|
|
vpll_con0 |= exynos4_vpll_div[i][1] << PLL46XX_PDIV_SHIFT;
|
|
|
|
vpll_con0 |= exynos4_vpll_div[i][2] << PLL46XX_MDIV_SHIFT;
|
|
|
|
vpll_con0 |= exynos4_vpll_div[i][3] << PLL46XX_SDIV_SHIFT;
|
|
|
|
vpll_con1 |= exynos4_vpll_div[i][4] << PLL46XX_KDIV_SHIFT;
|
|
|
|
vpll_con1 |= exynos4_vpll_div[i][5] << PLL46XX_MFR_SHIFT;
|
|
|
|
vpll_con1 |= exynos4_vpll_div[i][6] << PLL46XX_MRR_SHIFT;
|
|
|
|
vpll_con0 |= exynos4_vpll_div[i][7] << 27;
|
2011-09-19 15:44:42 +08:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
if (i == ARRAY_SIZE(exynos4_vpll_div)) {
|
2011-09-19 15:44:42 +08:00
|
|
|
printk(KERN_ERR "%s: Invalid Clock VPLL Frequency\n",
|
|
|
|
__func__);
|
|
|
|
return -EINVAL;
|
|
|
|
}
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
__raw_writel(vpll_con0, EXYNOS4_VPLL_CON0);
|
|
|
|
__raw_writel(vpll_con1, EXYNOS4_VPLL_CON1);
|
2011-09-19 15:44:42 +08:00
|
|
|
|
|
|
|
/* Wait for VPLL lock */
|
2012-03-10 06:19:10 +08:00
|
|
|
while (!(__raw_readl(EXYNOS4_VPLL_CON0) & (1 << PLL46XX_LOCKED_SHIFT)))
|
2011-09-19 15:44:42 +08:00
|
|
|
continue;
|
|
|
|
|
|
|
|
clk->rate = rate;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static struct clk_ops exynos4_vpll_ops = {
|
|
|
|
.get_rate = exynos4_vpll_get_rate,
|
|
|
|
.set_rate = exynos4_vpll_set_rate,
|
|
|
|
};
|
|
|
|
|
2011-02-14 15:08:04 +08:00
|
|
|
void __init_or_cpufreq exynos4_setup_clocks(void)
|
2010-07-27 16:52:39 +08:00
|
|
|
{
|
|
|
|
struct clk *xtal_clk;
|
2011-08-24 16:25:09 +08:00
|
|
|
unsigned long apll = 0;
|
|
|
|
unsigned long mpll = 0;
|
|
|
|
unsigned long epll = 0;
|
|
|
|
unsigned long vpll = 0;
|
2010-07-27 16:52:39 +08:00
|
|
|
unsigned long vpllsrc;
|
|
|
|
unsigned long xtal;
|
|
|
|
unsigned long armclk;
|
|
|
|
unsigned long sclk_dmc;
|
2010-08-18 21:24:53 +08:00
|
|
|
unsigned long aclk_200;
|
|
|
|
unsigned long aclk_100;
|
|
|
|
unsigned long aclk_160;
|
|
|
|
unsigned long aclk_133;
|
2010-07-27 16:52:39 +08:00
|
|
|
unsigned int ptr;
|
|
|
|
|
|
|
|
printk(KERN_DEBUG "%s: registering clocks\n", __func__);
|
|
|
|
|
|
|
|
xtal_clk = clk_get(NULL, "xtal");
|
|
|
|
BUG_ON(IS_ERR(xtal_clk));
|
|
|
|
|
|
|
|
xtal = clk_get_rate(xtal_clk);
|
2010-12-23 13:25:31 +08:00
|
|
|
|
|
|
|
xtal_rate = xtal;
|
|
|
|
|
2010-07-27 16:52:39 +08:00
|
|
|
clk_put(xtal_clk);
|
|
|
|
|
|
|
|
printk(KERN_DEBUG "%s: xtal is %ld\n", __func__, xtal);
|
|
|
|
|
2011-08-24 16:25:09 +08:00
|
|
|
if (soc_is_exynos4210()) {
|
2012-03-10 06:19:10 +08:00
|
|
|
apll = s5p_get_pll45xx(xtal, __raw_readl(EXYNOS4_APLL_CON0),
|
2011-08-24 16:25:09 +08:00
|
|
|
pll_4508);
|
2012-03-10 06:19:10 +08:00
|
|
|
mpll = s5p_get_pll45xx(xtal, __raw_readl(EXYNOS4_MPLL_CON0),
|
2011-08-24 16:25:09 +08:00
|
|
|
pll_4508);
|
2012-03-10 06:19:10 +08:00
|
|
|
epll = s5p_get_pll46xx(xtal, __raw_readl(EXYNOS4_EPLL_CON0),
|
|
|
|
__raw_readl(EXYNOS4_EPLL_CON1), pll_4600);
|
2011-08-24 16:25:09 +08:00
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
vpllsrc = clk_get_rate(&exynos4_clk_vpllsrc.clk);
|
|
|
|
vpll = s5p_get_pll46xx(vpllsrc, __raw_readl(EXYNOS4_VPLL_CON0),
|
|
|
|
__raw_readl(EXYNOS4_VPLL_CON1), pll_4650c);
|
2011-10-04 16:08:56 +08:00
|
|
|
} else if (soc_is_exynos4212() || soc_is_exynos4412()) {
|
2012-03-10 06:19:10 +08:00
|
|
|
apll = s5p_get_pll35xx(xtal, __raw_readl(EXYNOS4_APLL_CON0));
|
|
|
|
mpll = s5p_get_pll35xx(xtal, __raw_readl(EXYNOS4_MPLL_CON0));
|
|
|
|
epll = s5p_get_pll36xx(xtal, __raw_readl(EXYNOS4_EPLL_CON0),
|
|
|
|
__raw_readl(EXYNOS4_EPLL_CON1));
|
|
|
|
|
|
|
|
vpllsrc = clk_get_rate(&exynos4_clk_vpllsrc.clk);
|
|
|
|
vpll = s5p_get_pll36xx(vpllsrc, __raw_readl(EXYNOS4_VPLL_CON0),
|
|
|
|
__raw_readl(EXYNOS4_VPLL_CON1));
|
2011-08-24 16:25:09 +08:00
|
|
|
} else {
|
|
|
|
/* nothing */
|
|
|
|
}
|
2010-07-27 16:52:39 +08:00
|
|
|
|
2011-02-14 15:08:04 +08:00
|
|
|
clk_fout_apll.ops = &exynos4_fout_apll_ops;
|
2010-07-27 16:52:39 +08:00
|
|
|
clk_fout_mpll.rate = mpll;
|
|
|
|
clk_fout_epll.rate = epll;
|
2011-09-19 15:44:42 +08:00
|
|
|
clk_fout_vpll.ops = &exynos4_vpll_ops;
|
2010-07-27 16:52:39 +08:00
|
|
|
clk_fout_vpll.rate = vpll;
|
|
|
|
|
2011-02-14 15:08:04 +08:00
|
|
|
printk(KERN_INFO "EXYNOS4: PLL settings, A=%ld, M=%ld, E=%ld V=%ld",
|
2010-07-27 16:52:39 +08:00
|
|
|
apll, mpll, epll, vpll);
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
armclk = clk_get_rate(&exynos4_clk_armclk.clk);
|
|
|
|
sclk_dmc = clk_get_rate(&exynos4_clk_sclk_dmc.clk);
|
2010-08-18 21:03:19 +08:00
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
aclk_200 = clk_get_rate(&exynos4_clk_aclk_200.clk);
|
|
|
|
aclk_100 = clk_get_rate(&exynos4_clk_aclk_100.clk);
|
|
|
|
aclk_160 = clk_get_rate(&exynos4_clk_aclk_160.clk);
|
|
|
|
aclk_133 = clk_get_rate(&exynos4_clk_aclk_133.clk);
|
2010-08-18 21:24:53 +08:00
|
|
|
|
2011-02-14 15:08:04 +08:00
|
|
|
printk(KERN_INFO "EXYNOS4: ARMCLK=%ld, DMC=%ld, ACLK200=%ld\n"
|
2010-08-18 21:24:53 +08:00
|
|
|
"ACLK100=%ld, ACLK160=%ld, ACLK133=%ld\n",
|
|
|
|
armclk, sclk_dmc, aclk_200,
|
|
|
|
aclk_100, aclk_160, aclk_133);
|
2010-07-27 16:52:39 +08:00
|
|
|
|
|
|
|
clk_f.rate = armclk;
|
|
|
|
clk_h.rate = sclk_dmc;
|
2010-08-18 21:24:53 +08:00
|
|
|
clk_p.rate = aclk_100;
|
2010-07-27 16:52:39 +08:00
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
for (ptr = 0; ptr < ARRAY_SIZE(exynos4_clksrcs); ptr++)
|
|
|
|
s3c_set_clksrc(&exynos4_clksrcs[ptr], true);
|
2010-07-27 16:52:39 +08:00
|
|
|
}
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
static struct clk *exynos4_clks[] __initdata = {
|
|
|
|
&exynos4_clk_sclk_hdmi27m,
|
|
|
|
&exynos4_clk_sclk_hdmiphy,
|
|
|
|
&exynos4_clk_sclk_usbphy0,
|
|
|
|
&exynos4_clk_sclk_usbphy1,
|
2010-07-27 16:52:39 +08:00
|
|
|
};
|
|
|
|
|
2011-08-24 20:52:45 +08:00
|
|
|
#ifdef CONFIG_PM_SLEEP
|
|
|
|
static int exynos4_clock_suspend(void)
|
|
|
|
{
|
|
|
|
s3c_pm_do_save(exynos4_clock_save, ARRAY_SIZE(exynos4_clock_save));
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void exynos4_clock_resume(void)
|
|
|
|
{
|
|
|
|
s3c_pm_do_restore_core(exynos4_clock_save, ARRAY_SIZE(exynos4_clock_save));
|
|
|
|
}
|
|
|
|
|
|
|
|
#else
|
|
|
|
#define exynos4_clock_suspend NULL
|
|
|
|
#define exynos4_clock_resume NULL
|
|
|
|
#endif
|
|
|
|
|
2012-01-21 09:47:14 +08:00
|
|
|
static struct syscore_ops exynos4_clock_syscore_ops = {
|
2011-08-24 20:52:45 +08:00
|
|
|
.suspend = exynos4_clock_suspend,
|
|
|
|
.resume = exynos4_clock_resume,
|
|
|
|
};
|
|
|
|
|
2011-02-14 15:08:04 +08:00
|
|
|
void __init exynos4_register_clocks(void)
|
2010-07-27 16:52:39 +08:00
|
|
|
{
|
|
|
|
int ptr;
|
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
s3c24xx_register_clocks(exynos4_clks, ARRAY_SIZE(exynos4_clks));
|
2010-07-27 16:52:39 +08:00
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
for (ptr = 0; ptr < ARRAY_SIZE(exynos4_sysclks); ptr++)
|
|
|
|
s3c_register_clksrc(exynos4_sysclks[ptr], 1);
|
2010-07-27 16:52:39 +08:00
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
for (ptr = 0; ptr < ARRAY_SIZE(exynos4_sclk_tv); ptr++)
|
|
|
|
s3c_register_clksrc(exynos4_sclk_tv[ptr], 1);
|
2011-09-19 15:44:42 +08:00
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
for (ptr = 0; ptr < ARRAY_SIZE(exynos4_clksrc_cdev); ptr++)
|
|
|
|
s3c_register_clksrc(exynos4_clksrc_cdev[ptr], 1);
|
2011-10-24 18:08:42 +08:00
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
s3c_register_clksrc(exynos4_clksrcs, ARRAY_SIZE(exynos4_clksrcs));
|
|
|
|
s3c_register_clocks(exynos4_init_clocks_on, ARRAY_SIZE(exynos4_init_clocks_on));
|
2010-07-27 16:52:39 +08:00
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
s3c24xx_register_clocks(exynos4_clk_cdev, ARRAY_SIZE(exynos4_clk_cdev));
|
|
|
|
for (ptr = 0; ptr < ARRAY_SIZE(exynos4_clk_cdev); ptr++)
|
|
|
|
s3c_disable_clocks(exynos4_clk_cdev[ptr], 1);
|
2011-10-24 20:01:03 +08:00
|
|
|
|
2012-03-10 06:19:10 +08:00
|
|
|
s3c_register_clocks(exynos4_init_clocks_off, ARRAY_SIZE(exynos4_init_clocks_off));
|
|
|
|
s3c_disable_clocks(exynos4_init_clocks_off, ARRAY_SIZE(exynos4_init_clocks_off));
|
2011-10-24 18:08:42 +08:00
|
|
|
clkdev_add_table(exynos4_clk_lookup, ARRAY_SIZE(exynos4_clk_lookup));
|
2010-07-27 16:52:39 +08:00
|
|
|
|
2011-08-24 20:52:45 +08:00
|
|
|
register_syscore_ops(&exynos4_clock_syscore_ops);
|
2011-09-02 08:44:36 +08:00
|
|
|
s3c24xx_register_clock(&dummy_apb_pclk);
|
|
|
|
|
2010-07-27 16:52:39 +08:00
|
|
|
s3c_pwmclk_init();
|
|
|
|
}
|