[U-Boot] [PATCH] powerpc: add support for the Freescale P1022DS reference board

Timur Tabi timur at freescale.com
Tue May 25 20:30:14 CEST 2010


Wolfgang Denk wrote:

>> +	{  0, 333,    1,    5,  31,    3,  0},
>> +	{334, 400,    1,    5,  31,    3,  0},
>> +	{401, 549,    1,    5,  31,    3,  0},
>> +	{550, 680,    1,    5,  31,    5,  0},
>> +	{681, 850,    1,    5,  31,    5,  0},
>> +	{  0, 333,    2,    5,  31,    3,  0},
>> +	{334, 400,    2,    5,  31,    3,  0},
>> +	{401, 549,    2,    5,  31,    3,  0},
>> +	{550, 680,    2,    5,  31,    5,  0},
>> +	{681, 850,    2,    5,  31,    5,  0},
> 
> Please use TABs for vertical alignment.

Ok, I understand now what you mean.  However, the columns are
right-justified.  You can't use tabs to align right-justified columns.

>> +phys_size_t initdram(int board_type)
>> +{
>> +	phys_size_t dram_size = 0;
>> +
>> +	puts("Initializing....\n");
>> +
>> +	dram_size = fsl_ddr_sdram();
>> +	dram_size = setup_ddr_tlbs(dram_size / 0x100000);
>> +	dram_size *= 0x100000;
>> +
>> +	puts("    DDR: ");
>> +	return dram_size;
> 
> How about using get_ram_size() for autosizing / testing?

It appears get_ram_size() has never been used on PowerPC before.   This
function writes data to memory in blocks and reads it back.  In my
experience, attempting to access memory that doesn't exist will generate a
machine check and cause U-Boot to hang.

In addition, we only create a TLB to map the lower 2GB, no matter how much
memory is in the system.  But the initdram() function returns the full size
of RAM, no matter how big it is.  So won't get_ram_size() always fail if I
have more than 2GB of RAM?

-- 
Timur Tabi
Linux kernel developer at Freescale


More information about the U-Boot mailing list