[U-Boot] [PATCH 3/6] P1021: add P1021MDS board support

Kumar Gala galak at kernel.crashing.org
Mon Jan 31 22:40:29 CET 2011


> It seems there are a number of functions here which ar actually shared
> with other files, for example board/freescale/p1022ds/ddr.c.
> 
> I wonder if it is not possible to use more common code here - especially
> given the fact that we already have a nice collection of such files:
> 
> 	board/freescale/corenet_ds/ddr.c
> 	board/freescale/mpc8536ds/ddr.c
> 	board/freescale/mpc8540ads/ddr.c
> 	board/freescale/mpc8541cds/ddr.c
> 	board/freescale/mpc8544ds/ddr.c
> 	board/freescale/mpc8548cds/ddr.c
> 	board/freescale/mpc8555cds/ddr.c
> 	board/freescale/mpc8560ads/ddr.c
> 	board/freescale/mpc8568mds/ddr.c
> 	board/freescale/mpc8569mds/ddr.c
> 	board/freescale/mpc8572ds/ddr.c
> 	board/freescale/mpc8610hpcd/ddr.c
> 	board/freescale/mpc8641hpcn/ddr.c
> 	board/freescale/p1022ds/ddr.c
> 	board/freescale/p1_p2_rdb/ddr.c
> 	board/freescale/p2020ds/ddr.c

We've already done that, the code in these files is board specific params/tuning of DDR params.


> 	
>> diff --git a/board/freescale/p1021mds/p1021mds.c b/board/freescale/p1021mds/p1021mds.c
>> new file mode 100644
>> index 0000000..c7a7e57
>> --- /dev/null
>> +++ b/board/freescale/p1021mds/p1021mds.c
> ...
>> +extern void cpu_mp_lmb_reserve(struct lmb *lmb);

We have this in <asm/mp.h> already.

Will cleanup the other guys

> Please move prototypes to header file.
> 
>> +void board_lmb_reserve(struct lmb *lmb)
>> +{
>> +	cpu_mp_lmb_reserve(lmb);
>> +}
> 
> How many board/freescale/<name>/<name>.c file share this same code?

All of our multicore parts do this, we could move this into other places like arch_lmb_reserve().

>> diff --git a/board/freescale/p1021mds/tlb.c b/board/freescale/p1021mds/tlb.c
>> new file mode 100644
>> index 0000000..30af6dd
>> --- /dev/null
>> +++ b/board/freescale/p1021mds/tlb.c
> 
> How much of this is actually different from - say -
> board/freescale/p1022ds/tlb.c ?

Its mostly board specific.

- k


More information about the U-Boot mailing list