/* sdhci_s3c_consider_clock - consider one the bus clocks for current setting @ourhost: Our SDHCI instance. @src: The source clock index. @wanted: The clock frequency wanted.  */
static unsigned int sdhci_s3c_consider_clock(struct sdhci_s3c *ourhost, unsigned int src, unsigned int wanted)
/* sdhci_s3c_consider_clock - consider one the bus clocks for current setting @ourhost: Our SDHCI instance. @src: The source clock index. @wanted: The clock frequency wanted.  */
static unsigned int sdhci_s3c_consider_clock(struct sdhci_s3c *ourhost, unsigned int src, unsigned int wanted)
{
	unsigned long rate;
	struct clk *clksrc = ourhost->clk_bus[src];
	int div;
	if (!clksrc)
		return UINT_MAX;
	rate = clk_get_rate(clksrc);
	for (div = 1; div < 256; div *= 2) {
		if ((rate / div) <= wanted)
			break;
	}
	dev_dbg(&ourhost->pdev->dev, "clk %d: rate %ld, want %d, got %ld\n",
		src, rate, wanted, rate / div);
	return (wanted - (rate / div));
}