blob: 605b43855a6998dd07e6fdd5735ebf4fb070d9c0 [file] [log] [blame]
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00001/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
2/*
3 * Copyright (c) 2017 BayLibre, SAS
4 * Author: Neil Armstrong <narmstrong@baylibre.com>
5 *
6 * Copyright (c) 2018 Amlogic, inc.
7 * Author: Qiufang Dai <qiufang.dai@amlogic.com>
8 * Author: Yixun Lan <yixun.lan@amlogic.com>
9 */
10
11#ifndef __MESON_AOCLK_H__
12#define __MESON_AOCLK_H__
13
David Brazdil0f672f62019-12-10 10:32:29 +000014#include <linux/clk-provider.h>
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000015#include <linux/platform_device.h>
David Brazdil0f672f62019-12-10 10:32:29 +000016#include <linux/regmap.h>
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000017#include <linux/reset-controller.h>
David Brazdil0f672f62019-12-10 10:32:29 +000018
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000019#include "clk-regmap.h"
20
21struct meson_aoclk_data {
22 const unsigned int reset_reg;
23 const int num_reset;
24 const unsigned int *reset;
David Brazdil0f672f62019-12-10 10:32:29 +000025 const int num_clks;
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000026 struct clk_regmap **clks;
27 const struct clk_hw_onecell_data *hw_data;
28};
29
30struct meson_aoclk_reset_controller {
31 struct reset_controller_dev reset;
32 const struct meson_aoclk_data *data;
33 struct regmap *regmap;
34};
35
36int meson_aoclkc_probe(struct platform_device *pdev);
37#endif