mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
Samsung PM 3rd updates for v3.19
- exynos3250 : add PMU support - PMU refactoring : move restart code into PMU driver : move restart code for exynos440 into clk driver - use u8 for val[] in struct exynos_pmu_conf Note that this branch is based on tags/samsung-exynos-v3.19 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAABAgAGBQJUdsuOAAoJEA0Cl+kVi2xq4fkP/R4LIcYizfZxpe810YJWcIxU +1Ex5uesn0hgO8SfOaYixeuMyfhTWt4PQzfrFofL/WeQwgEMHeuBCqyWMbzBoF2v oi4U8zE90z8YTsKR31qXfwcZydMpXnqpj9KeIXsh/1S1wvJduKExQ6vgRdzD1cSK t/NXiU3AkvDrAf/NGgbM9bY6+vKpqMGY2OpLjYzouGA+3xObjbSol+aI9xMpagbh AacVwYOUHu+KKQx2A34toGVnrhNo6kPQ+eYR6JMCpHC3cNmysW8JeDCS/GI+dJLe Nu3NEOtPL2E4KsPm+4O44dRkxZVfhWht/+5KhSpyU8OCU7k876iP9HsMDbRRc251 WCoKMCPReZtbR3KDE1xU/qZhiBSe2bMo0EgnZn/rTg4pusbaBgtpmA8dy17hYfLQ YCYMV867Zcq8uZseiuaR6UaSqKPF4jciSq6w56YC3Ozi1DRmo1vKA0VHqYKiWZPm 8iD14+enPj1QNHwlYln2HyyttvreEFeU/wMUKe/qdQhPftrLlNDeliXHy12HZ6K+ eRgC8JmLITQiJ/mVy8yshsLa62S2jdEbWYmlOniTpaELFpgmMGVCBKySXdSh7sVf feaybFIUDjt0IxkKYTceqIpOs+dJ7eP/ccmcokMET8jpw78a1jMSddqt6PJz1ooZ /egKklt67zQuYlpGhWjv =bi8c -----END PGP SIGNATURE----- Merge tag 'samsung-pm-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/soc Pull "Samsung PM 3rd updates for v3.19" from Kukjin Kim: - exynos3250 : add PMU support - PMU refactoring : move restart code into PMU driver : move restart code for exynos440 into clk driver - use u8 for val[] in struct exynos_pmu_conf Note that this branch is based on tags/samsung-exynos-v3.19 * tag 'samsung-pm-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung: ARM: EXYNOS: use u8 for val[] in struct exynos_pmu_conf ARM: EXYNOS: move restart code into pmu driver clk: exynos5440: move restart code into clock driver ARM: EXYNOS: add exynos3250 PMU support Signed-off-by: Arnd Bergmann <[email protected]>
This commit is contained in:
commit
09ffd948a0
5 changed files with 347 additions and 26 deletions
|
|
@ -15,6 +15,8 @@
|
|||
#include <linux/clk-provider.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/reboot.h>
|
||||
|
||||
#include "clk.h"
|
||||
#include "clk-pll.h"
|
||||
|
|
@ -23,6 +25,8 @@
|
|||
#define CPU_CLK_STATUS 0xfc
|
||||
#define MISC_DOUT1 0x558
|
||||
|
||||
static void __iomem *reg_base;
|
||||
|
||||
/* parent clock name list */
|
||||
PNAME(mout_armclk_p) = { "cplla", "cpllb" };
|
||||
PNAME(mout_spi_p) = { "div125", "div200" };
|
||||
|
|
@ -89,10 +93,30 @@ static const struct of_device_id ext_clk_match[] __initconst = {
|
|||
{},
|
||||
};
|
||||
|
||||
static int exynos5440_clk_restart_notify(struct notifier_block *this,
|
||||
unsigned long code, void *unused)
|
||||
{
|
||||
u32 val, status;
|
||||
|
||||
status = readl_relaxed(reg_base + 0xbc);
|
||||
val = readl_relaxed(reg_base + 0xcc);
|
||||
val = (val & 0xffff0000) | (status & 0xffff);
|
||||
writel_relaxed(val, reg_base + 0xcc);
|
||||
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Exynos5440 Clock restart notifier, handles restart functionality
|
||||
*/
|
||||
static struct notifier_block exynos5440_clk_restart_handler = {
|
||||
.notifier_call = exynos5440_clk_restart_notify,
|
||||
.priority = 128,
|
||||
};
|
||||
|
||||
/* register exynos5440 clocks */
|
||||
static void __init exynos5440_clk_init(struct device_node *np)
|
||||
{
|
||||
void __iomem *reg_base;
|
||||
struct samsung_clk_provider *ctx;
|
||||
|
||||
reg_base = of_iomap(np, 0);
|
||||
|
|
@ -125,6 +149,9 @@ static void __init exynos5440_clk_init(struct device_node *np)
|
|||
|
||||
samsung_clk_of_add_provider(np, ctx);
|
||||
|
||||
if (register_restart_handler(&exynos5440_clk_restart_handler))
|
||||
pr_warn("exynos5440 clock can't register restart handler\n");
|
||||
|
||||
pr_info("Exynos5440: arm_clk = %ldHz\n", _get_rate("arm_clk"));
|
||||
pr_info("exynos5440 clock initialization complete\n");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue