[U-Boot] [PATCH] 86xx: Cleanup MP support

Kumar Gala galak at kernel.crashing.org
Wed Apr 1 17:56:37 CEST 2009


>> diff --git a/cpu/mpc85xx/mp.h b/cpu/mpc85xx/mp.h
>> index 4329286..b06707f 100644
>> --- a/cpu/mpc85xx/mp.h
>> +++ b/cpu/mpc85xx/mp.h
>> @@ -5,6 +5,7 @@ ulong get_spin_addr(void);
>> void setup_mp(void);
>> u32 get_my_id(void);
>> void cpu_mp_lmb_reserve(struct lmb *lmb);
>> +u32 determine_bootpg(void);
>
> This hunk is bogus - it's wrong, and doesn't belong in this patch,  
> anyway.

oops, thought I had caught that.

>> #define BOOT_ENTRY_ADDR_UPPER	0
>> #define BOOT_ENTRY_ADDR_LOWER	1



>> diff --git a/cpu/mpc86xx/mp.c b/cpu/mpc86xx/mp.c
>> index 5014401..b4c6b79 100644
>> --- a/cpu/mpc86xx/mp.c
>> +++ b/cpu/mpc86xx/mp.c
>> @@ -8,16 +8,39 @@
>>
>> DECLARE_GLOBAL_DATA_PTR;
>>
>> -#if (CONFIG_NUM_CPUS > 1)
>> -void cpu_mp_lmb_reserve(struct lmb *lmb)
>> +int cpu_reset(int nr)
>> +{
>> +	volatile immap_t *immr = (immap_t *)CONFIG_SYS_IMMR;
>> +	volatile ccsr_pic_t *pic = &immr->im_pic;
>> +	out_be32(&pic->pir, 1 << nr);
>> +	(void)in_be32(&pic->pir);
>> +	out_be32(&pic->pir, 0x0);
>> +
>> +	return 0;
>> +}
>> +
>> +int cpu_status(int nr)
>> +{
>> +	return 1;
>> +}
>> +
>> +int cpu_release(int nr, int argc, char *argv[])
>> {
>> -	u32 bootpg;
>> +	return 1;
>> +}
>
> Should probably add comments as to why these do nothing right now....

will do.

>> +u32 determine_mp_bootpg(void)
>> +{
>> 	/* if we have 4G or more of memory, put the boot page at 4Gb-1M */
>> 	if ((u64)gd->ram_size > 0xfffff000)
>> -		bootpg = 0xfff00000;
>> -	else
>> -		bootpg = gd->ram_size - (1024 * 1024);
>> +		return (0xfff00000);
>> +
>> +	return (gd->ram_size - (1024 * 1024));
>
> Seems like we might want to define a BOOTPG_ALIGN somewhere, even if  
> it's just at the top of this file for the moment.  At some  
> point(later is fine) we need to talk about creating a common spot  
> for code like this, because once there's  BOOTPG_ALIGN defined, this  
> code could be common between 85xx/86xx. (There's other code in this  
> file that could likely be made common between platforms.... so I  
> consider that a future item, not something that should affect the  
> acceptance of this patch).

I don't plan on adding BOOTPG_ALIGN at this point.  I agree that some  
of this code is common and get be refactored into cpu/mpc8xxx/ but I  
leave that for a future patch and will let that patch deal w/ 
BOOTPG_ALIGN.

- k


More information about the U-Boot mailing list