[PATCH v4] davinci: Support various speedgrades for MityDSP-L138 and MityARM-1808 SoMs

Michael Williamson michael.williamson at criticallink.com
Tue Jan 4 07:23:42 EST 2011


On 1/4/2011 4:35 AM, Nori, Sekhar wrote:

> On Mon, Jan 03, 2011 at 18:51:45, Michael Williamson wrote:
>> For the MityDSP-L138/MityARM-1808 SoMs, the speed grade can be determined
>> from the part number string read from the factory configuration block on
>> the on-board I2C PROM.  Configure the maximum CPU speed based on this
>> information.
>>
>> This patch was tested using a MityDSP-L138 and MityARM-1808 at various
>> speedgrades.  Also, for code coverage, a bogus configuration was tested
>> as well as a configuration having an unknown part number.
> 
> Thanks for the extensive testing. This looks good to me, except,
> a whitespace nit below. But otherwise:
> 
> Reviewed-by: Sekhar Nori <nsekhar at ti.com>
> 
>> +#ifdef CONFIG_CPU_FREQ
>> +static void mityomapl138_cpufreq_init(const char *partnum)
>> +{
>> +	int i, ret;
>> +
>> +	for (i = 0; partnum && i < ARRAY_SIZE(mityomapl138_pn_info); i++) {
>> +		/*
>> +		 * the part number has additional characters beyond what is
>> +		 * stored in the table.  This information is not needed for
>> +		 * determining the speed grade, and would require several
>> +		 * more table entries.  Only check the first N characters
>> +		 * for a match.
>> +		 */
>> +		if (!strncmp(partnum, mityomapl138_pn_info[i].part_no,
>> +			strlen(mityomapl138_pn_info[i].part_no))) {
>> +			da850_max_speed = mityomapl138_pn_info[i].max_freq;
>> +			break;
> 
> The indentation here makes it look like strlen is part of if()
> body. May be you can indent it substantially to the right. I will
> leave it to your judgment.
> 
> Thanks,
> Sekhar



I will align the strlen up to the partnum argument above and resubmit.

Thanks for the review.

-Mike




More information about the linux-arm-kernel mailing list