From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timur Tabi Date: Tue, 25 May 2010 13:30:14 -0500 Subject: [U-Boot] [PATCH] powerpc: add support for the Freescale P1022DS reference board In-Reply-To: <20100520223324.50594CCF026@gemini.denx.de> References: <1274392909-16422-1-git-send-email-timur@freescale.com> <20100520223324.50594CCF026@gemini.denx.de> Message-ID: <4BFC1736.5030902@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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