[U-Boot] [PATCH 1/2] Removed CONFIG_NUM_CPUS for 85xx and 86xxFreescale processors.

Kumar Gala kumar.gala at freescale.com
Wed Jul 22 17:06:53 CEST 2009


On Jul 22, 2009, at 5:14 AM, Aggrwal Poonam-B10812 wrote:

>>
>> ...
>>> --- a/cpu/mpc86xx/cpu.c
>>> +++ b/cpu/mpc86xx/cpu.c
>> ...
>>> +int probecpu (void)
>>> +{
>>> +	uint svr;
>>> +	uint ver;
>>> +
>>> +	svr = get_svr();
>>> +	ver = SVR_SOC_VER(svr);
>>> +
>>> +	gd->cpu = identify_cpu(ver);
>>> +
>>> +	return 0;
>>> +}
>>> +
>>> +int cpu_numcores() {
>>> +	struct cpu_type *cpu;
>>> +	cpu = gd->cpu;
>>> +	return cpu->num_cores;
>>> +}
>>> +
>>
>> This seems to be identically repeated code. Please factor out
>> into common code.
> Actually the files cpu/mpc86xx/cpu.c cpu/mpc85xx/cpu.c are quite
> identical.
> Kumar, Please suggest how should this be taken care.
> Probably a single file to take care of 85xx and 86xx don't know?

We can move the code into cpu/mpc8xxx/cpu.c

- k


More information about the U-Boot mailing list