2018-05-03 16:26:20 +03:00
|
|
|
/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
|
|
|
|
/*
|
|
|
|
* Copyright (c) 2017 BayLibre, SAS
|
|
|
|
* Author: Neil Armstrong <narmstrong@baylibre.com>
|
|
|
|
*
|
|
|
|
* Copyright (c) 2018 Amlogic, inc.
|
|
|
|
* Author: Qiufang Dai <qiufang.dai@amlogic.com>
|
|
|
|
* Author: Yixun Lan <yixun.lan@amlogic.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __MESON_AOCLK_H__
|
|
|
|
#define __MESON_AOCLK_H__
|
|
|
|
|
|
|
|
#include <linux/platform_device.h>
|
|
|
|
#include <linux/reset-controller.h>
|
2019-01-16 20:54:35 +03:00
|
|
|
#include "clkc.h"
|
|
|
|
|
|
|
|
struct meson_aoclk_input {
|
|
|
|
const char *name;
|
|
|
|
bool required;
|
|
|
|
};
|
2018-05-03 16:26:20 +03:00
|
|
|
|
|
|
|
struct meson_aoclk_data {
|
|
|
|
const unsigned int reset_reg;
|
|
|
|
const int num_reset;
|
|
|
|
const unsigned int *reset;
|
2019-01-16 20:54:35 +03:00
|
|
|
const int num_clks;
|
2018-05-03 16:26:20 +03:00
|
|
|
struct clk_regmap **clks;
|
2019-01-16 20:54:35 +03:00
|
|
|
const int num_inputs;
|
|
|
|
const struct meson_aoclk_input *inputs;
|
|
|
|
const char *input_prefix;
|
2018-05-03 16:26:20 +03:00
|
|
|
const struct clk_hw_onecell_data *hw_data;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct meson_aoclk_reset_controller {
|
|
|
|
struct reset_controller_dev reset;
|
|
|
|
const struct meson_aoclk_data *data;
|
|
|
|
struct regmap *regmap;
|
|
|
|
};
|
|
|
|
|
|
|
|
int meson_aoclkc_probe(struct platform_device *pdev);
|
|
|
|
#endif
|