mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
3054a55c5d
Add a driver to control the clock divider found in the sample clock generator of the axg audio clock controller. The sclk divider accumulates specific features which make the generic divider unsuitable to control it: - zero based divider (div = val + 1), but zero value gates the clock, so minimum divider value is 2. - lrclk variant may adjust the duty cycle depending the divider value and the 'hi' value. Acked-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
29 lines
560 B
C
29 lines
560 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright (c) 2018 BayLibre, SAS.
|
|
* Author: Jerome Brunet <jbrunet@baylibre.com>
|
|
*/
|
|
|
|
#ifndef __MESON_CLKC_AUDIO_H
|
|
#define __MESON_CLKC_AUDIO_H
|
|
|
|
#include "clkc.h"
|
|
|
|
struct meson_clk_triphase_data {
|
|
struct parm ph0;
|
|
struct parm ph1;
|
|
struct parm ph2;
|
|
};
|
|
|
|
struct meson_sclk_div_data {
|
|
struct parm div;
|
|
struct parm hi;
|
|
unsigned int cached_div;
|
|
struct clk_duty cached_duty;
|
|
};
|
|
|
|
extern const struct clk_ops meson_clk_triphase_ops;
|
|
extern const struct clk_ops meson_sclk_div_ops;
|
|
|
|
#endif /* __MESON_CLKC_AUDIO_H */
|