mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 14:30:58 +07:00
d2912cb15b
Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
55 lines
1.5 KiB
C
55 lines
1.5 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (C) 2003 Deep Blue Solutions, Ltd, All Rights Reserved.
|
|
*
|
|
* Support functions for calculating clocks/divisors for the ICST
|
|
* clock generators. See http://www.idt.com/ for more information
|
|
* on these devices.
|
|
*/
|
|
#ifndef ICST_H
|
|
#define ICST_H
|
|
|
|
struct icst_params {
|
|
unsigned long ref;
|
|
unsigned long vco_max; /* inclusive */
|
|
unsigned long vco_min; /* exclusive */
|
|
unsigned short vd_min; /* inclusive */
|
|
unsigned short vd_max; /* inclusive */
|
|
unsigned char rd_min; /* inclusive */
|
|
unsigned char rd_max; /* inclusive */
|
|
const unsigned char *s2div; /* chip specific s2div array */
|
|
const unsigned char *idx2s; /* chip specific idx2s array */
|
|
};
|
|
|
|
struct icst_vco {
|
|
unsigned short v;
|
|
unsigned char r;
|
|
unsigned char s;
|
|
};
|
|
|
|
unsigned long icst_hz(const struct icst_params *p, struct icst_vco vco);
|
|
struct icst_vco icst_hz_to_vco(const struct icst_params *p, unsigned long freq);
|
|
|
|
/*
|
|
* ICST307 VCO frequency must be between 6MHz and 200MHz (3.3 or 5V).
|
|
* This frequency is pre-output divider.
|
|
*/
|
|
#define ICST307_VCO_MIN 6000000
|
|
#define ICST307_VCO_MAX 200000000
|
|
|
|
extern const unsigned char icst307_s2div[];
|
|
extern const unsigned char icst307_idx2s[];
|
|
|
|
/*
|
|
* ICST525 VCO frequency must be between 10MHz and 200MHz (3V) or 320MHz (5V).
|
|
* This frequency is pre-output divider.
|
|
*/
|
|
#define ICST525_VCO_MIN 10000000
|
|
#define ICST525_VCO_MAX_3V 200000000
|
|
#define ICST525_VCO_MAX_5V 320000000
|
|
|
|
extern const unsigned char icst525_s2div[];
|
|
extern const unsigned char icst525_idx2s[];
|
|
|
|
#endif
|