[PATCH 04/11] ARM: sa1100: make cpufreq driver build standalone

Viresh Kumar viresh.kumar at linaro.org
Mon Oct 24 22:07:00 PDT 2022


On 21-10-22, 17:49, Arnd Bergmann wrote:
> --- a/drivers/cpufreq/sa1110-cpufreq.c
> +++ b/drivers/cpufreq/sa1110-cpufreq.c
> @@ -29,6 +29,38 @@
>  
>  #undef DEBUG
>  
> +#define NR_FREQS	16
> +
> +/*
> + * This table is setup for a 3.6864MHz Crystal.
> + */
> +static struct cpufreq_frequency_table sa11x0_freq_table[NR_FREQS+1] = {
> +	{ .frequency = 59000,	/*  59.0 MHz */},
> +	{ .frequency = 73700,	/*  73.7 MHz */},
> +	{ .frequency = 88500,	/*  88.5 MHz */},
> +	{ .frequency = 103200,	/* 103.2 MHz */},
> +	{ .frequency = 118000,	/* 118.0 MHz */},
> +	{ .frequency = 132700,	/* 132.7 MHz */},
> +	{ .frequency = 147500,	/* 147.5 MHz */},
> +	{ .frequency = 162200,	/* 162.2 MHz */},
> +	{ .frequency = 176900,	/* 176.9 MHz */},
> +	{ .frequency = 191700,	/* 191.7 MHz */},
> +	{ .frequency = 206400,	/* 206.4 MHz */},
> +	{ .frequency = 221200,	/* 221.2 MHz */},
> +	{ .frequency = 235900,	/* 235.9 MHz */},
> +	{ .frequency = 250700,	/* 250.7 MHz */},
> +	{ .frequency = 265400,	/* 265.4 MHz */},
> +	{ .frequency = 280200,	/* 280.2 MHz */},
> +	{ .frequency = CPUFREQ_TABLE_END, },
> +};
> +
> +static unsigned int sa11x0_getspeed(unsigned int cpu)
> +{
> +	if (cpu)
> +		return 0;
> +	return sa11x0_freq_table[PPCR & 0xf].frequency;
> +}
> +
>  struct sdram_params {
>  	const char name[20];
>  	u_char  rows;		/* bits				 */

Acked-by: Viresh Kumar <viresh.kumar at linaro.org>

-- 
viresh



More information about the linux-arm-kernel mailing list