// SPDX-License-Identifier: GPL-2.0-only /* * linux/arch/arm/common/icst307.c * * Copyright (C) 2003 Deep Blue Solutions, Ltd, All Rights Reserved. * * Support functions for calculating clocks/divisors for the ICST307 * clock generators. See https://www.idt.com/ for more information * on these devices. * * This is an almost identical implementation to the ICST525 clock generator. * The s2div and idx2s files are different
*/ #include <linux/module.h> #include <linux/kernel.h> #include <asm/div64.h> #include"icst.h"
/* * First, find the PLL output divisor such * that the PLL output is within spec.
*/ do {
f = freq * p->s2div[p->idx2s[i]];
if (f > p->vco_min && f <= p->vco_max) break;
i++;
} while (i < 8);
if (i >= 8) return vco;
vco.s = p->idx2s[i];
/* * Now find the closest divisor combination * which gives a PLL output of 'f'.
*/ for (rd = p->rd_min; rd <= p->rd_max; rd++) { unsignedlong fref_div, f_pll; unsignedint vd; int f_diff;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.