linux/drivers/clk/samsung/clk-exynos5-subcmu.c

// SPDX-License-Identifier: GPL-2.0
//
// Copyright (c) 2018 Samsung Electronics Co., Ltd.
// Author: Marek Szyprowski <[email protected]>
// Common Clock Framework support for Exynos5 power-domain dependent clocks

#include <linux/io.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm_domain.h>
#include <linux/pm_runtime.h>

#include "clk.h"
#include "clk-exynos5-subcmu.h"

static struct samsung_clk_provider *ctx;
static const struct exynos5_subcmu_info **cmu;
static int nr_cmus;

static void exynos5_subcmu_clk_save(void __iomem *base,
				    struct exynos5_subcmu_reg_dump *rd,
				    unsigned int num_regs)
{
	for (; num_regs > 0; --num_regs, ++rd) {
		rd->save = readl(base + rd->offset);
		writel((rd->save & ~rd->mask) | rd->value, base + rd->offset);
		rd->save &= rd->mask;
	}
};

static void exynos5_subcmu_clk_restore(void __iomem *base,
				       struct exynos5_subcmu_reg_dump *rd,
				       unsigned int num_regs)
{}

static void exynos5_subcmu_defer_gate(struct samsung_clk_provider *ctx,
			      const struct samsung_gate_clock *list, int nr_clk)
{}

/*
 * Pass the needed clock provider context and register sub-CMU clocks
 *
 * NOTE: This function has to be called from the main, CLK_OF_DECLARE-
 * initialized clock provider driver. This happens very early during boot
 * process. Then this driver, during core_initcall registers two platform
 * drivers: one which binds to the same device-tree node as CLK_OF_DECLARE
 * driver and second, for handling its per-domain child-devices. Those
 * platform drivers are bound to their devices a bit later in arch_initcall,
 * when OF-core populates all device-tree nodes.
 */
void exynos5_subcmus_init(struct samsung_clk_provider *_ctx, int _nr_cmus,
			  const struct exynos5_subcmu_info **_cmu)
{}

static int __maybe_unused exynos5_subcmu_suspend(struct device *dev)
{}

static int __maybe_unused exynos5_subcmu_resume(struct device *dev)
{}

static int __init exynos5_subcmu_probe(struct platform_device *pdev)
{}

static const struct dev_pm_ops exynos5_subcmu_pm_ops =;

static struct platform_driver exynos5_subcmu_driver __refdata =;

static int __init exynos5_clk_register_subcmu(struct device *parent,
					 const struct exynos5_subcmu_info *info,
					      struct device_node *pd_node)
{}

static int __init exynos5_clk_probe(struct platform_device *pdev)
{}

static const struct of_device_id exynos5_clk_of_match[] =;

static struct platform_driver exynos5_clk_driver __refdata =;

static int __init exynos5_clk_drv_init(void)
{}
core_initcall(exynos5_clk_drv_init);